mirror of
https://github.com/zadam/trilium.git
synced 2026-07-08 11:22:31 +02:00
Merge remote-tracking branch 'origin/main' into chore/audit
; Conflicts: ; pnpm-lock.yaml
This commit is contained in:
@@ -709,7 +709,8 @@
|
||||
"advanced": "高级",
|
||||
"export_as_image": "导出为图像",
|
||||
"export_as_image_png": "PNG(栅格)",
|
||||
"export_as_image_svg": "SVG(矢量图)"
|
||||
"export_as_image_svg": "SVG(矢量图)",
|
||||
"view_ocr_text": "查看 OCR 文本"
|
||||
},
|
||||
"onclick_button": {
|
||||
"no_click_handler": "按钮组件'{{componentId}}'没有定义点击处理程序"
|
||||
@@ -1197,12 +1198,28 @@
|
||||
},
|
||||
"images": {
|
||||
"images_section_title": "图片",
|
||||
"download_images_automatically": "自动下载图片以供离线使用。",
|
||||
"download_images_description": "粘贴的 HTML 可能包含在线图片的引用,Trilium 会找到这些引用并下载图片,以便它们可以离线使用。",
|
||||
"enable_image_compression": "启用图片压缩",
|
||||
"max_image_dimensions": "图片的最大宽度/高度(超过此限制的图像将会被缩放)。",
|
||||
"jpeg_quality_description": "JPEG 质量(10 - 最差质量,100 最佳质量,建议为 50 - 85)",
|
||||
"max_image_dimensions_unit": "像素"
|
||||
"download_images_automatically": "自动下载图片",
|
||||
"download_images_description": "从粘贴的 HTML 代码中下载引用的在线图片,以便离线使用。",
|
||||
"enable_image_compression": "图片压缩",
|
||||
"max_image_dimensions": "最大图像尺寸",
|
||||
"jpeg_quality_description": "建议范围为 50–85。较低的值可以减小文件大小,较高的值可以保留细节。",
|
||||
"max_image_dimensions_unit": "像素",
|
||||
"enable_image_compression_description": "上传或粘贴图片时,对其进行压缩和调整大小。",
|
||||
"max_image_dimensions_description": "超过此尺寸的图片将自动调整大小。",
|
||||
"jpeg_quality": "JPEG质量",
|
||||
"ocr_section_title": "文本提取(OCR)",
|
||||
"ocr_related_content_languages": "内容语言(用于文本提取)",
|
||||
"ocr_auto_process": "自动处理新文件",
|
||||
"ocr_auto_process_description": "自动从新上传或粘贴的文件中提取文本。",
|
||||
"ocr_min_confidence": "最低置信度",
|
||||
"ocr_confidence_description": "仅提取置信度高于此阈值的文本。较低的置信度阈值会包含更多文本,但可能准确性较低。",
|
||||
"batch_ocr_title": "处理现有文件",
|
||||
"batch_ocr_description": "从笔记中的所有现有图像、PDF 和 Office 文档中提取文本。这可能需要一些时间,具体取决于文件数量。",
|
||||
"batch_ocr_start": "开始批量处理",
|
||||
"batch_ocr_starting": "开始批量处理...",
|
||||
"batch_ocr_progress": "正在处理 {{processed}} 个文件,共 {{total}} 个文件...",
|
||||
"batch_ocr_completed": "批量处理完成!已处理 {{processed}} 个文件。",
|
||||
"batch_ocr_error": "批量处理过程中出错:{{error}}"
|
||||
},
|
||||
"attachment_erasure_timeout": {
|
||||
"attachment_erasure_timeout": "附件清理超时",
|
||||
@@ -2227,7 +2244,7 @@
|
||||
"searching_web": "在网上搜索…",
|
||||
"web_search": "联网搜索",
|
||||
"sources": "来源",
|
||||
"extended_thinking": "深度思考",
|
||||
"extended_thinking": "延伸思考",
|
||||
"legacy_models": "传统模型",
|
||||
"thinking": "正在思考...",
|
||||
"thought_process": "思考过程",
|
||||
@@ -2235,6 +2252,60 @@
|
||||
"input": "输入",
|
||||
"result": "结果",
|
||||
"error": "错误",
|
||||
"tool_error": "失败"
|
||||
"tool_error": "失败",
|
||||
"total_tokens": "{{total}} 个词元",
|
||||
"tokens_detail": "{{prompt}} 提示词 + {{completion}} 补全",
|
||||
"tokens_used": "{{prompt}} 提示词 + {{completion}} 补全 = {{total}} 个词元",
|
||||
"tokens_used_with_cost": "{{prompt}} 提示词 + {{completion}} 补全 = {{total}} 个词元(约 ${{cost}})",
|
||||
"tokens_used_with_model": "{{model}}: {{prompt}} 提示词 + {{completion}} 补全 = {{total}} 个词元",
|
||||
"tokens_used_with_model_and_cost": "{{model}}: {{prompt}} 提示词 + {{completion}} 补全 = {{total}} 个词元(约 ${{cost}})",
|
||||
"tokens": "词元",
|
||||
"context_used": "{{percentage}}% 使用率",
|
||||
"note_context_enabled": "点击即可禁用笔记上下文:{{title}}",
|
||||
"note_context_disabled": "点击即可将当前注释添加到上下文中",
|
||||
"no_provider_message": "未配置人工智能提供商。添加一个即可开始对话。",
|
||||
"add_provider": "添加人工智能提供商",
|
||||
"note_tools": "笔记访问"
|
||||
},
|
||||
"sidebar_chat": {
|
||||
"title": "AI对话",
|
||||
"launcher_title": "打开AI对话",
|
||||
"new_chat": "开始新对话",
|
||||
"save_chat": "将对话保存到笔记",
|
||||
"empty_state": "开始对话",
|
||||
"history": "对话历史",
|
||||
"recent_chats": "最近对话",
|
||||
"no_chats": "无历史对话"
|
||||
},
|
||||
"ocr": {
|
||||
"extracted_text": "提取文本(OCR)",
|
||||
"extracted_text_title": "提取文本(OCR)",
|
||||
"loading_text": "正在加载OCR文本...",
|
||||
"no_text_available": "暂无OCR文本",
|
||||
"no_text_explanation": "该笔记未进行 OCR 文本提取处理,或未找到文本。",
|
||||
"failed_to_load": "OCR文本加载失败",
|
||||
"process_now": "处理 OCR",
|
||||
"processing": "正在处理...",
|
||||
"processing_started": "OCR识别已开始。请稍候片刻并刷新页面。",
|
||||
"processing_failed": "OCR处理启动失败",
|
||||
"view_extracted_text": "查看提取的文本(OCR)"
|
||||
},
|
||||
"mind-map": {
|
||||
"addChild": "添加子节点",
|
||||
"addParent": "添加父节点",
|
||||
"addSibling": "添加同级节点",
|
||||
"removeNode": "删除节点",
|
||||
"focus": "专注模式",
|
||||
"cancelFocus": "退出专注模式",
|
||||
"moveUp": "上移",
|
||||
"moveDown": "下移",
|
||||
"link": "链接",
|
||||
"linkBidirectional": "双向链接",
|
||||
"clickTips": "请点击目标节点",
|
||||
"summary": "总结"
|
||||
},
|
||||
"llm": {
|
||||
"settings_description": "配置人工智能和大语言模型集成。",
|
||||
"add_provider": "添加提供商"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2113,9 +2113,7 @@
|
||||
"note_context_enabled": "Cliquez pour désactiver le contexte de la note : {{title}}",
|
||||
"note_context_disabled": "Cliquez pour inclure la note actuelle dans le contexte",
|
||||
"no_provider_message": "Aucun fournisseur d'IA configuré. Ajoutez en un pour commencer à discuter.",
|
||||
"add_provider": "Ajouter un fournisseur d'IA",
|
||||
"role_user": "Vous",
|
||||
"role_assistant": "Assistant"
|
||||
"add_provider": "Ajouter un fournisseur d'IA"
|
||||
},
|
||||
"sidebar_chat": {
|
||||
"title": "discussion IA",
|
||||
|
||||
@@ -2308,9 +2308,7 @@
|
||||
"note_context_enabled": "Cliceáil chun comhthéacs nótaí a dhíchumasú: {{title}}",
|
||||
"note_context_disabled": "Cliceáil chun an nóta reatha a chur san áireamh i gcomhthéacs",
|
||||
"no_provider_message": "Níl aon soláthraí AI cumraithe. Cuir ceann leis chun comhrá a thosú.",
|
||||
"add_provider": "Cuir Soláthraí AI leis",
|
||||
"role_user": "Tusa",
|
||||
"role_assistant": "Cúntóir"
|
||||
"add_provider": "Cuir Soláthraí AI leis"
|
||||
},
|
||||
"sidebar_chat": {
|
||||
"title": "Comhrá AI",
|
||||
|
||||
@@ -2278,9 +2278,7 @@
|
||||
"note_context_enabled": "Clicca qui per disattivare il contesto della nota: {{title}}",
|
||||
"note_context_disabled": "Clicca per includere la nota corrente nel contesto",
|
||||
"no_provider_message": "Non è stato configurato alcun fornitore di IA. Aggiungine uno per iniziare a chattare.",
|
||||
"add_provider": "Aggiungi un fornitore di IA",
|
||||
"role_user": "Tu",
|
||||
"role_assistant": "Assistente"
|
||||
"add_provider": "Aggiungi un fornitore di IA"
|
||||
},
|
||||
"sidebar_chat": {
|
||||
"title": "Chat AI",
|
||||
|
||||
@@ -486,7 +486,8 @@
|
||||
"advanced": "高度",
|
||||
"export_as_image": "画像としてエクスポート",
|
||||
"export_as_image_png": "PNG (raster)",
|
||||
"export_as_image_svg": "SVG (vector)"
|
||||
"export_as_image_svg": "SVG (vector)",
|
||||
"view_ocr_text": "OCR テキストを表示"
|
||||
},
|
||||
"command_palette": {
|
||||
"export_note_title": "ノートをエクスポート",
|
||||
@@ -898,12 +899,28 @@
|
||||
},
|
||||
"images": {
|
||||
"images_section_title": "画像",
|
||||
"download_images_automatically": "画像を自動的にダウンロードしてオフラインで使用可能にする。",
|
||||
"download_images_description": "貼り付けられたHTMLにはオンライン画像への参照が含まれていることがありますが、Triliumはそれらの参照を見つけて画像をダウンロードし、オフラインで利用できるようにします。",
|
||||
"enable_image_compression": "画像の圧縮を有効にする",
|
||||
"max_image_dimensions": "画像の最大幅/高さ(この設定を超えると画像はリサイズされます)。",
|
||||
"download_images_automatically": "画像を自動的にダウンロードする。",
|
||||
"download_images_description": "貼り付けた HTML 内の参照画像をダウンロードし、オフラインでも利用できるようにする。",
|
||||
"enable_image_compression": "画像の圧縮",
|
||||
"max_image_dimensions": "画像の最大サイズ",
|
||||
"max_image_dimensions_unit": "ピクセル",
|
||||
"jpeg_quality_description": "JPEGの品質(10 - 最低品質、100 - 最高品質、50 - 80を推奨)"
|
||||
"jpeg_quality_description": "推奨範囲は50~85です。値が低いほどファイルサイズが小さくなり、値が高いほどディテールが保持されます。",
|
||||
"enable_image_compression_description": "画像をアップロードまたは貼り付ける際に、画像を圧縮およびサイズ変更します。",
|
||||
"max_image_dimensions_description": "このサイズを超える画像は自動的にサイズ変更されます",
|
||||
"jpeg_quality": "JPEG 画質",
|
||||
"ocr_section_title": "テキスト抽出(OCR)",
|
||||
"ocr_related_content_languages": "コンテンツ言語(テキスト抽出に使用)",
|
||||
"ocr_auto_process": "新しいファイルを自動処理",
|
||||
"ocr_auto_process_description": "新しくアップロードまたは貼り付けられたファイルからテキストを自動的に抽出します。",
|
||||
"ocr_min_confidence": "最低限の信頼度",
|
||||
"ocr_confidence_description": "この信頼度閾値以上のテキストのみを抽出します。信頼度が低いほど抽出されるテキストの量は増えますが、精度が低下する可能性があります。",
|
||||
"batch_ocr_title": "既存ファイルの処理",
|
||||
"batch_ocr_description": "ノート内の既存の画像、PDF、Office 文書からテキストを抽出します。ファイル数によっては時間がかかる場合があります。",
|
||||
"batch_ocr_start": "バッチ処理を開始します",
|
||||
"batch_ocr_starting": "バッチ処理を開始しています...",
|
||||
"batch_ocr_progress": "{{total}} ファイルのうち {{processed}} ファイルを処理中...",
|
||||
"batch_ocr_completed": "バッチ処理が完了しました!{{processed}} ファイルを処理しました。",
|
||||
"batch_ocr_error": "バッチ処理中にエラーが発生しました: {{error}}"
|
||||
},
|
||||
"search_engine": {
|
||||
"title": "検索エンジン",
|
||||
@@ -916,7 +933,7 @@
|
||||
"custom_name_label": "カスタム検索エンジンの名前",
|
||||
"custom_name_placeholder": "カスタム検索エンジンの名前",
|
||||
"custom_url_label": "カスタム検索エンジンのURLには、検索語句のプレースホルダーとして {keyword} を含める必要があります。",
|
||||
"custom_url_placeholder": "カスタム検索エンジンのurl",
|
||||
"custom_url_placeholder": "検索エンジンの URL をカスタマイズ",
|
||||
"save_button": "保存"
|
||||
},
|
||||
"tray": {
|
||||
@@ -1103,7 +1120,7 @@
|
||||
"calendar_root": "dayノートのルートとして使用するノートをマークします。このようにマークできるのは 1 つだけです。",
|
||||
"archived": "このラベルの付いたノートは、デフォルトでは検索結果に表示されません (ジャンプ先、リンクの追加ダイアログなどにも表示されません)。",
|
||||
"exclude_from_export": "ノート(サブツリーを含む)はノートのエクスポートには含まれません",
|
||||
"run": "どのイベントでスクリプトを実行するかを定義します。可能な値は次の通り:\n<ul>\n<li>frontendStartup - Trilium フロントエンドが起動(または更新)されたとき。モバイルは除く</li>\n<li>mobileStartup - モバイルで Trilium フロントエンドが起動(または更新)されたとき。</li>\n<li>backendStartup - Trilium バックエンドが起動したとき</li>\n<li>hourly - 1時間に1回実行します。 <code>runAtHour</code> というラベルを追加して、実行時刻を指定できます。</li>\n<li>daily - 1日に1回実行</li>\n</ul>",
|
||||
"run": "スクリプトを実行するイベントを定義します。指定可能な値は以下の通りです:\n<ul>\n<li>frontendStartup - Trilium フロントエンドの起動時(または更新時)に実行されます。モバイルでは実行されません。</li>\n<li>mobileStartup - モバイルでの Trilium フロントエンドの起動時(または更新時)に実行されます。</li>\n<li>backendStartup - Trilium バックエンドの起動時。</li>\n<li>hourly - 1時間ごとに実行。 <code>runAtHour</code> というラベルを追加することで、実行時刻を指定できます。</li>\n<li>daily - 1日に1回実行。</li>\n</ul>",
|
||||
"run_on_instance": "どの Trilium インスタンスでこれを実行するかを定義します。デフォルトはすべてのインスタンスです。",
|
||||
"run_at_hour": "何時に実行するかを指定します。 <code>#run=hourly</code> と併用してください。1日に複数回実行したい場合は、複数回定義できます。",
|
||||
"disable_inclusion": "このラベルが付いたスクリプトは親スクリプトの実行には含まれません。",
|
||||
@@ -1391,7 +1408,7 @@
|
||||
},
|
||||
"content_language": {
|
||||
"title": "コンテンツの言語",
|
||||
"description": "読み取り専用または編集可能なテキストノートの基本プロパティセクションの言語選択に表示する言語を 1 つ以上選択します。これにより、スペルチェックや右から左へのサポートなどの機能が利用できるようになります。"
|
||||
"description": "読み取り専用または編集可能なテキストノートの基本プロパティセクションの言語選択に表示する言語を 1 つ以上選択してください。これにより、スペルチェック、右から左へのサポート、テキスト抽出(OCR)などの機能が利用できるようになります。"
|
||||
},
|
||||
"png_export_button": {
|
||||
"button_title": "図をPNG形式でエクスポート"
|
||||
@@ -2248,9 +2265,7 @@
|
||||
"note_context_enabled": "クリックしてノートのコンテキストを無効にする: {{title}}",
|
||||
"note_context_disabled": "クリックして現在のノートをコンテキストに含める",
|
||||
"no_provider_message": "AI プロバイダーが設定されていません。チャットを開始するには、プロバイダーを追加してください。",
|
||||
"add_provider": "AI プロバイダーを追加",
|
||||
"role_user": "あなた",
|
||||
"role_assistant": "アシスタント"
|
||||
"add_provider": "AI プロバイダーを追加"
|
||||
},
|
||||
"sidebar_chat": {
|
||||
"title": "AI チャット",
|
||||
@@ -2291,5 +2306,18 @@
|
||||
"api_key": "API キー",
|
||||
"api_key_placeholder": "API キーを入力してください",
|
||||
"cancel": "キャンセル"
|
||||
},
|
||||
"ocr": {
|
||||
"extracted_text": "抽出されたテキスト(OCR)",
|
||||
"extracted_text_title": "抽出されたテキスト(OCR)",
|
||||
"loading_text": "OCR テキストを読み込んでいます…",
|
||||
"no_text_available": "OCR テキストが見つかりません",
|
||||
"no_text_explanation": "このノートは OCR テキスト抽出処理が行われなかったか、テキストが見つかりませんでした。",
|
||||
"failed_to_load": "OCR テキストの読み込みに失敗しました",
|
||||
"process_now": "OCR 処理",
|
||||
"processing": "処理中…",
|
||||
"processing_started": "OCR 処理が開始されました。しばらくお待ちいただき、ページを更新してください。",
|
||||
"processing_failed": "OCR 処理の開始に失敗しました",
|
||||
"view_extracted_text": "抽出されたテキスト(OCR)を表示"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2246,8 +2246,6 @@
|
||||
"note_context_disabled": "Нажмите, чтобы включить текущую заметку в контекст",
|
||||
"no_provider_message": "Не выбран провайдер ИИ. Добавьте его для начала общения.",
|
||||
"add_provider": "Добавить провайдера ИИ",
|
||||
"role_user": "Вы",
|
||||
"role_assistant": "Ассистент",
|
||||
"tokens_detail": "{{prompt}} (промт) + {{completion}} (ответ)",
|
||||
"tokens_used": "{{prompt}} (промт) + {{completion}} (ответ) = {{total}} токен(а/ов)",
|
||||
"tokens_used_with_cost": "{{prompt}} (промт) + {{completion}} (ответ) = {{total}} токен(а/ов) (~${{cost}})",
|
||||
|
||||
@@ -205,7 +205,7 @@ export default function CKEditorWithWatchdog({ containerRef: externalContainerRe
|
||||
watchdog.on("stateChange", () => onWatchdogStateChange(watchdog));
|
||||
}
|
||||
|
||||
await watchdog.create(container);
|
||||
await watchdog.create(container, {});
|
||||
};
|
||||
|
||||
init();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import utils from "../../../services/utils.js";
|
||||
import options from "../../../services/options.js";
|
||||
import IconAlignCenter from "@ckeditor/ckeditor5-icons/theme/icons/align-center.svg?raw";
|
||||
import { IconAlignCenter } from "@ckeditor/ckeditor5-icons";
|
||||
|
||||
const TEXT_FORMATTING_GROUP = {
|
||||
label: "Text formatting",
|
||||
|
||||
@@ -299,7 +299,7 @@
|
||||
"shortcuts-title": "ショートカット",
|
||||
"text-notes": "テキストノート",
|
||||
"code-notes-title": "コードノート",
|
||||
"images-title": "画像",
|
||||
"images-title": "メディア",
|
||||
"spellcheck-title": "スペルチェック",
|
||||
"password-title": "パスワード",
|
||||
"backup-title": "バックアップ",
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"@typescript-eslint/parser": "8.58.0",
|
||||
"@vitest/browser": "4.1.2",
|
||||
"@vitest/coverage-istanbul": "4.1.2",
|
||||
"ckeditor5": "47.6.1",
|
||||
"ckeditor5": "48.0.0",
|
||||
"eslint": "10.1.0",
|
||||
"eslint-config-ckeditor5": ">=9.1.0",
|
||||
"http-server": "14.1.1",
|
||||
@@ -42,7 +42,7 @@
|
||||
"webdriverio": "9.27.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ckeditor5": "47.6.1"
|
||||
"ckeditor5": "48.0.0"
|
||||
},
|
||||
"author": "Elian Doran <contact@eliandoran.me>",
|
||||
"license": "GPL-2.0-or-later",
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"@typescript-eslint/parser": "8.58.0",
|
||||
"@vitest/browser": "4.1.2",
|
||||
"@vitest/coverage-istanbul": "4.1.2",
|
||||
"ckeditor5": "47.6.1",
|
||||
"ckeditor5": "48.0.0",
|
||||
"eslint": "10.1.0",
|
||||
"eslint-config-ckeditor5": ">=9.1.0",
|
||||
"http-server": "14.1.1",
|
||||
@@ -43,7 +43,7 @@
|
||||
"webdriverio": "9.27.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ckeditor5": "47.6.1"
|
||||
"ckeditor5": "48.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node ./scripts/build-dist.mjs",
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"@typescript-eslint/parser": "8.58.0",
|
||||
"@vitest/browser": "4.1.2",
|
||||
"@vitest/coverage-istanbul": "4.1.2",
|
||||
"ckeditor5": "47.6.1",
|
||||
"ckeditor5": "48.0.0",
|
||||
"eslint": "10.1.0",
|
||||
"eslint-config-ckeditor5": ">=9.1.0",
|
||||
"http-server": "14.1.1",
|
||||
@@ -45,7 +45,7 @@
|
||||
"webdriverio": "9.27.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ckeditor5": "47.6.1"
|
||||
"ckeditor5": "48.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node ./scripts/build-dist.mjs",
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"@typescript-eslint/parser": "8.58.0",
|
||||
"@vitest/browser": "4.1.2",
|
||||
"@vitest/coverage-istanbul": "4.1.2",
|
||||
"ckeditor5": "47.6.1",
|
||||
"ckeditor5": "48.0.0",
|
||||
"eslint": "10.1.0",
|
||||
"eslint-config-ckeditor5": ">=9.1.0",
|
||||
"http-server": "14.1.1",
|
||||
@@ -45,7 +45,7 @@
|
||||
"webdriverio": "9.27.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ckeditor5": "47.6.1"
|
||||
"ckeditor5": "48.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node ./scripts/build-dist.mjs",
|
||||
@@ -70,7 +70,7 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@ckeditor/ckeditor5-icons": "47.6.1",
|
||||
"@ckeditor/ckeditor5-icons": "48.0.0",
|
||||
"mathlive": "0.109.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { ButtonView, FocusCycler, FocusTracker, KeystrokeHandler, LabelView, submitHandler, SwitchButtonView, View, ViewCollection, type FocusableView, type Locale } from 'ckeditor5';
|
||||
import IconCheck from "@ckeditor/ckeditor5-icons/theme/icons/check.svg?raw";
|
||||
import IconCancel from "@ckeditor/ckeditor5-icons/theme/icons/cancel.svg?raw";
|
||||
import { IconCheck, IconCancel } from "@ckeditor/ckeditor5-icons";
|
||||
import { extractDelimiters, hasDelimiters } from '../utils.js';
|
||||
import MathView, { type MathViewOptions } from './mathview.js';
|
||||
import MathInputView from './mathinputview.js';
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"@typescript-eslint/parser": "8.58.0",
|
||||
"@vitest/browser": "4.1.2",
|
||||
"@vitest/coverage-istanbul": "4.1.2",
|
||||
"ckeditor5": "47.6.1",
|
||||
"ckeditor5": "48.0.0",
|
||||
"eslint": "10.1.0",
|
||||
"eslint-config-ckeditor5": ">=9.1.0",
|
||||
"http-server": "14.1.1",
|
||||
@@ -45,7 +45,7 @@
|
||||
"webdriverio": "9.27.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ckeditor5": "47.6.1"
|
||||
"ckeditor5": "48.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node ./scripts/build-dist.mjs",
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
"@triliumnext/ckeditor5-keyboard-marker": "workspace:*",
|
||||
"@triliumnext/ckeditor5-math": "workspace:*",
|
||||
"@triliumnext/ckeditor5-mermaid": "workspace:*",
|
||||
"ckeditor5": "47.6.1",
|
||||
"ckeditor5-premium-features": "47.6.1"
|
||||
"ckeditor5": "48.0.0",
|
||||
"ckeditor5-premium-features": "48.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@smithy/middleware-retry": "4.4.46",
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
import type { Editor } from 'ckeditor5';
|
||||
import type { SlashCommandEditorConfig } from 'ckeditor5-premium-features';
|
||||
import { icons as footnoteIcons } from '@triliumnext/ckeditor5-footnotes';
|
||||
import IconPageBreak from "@ckeditor/ckeditor5-icons/theme/icons/page-break.svg?raw";
|
||||
import IconAlignLeft from "@ckeditor/ckeditor5-icons/theme/icons/align-left.svg?raw";
|
||||
import IconAlignCenter from "@ckeditor/ckeditor5-icons/theme/icons/align-center.svg?raw";
|
||||
import IconAlignRight from "@ckeditor/ckeditor5-icons/theme/icons/align-right.svg?raw";
|
||||
import IconAlignJustify from "@ckeditor/ckeditor5-icons/theme/icons/align-justify.svg?raw";
|
||||
import { IconPageBreak, IconAlignLeft, IconAlignCenter, IconAlignRight, IconAlignJustify } from "@ckeditor/ckeditor5-icons";
|
||||
import bxInfoCircle from "boxicons/svg/regular/bx-info-circle.svg?raw";
|
||||
import bxBulb from "boxicons/svg/regular/bx-bulb.svg?raw";
|
||||
import bxCommentError from "boxicons/svg/regular/bx-comment-error.svg?raw";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import cancelIcon from '@ckeditor/ckeditor5-core/theme/icons/cancel.svg?raw';
|
||||
import { IconCancel } from '@ckeditor/ckeditor5-icons';
|
||||
import { ButtonView, Locale, toUnit, View } from 'ckeditor5';
|
||||
|
||||
const toPx = toUnit('%');
|
||||
@@ -54,7 +54,7 @@ export default class ProgressBarView extends View {
|
||||
_createCancelButton(locale: Locale) {
|
||||
const view = new ButtonView(locale);
|
||||
view.set({
|
||||
icon: cancelIcon,
|
||||
icon: IconCancel,
|
||||
tooltip: true,
|
||||
label: 'Cancel',
|
||||
//@ts-expect-error Object literal may only specify known properties, and 'attributes' does not exist in type
|
||||
|
||||
@@ -1,33 +1,37 @@
|
||||
diff --git a/dist/index.css b/dist/index.css
|
||||
index 8276289d55abd0f70d399e33c5f6c2d006745000..c70f12f1644dcebea6730b9b201a6933fa28969b 100644
|
||||
index 50d1b0005b464f33fb3f07f69c06f36a35e0c406..785e95ceeb7fce12be6249b43abf9b83e15fcfde 100644
|
||||
--- a/dist/index.css
|
||||
+++ b/dist/index.css
|
||||
@@ -9,8 +9,6 @@
|
||||
@@ -26,12 +26,10 @@
|
||||
}
|
||||
|
||||
.ck-content pre {
|
||||
padding: 1em;
|
||||
- color: hsl(0, 0%, 20.8%);
|
||||
- background: hsla(0, 0%, 78%, 0.3);
|
||||
border: 1px solid hsl(0, 0%, 77%);
|
||||
border-radius: 2px;
|
||||
|
||||
@@ -28,6 +26,11 @@
|
||||
min-width: 200px;
|
||||
- color: #353535;
|
||||
text-align: left;
|
||||
tab-size: 4;
|
||||
white-space: pre-wrap;
|
||||
direction: ltr;
|
||||
- background: #c7c7c74d;
|
||||
border: 1px solid #c4c4c4;
|
||||
border-radius: 2px;
|
||||
min-width: 200px;
|
||||
@@ -40,6 +38,11 @@
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
+.ck-content pre:not(.hljs) {
|
||||
+ color: hsl(0, 0%, 20.8%);
|
||||
+ background: hsla(0, 0%, 78%, 0.3);
|
||||
+ color: #353535;
|
||||
+ background: #c7c7c74d;
|
||||
+}
|
||||
+
|
||||
.ck-content pre code {
|
||||
background: unset;
|
||||
padding: 0;
|
||||
background: unset;
|
||||
border-radius: 0;
|
||||
diff --git a/dist/index.js b/dist/index.js
|
||||
index f0f8aec2323e8cdb34fa0bb4f48c2b433abcb804..b9600d356df2bf1922d51c6cebd1f74ee3ed9155 100644
|
||||
index 2e231803ce8450f8498e2a37f1be8c32ff52d090..b54c4943904d2b325f3ca6cef08888b3defc29b9 100644
|
||||
--- a/dist/index.js
|
||||
+++ b/dist/index.js
|
||||
@@ -656,6 +656,7 @@ function getLastOutdentableSequenceRange(model, position, sequence) {
|
||||
@@ -673,6 +673,7 @@ function getLastOutdentableSequenceRange(model, position, sequence) {
|
||||
// Attributes added only in the editing view.
|
||||
if (useLabels) {
|
||||
preAttributes['data-language'] = languagesToLabels[codeBlockLanguage];
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
diff --git a/build/mention.js b/build/mention.js
|
||||
deleted file mode 100644
|
||||
index 3ef262a2fb7cbb953b35cb7e07a999edce6dc72a..0000000000000000000000000000000000000000
|
||||
diff --git a/dist/index.js b/dist/index.js
|
||||
index bbe511c5550e1cac8612e998034382b4eea1f1b8..8394fd8bba89f8a7b82d62fe613be6f12703ff53 100644
|
||||
index 5c1b7d98d6a47f56a00440a6753368676bc26a7a..46cf87ae341bd2405fb756ba827c61b5b062f6b6 100644
|
||||
--- a/dist/index.js
|
||||
+++ b/dist/index.js
|
||||
@@ -603,6 +603,16 @@ const defaultCommitKeyCodes = [
|
||||
@@ -609,6 +609,16 @@ const defaultCommitKeyCodes = [
|
||||
}
|
||||
if (data.keyCode == keyCodes.esc) {
|
||||
this._hideUIAndRemoveMarker();
|
||||
@@ -22,7 +19,7 @@ index bbe511c5550e1cac8612e998034382b4eea1f1b8..8394fd8bba89f8a7b82d62fe613be6f1
|
||||
}
|
||||
}
|
||||
}, {
|
||||
@@ -1067,12 +1077,11 @@ const defaultCommitKeyCodes = [
|
||||
@@ -1075,12 +1085,11 @@ const defaultCommitKeyCodes = [
|
||||
*/ function createRegExp(marker, minimumCharacters) {
|
||||
const numberOfCharacters = minimumCharacters == 0 ? '*' : `{${minimumCharacters},}`;
|
||||
const openAfterCharacters = env.features.isRegExpUnicodePropertySupported ? '\\p{Ps}\\p{Pi}"\'' : '\\(\\[{"\'';
|
||||
@@ -36,7 +33,7 @@ index bbe511c5550e1cac8612e998034382b4eea1f1b8..8394fd8bba89f8a7b82d62fe613be6f1
|
||||
// The pattern consists of 3 groups:
|
||||
//
|
||||
// - 0 (non-capturing): Opening sequence - start of the line, space or an opening punctuation character like "(" or "\"",
|
||||
@@ -1081,7 +1090,7 @@ const defaultCommitKeyCodes = [
|
||||
@@ -1089,7 +1098,7 @@ const defaultCommitKeyCodes = [
|
||||
//
|
||||
// The pattern matches up to the caret (end of string switch - $).
|
||||
// (0: opening sequence )(1: marker )(2: typed mention )$
|
||||
|
||||
2948
pnpm-lock.yaml
generated
2948
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,27 @@
|
||||
import { join, resolve } from "path";
|
||||
import { cpSync, exists, existsSync, mkdirSync, readFileSync, rmSync } from "fs";
|
||||
import { cpSync, existsSync, mkdirSync, readFileSync, rmSync } from "fs";
|
||||
import { execSync } from "child_process";
|
||||
import { rebuild } from "@electron/rebuild"
|
||||
import { getElectronPath, isNixOS } from "./utils.mjs";
|
||||
import { isNixOS } from "./utils.mjs";
|
||||
|
||||
const workspaceRoot = join(import.meta.dirname, "..");
|
||||
|
||||
// On NixOS, re-execute this script inside `nix develop` to get access to Python and other build tools
|
||||
if (isNixOS() && !process.env.IN_NIX_SHELL) {
|
||||
console.log("Detected NixOS, re-running electron-rebuild inside 'nix develop'...");
|
||||
try {
|
||||
execSync("nix develop -c pnpm exec tsx scripts/electron-rebuild.mts", {
|
||||
cwd: workspaceRoot,
|
||||
stdio: "inherit",
|
||||
env: { ...process.env, IN_NIX_SHELL: "1" }
|
||||
});
|
||||
process.exit(0);
|
||||
} catch (e) {
|
||||
console.error("Failed to run electron-rebuild inside 'nix develop'.");
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
function copyNativeDependencies(projectRoot: string) {
|
||||
const destPath = join(projectRoot, "node_modules/better-sqlite3");
|
||||
|
||||
@@ -46,20 +62,8 @@ async function rebuildNativeDependencies(projectRoot: string) {
|
||||
|
||||
function determineElectronVersion(projectRoot: string) {
|
||||
const packageJson = JSON.parse(readFileSync(join(projectRoot, "package.json"), "utf-8"));
|
||||
|
||||
if (isNixOS()) {
|
||||
console.log("Detected NixOS, reading Electron version from PATH");
|
||||
|
||||
try {
|
||||
return execSync(`${getElectronPath()} --version`, { }).toString("utf-8");
|
||||
} catch (e) {
|
||||
console.error("Got error while trying to read the Electron version from shell. Make sure that an Electron version is in the PATH (e.g. `nix-shell -p electron`)");
|
||||
process.exit(1);
|
||||
}
|
||||
} else {
|
||||
console.log("Using Electron version from package.json");
|
||||
return packageJson.devDependencies.electron;
|
||||
}
|
||||
console.log("Using Electron version from package.json");
|
||||
return packageJson.devDependencies.electron;
|
||||
}
|
||||
|
||||
for (const projectRoot of [ "apps/desktop", "apps/edit-docs" ]) {
|
||||
|
||||
Reference in New Issue
Block a user