From 1dcd7c1b5633bafd93ea9d32bfbffb49ca6c559a Mon Sep 17 00:00:00 2001 From: Kodai Aoyama Date: Sun, 15 Sep 2024 12:17:34 +0900 Subject: [PATCH 01/12] fix loading icon hidden --- src-tauri/tauri.conf.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index f0151fa..66d579c 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -52,7 +52,7 @@ } }, "security": { - "csp": "default-src 'self'; img-src 'self' asset: https://asset.localhost; media-src stream: https://stream.localhost asset: https://asset.localhost" + "csp": "default-src 'self'; img-src 'self' data: asset: https://asset.localhost; media-src stream: https://stream.localhost asset: https://asset.localhost" }, "updater": { "active": false From 05400b6b6f1f8efe3909239c94677ffa9ffd4908 Mon Sep 17 00:00:00 2001 From: Kodai Aoyama Date: Sun, 15 Sep 2024 12:18:08 +0900 Subject: [PATCH 02/12] fix style with action --- src/components/molecules/SpeechHistory.tsx | 7 +++---- src/index.css | 7 ++++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/molecules/SpeechHistory.tsx b/src/components/molecules/SpeechHistory.tsx index 215954d..25e5c62 100644 --- a/src/components/molecules/SpeechHistory.tsx +++ b/src/components/molecules/SpeechHistory.tsx @@ -69,10 +69,9 @@ const SpeechHistory = (props: SpeechHistoryProps): JSX.Element => {
{c.content_2 ?
- : <> -

発言の追っかけを待っています

- - } + : + + }
diff --git a/src/index.css b/src/index.css index ef21865..9f63cc7 100644 --- a/src/index.css +++ b/src/index.css @@ -43,11 +43,16 @@ body { display: none; } -.znc ul,ol,p+p,blockquote,hr,table,pre,h1,h2,h3,h4,h5,h6 { +.znc ul,ol,p+p,blockquote,table,pre,h1,h2,h3,h4,h5,h6 { width: 100%; margin: 0!important; } +.znc hr { + width: 100%; + margin: 1.5rem 0!important; +} + .znc p { overflow-wrap: anywhere; } From 0a710edfa560f2fc34f33037606cb5af3971b138 Mon Sep 17 00:00:00 2001 From: Kodai Aoyama Date: Sun, 15 Sep 2024 14:16:00 +0900 Subject: [PATCH 03/12] support markdown on user chat --- src/components/molecules/SpeechHistory.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/molecules/SpeechHistory.tsx b/src/components/molecules/SpeechHistory.tsx index 25e5c62..88c3a7a 100644 --- a/src/components/molecules/SpeechHistory.tsx +++ b/src/components/molecules/SpeechHistory.tsx @@ -61,7 +61,7 @@ const SpeechHistory = (props: SpeechHistoryProps): JSX.Element => {

- {c.content} +

From 61274d60527a61576cb69d2697ae1743670473a9 Mon Sep 17 00:00:00 2001 From: Kodai Aoyama Date: Sun, 15 Sep 2024 16:07:00 +0900 Subject: [PATCH 04/12] add highlight on markdown and add mermaid support --- package.json | 2 + src/components/molecules/MyMarkdown.tsx | 38 +- src/components/molecules/SpeechHistory.tsx | 6 +- src/index.css | 11 +- src/main.tsx | 1 + yarn.lock | 687 ++++++++++++++++++++- 6 files changed, 730 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index eed40c1..66a9618 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,9 @@ "dependencies": { "@tauri-apps/api": "^1.6.0", "dayjs": "^1.11.13", + "highlight.js": "^11.10.0", "markdown-to-jsx": "^7.5.0", + "mermaid": "^11.2.0", "react": "^18.3.1", "react-dom": "^18.3.1", "react-h5-audio-player": "^3.9.3", diff --git a/src/components/molecules/MyMarkdown.tsx b/src/components/molecules/MyMarkdown.tsx index 2162e3c..856f817 100644 --- a/src/components/molecules/MyMarkdown.tsx +++ b/src/components/molecules/MyMarkdown.tsx @@ -1,22 +1,40 @@ import Markdown from 'markdown-to-jsx' +import { useEffect, useRef } from 'react' +import hljs from 'highlight.js'; +import mermaid from 'mermaid'; type MyMarkdownProps = { content: string } const MyMarkdown = (props: MyMarkdownProps) => { + const rootRef = useRef(null); const { content } = props + + useEffect(() => { + mermaid.initialize({ startOnLoad: false }); + rootRef.current?.querySelectorAll('pre code').forEach(async (block) => { + if (block.className.includes("mermaid")) { + await mermaid.run({ nodes: [block as HTMLElement] }); + } else { + hljs.highlightBlock(block as HTMLElement); + } + }); + }, [content]); + return ( - {children}, - p: ({ children, ...props }) => `${children}`.includes("[object Object]") ?

{children}

: `${children}`.split("\n").map(c =>

{c}

) - } - }}> - {content} -
+
+ {children}, + p: ({ children, ...props }) => `${children}`.includes("[object Object]") ?

{children}

: `${children}`.split("\n").map(c =>

{c}

), + } + }}> + {content} +
+
) } diff --git a/src/components/molecules/SpeechHistory.tsx b/src/components/molecules/SpeechHistory.tsx index 88c3a7a..cd0dbfe 100644 --- a/src/components/molecules/SpeechHistory.tsx +++ b/src/components/molecules/SpeechHistory.tsx @@ -48,7 +48,7 @@ const SpeechHistory = (props: SpeechHistoryProps): JSX.Element => { {c.speech_type === "memo" &&
{date}
-
+
} @@ -61,14 +61,14 @@ const SpeechHistory = (props: SpeechHistoryProps): JSX.Element => {

-

+

{c.content_2 ? -
+ : } diff --git a/src/index.css b/src/index.css index 9f63cc7..1c3ccaf 100644 --- a/src/index.css +++ b/src/index.css @@ -43,7 +43,7 @@ body { display: none; } -.znc ul,ol,p+p,blockquote,table,pre,h1,h2,h3,h4,h5,h6 { +.znc ul,ol,p+p,blockquote,table,h1,h2,h3,h4,h5,h6 { width: 100%; margin: 0!important; } @@ -57,6 +57,15 @@ body { overflow-wrap: anywhere; } +.znc pre { + width: 100%; + margin: 1.5rem 0!important; +} + +.znc pre:has(.lang-mermaid) { + background-color: initial; +} + .collapse,.collapse-content { visibility: inherit!important; } diff --git a/src/main.tsx b/src/main.tsx index 611e848..957c86a 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,6 +1,7 @@ import React from 'react' import ReactDOM from 'react-dom/client' import App from './App' +import 'highlight.js/styles/github.min.css' import './index.css' ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( diff --git a/yarn.lock b/yarn.lock index f5f77c1..27f5798 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,6 +15,19 @@ "@jridgewell/gen-mapping" "^0.1.0" "@jridgewell/trace-mapping" "^0.3.9" +"@antfu/install-pkg@^0.4.0": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@antfu/install-pkg/-/install-pkg-0.4.1.tgz#d1d7f3be96ecdb41581629cafe8626d1748c0cf1" + integrity sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw== + dependencies: + package-manager-detector "^0.2.0" + tinyexec "^0.3.0" + +"@antfu/utils@^0.7.10": + version "0.7.10" + resolved "https://registry.yarnpkg.com/@antfu/utils/-/utils-0.7.10.tgz#ae829f170158e297a9b6a28f161a8e487d00814d" + integrity sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww== + "@babel/code-frame@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" @@ -241,6 +254,43 @@ "@babel/helper-validator-identifier" "^7.24.7" to-fast-properties "^2.0.0" +"@braintree/sanitize-url@^7.0.1": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-7.1.0.tgz#048e48aab4f1460e3121e22aa62459d16653dc85" + integrity sha512-o+UlMLt49RvtCASlOMW0AkHnabN9wR9rwCCherxO0yG4Npy34GkvrAqdXQvrhNs+jh+gkK8gB8Lf05qL/O7KWg== + +"@chevrotain/cst-dts-gen@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@chevrotain/cst-dts-gen/-/cst-dts-gen-11.0.3.tgz#5e0863cc57dc45e204ccfee6303225d15d9d4783" + integrity sha512-BvIKpRLeS/8UbfxXxgC33xOumsacaeCKAjAeLyOn7Pcp95HiRbrpl14S+9vaZLolnbssPIUuiUd8IvgkRyt6NQ== + dependencies: + "@chevrotain/gast" "11.0.3" + "@chevrotain/types" "11.0.3" + lodash-es "4.17.21" + +"@chevrotain/gast@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@chevrotain/gast/-/gast-11.0.3.tgz#e84d8880323fe8cbe792ef69ce3ffd43a936e818" + integrity sha512-+qNfcoNk70PyS/uxmj3li5NiECO+2YKZZQMbmjTqRI3Qchu8Hig/Q9vgkHpI3alNjr7M+a2St5pw5w5F6NL5/Q== + dependencies: + "@chevrotain/types" "11.0.3" + lodash-es "4.17.21" + +"@chevrotain/regexp-to-ast@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@chevrotain/regexp-to-ast/-/regexp-to-ast-11.0.3.tgz#11429a81c74a8e6a829271ce02fc66166d56dcdb" + integrity sha512-1fMHaBZxLFvWI067AVbGJav1eRY7N8DDvYCTwGBiE/ytKBgP8azTdgyrKyWZ9Mfh09eHWb5PgTSO8wi7U824RA== + +"@chevrotain/types@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@chevrotain/types/-/types-11.0.3.tgz#f8a03914f7b937f594f56eb89312b3b8f1c91848" + integrity sha512-gsiM3G8b58kZC2HaWR50gu6Y1440cHiJ+i3JUvcp/35JchYejb2+5MVeJK0iKThYpAa/P2PYFV4hoi44HD+aHQ== + +"@chevrotain/utils@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@chevrotain/utils/-/utils-11.0.3.tgz#e39999307b102cff3645ec4f5b3665f5297a2224" + integrity sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ== + "@esbuild/aix-ppc64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz#c7184a326533fcdf1b8ee0733e21c713b975575f" @@ -368,6 +418,19 @@ resolved "https://registry.yarnpkg.com/@iconify/types/-/types-2.0.0.tgz#ab0e9ea681d6c8a1214f30cd741fe3a20cc57f57" integrity sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg== +"@iconify/utils@^2.1.32": + version "2.1.33" + resolved "https://registry.yarnpkg.com/@iconify/utils/-/utils-2.1.33.tgz#cbf7242a52fd0ec58c42d37d28e4406b5327e8c0" + integrity sha512-jP9h6v/g0BIZx0p7XGJJVtkVnydtbgTgt9mVNcGDYwaa7UhdHdI9dvoq+gKj9sijMSJKxUPEG2JyjsgXjxL7Kw== + dependencies: + "@antfu/install-pkg" "^0.4.0" + "@antfu/utils" "^0.7.10" + "@iconify/types" "^2.0.0" + debug "^4.3.6" + kolorist "^1.8.0" + local-pkg "^0.5.0" + mlly "^1.7.1" + "@isaacs/cliui@^8.0.2": version "8.0.2" resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" @@ -452,6 +515,13 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@mermaid-js/parser@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@mermaid-js/parser/-/parser-0.3.0.tgz#7a28714599f692f93df130b299fa1aadc9f9c8ab" + integrity sha512-HsvL6zgE5sUPGgkIDlmAWR1HTNHz2Iy11BAWPTa4Jjabkpguy4Ze2gzfLrg6pdRuBvFwgUYyxiaNqZwrEEXepA== + dependencies: + langium "3.0.0" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -735,6 +805,11 @@ "@types/babel__core" "^7.20.5" react-refresh "^0.14.2" +acorn@^8.11.3: + version "8.12.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" + integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== + ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" @@ -847,6 +922,25 @@ chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chevrotain-allstar@~0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/chevrotain-allstar/-/chevrotain-allstar-0.3.1.tgz#b7412755f5d83cc139ab65810cdb00d8db40e6ca" + integrity sha512-b7g+y9A0v4mxCW1qUhf3BSVPg+/NvGErk/dOkrDaHA0nQIQGAtrOjlX//9OQtRlSCy+x9rfB5N8yC71lH1nvMw== + dependencies: + lodash-es "^4.17.21" + +chevrotain@~11.0.3: + version "11.0.3" + resolved "https://registry.yarnpkg.com/chevrotain/-/chevrotain-11.0.3.tgz#88ffc1fb4b5739c715807eaeedbbf200e202fc1b" + integrity sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw== + dependencies: + "@chevrotain/cst-dts-gen" "11.0.3" + "@chevrotain/gast" "11.0.3" + "@chevrotain/regexp-to-ast" "11.0.3" + "@chevrotain/types" "11.0.3" + "@chevrotain/utils" "11.0.3" + lodash-es "4.17.21" + chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" @@ -896,16 +990,45 @@ colord@^2.9: resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.3.tgz#4f8ce919de456f1d5c1c368c307fe20f3e59fb43" integrity sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw== +commander@7: + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== + commander@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== +commander@^8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" + integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== + +confbox@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/confbox/-/confbox-0.1.7.tgz#ccfc0a2bcae36a84838e83a3b7f770fb17d6c579" + integrity sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA== + convert-source-map@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== +cose-base@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/cose-base/-/cose-base-1.0.3.tgz#650334b41b869578a543358b80cda7e0abe0a60a" + integrity sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg== + dependencies: + layout-base "^1.0.0" + +cose-base@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cose-base/-/cose-base-2.2.0.tgz#1c395c35b6e10bb83f9769ca8b817d614add5c01" + integrity sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g== + dependencies: + layout-base "^2.0.0" + cross-spawn@^7.0.0: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -933,6 +1056,304 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.0.tgz#4ddcac3718d787cf9df0d1b7d15033925c8f29f2" integrity sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA== +cytoscape-cose-bilkent@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cytoscape-cose-bilkent/-/cytoscape-cose-bilkent-4.1.0.tgz#762fa121df9930ffeb51a495d87917c570ac209b" + integrity sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ== + dependencies: + cose-base "^1.0.0" + +cytoscape-fcose@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz#e4d6f6490df4fab58ae9cea9e5c3ab8d7472f471" + integrity sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ== + dependencies: + cose-base "^2.2.0" + +cytoscape@^3.29.2: + version "3.30.2" + resolved "https://registry.yarnpkg.com/cytoscape/-/cytoscape-3.30.2.tgz#94149707fb6547a55e3b44f03ffe232706212161" + integrity sha512-oICxQsjW8uSaRmn4UK/jkczKOqTrVqt5/1WL0POiJUT2EKNc9STM4hYFHv917yu55aTBMFNRzymlJhVAiWPCxw== + +"d3-array@1 - 2": + version "2.12.1" + resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-2.12.1.tgz#e20b41aafcdffdf5d50928004ececf815a465e81" + integrity sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ== + dependencies: + internmap "^1.0.0" + +"d3-array@2 - 3", "d3-array@2.10.0 - 3", "d3-array@2.5.0 - 3", d3-array@3, d3-array@^3.2.0: + version "3.2.4" + resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.2.4.tgz#15fec33b237f97ac5d7c986dc77da273a8ed0bb5" + integrity sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg== + dependencies: + internmap "1 - 2" + +d3-axis@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-axis/-/d3-axis-3.0.0.tgz#c42a4a13e8131d637b745fc2973824cfeaf93322" + integrity sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw== + +d3-brush@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-brush/-/d3-brush-3.0.0.tgz#6f767c4ed8dcb79de7ede3e1c0f89e63ef64d31c" + integrity sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ== + dependencies: + d3-dispatch "1 - 3" + d3-drag "2 - 3" + d3-interpolate "1 - 3" + d3-selection "3" + d3-transition "3" + +d3-chord@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-chord/-/d3-chord-3.0.1.tgz#d156d61f485fce8327e6abf339cb41d8cbba6966" + integrity sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g== + dependencies: + d3-path "1 - 3" + +"d3-color@1 - 3", d3-color@3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.1.0.tgz#395b2833dfac71507f12ac2f7af23bf819de24e2" + integrity sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA== + +d3-contour@4: + version "4.0.2" + resolved "https://registry.yarnpkg.com/d3-contour/-/d3-contour-4.0.2.tgz#bb92063bc8c5663acb2422f99c73cbb6c6ae3bcc" + integrity sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA== + dependencies: + d3-array "^3.2.0" + +d3-delaunay@6: + version "6.0.4" + resolved "https://registry.yarnpkg.com/d3-delaunay/-/d3-delaunay-6.0.4.tgz#98169038733a0a5babbeda55054f795bb9e4a58b" + integrity sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A== + dependencies: + delaunator "5" + +"d3-dispatch@1 - 3", d3-dispatch@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-3.0.1.tgz#5fc75284e9c2375c36c839411a0cf550cbfc4d5e" + integrity sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg== + +"d3-drag@2 - 3", d3-drag@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-drag/-/d3-drag-3.0.0.tgz#994aae9cd23c719f53b5e10e3a0a6108c69607ba" + integrity sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg== + dependencies: + d3-dispatch "1 - 3" + d3-selection "3" + +"d3-dsv@1 - 3", d3-dsv@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-dsv/-/d3-dsv-3.0.1.tgz#c63af978f4d6a0d084a52a673922be2160789b73" + integrity sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q== + dependencies: + commander "7" + iconv-lite "0.6" + rw "1" + +"d3-ease@1 - 3", d3-ease@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-3.0.1.tgz#9658ac38a2140d59d346160f1f6c30fda0bd12f4" + integrity sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w== + +d3-fetch@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-fetch/-/d3-fetch-3.0.1.tgz#83141bff9856a0edb5e38de89cdcfe63d0a60a22" + integrity sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw== + dependencies: + d3-dsv "1 - 3" + +d3-force@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-3.0.0.tgz#3e2ba1a61e70888fe3d9194e30d6d14eece155c4" + integrity sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg== + dependencies: + d3-dispatch "1 - 3" + d3-quadtree "1 - 3" + d3-timer "1 - 3" + +"d3-format@1 - 3", d3-format@3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-3.1.0.tgz#9260e23a28ea5cb109e93b21a06e24e2ebd55641" + integrity sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA== + +d3-geo@3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-3.1.1.tgz#6027cf51246f9b2ebd64f99e01dc7c3364033a4d" + integrity sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q== + dependencies: + d3-array "2.5.0 - 3" + +d3-hierarchy@3: + version "3.1.2" + resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz#b01cd42c1eed3d46db77a5966cf726f8c09160c6" + integrity sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA== + +"d3-interpolate@1 - 3", "d3-interpolate@1.2.0 - 3", d3-interpolate@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-3.0.1.tgz#3c47aa5b32c5b3dfb56ef3fd4342078a632b400d" + integrity sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g== + dependencies: + d3-color "1 - 3" + +d3-path@1: + version "1.0.9" + resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-1.0.9.tgz#48c050bb1fe8c262493a8caf5524e3e9591701cf" + integrity sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg== + +"d3-path@1 - 3", d3-path@3, d3-path@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-3.1.0.tgz#22df939032fb5a71ae8b1800d61ddb7851c42526" + integrity sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ== + +d3-polygon@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-polygon/-/d3-polygon-3.0.1.tgz#0b45d3dd1c48a29c8e057e6135693ec80bf16398" + integrity sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg== + +"d3-quadtree@1 - 3", d3-quadtree@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-quadtree/-/d3-quadtree-3.0.1.tgz#6dca3e8be2b393c9a9d514dabbd80a92deef1a4f" + integrity sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw== + +d3-random@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-random/-/d3-random-3.0.1.tgz#d4926378d333d9c0bfd1e6fa0194d30aebaa20f4" + integrity sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ== + +d3-sankey@^0.12.3: + version "0.12.3" + resolved "https://registry.yarnpkg.com/d3-sankey/-/d3-sankey-0.12.3.tgz#b3c268627bd72e5d80336e8de6acbfec9d15d01d" + integrity sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ== + dependencies: + d3-array "1 - 2" + d3-shape "^1.2.0" + +d3-scale-chromatic@3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz#34c39da298b23c20e02f1a4b239bd0f22e7f1314" + integrity sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ== + dependencies: + d3-color "1 - 3" + d3-interpolate "1 - 3" + +d3-scale@4: + version "4.0.2" + resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-4.0.2.tgz#82b38e8e8ff7080764f8dcec77bd4be393689396" + integrity sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ== + dependencies: + d3-array "2.10.0 - 3" + d3-format "1 - 3" + d3-interpolate "1.2.0 - 3" + d3-time "2.1.1 - 3" + d3-time-format "2 - 4" + +"d3-selection@2 - 3", d3-selection@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-3.0.0.tgz#c25338207efa72cc5b9bd1458a1a41901f1e1b31" + integrity sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ== + +d3-shape@3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-3.2.0.tgz#a1a839cbd9ba45f28674c69d7f855bcf91dfc6a5" + integrity sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA== + dependencies: + d3-path "^3.1.0" + +d3-shape@^1.2.0: + version "1.3.7" + resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.3.7.tgz#df63801be07bc986bc54f63789b4fe502992b5d7" + integrity sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw== + dependencies: + d3-path "1" + +"d3-time-format@2 - 4", d3-time-format@4: + version "4.1.0" + resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-4.1.0.tgz#7ab5257a5041d11ecb4fe70a5c7d16a195bb408a" + integrity sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg== + dependencies: + d3-time "1 - 3" + +"d3-time@1 - 3", "d3-time@2.1.1 - 3", d3-time@3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-3.1.0.tgz#9310db56e992e3c0175e1ef385e545e48a9bb5c7" + integrity sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q== + dependencies: + d3-array "2 - 3" + +"d3-timer@1 - 3", d3-timer@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-3.0.1.tgz#6284d2a2708285b1abb7e201eda4380af35e63b0" + integrity sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA== + +"d3-transition@2 - 3", d3-transition@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-transition/-/d3-transition-3.0.1.tgz#6869fdde1448868077fdd5989200cb61b2a1645f" + integrity sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w== + dependencies: + d3-color "1 - 3" + d3-dispatch "1 - 3" + d3-ease "1 - 3" + d3-interpolate "1 - 3" + d3-timer "1 - 3" + +d3-zoom@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-zoom/-/d3-zoom-3.0.0.tgz#d13f4165c73217ffeaa54295cd6969b3e7aee8f3" + integrity sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw== + dependencies: + d3-dispatch "1 - 3" + d3-drag "2 - 3" + d3-interpolate "1 - 3" + d3-selection "2 - 3" + d3-transition "2 - 3" + +d3@^7.8.2, d3@^7.9.0: + version "7.9.0" + resolved "https://registry.yarnpkg.com/d3/-/d3-7.9.0.tgz#579e7acb3d749caf8860bd1741ae8d371070cd5d" + integrity sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA== + dependencies: + d3-array "3" + d3-axis "3" + d3-brush "3" + d3-chord "3" + d3-color "3" + d3-contour "4" + d3-delaunay "6" + d3-dispatch "3" + d3-drag "3" + d3-dsv "3" + d3-ease "3" + d3-fetch "3" + d3-force "3" + d3-format "3" + d3-geo "3" + d3-hierarchy "3" + d3-interpolate "3" + d3-path "3" + d3-polygon "3" + d3-quadtree "3" + d3-random "3" + d3-scale "4" + d3-scale-chromatic "3" + d3-selection "3" + d3-shape "3" + d3-time "3" + d3-time-format "4" + d3-timer "3" + d3-transition "3" + d3-zoom "3" + +dagre-d3-es@7.0.10: + version "7.0.10" + resolved "https://registry.yarnpkg.com/dagre-d3-es/-/dagre-d3-es-7.0.10.tgz#19800d4be674379a3cd8c86a8216a2ac6827cadc" + integrity sha512-qTCQmEhcynucuaZgY5/+ti3X/rnszKZhEQH/ZdWdtP1tA/y3VoHJzcVrO9pjjJCNpigfscAtoUB5ONcd2wNn0A== + dependencies: + d3 "^7.8.2" + lodash-es "^4.17.21" + daisyui@^3.9.4: version "3.9.4" resolved "https://registry.yarnpkg.com/daisyui/-/daisyui-3.9.4.tgz#84209bfce115505d7b502f7362b8ced6bb3a6cc5" @@ -944,7 +1365,7 @@ daisyui@^3.9.4: postcss-js "^4" tailwindcss "^3.1" -dayjs@^1.11.13: +dayjs@^1.11.10, dayjs@^1.11.13: version "1.11.13" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.13.tgz#92430b0139055c3ebb60150aa13e860a4b5a366c" integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg== @@ -956,6 +1377,20 @@ debug@^4.1.0, debug@^4.3.1: dependencies: ms "2.1.2" +debug@^4.3.6: + version "4.3.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== + dependencies: + ms "^2.1.3" + +delaunator@5: + version "5.0.1" + resolved "https://registry.yarnpkg.com/delaunator/-/delaunator-5.0.1.tgz#39032b08053923e924d6094fe2cde1a99cc51278" + integrity sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw== + dependencies: + robust-predicates "^3.0.2" + didyoumean@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" @@ -966,6 +1401,11 @@ dlv@^1.1.3: resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79" integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== +dompurify@^3.0.11: + version "3.1.6" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.1.6.tgz#43c714a94c6a7b8801850f82e756685300a027e2" + integrity sha512-cTOAhc36AalkjtBpfG6O8JimdTMWNXjiePT2xQH/ppBGi/4uIpmj8eKyIkMJErXWARyINV/sB38yf8JCLF5pbQ== + eastasianwidth@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" @@ -1123,6 +1563,11 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +hachure-fill@^0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/hachure-fill/-/hachure-fill-0.5.2.tgz#d19bc4cc8750a5962b47fb1300557a85fcf934cc" + integrity sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg== + hamt_plus@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/hamt_plus/-/hamt_plus-1.0.2.tgz#e21c252968c7e33b20f6a1b094cd85787a265601" @@ -1147,6 +1592,28 @@ hasown@^2.0.0: dependencies: function-bind "^1.1.2" +highlight.js@^11.10.0: + version "11.10.0" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-11.10.0.tgz#6e3600dc4b33d6dc23d5bd94fbf72405f5892b92" + integrity sha512-SYVnVFswQER+zu1laSya563s+F8VDGt7o35d4utbamowvUNLLMovFqwCLSocpZTz3MgaSRA1IbqRWZv97dtErQ== + +iconv-lite@0.6: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +"internmap@1 - 2": + version "2.0.3" + resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.3.tgz#6685f23755e43c524e251d29cbc97248e3061009" + integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg== + +internmap@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/internmap/-/internmap-1.0.1.tgz#0017cc8a3b99605f0302f2b198d272e015e5df95" + integrity sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw== + is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -1224,6 +1691,44 @@ json5@^2.2.3: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== +katex@^0.16.9: + version "0.16.11" + resolved "https://registry.yarnpkg.com/katex/-/katex-0.16.11.tgz#4bc84d5584f996abece5f01c6ad11304276a33f5" + integrity sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ== + dependencies: + commander "^8.3.0" + +khroma@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/khroma/-/khroma-2.1.0.tgz#45f2ce94ce231a437cf5b63c2e886e6eb42bbbb1" + integrity sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw== + +kolorist@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/kolorist/-/kolorist-1.8.0.tgz#edddbbbc7894bc13302cdf740af6374d4a04743c" + integrity sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ== + +langium@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/langium/-/langium-3.0.0.tgz#4938294eb57c59066ef955070ac4d0c917b26026" + integrity sha512-+Ez9EoiByeoTu/2BXmEaZ06iPNXM6thWJp02KfBO/raSMyCJ4jw7AkWWa+zBCTm0+Tw1Fj9FOxdqSskyN5nAwg== + dependencies: + chevrotain "~11.0.3" + chevrotain-allstar "~0.3.0" + vscode-languageserver "~9.0.1" + vscode-languageserver-textdocument "~1.0.11" + vscode-uri "~3.0.8" + +layout-base@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/layout-base/-/layout-base-1.0.2.tgz#1291e296883c322a9dd4c5dd82063721b53e26e2" + integrity sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg== + +layout-base@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/layout-base/-/layout-base-2.0.1.tgz#d0337913586c90f9c2c075292069f5c2da5dd285" + integrity sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg== + lilconfig@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" @@ -1239,6 +1744,19 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +local-pkg@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.5.0.tgz#093d25a346bae59a99f80e75f6e9d36d7e8c925c" + integrity sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg== + dependencies: + mlly "^1.4.2" + pkg-types "^1.0.3" + +lodash-es@4.17.21, lodash-es@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" + integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== + loose-envify@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -1263,11 +1781,41 @@ markdown-to-jsx@^7.5.0: resolved "https://registry.yarnpkg.com/markdown-to-jsx/-/markdown-to-jsx-7.5.0.tgz#42ece0c71e842560a7d8bd9f81e7a34515c72150" integrity sha512-RrBNcMHiFPcz/iqIj0n3wclzHXjwS7mzjBNWecKKVhNTIxQepIix6Il/wZCn2Cg5Y1ow2Qi84+eJrryFRWBEWw== +marked@^13.0.2: + version "13.0.3" + resolved "https://registry.yarnpkg.com/marked/-/marked-13.0.3.tgz#5c5b4a5d0198060c7c9bc6ef9420a7fed30f822d" + integrity sha512-rqRix3/TWzE9rIoFGIn8JmsVfhiuC8VIQ8IdX5TfzmeBucdY05/0UlzKaw0eVtpcN/OdVFpBk7CjKGo9iHJ/zA== + merge2@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== +mermaid@^11.2.0: + version "11.2.0" + resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-11.2.0.tgz#b9703e23155c70853925590dcd849fa5ffed0728" + integrity sha512-ZinOa063lk81lujX8vkINNqmFaNMk1A95Z4kCL7fE6QLAi01CxeiUJVw+tpXU+lAM73utO39G+2PLjxS2GYS/w== + dependencies: + "@braintree/sanitize-url" "^7.0.1" + "@iconify/utils" "^2.1.32" + "@mermaid-js/parser" "^0.3.0" + cytoscape "^3.29.2" + cytoscape-cose-bilkent "^4.1.0" + cytoscape-fcose "^2.2.0" + d3 "^7.9.0" + d3-sankey "^0.12.3" + dagre-d3-es "7.0.10" + dayjs "^1.11.10" + dompurify "^3.0.11" + katex "^0.16.9" + khroma "^2.1.0" + lodash-es "^4.17.21" + marked "^13.0.2" + roughjs "^4.6.6" + stylis "^4.3.1" + ts-dedent "^2.2.0" + uuid "^9.0.1" + micromatch@^4.0.4, micromatch@^4.0.5: version "4.0.8" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" @@ -1288,11 +1836,26 @@ minimatch@^9.0.1: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== +mlly@^1.4.2, mlly@^1.7.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.7.1.tgz#e0336429bb0731b6a8e887b438cbdae522c8f32f" + integrity sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA== + dependencies: + acorn "^8.11.3" + pathe "^1.1.2" + pkg-types "^1.1.1" + ufo "^1.5.3" + ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + mz@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" @@ -1332,6 +1895,16 @@ object-hash@^3.0.0: resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== +package-manager-detector@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/package-manager-detector/-/package-manager-detector-0.2.0.tgz#160395cd5809181f5a047222319262b8c2d8aaea" + integrity sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog== + +path-data-parser@0.1.0, path-data-parser@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/path-data-parser/-/path-data-parser-0.1.0.tgz#8f5ba5cc70fc7becb3dcefaea08e2659aba60b8c" + integrity sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w== + path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" @@ -1350,6 +1923,11 @@ path-scurry@^1.10.1: lru-cache "^9.1.1 || ^10.0.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" +pathe@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec" + integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== + picocolors@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" @@ -1375,6 +1953,28 @@ pirates@^4.0.1: resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== +pkg-types@^1.0.3, pkg-types@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.2.0.tgz#d0268e894e93acff11a6279de147e83354ebd42d" + integrity sha512-+ifYuSSqOQ8CqP4MbZA5hDpb97n3E8SVWdJe+Wms9kj745lmd3b7EZJiqvmLwAlmRfjrI7Hi5z3kdBJ93lFNPA== + dependencies: + confbox "^0.1.7" + mlly "^1.7.1" + pathe "^1.1.2" + +points-on-curve@0.2.0, points-on-curve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/points-on-curve/-/points-on-curve-0.2.0.tgz#7dbb98c43791859434284761330fa893cb81b4d1" + integrity sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A== + +points-on-path@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/points-on-path/-/points-on-path-0.2.1.tgz#553202b5424c53bed37135b318858eacff85dd52" + integrity sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g== + dependencies: + path-data-parser "0.1.0" + points-on-curve "0.2.0" + postcss-import@^15.1.0: version "15.1.0" resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-15.1.0.tgz#41c64ed8cc0e23735a9698b3249ffdbf704adc70" @@ -1540,6 +2140,11 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== +robust-predicates@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/robust-predicates/-/robust-predicates-3.0.2.tgz#d5b28528c4824d20fc48df1928d41d9efa1ad771" + integrity sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg== + rollup@^4.20.0: version "4.21.0" resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.21.0.tgz#28db5f5c556a5180361d35009979ccc749560b9d" @@ -1565,6 +2170,16 @@ rollup@^4.20.0: "@rollup/rollup-win32-x64-msvc" "4.21.0" fsevents "~2.3.2" +roughjs@^4.6.6: + version "4.6.6" + resolved "https://registry.yarnpkg.com/roughjs/-/roughjs-4.6.6.tgz#1059f49a5e0c80dee541a005b20cc322b222158b" + integrity sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ== + dependencies: + hachure-fill "^0.5.2" + path-data-parser "^0.1.0" + points-on-curve "^0.2.0" + points-on-path "^0.2.1" + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -1572,6 +2187,16 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" +rw@1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" + integrity sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ== + +"safer-buffer@>= 2.1.2 < 3.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + scheduler@^0.23.2: version "0.23.2" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3" @@ -1659,6 +2284,11 @@ strip-ansi@^7.0.1: dependencies: ansi-regex "^6.0.1" +stylis@^4.3.1: + version "4.3.4" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.3.4.tgz#ca5c6c4a35c4784e4e93a2a24dc4e9fa075250a4" + integrity sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now== + sucrase@^3.32.0: version "3.35.0" resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.35.0.tgz#57f17a3d7e19b36d8995f06679d121be914ae263" @@ -1761,6 +2391,11 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" +tinyexec@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-0.3.0.tgz#ed60cfce19c17799d4a241e06b31b0ec2bee69e6" + integrity sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg== + to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" @@ -1773,6 +2408,11 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +ts-dedent@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ts-dedent/-/ts-dedent-2.2.0.tgz#39e4bd297cd036292ae2394eb3412be63f563bb5" + integrity sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ== + ts-interface-checker@^0.1.9: version "0.1.13" resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" @@ -1788,6 +2428,11 @@ typescript@^5.5.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== +ufo@^1.5.3: + version "1.5.4" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.4.tgz#16d6949674ca0c9e0fbbae1fa20a71d7b1ded754" + integrity sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ== + update-browserslist-db@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz#7ca61c0d8650766090728046e416a8cde682859e" @@ -1801,6 +2446,11 @@ util-deprecate@^1.0.2: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== +uuid@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== + vite@^5.4.2: version "5.4.2" resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.2.tgz#8acb6ec4bfab823cdfc1cb2d6c53ed311bc4e47e" @@ -1812,6 +2462,41 @@ vite@^5.4.2: optionalDependencies: fsevents "~2.3.3" +vscode-jsonrpc@8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz#f43dfa35fb51e763d17cd94dcca0c9458f35abf9" + integrity sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA== + +vscode-languageserver-protocol@3.17.5: + version "3.17.5" + resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz#864a8b8f390835572f4e13bd9f8313d0e3ac4bea" + integrity sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg== + dependencies: + vscode-jsonrpc "8.2.0" + vscode-languageserver-types "3.17.5" + +vscode-languageserver-textdocument@~1.0.11: + version "1.0.12" + resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz#457ee04271ab38998a093c68c2342f53f6e4a631" + integrity sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA== + +vscode-languageserver-types@3.17.5: + version "3.17.5" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz#3273676f0cf2eab40b3f44d085acbb7f08a39d8a" + integrity sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg== + +vscode-languageserver@~9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz#500aef82097eb94df90d008678b0b6b5f474015b" + integrity sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g== + dependencies: + vscode-languageserver-protocol "3.17.5" + +vscode-uri@~3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.8.tgz#1770938d3e72588659a172d0fd4642780083ff9f" + integrity sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw== + which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" From 5392c04c0175a532cd1dfdb20263e9172f022dda Mon Sep 17 00:00:00 2001 From: Kodai Aoyama Date: Mon, 16 Sep 2024 01:08:47 +0900 Subject: [PATCH 05/12] add contextmenu on codeblock --- package.json | 3 + src-tauri/Cargo.lock | 93 +++++++++++++++++++--- src-tauri/Cargo.toml | 1 + src-tauri/src/main.rs | 1 + src/components/atoms/Download.tsx | 10 +++ src/components/atoms/PaperClip.tsx | 9 +++ src/components/molecules/MyMarkdown.tsx | 83 ++++++++++++++++++- src/components/molecules/SpeechHistory.tsx | 8 +- src/components/organisms/NoteMain.tsx | 6 +- src/index.css | 5 ++ src/main.tsx | 1 + yarn.lock | 84 ++++++++++++++++++- 12 files changed, 279 insertions(+), 25 deletions(-) create mode 100644 src/components/atoms/Download.tsx create mode 100644 src/components/atoms/PaperClip.tsx diff --git a/package.json b/package.json index 66a9618..df9a7bc 100644 --- a/package.json +++ b/package.json @@ -16,9 +16,11 @@ "debug:rs": "RUST_BACKTRACE=1 tauri dev --verbose" }, "dependencies": { + "@szhsin/react-menu": "^4.2.2", "@tauri-apps/api": "^1.6.0", "dayjs": "^1.11.13", "highlight.js": "^11.10.0", + "html2canvas": "^1.4.1", "markdown-to-jsx": "^7.5.0", "mermaid": "^11.2.0", "react": "^18.3.1", @@ -27,6 +29,7 @@ "react-medium-image-zoom": "^5.2.8", "react-toastify": "^10.0.5", "recoil": "^0.7.7", + "tauri-plugin-clipboard-api": "1.1.4", "tauri-plugin-sql-api": "github:tauri-apps/tauri-plugin-sql#release", "zenn-content-css": "^0.1.155" }, diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 7edecc6..6fd7f06 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -678,6 +678,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + [[package]] name = "bytes" version = "1.6.0" @@ -917,13 +923,26 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +[[package]] +name = "clipboard-rs" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c718c0784ab208e35cc764e8b3f864caf5cd82a65d793fb99ddb3565ae028726" +dependencies = [ + "clipboard-win", + "cocoa 0.25.0", + "image 0.25.2", + "x11rb", +] + [[package]] name = "clipboard-win" -version = "5.3.0" +version = "5.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d517d4b86184dbb111d3556a10f1c8a04da7428d2987bf1081602bf11c3aa9ee" +checksum = "15efe7a882b08f34e38556b14f2fb3daa98769d06c7f0c1b076dfd0d983bc892" dependencies = [ "error-code", + "windows-win", ] [[package]] @@ -951,6 +970,22 @@ dependencies = [ "objc", ] +[[package]] +name = "cocoa" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" +dependencies = [ + "bitflags 1.3.2", + "block", + "cocoa-foundation", + "core-foundation 0.9.4", + "core-graphics 0.23.1", + "foreign-types 0.5.0", + "libc", + "objc", +] + [[package]] name = "cocoa-foundation" version = "0.1.2" @@ -3224,19 +3259,23 @@ dependencies = [ "bytemuck", "byteorder", "color_quant", + "exr", + "gif", + "jpeg-decoder", "num-traits", "png", + "qoi", "tiff", ] [[package]] name = "image" -version = "0.25.1" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd54d660e773627692c524beaad361aca785a4f9f5730ce91f42aabe5bce3d11" +checksum = "99314c8a2152b8ddb211f924cdae532d8c5e4c8bb54728e12fff1b0cd5963a10" dependencies = [ "bytemuck", - "byteorder", + "byteorder-lite", "color_quant", "exr", "gif", @@ -3475,6 +3514,9 @@ name = "jpeg-decoder" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" +dependencies = [ + "rayon", +] [[package]] name = "js-sys" @@ -3722,6 +3764,7 @@ dependencies = [ "serde_json", "tauri", "tauri-build", + "tauri-plugin-clipboard", "tauri-plugin-sql", "tauri-plugin-window-state", "tokio", @@ -3976,7 +4019,7 @@ dependencies = [ "candle-core", "either", "futures", - "image 0.25.1", + "image 0.25.2", "indexmap 2.2.6", "mistralrs-core", "rand 0.8.5", @@ -4012,7 +4055,7 @@ dependencies = [ "galil-seiferas", "half", "hf-hub", - "image 0.25.1", + "image 0.25.2", "indexmap 2.2.6", "indicatif", "itertools 0.13.0", @@ -4070,7 +4113,7 @@ version = "0.3.0" source = "git+https://github.com/EricLBuehler/mistral.rs.git?tag=v0.3.0#ae71578be27f4369a4d9a0c7d9b849be14c82162" dependencies = [ "candle-core", - "image 0.25.1", + "image 0.25.2", ] [[package]] @@ -6847,7 +6890,7 @@ dependencies = [ "bitflags 1.3.2", "cairo-rs", "cc", - "cocoa", + "cocoa 0.24.1", "core-foundation 0.9.4", "core-graphics 0.22.3", "crossbeam-channel", @@ -6921,7 +6964,7 @@ checksum = "0e33e3ba00a3b05eb6c57ef135781717d33728b48acf914bb05629e74d897d29" dependencies = [ "anyhow", "bytes", - "cocoa", + "cocoa 0.24.1", "dirs-next", "dunce", "embed_plist", @@ -7031,6 +7074,21 @@ dependencies = [ "tauri-utils", ] +[[package]] +name = "tauri-plugin-clipboard" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c52e79ce4da9a2f42995ea07d1bdbe76d5dd6d77e8c6d629a1244dfbb5b130" +dependencies = [ + "base64 0.21.7", + "clipboard-rs", + "image 0.24.9", + "serde", + "tauri", + "tempfile", + "thiserror", +] + [[package]] name = "tauri-plugin-sql" version = "0.0.0" @@ -7089,7 +7147,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18c447dcd9b0f09c7dc4b752cc33e72788805bfd761fbda5692d30c48289efec" dependencies = [ "arboard", - "cocoa", + "cocoa 0.24.1", "gtk", "percent-encoding", "rand 0.8.5", @@ -8454,6 +8512,15 @@ dependencies = [ "windows-targets 0.52.5", ] +[[package]] +name = "windows-win" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58e23e33622b3b52f948049acbec9bcc34bf6e26d74176b88941f213c75cf2dc" +dependencies = [ + "error-code", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -8712,7 +8779,7 @@ checksum = "00711278ed357350d44c749c286786ecac644e044e4da410d466212152383b45" dependencies = [ "base64 0.13.1", "block", - "cocoa", + "cocoa 0.24.1", "core-graphics 0.22.3", "crossbeam-channel", "dunce", @@ -8800,7 +8867,7 @@ dependencies = [ "core-foundation 0.9.4", "core-graphics 0.23.1", "dbus", - "image 0.25.1", + "image 0.25.2", "log", "percent-encoding", "sysinfo", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 84d1eb9..7580512 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -49,6 +49,7 @@ mistralrs = { git = "https://github.com/EricLBuehler/mistral.rs.git", tag = "v0. ] } # mistralrsの要求がtauriの要求と競合するため、tauriの要求を上書きする uuid = "=1.10.0" +tauri-plugin-clipboard = "1.1.4" [target.'cfg(target_arch = "x86_64")'.dependencies] whisper-rs = { version = "0.11.1", features = ["metal"] } diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 3a74b33..7fea8fd 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -331,6 +331,7 @@ fn main() { } response.mimetype("audio/wav").status(status_code).body(buf) }) + .plugin(tauri_plugin_clipboard::init()) .plugin(tauri_plugin_window_state::Builder::default().build()) .plugin( tauri_plugin_sql::Builder::default() diff --git a/src/components/atoms/Download.tsx b/src/components/atoms/Download.tsx new file mode 100644 index 0000000..0351ca6 --- /dev/null +++ b/src/components/atoms/Download.tsx @@ -0,0 +1,10 @@ +import type { SVGProps } from 'react'; + +const Download = (props: SVGProps) => { + return ( + + + ); +} + +export { Download } \ No newline at end of file diff --git a/src/components/atoms/PaperClip.tsx b/src/components/atoms/PaperClip.tsx new file mode 100644 index 0000000..c026954 --- /dev/null +++ b/src/components/atoms/PaperClip.tsx @@ -0,0 +1,9 @@ +import type { SVGProps } from 'react'; + +const PaperClip = (props: SVGProps) => { + return ( + + ); +} + +export { PaperClip } \ No newline at end of file diff --git a/src/components/molecules/MyMarkdown.tsx b/src/components/molecules/MyMarkdown.tsx index 856f817..a5a0f13 100644 --- a/src/components/molecules/MyMarkdown.tsx +++ b/src/components/molecules/MyMarkdown.tsx @@ -1,24 +1,82 @@ import Markdown from 'markdown-to-jsx' -import { useEffect, useRef } from 'react' +import { useEffect, useRef, useState } from 'react' import hljs from 'highlight.js'; import mermaid from 'mermaid'; +import { writeBinaryFile } from "@tauri-apps/api/fs"; +import { save } from '@tauri-apps/api/dialog'; +import html2canvas from 'html2canvas'; +import { ControlledMenu, MenuItem } from '@szhsin/react-menu'; +import clipboard from "tauri-plugin-clipboard-api"; +import { PaperClip } from '../atoms/PaperClip'; +import { Download } from '../atoms/Download'; +import { selectedNoteState } from '../../store/atoms/selectedNoteState'; +import { useRecoilValue } from 'recoil'; type MyMarkdownProps = { content: string + title?: string } const MyMarkdown = (props: MyMarkdownProps) => { + const { content, title = Date.now() } = props const rootRef = useRef(null); - const { content } = props + + const [isOpen, setOpen] = useState(false); + const [anchorPoint, setAnchorPoint] = useState({ x: 0, y: 0 }); + const [elementId, setElementId] = useState(0); + + const [contents, setContents] = useState([]); + + const handleText = () => { + clipboard.writeText(contents[elementId]); + } + const handleImage = async (type: "copy" | "download") => { + const target = rootRef.current?.querySelectorAll("pre code")[elementId] as HTMLElement; + const canvas = await html2canvas(target, + { + backgroundColor: null, + onclone: (_, element) => { + element.style.setProperty("overflow-x", "unset"); + element.style.setProperty("width", "fit-content"); + if (!target.className.includes("mermaid")) { + element.style.backgroundColor = "#1a2638"; + } + } + }); + if (type === "download") { + const blob = await new Promise((resolve) => { + canvas.toBlob((blob) => { + resolve(blob as Blob); + }, 'image/png'); + }); + const arrayBuffer = await blob.arrayBuffer(); + const path = await save({ defaultPath: `${title}.png` }); + if (path) { + const uint8Array = new Uint8Array(arrayBuffer); + await writeBinaryFile({ path, contents: uint8Array }); + } + } else if (type === "copy") { + clipboard.writeImageBase64(canvas.toDataURL("image/png").split(';base64,')[1]) + } + }; useEffect(() => { mermaid.initialize({ startOnLoad: false }); - rootRef.current?.querySelectorAll('pre code').forEach(async (block) => { + rootRef.current?.querySelectorAll('pre code').forEach(async (block, index) => { + setContents(prev => [...prev, block.textContent! as string]); + if (block.className.includes("mermaid")) { await mermaid.run({ nodes: [block as HTMLElement] }); + block.classList.add("hover:border-base-300", "border-2", "border-transparent", "rounded-lg", "cursor-pointer"); } else { hljs.highlightBlock(block as HTMLElement); } + (block as HTMLElement).addEventListener('contextmenu', (e) => { + e.preventDefault(); + setAnchorPoint({ x: e.clientX, y: e.clientY }); + setElementId(index); + setOpen(true); + }); }); }, [content]); @@ -34,6 +92,25 @@ const MyMarkdown = (props: MyMarkdownProps) => { }}> {content} + setOpen(false)} + > + + +

コピー

+
+ handleImage("copy")}> + +

画像としてコピー

+
+ handleImage("download")}> + +

画像としてダウンロード

+
+
) } diff --git a/src/components/molecules/SpeechHistory.tsx b/src/components/molecules/SpeechHistory.tsx index cd0dbfe..2fbbf2f 100644 --- a/src/components/molecules/SpeechHistory.tsx +++ b/src/components/molecules/SpeechHistory.tsx @@ -6,6 +6,7 @@ import { Speech } from './Speech' import { Screenshot } from './Screenshot' import { MyMarkdown } from './MyMarkdown' import 'zenn-content-css'; +import { selectedNoteState } from '../../store/atoms/selectedNoteState' type SpeechHistoryProps = { histories: SpeechHistoryType[] @@ -29,6 +30,7 @@ const SpeechHistory = (props: SpeechHistoryProps): JSX.Element => { } } ); + const selectedNote = useRecoilValue(selectedNoteState) return (
@@ -49,7 +51,7 @@ const SpeechHistory = (props: SpeechHistoryProps): JSX.Element => { &&
{date}
- +
} { @@ -61,14 +63,14 @@ const SpeechHistory = (props: SpeechHistoryProps): JSX.Element => {

- +

{c.content_2 ? - + : } diff --git a/src/components/organisms/NoteMain.tsx b/src/components/organisms/NoteMain.tsx index 16fca3d..b242462 100644 --- a/src/components/organisms/NoteMain.tsx +++ b/src/components/organisms/NoteMain.tsx @@ -25,6 +25,7 @@ import dayjs from '../../lib/dayjs' import { speechFilterState } from '../../store/atoms/speechFilterState' import { invoke } from '@tauri-apps/api' import { settingKeyState } from '../../store/atoms/settingKeyState' +import { Download } from '../atoms/Download' const NoteMain = (): JSX.Element => { const filterTarget = useRecoilValue(speechFilterState); @@ -292,10 +293,7 @@ const NoteMain = (): JSX.Element => { await writeTextFile(path, csvData); } }}> - - - - +
Date: Mon, 16 Sep 2024 20:12:06 +0900 Subject: [PATCH 06/12] add partial copy --- src/components/molecules/MyMarkdown.tsx | 73 +++++++++++++++++++------ 1 file changed, 56 insertions(+), 17 deletions(-) diff --git a/src/components/molecules/MyMarkdown.tsx b/src/components/molecules/MyMarkdown.tsx index a5a0f13..c6bf412 100644 --- a/src/components/molecules/MyMarkdown.tsx +++ b/src/components/molecules/MyMarkdown.tsx @@ -9,8 +9,6 @@ import { ControlledMenu, MenuItem } from '@szhsin/react-menu'; import clipboard from "tauri-plugin-clipboard-api"; import { PaperClip } from '../atoms/PaperClip'; import { Download } from '../atoms/Download'; -import { selectedNoteState } from '../../store/atoms/selectedNoteState'; -import { useRecoilValue } from 'recoil'; type MyMarkdownProps = { content: string @@ -27,6 +25,26 @@ const MyMarkdown = (props: MyMarkdownProps) => { const [contents, setContents] = useState([]); + const [isTextSelected, setIsTextSelected] = useState(false); + const [textSelected, setTextSelected] = useState(""); + const handleMouseDown = (e: MouseEvent) => { + if (e.button === 2) { + const selection = window.getSelection(); + setTextSelected(selection?.toString() || ""); + const isWithinSelectableArea = rootRef.current?.contains(selection?.anchorNode || null); + setIsTextSelected((selection?.toString() || "").length > 0 && !!isWithinSelectableArea); + } + }; + useEffect(() => { + document.addEventListener("mousedown", handleMouseDown); + return () => { + document.removeEventListener("mousedown", handleMouseDown); + } + }, [handleMouseDown]); + + const handlePartialText = () => { + clipboard.writeText(textSelected); + } const handleText = () => { clipboard.writeText(contents[elementId]); } @@ -62,6 +80,8 @@ const MyMarkdown = (props: MyMarkdownProps) => { useEffect(() => { mermaid.initialize({ startOnLoad: false }); + const listeners = new Map(); + rootRef.current?.querySelectorAll('pre code').forEach(async (block, index) => { setContents(prev => [...prev, block.textContent! as string]); @@ -71,13 +91,23 @@ const MyMarkdown = (props: MyMarkdownProps) => { } else { hljs.highlightBlock(block as HTMLElement); } - (block as HTMLElement).addEventListener('contextmenu', (e) => { + + const handleContextMenu = (e: MouseEvent) => { e.preventDefault(); setAnchorPoint({ x: e.clientX, y: e.clientY }); setElementId(index); setOpen(true); - }); + }; + + (block as HTMLElement).addEventListener('contextmenu', handleContextMenu); + listeners.set(block, ['contextmenu', handleContextMenu]); }); + + return () => { + listeners.forEach(([event, listener], block) => { + (block as HTMLElement).removeEventListener(event, listener); + }); + }; }, [content]); return ( @@ -98,21 +128,30 @@ const MyMarkdown = (props: MyMarkdownProps) => { direction="right" onClose={() => setOpen(false)} > - - -

コピー

-
- handleImage("copy")}> - -

画像としてコピー

-
- handleImage("download")}> - -

画像としてダウンロード

-
+ {isTextSelected ? + <> + + +

コピー

+
+ : + <> + + +

全体をコピー

+
+ handleImage("copy")}> + +

画像としてコピー

+
+ handleImage("download")}> + +

画像としてダウンロード

+
+ }
) } -export { MyMarkdown } \ No newline at end of file +export { MyMarkdown } From 5631da550f04993878b51f71b2a02561c0a0f340 Mon Sep 17 00:00:00 2001 From: Kodai Aoyama Date: Mon, 16 Sep 2024 20:25:11 +0900 Subject: [PATCH 07/12] allow mermaid --- src-tauri/tauri.conf.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 66d579c..0276e60 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -52,7 +52,7 @@ } }, "security": { - "csp": "default-src 'self'; img-src 'self' data: asset: https://asset.localhost; media-src stream: https://stream.localhost asset: https://asset.localhost" + "csp": "default-src 'self'; img-src 'self' data: asset: https://asset.localhost; media-src stream: https://stream.localhost asset: https://asset.localhost; style-src 'self' 'unsafe-inline'" }, "updater": { "active": false From 2eae78df51f2fd746136733a6bc4e60ce8aa6460 Mon Sep 17 00:00:00 2001 From: Kodai Aoyama Date: Mon, 16 Sep 2024 20:30:13 +0900 Subject: [PATCH 08/12] add gpt-4o-2024-05-13 --- src/components/molecules/SettingModel.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/molecules/SettingModel.tsx b/src/components/molecules/SettingModel.tsx index c92b498..04479b6 100644 --- a/src/components/molecules/SettingModel.tsx +++ b/src/components/molecules/SettingModel.tsx @@ -3,7 +3,7 @@ import { useRecoilState } from 'recoil'; import { settingKeyState } from "../../store/atoms/settingKeyState"; const SettingModel = (): JSX.Element => { - const settingModels = ["gpt-3.5-turbo", "gpt-3.5-turbo-1106", "gpt-4", "gpt-4-1106-preview", "gpt-4-turbo-preview", "gpt-4-turbo", "gpt-4o", "gpt-4o-mini"] + const settingModels = ["gpt-3.5-turbo", "gpt-3.5-turbo-1106", "gpt-4", "gpt-4-1106-preview", "gpt-4-turbo-preview", "gpt-4-turbo", "gpt-4o-2024-05-13", "gpt-4o", "gpt-4o-mini"] const [settingKey, setSettingKey] = useRecoilState(settingKeyState("settingModel")) const change = (e: ChangeEvent) => { From b92a514b277e8732bf39ac29e92fe9031ccb58f9 Mon Sep 17 00:00:00 2001 From: Kodai Aoyama Date: Mon, 16 Sep 2024 22:11:27 +0900 Subject: [PATCH 09/12] remove unnecessary wrapper --- src/components/molecules/SpeechHistory.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/molecules/SpeechHistory.tsx b/src/components/molecules/SpeechHistory.tsx index 2fbbf2f..93f7942 100644 --- a/src/components/molecules/SpeechHistory.tsx +++ b/src/components/molecules/SpeechHistory.tsx @@ -62,9 +62,7 @@ const SpeechHistory = (props: SpeechHistoryProps): JSX.Element => {
-

- -

+
From aaee3df8ca5036ee255a3ea82cbcff097b1c0745 Mon Sep 17 00:00:00 2001 From: Kodai Aoyama Date: Mon, 16 Sep 2024 22:34:05 +0900 Subject: [PATCH 10/12] add info with openai api usage --- src/components/organisms/SettingsMain.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/organisms/SettingsMain.tsx b/src/components/organisms/SettingsMain.tsx index eb7166f..9891ba3 100644 --- a/src/components/organisms/SettingsMain.tsx +++ b/src/components/organisms/SettingsMain.tsx @@ -586,9 +586,10 @@ const SettingsMain = (): JSX.Element => {
{settingOnline === "OpenAI" && <> -
-

OpenAI社のAPIを利用することで、

-

高速な追っかけ文字起こし・翻訳やAIが選択可能となります。

+
+

OpenAI社のAPIを利用することで、高速な追っかけ文字起こし・翻訳やAIが選択可能となります。

+

あなたのアカウントのTierに応じて、利用可能なモデルが異なります。

+ https://platform.openai.com/settings/organization/limits
From bd9b52bdb18867d2ba44b0dfc4a775936785dc11 Mon Sep 17 00:00:00 2001 From: Kodai Aoyama Date: Mon, 16 Sep 2024 23:33:23 +0900 Subject: [PATCH 11/12] arrange prompt with action --- src-tauri/src/module/action.rs | 82 ++++++++++++++++++++++++++++------ 1 file changed, 68 insertions(+), 14 deletions(-) diff --git a/src-tauri/src/module/action.rs b/src-tauri/src/module/action.rs index 613a9bf..1af89bb 100644 --- a/src-tauri/src/module/action.rs +++ b/src-tauri/src/module/action.rs @@ -53,23 +53,77 @@ impl Action { headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); let mut messages: Vec = Vec::new(); + let mut prompt = "あなたは高度な文字起こし解析AIアシスタントです。 +提供される情報を統合し、ユーザーの最終的な質問に対して包括的で正確な回答を提供することが、あなたの役割です。 +以下の手順に従って処理を行ってください: + +1. 情報の分析: + a) 文字起こし (:::transcription で囲まれた部分):会話の主要な内容と流れを把握します。 + b) メモ (:::note で囲まれた部分):文脈や補足情報として扱います。 + c) 過去のAIとのQ&A (:::assistant で囲まれた部分):関連する追加情報として考慮します。 +2. 情報の優先順位付け: + - 文字起こしの内容を最も重要視します。 + - メモと過去のQ&Aは補足情報として扱いますが、関連性が高い場合は積極的に活用します。 +3. 回答の構造化: + a) 要約:主要なポイントを簡潔にまとめます(3-5文程度)。 + b) 詳細分析:重要なトピックについて掘り下げて説明します。 + c) 追加の洞察:メモやQ&Aから得られた関連情報を提供します。 + d) 結論:全体を総括し、ユーザーの質問に直接答えます。 +4. エラー処理: + - 情報が不完全や矛盾している場合は、その旨を明確に述べます。 + - 可能な限り、利用可能な情報に基づいて回答し、推測が含まれる場合はその旨を明示します。 +5. 回答の調整: + - ユーザーの質問の種類(要約、分析、意見など)に応じて、回答の焦点と深さを調整します。 + - 必要に応じて、追加の質問や明確化を求めることを提案します。 + +以下に提供される情報を上記の手順に従って分析し、次のユーザーの質問に答えてください: + +".to_string(); + let mut current_type = String::new(); + let mut current_content = String::new(); + for content in contents.iter() { - if content.speech_type == "action" { - messages.push(json!({ - "role": "user", - "content": content.content.clone() - })); - messages.push(json!({ - "role": "assistant", - "content": content.content_2.clone() - })); - } else { - messages.push(json!({ - "role": "user", - "content": content.content.clone() - })); + match content.speech_type.as_str() { + "action" => { + if !current_content.is_empty() { + prompt + .push_str(&format!(":::{}\n{}\n:::\n", current_type, current_content)); + current_content.clear(); + } + prompt.push_str(&format!( + ":::assistant\n[query]\n{}\n[answer]\n{}\n:::\n", + content.content, content.content_2 + )); + } + "speech" | _ => { + let speech_type = if content.speech_type == "speech" { + "transcription" + } else if content.speech_type == "memo" { + "note" + } else { // "screenshot" + "note" + }; + if speech_type != current_type && !current_content.is_empty() { + prompt + .push_str(&format!(":::{}\n{}\n:::\n", current_type, current_content)); + current_content.clear(); + } + current_type = speech_type.to_string(); + current_content.push_str(&content.content); + current_content.push('\n'); + } } } + + if !current_content.is_empty() { + prompt.push_str(&format!(":::{}\n{}\n:::\n", current_type, current_content)); + } + prompt.push_str("\n回答の際は、上記の手順に従い、情報を適切に統合し、構造化された形で提供してください。次のユーザーの質問に直接答え、必要に応じて追加の洞察や説明を加えてください。"); + + messages.push(json!({ + "role": "system", + "content": prompt + })); messages.push(json!({ "role": "user", "content": question From 68e4784507bd0d6fd48af633c4308758cb58fc14 Mon Sep 17 00:00:00 2001 From: Kodai Aoyama Date: Mon, 16 Sep 2024 23:38:46 +0900 Subject: [PATCH 12/12] update to 0.9.21 --- package.json | 2 +- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index df9a7bc..b4c3e6c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lycoris", "private": true, - "version": "0.9.20", + "version": "0.9.21", "type": "module", "license": "MIT", "engines": { diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 6fd7f06..b6675b9 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -3740,7 +3740,7 @@ dependencies = [ [[package]] name = "lycoris" -version = "0.9.20" +version = "0.9.21" dependencies = [ "chrono", "core-graphics 0.24.0", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 7580512..9db86f0 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lycoris" -version = "0.9.20" +version = "0.9.21" description = "Lycoris is an offline voice memo" authors = ["solaoi"] license = "MIT" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 0276e60..2a64283 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "Lycoris", - "version": "0.9.20" + "version": "0.9.21" }, "tauri": { "allowlist": {