From 1d874aa1891f6845b08ccd29e8471ffa72e4975f Mon Sep 17 00:00:00 2001 From: reiji-h Date: Thu, 28 Nov 2024 09:43:50 +0000 Subject: [PATCH 01/33] change className to class --- apps/app/public/static/locales/en_US/translation.json | 4 ++-- apps/app/public/static/locales/fr_FR/translation.json | 4 ++-- apps/app/public/static/locales/ja_JP/translation.json | 4 ++-- apps/app/public/static/locales/zh_CN/translation.json | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/app/public/static/locales/en_US/translation.json b/apps/app/public/static/locales/en_US/translation.json index 9481d802cbf..91e5c88482c 100644 --- a/apps/app/public/static/locales/en_US/translation.json +++ b/apps/app/public/static/locales/en_US/translation.json @@ -117,7 +117,7 @@ "Create under": "Create page under below:", "V5 Page Migration": "Convert To V5 Compatibility", "GROWI.5.0_new_schema": "GROWI.5.0 new schema", - "See_more_detail_on_new_schema": "See more detail on {{title}} external_link ", + "See_more_detail_on_new_schema": "See more detail on {{title}} external_link ", "external_account_management": "External Account Management", "UserGroup": "UserGroup", "Basic Settings": "Basic Settings", @@ -615,7 +615,7 @@ "alert_desc1": "On this page, you can select pages with the checkbox and batch convert to the new v5 compatible format from the \"Bulk operation\" button at the top of the screen.", "nopages_title": "Congratulations. Ready to use GROWI v5!", "nopages_desc1": "Now all the pages you can manage seem to be in v5 compatible format.", - "detail_info": "See the detail information from Upgrading GROWI to v5.0.x external_link.", + "detail_info": "See the detail information from Upgrading GROWI to v5.0.x external_link.", "modal": { "title": "Convert to new v5 compatible format", "converting_pages": "Converting pages", diff --git a/apps/app/public/static/locales/fr_FR/translation.json b/apps/app/public/static/locales/fr_FR/translation.json index bb0d0686ba2..d753fb02981 100644 --- a/apps/app/public/static/locales/fr_FR/translation.json +++ b/apps/app/public/static/locales/fr_FR/translation.json @@ -117,7 +117,7 @@ "Create under": "Créer la page sous:", "V5 Page Migration": "Convertir vers la V5", "GROWI.5.0_new_schema": "Nouveau schéma GROWI.5.0", - "See_more_detail_on_new_schema": "Plus de détails sur {{title}} ", + "See_more_detail_on_new_schema": "Plus de détails sur {{title}}external_link ", "external_account_management": "Gestion des comptes externes", "UserGroup": "Groupe utilisateur", "Basic Settings": "Paramètres de base", @@ -608,7 +608,7 @@ "alert_desc1": "Sélectionner les pages à convertir vers le format V5 avec le bouton \"Opération de masse\".", "nopages_title": "GROWI V5 est maintenant utilisable!", "nopages_desc1": "Toutes les pages ont été converties au format V5.", - "detail_info": "Pour plus de détails, voir Convertir vers GROWI v5.0.x external_link.", + "detail_info": "Pour plus de détails, voir Convertir vers GROWI v5.0.x external_link.", "modal": { "title": "Convertir au format V5", "converting_pages": "Conversion des pages", diff --git a/apps/app/public/static/locales/ja_JP/translation.json b/apps/app/public/static/locales/ja_JP/translation.json index dc7c3021ed9..89e6bd0b190 100644 --- a/apps/app/public/static/locales/ja_JP/translation.json +++ b/apps/app/public/static/locales/ja_JP/translation.json @@ -116,7 +116,7 @@ "Create under": "ページを以下に作成", "V5 Page Migration": "V5 互換形式 への変換", "GROWI.5.0_new_schema": "GROWI.5.0における新スキーマについて", - "See_more_detail_on_new_schema": "詳しくは{{title}}external_linkを参照ください。", + "See_more_detail_on_new_schema": "詳しくは{{title}}external_linkを参照ください。", "external_account_management": "外部アカウント管理", "UserGroup": "グループ", "Basic Settings": "基本設定", @@ -647,7 +647,7 @@ "alert_desc1": "このページでは、チェックボックスでページを選択し、画面上部の「一括操作」ボタンから新しい v5 互換形式に一括変換できます。", "nopages_title": "おめでとうございます。GROWI v5 を使う準備が完了しました!", "nopages_desc1": "今あなたが管理可能なページはすべて v5 互換形式になっているようです。", - "detail_info": "詳しくは GROWI v5.0.x へのアップグレード external_link を参照ください。", + "detail_info": "詳しくは GROWI v5.0.x へのアップグレード external_link を参照ください。", "modal": { "title": "新しい v5 互換形式への変換", "converting_pages": "以下のページを変換します", diff --git a/apps/app/public/static/locales/zh_CN/translation.json b/apps/app/public/static/locales/zh_CN/translation.json index 3a3fb1e8e42..b64af72f5b1 100644 --- a/apps/app/public/static/locales/zh_CN/translation.json +++ b/apps/app/public/static/locales/zh_CN/translation.json @@ -122,7 +122,7 @@ "Create under": "Create page under below:", "V5 Page Migration": "转换为V5的兼容性", "GROWI.5.0_new_schema": "GROWI.5.0 new schema", - "See_more_detail_on_new_schema": "更多详情请见 {{title}} external_link ", + "See_more_detail_on_new_schema": "更多详情请见 {{title}} external_link ", "Markdown Settings": "Markdown设置", "external_account_management": "外部账户管理", "UserGroup": "用户组", @@ -617,7 +617,7 @@ "alert_desc1": "在这一页,你可以用复选框选择页面,并通过屏幕上方的批量操作按钮批量转换为新的v5兼容格式。", "nopages_title": "恭喜你。准备使用GROWI v5!", "nopages_desc1": "现在你能管理的所有页面似乎都是v5兼容的格式。", - "detail_info": "请参见 升级GROWI到v5.0.x external_link.的详细内容。", + "detail_info": "请参见 升级GROWI到v5.0.x external_link.的详细内容。", "modal": { "title": "转换为新的v5兼容格式", "converting_pages": "转换页面", From 1e0c75d4da595732651a51c1568b0b3f76af5b48 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 2 Dec 2024 01:50:00 +0000 Subject: [PATCH 02/33] Install rehype-stringify --- apps/app/package.json | 1 + pnpm-lock.yaml | 106 +++++++++++++++++++++++++++--------------- 2 files changed, 69 insertions(+), 38 deletions(-) diff --git a/apps/app/package.json b/apps/app/package.json index ffbd501e4dd..44ddf9ec064 100644 --- a/apps/app/package.json +++ b/apps/app/package.json @@ -200,6 +200,7 @@ "rehype-raw": "^7.0.0", "rehype-sanitize": "^6.0.0", "rehype-slug": "^6.0.0", + "rehype-stringify": "^10.0.1", "rehype-toc": "^3.0.2", "remark-breaks": "^4.0.0", "remark-directive": "^3.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 77af8f0cea0..6f96108f05e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -606,6 +606,9 @@ importers: rehype-slug: specifier: ^6.0.0 version: 6.0.0 + rehype-stringify: + specifier: ^10.0.1 + version: 10.0.1 rehype-toc: specifier: ^3.0.2 version: 3.0.2 @@ -7292,6 +7295,9 @@ packages: hast-util-select@6.0.2: resolution: {integrity: sha512-hT/SD/d/Meu+iobvgkffo1QecV8WeKWxwsNMzcTJsKw1cKTQKSR/7ArJeURLNJF9HDjp9nVoORyNNJxrvBye8Q==} + hast-util-to-html@9.0.3: + resolution: {integrity: sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==} + hast-util-to-jsx-runtime@2.3.0: resolution: {integrity: sha512-H/y0+IWPdsLLS738P8tDnrQ8Z+dj12zQQ6WC11TIM21C8WFVoIxcqWXf2H3hiTVZjF1AWqoimGwrTWecWrnmRQ==} @@ -10229,6 +10235,9 @@ packages: rehype-slug@6.0.0: resolution: {integrity: sha512-lWyvf/jwu+oS5+hL5eClVd3hNdmwM1kAC0BUvEGD19pajQMIzcNUd/k9GsfQ+FfECvX+JE+e9/btsKH0EjJT6A==} + rehype-stringify@10.0.1: + resolution: {integrity: sha512-k9ecfXHmIPuFVI61B9DeLPN0qFHfawM6RsuX48hoqlaKSF61RskNjSm1lI8PhBEM0MRdLxVVm4WmTqJQccH9mA==} + rehype-toc@3.0.2: resolution: {integrity: sha512-DMt376+4i1KJGgHJL7Ezd65qKkJ7Eqp6JSB47BJ90ReBrohI9ufrornArM6f4oJjP2E2DVZZHufWucv/9t7GUQ==} engines: {node: '>=10'} @@ -12268,6 +12277,9 @@ packages: zwitch@2.0.2: resolution: {integrity: sha512-JZxotl7SxAJH0j7dN4pxsTV6ZLXoLdGME+PsjkL/DaBrVryK9kTGq06GfKrwcSOqypP+fdXGoCHE36b99fWVoA==} + zwitch@2.0.4: + resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} + snapshots: '@adobe/css-tools@4.4.0': {} @@ -13389,7 +13401,7 @@ snapshots: '@babel/traverse': 7.24.6 '@babel/types': 7.25.6 convert-source-map: 2.0.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -13580,7 +13592,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.24.6 '@babel/parser': 7.25.6 '@babel/types': 7.25.6 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -14085,7 +14097,7 @@ snapshots: '@elastic/elasticsearch@7.17.13': dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) hpagent: 0.1.2 ms: 2.1.3 secure-json-parse: 2.7.0 @@ -14101,7 +14113,7 @@ snapshots: '@elastic/transport@8.6.1': dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) hpagent: 1.2.0 ms: 2.1.3 secure-json-parse: 2.7.0 @@ -14212,7 +14224,7 @@ snapshots: '@eslint/eslintrc@2.0.3': dependencies: ajv: 6.12.6 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) espree: 9.6.1 globals: 13.24.0 ignore: 5.3.1 @@ -14285,7 +14297,7 @@ snapshots: '@humanwhocodes/config-array@0.11.8': dependencies: '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -14301,7 +14313,7 @@ snapshots: '@antfu/install-pkg': 0.4.1 '@antfu/utils': 0.7.10 '@iconify/types': 2.0.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) kolorist: 1.8.0 local-pkg: 0.5.0 mlly: 1.7.1 @@ -15760,7 +15772,7 @@ snapshots: '@swc-node/sourcemap-support': 0.5.0 '@swc/core': 1.5.25(@swc/helpers@0.5.11) colorette: 2.0.20 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) pirates: 4.0.6 tslib: 2.8.0 typescript: 5.4.2 @@ -16361,7 +16373,7 @@ snapshots: '@typescript-eslint/scope-manager': 5.59.7 '@typescript-eslint/type-utils': 5.59.7(eslint@8.41.0)(typescript@5.4.2) '@typescript-eslint/utils': 5.59.7(eslint@8.41.0)(typescript@5.4.2) - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) eslint: 8.41.0 grapheme-splitter: 1.0.4 ignore: 5.3.1 @@ -16391,7 +16403,7 @@ snapshots: '@typescript-eslint/scope-manager': 5.59.7 '@typescript-eslint/types': 5.59.7 '@typescript-eslint/typescript-estree': 5.59.7(typescript@5.4.2) - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) eslint: 8.41.0 optionalDependencies: typescript: 5.4.2 @@ -16420,7 +16432,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 5.59.7(typescript@5.4.2) '@typescript-eslint/utils': 5.59.7(eslint@8.41.0)(typescript@5.4.2) - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) eslint: 8.41.0 tsutils: 3.21.0(typescript@5.4.2) optionalDependencies: @@ -16449,7 +16461,7 @@ snapshots: dependencies: '@typescript-eslint/types': 5.59.7 '@typescript-eslint/visitor-keys': 5.59.7 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) globby: 11.1.0 is-glob: 4.0.3 semver: 7.6.3 @@ -16835,13 +16847,13 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color agent-base@7.1.1: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -17915,7 +17927,7 @@ snapshots: connect-mongo@4.6.0(express-session@1.18.0)(mongodb@4.17.2(@aws-sdk/client-sso-oidc@3.600.0)): dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) express-session: 1.18.0 kruptein: 3.0.6 mongodb: 4.17.2(@aws-sdk/client-sso-oidc@3.600.0) @@ -18395,10 +18407,6 @@ snapshots: dependencies: ms: 2.1.3 - debug@4.3.7: - dependencies: - ms: 2.1.3 - debug@4.3.7(supports-color@5.5.0): dependencies: ms: 2.1.3 @@ -18693,7 +18701,7 @@ snapshots: engine.io-client@6.6.2: dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) engine.io-parser: 5.2.3 ws: 8.17.1 xmlhttprequest-ssl: 2.1.2 @@ -18713,7 +18721,7 @@ snapshots: base64id: 2.0.0 cookie: 0.7.2 cors: 2.8.5 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) engine.io-parser: 5.2.3 ws: 8.17.1 transitivePeerDependencies: @@ -19159,7 +19167,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.0 @@ -19499,7 +19507,7 @@ snapshots: follow-redirects@1.15.9(debug@4.3.7): optionalDependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) follow-redirects@1.5.10: dependencies: @@ -20005,6 +20013,20 @@ snapshots: unist-util-visit: 5.0.0 zwitch: 2.0.2 + hast-util-to-html@9.0.3: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + ccount: 2.0.1 + comma-separated-tokens: 2.0.2 + hast-util-whitespace: 3.0.0 + html-void-elements: 3.0.0 + mdast-util-to-hast: 13.2.0 + property-information: 6.1.1 + space-separated-tokens: 2.0.1 + stringify-entities: 4.0.4 + zwitch: 2.0.4 + hast-util-to-jsx-runtime@2.3.0: dependencies: '@types/estree': 1.0.6 @@ -20147,14 +20169,14 @@ snapshots: dependencies: '@tootallnate/once': 2.0.0 agent-base: 6.0.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -20177,14 +20199,14 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color https-proxy-agent@7.0.5: dependencies: agent-base: 7.1.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -20543,7 +20565,7 @@ snapshots: istanbul-lib-source-maps@4.0.1: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: @@ -21942,7 +21964,7 @@ snapshots: micromark@4.0.0: dependencies: '@types/debug': 4.1.7 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) decode-named-character-reference: 1.0.2 devlop: 1.1.0 micromark-core-commonmark: 2.0.1 @@ -22105,7 +22127,7 @@ snapshots: dependencies: async-mutex: 0.4.1 camelcase: 6.3.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) find-cache-dir: 3.3.2 follow-redirects: 1.15.9(debug@4.3.7) https-proxy-agent: 7.0.5 @@ -22213,7 +22235,7 @@ snapshots: mquery@4.0.3: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -22303,7 +22325,7 @@ snapshots: new-find-package-json@2.0.0: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -22834,7 +22856,7 @@ snapshots: passport-saml@3.2.4: dependencies: '@xmldom/xmldom': 0.7.13 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) passport-strategy: 1.0.0 xml-crypto: 2.1.5 xml-encryption: 2.0.0 @@ -23640,6 +23662,12 @@ snapshots: hast-util-to-string: 3.0.1 unist-util-visit: 5.0.0 + rehype-stringify@10.0.1: + dependencies: + '@types/hast': 3.0.4 + hast-util-to-html: 9.0.3 + unified: 11.0.5 + rehype-toc@3.0.2: dependencies: '@jsdevtools/rehype-toc': 3.0.2 @@ -23821,7 +23849,7 @@ snapshots: retry-request@4.2.2: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) extend: 3.0.2 transitivePeerDependencies: - supports-color @@ -24211,7 +24239,7 @@ snapshots: socket.io-adapter@2.5.5: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) ws: 8.17.1 transitivePeerDependencies: - bufferutil @@ -24221,7 +24249,7 @@ snapshots: socket.io-client@4.8.1: dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) engine.io-client: 6.6.2 socket.io-parser: 4.2.4 transitivePeerDependencies: @@ -24232,7 +24260,7 @@ snapshots: socket.io-parser@4.2.4: dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -24241,7 +24269,7 @@ snapshots: accepts: 1.3.8 base64id: 2.0.0 cors: 2.8.5 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) engine.io: 6.6.2 socket.io-adapter: 2.5.5 socket.io-parser: 4.2.4 @@ -26037,3 +26065,5 @@ snapshots: zwitch@1.0.5: {} zwitch@2.0.2: {} + + zwitch@2.0.4: {} From 95eb6ec6ccb5e079b4db68abf4a315fa663724d7 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 2 Dec 2024 01:50:38 +0000 Subject: [PATCH 03/33] Install rehype-meta --- apps/app/package.json | 1 + pnpm-lock.yaml | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/apps/app/package.json b/apps/app/package.json index 44ddf9ec064..592d97fd22c 100644 --- a/apps/app/package.json +++ b/apps/app/package.json @@ -197,6 +197,7 @@ "reconnecting-websocket": "^4.4.0", "redis": "^3.0.2", "rehype-katex": "^7.0.1", + "rehype-meta": "^4.0.1", "rehype-raw": "^7.0.0", "rehype-sanitize": "^6.0.0", "rehype-slug": "^6.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6f96108f05e..40507391d88 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -597,6 +597,9 @@ importers: rehype-katex: specifier: ^7.0.1 version: 7.0.1 + rehype-meta: + specifier: ^4.0.1 + version: 4.0.1 rehype-raw: specifier: ^7.0.0 version: 7.0.0 @@ -7271,6 +7274,9 @@ packages: hast-util-from-parse5@8.0.1: resolution: {integrity: sha512-Er/Iixbc7IEa7r/XLtuG52zoqn/b3Xng/w6aZQ0xGVxzhw5xUFxcRqdPzP6yFi/4HBYRaifaI5fQ1RH8n0ZeOQ==} + hast-util-from-selector@3.0.1: + resolution: {integrity: sha512-CA2dwcsAS6a7DNZq8HT5fNP4FzUq2PUpQpKnAtOCmfTk429jR0RtasLSMlFA1FNKd8lgfeCIAFl3/vD95be8Lg==} + hast-util-has-property@3.0.0: resolution: {integrity: sha512-MNilsvEKLFpV604hwfhVStK0usFY/QmM5zX16bo7EjnAEGofr5YyI37kzopBlZJkHD4t887i+q/C8/tr5Q94cA==} @@ -7319,6 +7325,9 @@ packages: hastscript@8.0.0: resolution: {integrity: sha512-dMOtzCEd3ABUeSIISmrETiKuyydk1w0pa+gE/uormcTpSYuaNJPbX1NU3JLyscSLjwAQM8bWMhhIlnCqnRvDTw==} + hastscript@9.0.0: + resolution: {integrity: sha512-jzaLBGavEDKHrc5EfFImKN7nZKKBdSLIdGvCwDZ9TfzbF2ffXiov8CKE445L2Z1Ek2t/m4SKQ2j6Ipv7NyUolw==} + he@1.2.0: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true @@ -10222,6 +10231,9 @@ packages: rehype-katex@7.0.1: resolution: {integrity: sha512-OiM2wrZ/wuhKkigASodFoo8wimG3H12LWQaH8qSPVJn9apWKFSH3YOCtbKpBorTVw/eI7cuT21XBbvwEswbIOA==} + rehype-meta@4.0.1: + resolution: {integrity: sha512-nLwA17+GbtBYi3C1KSrFR8JlqXv76mz185U//xDEAYgzE3g/bSD6WKSXva1W95ttzouUCJwA09X3AQZIi3R+Nw==} + rehype-raw@7.0.0: resolution: {integrity: sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==} @@ -19954,6 +19966,13 @@ snapshots: vfile-location: 5.0.3 web-namespaces: 2.0.1 + hast-util-from-selector@3.0.1: + dependencies: + '@types/hast': 3.0.4 + css-selector-parser: 3.0.5 + devlop: 1.1.0 + hastscript: 9.0.0 + hast-util-has-property@3.0.0: dependencies: '@types/hast': 3.0.4 @@ -20088,6 +20107,14 @@ snapshots: property-information: 6.1.1 space-separated-tokens: 2.0.1 + hastscript@9.0.0: + dependencies: + '@types/hast': 3.0.4 + comma-separated-tokens: 2.0.2 + hast-util-parse-selector: 4.0.0 + property-information: 6.1.1 + space-separated-tokens: 2.0.1 + he@1.2.0: {} header-case@2.0.4: @@ -23637,6 +23664,14 @@ snapshots: unist-util-visit-parents: 6.0.1 vfile: 6.0.3 + rehype-meta@4.0.1: + dependencies: + '@types/hast': 3.0.4 + hast-util-from-selector: 3.0.1 + hast-util-select: 6.0.2 + hastscript: 9.0.0 + vfile: 6.0.3 + rehype-raw@7.0.0: dependencies: '@types/hast': 3.0.4 From f87304f15b7e243c94daf9b6b7acd84a9ad09bad Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 2 Dec 2024 02:46:47 +0000 Subject: [PATCH 04/33] Modified markdown to html conversion logic --- .../features/openai/server/services/openai.ts | 16 +++-- .../openai/server/utils/sanitize-markdown.ts | 65 +++++++++++++++---- 2 files changed, 62 insertions(+), 19 deletions(-) diff --git a/apps/app/src/features/openai/server/services/openai.ts b/apps/app/src/features/openai/server/services/openai.ts index 608f6576278..ecd3d0ed9c3 100644 --- a/apps/app/src/features/openai/server/services/openai.ts +++ b/apps/app/src/features/openai/server/services/openai.ts @@ -2,6 +2,7 @@ import assert from 'node:assert'; import { Readable, Transform } from 'stream'; import { pipeline } from 'stream/promises'; +import type { IPagePopulatedToShowRevision } from '@growi/core'; import { PageGrant, isPopulated } from '@growi/core'; import type { HydratedDocument, Types } from 'mongoose'; import mongoose from 'mongoose'; @@ -20,7 +21,7 @@ import { createBatchStream } from '~/server/util/batch-stream'; import loggerFactory from '~/utils/logger'; import { OpenaiServiceTypes } from '../../interfaces/ai'; -import { sanitizeMarkdown } from '../utils/sanitize-markdown'; +import { convertMarkdownToHtml } from '../utils/sanitize-markdown'; import { getClient } from './client-delegator'; // import { splitMarkdownIntoChunks } from './markdown-splitter/markdown-token-splitter'; @@ -157,9 +158,10 @@ class OpenaiService implements IOpenaiService { // } // } - private async uploadFile(pageId: Types.ObjectId, body: string): Promise { - const sanitizedMarkdown = await sanitizeMarkdown(body); - const file = await toFile(Readable.from(sanitizedMarkdown), `${pageId}.md`); + private async uploadFile(page: HydratedDocument | IPagePopulatedToShowRevision): Promise { + const convertedHtml = await convertMarkdownToHtml(page); + console.log('convertedHtml', convertedHtml); + const file = await toFile(Readable.from(convertedHtml), `${page._id}.html`); const uploadedFile = await this.client.uploadFile(file); return uploadedFile; } @@ -183,17 +185,17 @@ class OpenaiService implements IOpenaiService { async createVectorStoreFile(pages: Array>): Promise { const vectorStore = await this.getOrCreateVectorStoreForPublicScope(); const vectorStoreFileRelationsMap: VectorStoreFileRelationsMap = new Map(); - const processUploadFile = async(page: PageDocument) => { + const processUploadFile = async(page: HydratedDocument) => { if (page._id != null && page.grant === PageGrant.GRANT_PUBLIC && page.revision != null) { if (isPopulated(page.revision) && page.revision.body.length > 0) { - const uploadedFile = await this.uploadFile(page._id, page.revision.body); + const uploadedFile = await this.uploadFile(page); prepareVectorStoreFileRelations(vectorStore._id, page._id, uploadedFile.id, vectorStoreFileRelationsMap); return; } const pagePopulatedToShowRevision = await page.populateDataToShowRevision(); if (pagePopulatedToShowRevision.revision != null && pagePopulatedToShowRevision.revision.body.length > 0) { - const uploadedFile = await this.uploadFile(page._id, pagePopulatedToShowRevision.revision.body); + const uploadedFile = await this.uploadFile(pagePopulatedToShowRevision); prepareVectorStoreFileRelations(vectorStore._id, page._id, uploadedFile.id, vectorStoreFileRelationsMap); } } diff --git a/apps/app/src/features/openai/server/utils/sanitize-markdown.ts b/apps/app/src/features/openai/server/utils/sanitize-markdown.ts index f604be5e058..8cea762d2c4 100644 --- a/apps/app/src/features/openai/server/utils/sanitize-markdown.ts +++ b/apps/app/src/features/openai/server/utils/sanitize-markdown.ts @@ -1,48 +1,82 @@ import { dynamicImport } from '@cspell/dynamic-import'; +import { isPopulated } from '@growi/core'; +import type { IPagePopulatedToShowRevision } from '@growi/core/dist/interfaces'; import type { Root, Code } from 'mdast'; +import type { HydratedDocument } from 'mongoose'; +import type * as RehypeMeta from 'rehype-meta'; +import type * as RehypeStringify from 'rehype-stringify'; import type * as RemarkParse from 'remark-parse'; -import type * as RemarkStringify from 'remark-stringify'; +import type * as RemarkRehype from 'remark-rehype'; import type * as Unified from 'unified'; import type * as UnistUtilVisit from 'unist-util-visit'; +import type { PageDocument } from '~/server/models/page'; + + interface ModuleCache { remarkParse?: typeof RemarkParse.default; - remarkStringify?: typeof RemarkStringify.default; unified?: typeof Unified.unified; visit?: typeof UnistUtilVisit.visit; + remarkRehype?: typeof RemarkRehype.default; + rehypeMeta?: typeof RehypeMeta.default; + rehypeStringify?: typeof RehypeStringify.default; } let moduleCache: ModuleCache = {}; const initializeModules = async(): Promise => { - if (moduleCache.remarkParse != null && moduleCache.remarkStringify != null && moduleCache.unified != null && moduleCache.visit != null) { + if (moduleCache.remarkParse != null + && moduleCache.unified != null + && moduleCache.visit != null + && moduleCache.remarkRehype != null + && moduleCache.rehypeMeta != null + && moduleCache.rehypeStringify != null + ) { return; } - const [{ default: remarkParse }, { default: remarkStringify }, { unified }, { visit }] = await Promise.all([ + const [ + { default: remarkParse }, + { unified }, { visit }, + { default: remarkRehype }, + { default: rehypeMeta }, + { default: rehypeStringify }, + ] = await Promise.all([ dynamicImport('remark-parse', __dirname), - dynamicImport('remark-stringify', __dirname), dynamicImport('unified', __dirname), dynamicImport('unist-util-visit', __dirname), + dynamicImport('remark-rehype', __dirname), + dynamicImport('rehype-meta', __dirname), + dynamicImport('rehype-stringify', __dirname), ]); moduleCache = { remarkParse, - remarkStringify, unified, visit, + remarkRehype, + rehypeMeta, + rehypeStringify, }; }; -export const sanitizeMarkdown = async(markdown: string): Promise => { +export const convertMarkdownToHtml = async(page: HydratedDocument | IPagePopulatedToShowRevision): Promise => { await initializeModules(); const { - remarkParse, remarkStringify, unified, visit, + remarkParse, + unified, visit, + remarkRehype, + rehypeMeta, + rehypeStringify, } = moduleCache; - - if (remarkParse == null || remarkStringify == null || unified == null || visit == null) { + if (remarkParse == null + || unified == null + || visit == null + || remarkRehype == null + || rehypeMeta == null + || rehypeStringify == null) { throw new Error('Failed to initialize required modules'); } @@ -56,10 +90,17 @@ export const sanitizeMarkdown = async(markdown: string): Promise => { }; }; + + const revisionBody = page.revision != null && isPopulated(page.revision) ? page.revision.body : undefined; + const processor = unified() .use(remarkParse) .use(sanitize) - .use(remarkStringify); + .use(remarkRehype) + .use(rehypeMeta, { + title: page.path, + }) + .use(rehypeStringify); - return processor.processSync(markdown).toString(); + return processor.processSync(revisionBody).toString(); }; From 1b05ae3b1b601c12d6725b572faa354b6cac7e02 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 2 Dec 2024 02:50:17 +0000 Subject: [PATCH 05/33] sanitize-markdown.ts -> convert-markdown-to-html.ts --- apps/app/src/features/openai/server/services/openai.ts | 2 +- .../utils/{sanitize-markdown.ts => convert-markdown-to-html.ts} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename apps/app/src/features/openai/server/utils/{sanitize-markdown.ts => convert-markdown-to-html.ts} (100%) diff --git a/apps/app/src/features/openai/server/services/openai.ts b/apps/app/src/features/openai/server/services/openai.ts index ecd3d0ed9c3..7b38351f063 100644 --- a/apps/app/src/features/openai/server/services/openai.ts +++ b/apps/app/src/features/openai/server/services/openai.ts @@ -21,7 +21,7 @@ import { createBatchStream } from '~/server/util/batch-stream'; import loggerFactory from '~/utils/logger'; import { OpenaiServiceTypes } from '../../interfaces/ai'; -import { convertMarkdownToHtml } from '../utils/sanitize-markdown'; +import { convertMarkdownToHtml } from '../utils/convert-markdown-to-html'; import { getClient } from './client-delegator'; // import { splitMarkdownIntoChunks } from './markdown-splitter/markdown-token-splitter'; diff --git a/apps/app/src/features/openai/server/utils/sanitize-markdown.ts b/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts similarity index 100% rename from apps/app/src/features/openai/server/utils/sanitize-markdown.ts rename to apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts From 20ecef066bfa0d03604ab30d1244968fc96e2f23 Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 2 Dec 2024 07:29:44 +0000 Subject: [PATCH 06/33] sanitize -> sanitizeMarkdown --- .../features/openai/server/utils/convert-markdown-to-html.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts b/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts index 8cea762d2c4..42e1965b596 100644 --- a/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts +++ b/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts @@ -80,7 +80,7 @@ export const convertMarkdownToHtml = async(page: HydratedDocument throw new Error('Failed to initialize required modules'); } - const sanitize = () => { + const sanitizeMarkdown = () => { return (tree: Root) => { visit(tree, 'code', (node: Code) => { if (node.lang === 'drawio') { @@ -95,7 +95,7 @@ export const convertMarkdownToHtml = async(page: HydratedDocument const processor = unified() .use(remarkParse) - .use(sanitize) + .use(sanitizeMarkdown) .use(remarkRehype) .use(rehypeMeta, { title: page.path, From 23c9dbd4f1655ccbfb9265a827313b2d06e64e9e Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 2 Dec 2024 07:38:00 +0000 Subject: [PATCH 07/33] clean code --- .../server/utils/convert-markdown-to-html.ts | 32 +++++++------------ 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts b/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts index 42e1965b596..531099402e9 100644 --- a/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts +++ b/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts @@ -12,11 +12,10 @@ import type * as UnistUtilVisit from 'unist-util-visit'; import type { PageDocument } from '~/server/models/page'; - interface ModuleCache { - remarkParse?: typeof RemarkParse.default; unified?: typeof Unified.unified; visit?: typeof UnistUtilVisit.visit; + remarkParse?: typeof RemarkParse.default; remarkRehype?: typeof RemarkRehype.default; rehypeMeta?: typeof RehypeMeta.default; rehypeStringify?: typeof RehypeStringify.default; @@ -25,9 +24,9 @@ interface ModuleCache { let moduleCache: ModuleCache = {}; const initializeModules = async(): Promise => { - if (moduleCache.remarkParse != null - && moduleCache.unified != null + if (moduleCache.unified != null && moduleCache.visit != null + && moduleCache.remarkParse != null && moduleCache.remarkRehype != null && moduleCache.rehypeMeta != null && moduleCache.rehypeStringify != null @@ -36,24 +35,25 @@ const initializeModules = async(): Promise => { } const [ + { unified }, + { visit }, { default: remarkParse }, - { unified }, { visit }, { default: remarkRehype }, { default: rehypeMeta }, { default: rehypeStringify }, ] = await Promise.all([ - dynamicImport('remark-parse', __dirname), dynamicImport('unified', __dirname), dynamicImport('unist-util-visit', __dirname), + dynamicImport('remark-parse', __dirname), dynamicImport('remark-rehype', __dirname), dynamicImport('rehype-meta', __dirname), dynamicImport('rehype-stringify', __dirname), ]); moduleCache = { - remarkParse, unified, visit, + remarkParse, remarkRehype, rehypeMeta, rehypeStringify, @@ -64,19 +64,10 @@ export const convertMarkdownToHtml = async(page: HydratedDocument await initializeModules(); const { - remarkParse, - unified, visit, - remarkRehype, - rehypeMeta, - rehypeStringify, + unified, visit, remarkParse, remarkRehype, rehypeMeta, rehypeStringify, } = moduleCache; - if (remarkParse == null - || unified == null - || visit == null - || remarkRehype == null - || rehypeMeta == null - || rehypeStringify == null) { + if (unified == null || visit == null || remarkParse == null || remarkRehype == null || rehypeMeta == null || rehypeStringify == null) { throw new Error('Failed to initialize required modules'); } @@ -90,8 +81,9 @@ export const convertMarkdownToHtml = async(page: HydratedDocument }; }; - - const revisionBody = page.revision != null && isPopulated(page.revision) ? page.revision.body : undefined; + const revisionBody = page.revision != null && isPopulated(page.revision) + ? page.revision.body + : undefined; const processor = unified() .use(remarkParse) From 621907ae24d079908f60bbe9f0afa18f821306cf Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 2 Dec 2024 12:48:36 +0000 Subject: [PATCH 08/33] rm debug log --- apps/app/src/features/openai/server/services/openai.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/app/src/features/openai/server/services/openai.ts b/apps/app/src/features/openai/server/services/openai.ts index 7b38351f063..f9dfa82e1de 100644 --- a/apps/app/src/features/openai/server/services/openai.ts +++ b/apps/app/src/features/openai/server/services/openai.ts @@ -160,7 +160,6 @@ class OpenaiService implements IOpenaiService { private async uploadFile(page: HydratedDocument | IPagePopulatedToShowRevision): Promise { const convertedHtml = await convertMarkdownToHtml(page); - console.log('convertedHtml', convertedHtml); const file = await toFile(Readable.from(convertedHtml), `${page._id}.html`); const uploadedFile = await this.client.uploadFile(file); return uploadedFile; From e5b767144dfa4bf2476a4f74fd42f20126a08623 Mon Sep 17 00:00:00 2001 From: reiji-h Date: Thu, 5 Dec 2024 06:14:31 +0000 Subject: [PATCH 09/33] limit creatable page path --- packages/core/src/utils/page-path-utils/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/utils/page-path-utils/index.ts b/packages/core/src/utils/page-path-utils/index.ts index 6c400a9d5ac..1b1ba7bbd5f 100644 --- a/packages/core/src/utils/page-path-utils/index.ts +++ b/packages/core/src/utils/page-path-utils/index.ts @@ -1,6 +1,6 @@ import escapeStringRegexp from 'escape-string-regexp'; -import { IUser } from '~/interfaces'; +import type { IUser } from '~/interfaces'; import { isValidObjectId } from '../objectid-utils'; import { addTrailingSlash } from '../path-utils'; @@ -117,6 +117,7 @@ const restrictedPatternsToCreate: Array = [ /^\/(_search|_private-legacy-pages)(\/.*|$)/, /^\/(installer|register|login|logout|admin|me|files|trash|paste|comments|tags|share|attachment)(\/.*|$)/, /^\/user(?:\/[^/]+)?$/, // https://regex101.com/r/9Eh2S1/1 + /^.{2000000,}$/, // avoid very long path. see: https://regex101.com/r/s9cCdf/1 ]; export const isCreatablePage = (path: string): boolean => { return !restrictedPatternsToCreate.some(pattern => path.match(pattern)); From d0a80e6a7b69447c3ea1d6fcbade16ad253a4e3b Mon Sep 17 00:00:00 2001 From: reiji-h Date: Thu, 5 Dec 2024 06:19:47 +0000 Subject: [PATCH 10/33] use javascript length --- packages/core/src/utils/page-path-utils/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/core/src/utils/page-path-utils/index.ts b/packages/core/src/utils/page-path-utils/index.ts index 1b1ba7bbd5f..7efcaa9222e 100644 --- a/packages/core/src/utils/page-path-utils/index.ts +++ b/packages/core/src/utils/page-path-utils/index.ts @@ -117,10 +117,9 @@ const restrictedPatternsToCreate: Array = [ /^\/(_search|_private-legacy-pages)(\/.*|$)/, /^\/(installer|register|login|logout|admin|me|files|trash|paste|comments|tags|share|attachment)(\/.*|$)/, /^\/user(?:\/[^/]+)?$/, // https://regex101.com/r/9Eh2S1/1 - /^.{2000000,}$/, // avoid very long path. see: https://regex101.com/r/s9cCdf/1 ]; export const isCreatablePage = (path: string): boolean => { - return !restrictedPatternsToCreate.some(pattern => path.match(pattern)); + return !restrictedPatternsToCreate.some(pattern => path.match(pattern)) && path.length <= 2_000_000; }; /** From 307a6573c934afdb394760ad79ed24f90a222c18 Mon Sep 17 00:00:00 2001 From: ryosei-f Date: Tue, 10 Dec 2024 04:33:45 +0000 Subject: [PATCH 11/33] Wider-clipboard-area --- .../Common/PagePathNavTitle/PagePathNavTitle.module.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss b/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss index a4dac0678a3..4145c95f6df 100644 --- a/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss +++ b/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss @@ -1,6 +1,6 @@ @use '@growi/core-styles/scss/bootstrap/init' as bs; .grw-page-path-nav-title :global { - min-width: 300px; min-height: 75px; + padding-right: 70px; } From 0e46e2b74c4c3db8e521be5cf08efe100dede49a Mon Sep 17 00:00:00 2001 From: ryosei-f Date: Thu, 12 Dec 2024 09:04:29 +0000 Subject: [PATCH 12/33] Resolve conflicts --- .../PagePathNavSticky.module.scss | 2 ++ .../components/PagePresentationModal.tsx | 3 ++- .../PagePathNav/PagePathNav.module.scss | 7 +++-- .../Common/PagePathNav/PagePathNavLayout.tsx | 26 ++++++++++++++++--- .../PagePathNavTitle.module.scss | 4 +++ apps/app/src/pages/[[...path]].page.tsx | 2 +- apps/app/src/stores-universal/context.tsx | 1 + apps/app/src/stores/renderer.tsx | 5 ++++ 8 files changed, 42 insertions(+), 8 deletions(-) diff --git a/apps/app/src/client/components/PagePathNavSticky/PagePathNavSticky.module.scss b/apps/app/src/client/components/PagePathNavSticky/PagePathNavSticky.module.scss index 2948618afcb..9dd96f4284d 100644 --- a/apps/app/src/client/components/PagePathNavSticky/PagePathNavSticky.module.scss +++ b/apps/app/src/client/components/PagePathNavSticky/PagePathNavSticky.module.scss @@ -1,6 +1,8 @@ @use '@growi/core-styles/scss/bootstrap/init' as bs; .grw-page-path-nav-sticky :global { + // width: 100%; + .sticky-inner-wrapper { z-index: bs.$zindex-sticky; } diff --git a/apps/app/src/client/components/PagePresentationModal.tsx b/apps/app/src/client/components/PagePresentationModal.tsx index 7796841113c..51468e781eb 100644 --- a/apps/app/src/client/components/PagePresentationModal.tsx +++ b/apps/app/src/client/components/PagePresentationModal.tsx @@ -67,7 +67,8 @@ const PagePresentationModal = (): JSX.Element => { if (!isOpen) { return <>; } - + console.log(isEnabledMarp, 'Marp'); + console.log(rendererOptions, 'renderOption'); return ( import('~/client/components/Common/CopyDropdown').then(mod => mod.CopyDropdown), { ssr: false }); @@ -40,6 +41,19 @@ export const PagePathNavLayout = (props: Props): JSX.Element => { const copyDropdownId = `copydropdown-${pageId}`; + const [, setIsHovered] = useState(false); + const [hideTimeout, setHideTimeout] = useState(null); + + const handleMouseEnter = () => { + if (hideTimeout) clearTimeout(hideTimeout); // 非表示タイマーをリセット + setIsHovered(true); // ボタンを表示 + }; + + const handleMouseLeave = () => { + const timeout = setTimeout(() => setIsHovered(false), 3000); // 3秒後にボタンを非表示 + setHideTimeout(timeout); + }; + return (
{ { isWipPage && ( WIP )} - + content_paste diff --git a/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss b/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss index 3c62f47ea35..4d4fc899da1 100644 --- a/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss +++ b/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss @@ -3,3 +3,7 @@ .grw-page-path-nav-title :global { min-height: 75px; } + +.grw-page-path-nav-title:hover { + background-color: rgba(0, 0, 0, 0.05); /* ホバー範囲を視覚的に確認したい場合の背景 */ +} diff --git a/apps/app/src/pages/[[...path]].page.tsx b/apps/app/src/pages/[[...path]].page.tsx index d26fb5e22d1..e8e4b7c4d9c 100644 --- a/apps/app/src/pages/[[...path]].page.tsx +++ b/apps/app/src/pages/[[...path]].page.tsx @@ -237,7 +237,7 @@ const Page: NextPageWithLayout = (props: Props) => { useDefaultIndentSize(props.adminPreferredIndentSize); useIsIndentSizeForced(props.isIndentSizeForced); useDisableLinkSharing(props.disableLinkSharing); - useRendererConfig(props.rendererConfig); + // useRendererConfig(props.rendererConfig); useIsEnabledMarp(props.rendererConfig.isEnabledMarp); // useRendererSettings(props.rendererSettingsStr != null ? JSON.parse(props.rendererSettingsStr) : undefined); // useGrowiRendererConfig(props.growiRendererConfigStr != null ? JSON.parse(props.growiRendererConfigStr) : undefined); diff --git a/apps/app/src/stores-universal/context.tsx b/apps/app/src/stores-universal/context.tsx index a62586dacc7..e29ada8d300 100644 --- a/apps/app/src/stores-universal/context.tsx +++ b/apps/app/src/stores-universal/context.tsx @@ -147,6 +147,7 @@ export const useIsEnabledStaleNotification = (initialData?: boolean): SWRRespons }; export const useRendererConfig = (initialData?: RendererConfig): SWRResponse => { + console.log(initialData, 'undifined or null'); return useContextSWR('growiRendererConfig', initialData); }; diff --git a/apps/app/src/stores/renderer.tsx b/apps/app/src/stores/renderer.tsx index bd4a4776bd3..97dd1cfa748 100644 --- a/apps/app/src/stores/renderer.tsx +++ b/apps/app/src/stores/renderer.tsx @@ -171,6 +171,11 @@ export const useCustomSidebarOptions = (config?: SWRConfiguration): SWRResponse< export const usePresentationViewOptions = (): SWRResponse => { const { data: currentPagePath } = useCurrentPagePath(); const { data: rendererConfig } = useRendererConfig(); + console.log(rendererConfig, 'rendererconfig'); + if (!rendererConfig) { + console.log('RendererConfig is missing.'); + } + const isAllDataValid = currentPagePath != null && rendererConfig != null; From 719e2f37498041f28b9e88cbfcfd97cb23fa7b7a Mon Sep 17 00:00:00 2001 From: ryosei-f Date: Thu, 12 Dec 2024 09:06:08 +0000 Subject: [PATCH 13/33] Resolve conflicts --- .../Common/PagePathNavTitle/PagePathNavTitle.module.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss b/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss index 4d4fc899da1..9b2828798b7 100644 --- a/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss +++ b/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss @@ -2,6 +2,10 @@ .grw-page-path-nav-title :global { min-height: 75px; +<<<<<<< Updated upstream +======= + // padding-right: 70px; +>>>>>>> Stashed changes } .grw-page-path-nav-title:hover { From 0948c30cb887392824853f4799a93a62c2061f6a Mon Sep 17 00:00:00 2001 From: ryosei-f Date: Thu, 12 Dec 2024 09:07:15 +0000 Subject: [PATCH 14/33] Resolve conflicts --- .../Common/PagePathNavTitle/PagePathNavTitle.module.scss | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss b/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss index 9b2828798b7..4d4fc899da1 100644 --- a/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss +++ b/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss @@ -2,10 +2,6 @@ .grw-page-path-nav-title :global { min-height: 75px; -<<<<<<< Updated upstream -======= - // padding-right: 70px; ->>>>>>> Stashed changes } .grw-page-path-nav-title:hover { From ef8978dd3b33c2215301d2dcea4063d618ee8b86 Mon Sep 17 00:00:00 2001 From: reiji-h Date: Fri, 13 Dec 2024 02:35:15 +0000 Subject: [PATCH 15/33] add slash limit pattern --- packages/core/src/utils/page-path-utils/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/utils/page-path-utils/index.ts b/packages/core/src/utils/page-path-utils/index.ts index 7efcaa9222e..c501aa0ee68 100644 --- a/packages/core/src/utils/page-path-utils/index.ts +++ b/packages/core/src/utils/page-path-utils/index.ts @@ -117,9 +117,10 @@ const restrictedPatternsToCreate: Array = [ /^\/(_search|_private-legacy-pages)(\/.*|$)/, /^\/(installer|register|login|logout|admin|me|files|trash|paste|comments|tags|share|attachment)(\/.*|$)/, /^\/user(?:\/[^/]+)?$/, // https://regex101.com/r/9Eh2S1/1 + /^(\/.+){500,}$/, // avoid deep layer path. see: https://regex101.com/r/s9cCdf/1 ]; export const isCreatablePage = (path: string): boolean => { - return !restrictedPatternsToCreate.some(pattern => path.match(pattern)) && path.length <= 2_000_000; + return !restrictedPatternsToCreate.some(pattern => path.match(pattern)); }; /** From 0f759044c7306b4b8ed221d6cb9fb5c8d1b32041 Mon Sep 17 00:00:00 2001 From: reiji-h Date: Fri, 13 Dec 2024 03:08:08 +0000 Subject: [PATCH 16/33] add regex example --- packages/core/src/utils/page-path-utils/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/utils/page-path-utils/index.ts b/packages/core/src/utils/page-path-utils/index.ts index c501aa0ee68..b970deddcce 100644 --- a/packages/core/src/utils/page-path-utils/index.ts +++ b/packages/core/src/utils/page-path-utils/index.ts @@ -117,7 +117,7 @@ const restrictedPatternsToCreate: Array = [ /^\/(_search|_private-legacy-pages)(\/.*|$)/, /^\/(installer|register|login|logout|admin|me|files|trash|paste|comments|tags|share|attachment)(\/.*|$)/, /^\/user(?:\/[^/]+)?$/, // https://regex101.com/r/9Eh2S1/1 - /^(\/.+){500,}$/, // avoid deep layer path. see: https://regex101.com/r/s9cCdf/1 + /^(\/.+){500,}$/, // avoid deep layer path. see: https://regex101.com/r/L0kzOD/1 ]; export const isCreatablePage = (path: string): boolean => { return !restrictedPatternsToCreate.some(pattern => path.match(pattern)); From 06c2aad857b7c24534765714fd40bbe648dd792f Mon Sep 17 00:00:00 2001 From: GitHub Action <> Date: Fri, 13 Dec 2024 04:42:20 +0000 Subject: [PATCH 17/33] Bump version --- apps/app/package.json | 2 +- apps/slackbot-proxy/package.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/app/package.json b/apps/app/package.json index f5fedee1512..4718976c500 100644 --- a/apps/app/package.json +++ b/apps/app/package.json @@ -1,6 +1,6 @@ { "name": "@growi/app", - "version": "7.1.5", + "version": "7.1.6-RC.0", "license": "MIT", "private": "true", "scripts": { diff --git a/apps/slackbot-proxy/package.json b/apps/slackbot-proxy/package.json index ec58c99a700..8d2c43b29d4 100644 --- a/apps/slackbot-proxy/package.json +++ b/apps/slackbot-proxy/package.json @@ -1,6 +1,6 @@ { "name": "@growi/slackbot-proxy", - "version": "7.1.5-slackbot-proxy.0", + "version": "7.1.6-slackbot-proxy.0", "license": "MIT", "private": "true", "scripts": { diff --git a/package.json b/package.json index 0c9f57e5253..36cba3ba9be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "growi", - "version": "7.1.5", + "version": "7.1.6-RC.0", "description": "Team collaboration software using markdown", "license": "MIT", "private": "true", From 2a99b278e9a5992022733dd17dcbab4d3560fba9 Mon Sep 17 00:00:00 2001 From: reiji-h Date: Fri, 13 Dec 2024 07:30:52 +0000 Subject: [PATCH 18/33] change create error message --- apps/app/public/static/locales/en_US/translation.json | 2 +- apps/app/public/static/locales/fr_FR/translation.json | 2 +- apps/app/public/static/locales/ja_JP/translation.json | 2 +- apps/app/public/static/locales/zh_CN/translation.json | 2 +- .../components/TreeItem/NewPageInput/use-new-page-input.tsx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/app/public/static/locales/en_US/translation.json b/apps/app/public/static/locales/en_US/translation.json index 9481d802cbf..a999a171337 100644 --- a/apps/app/public/static/locales/en_US/translation.json +++ b/apps/app/public/static/locales/en_US/translation.json @@ -157,7 +157,7 @@ "duplicated_path": "Duplicated path", "Link sharing is disabled": "Link sharing is disabled", "successfully_saved_the_page": "Successfully saved the page", - "you_can_not_create_page_with_this_name": "You can not create page with this name", + "you_can_not_create_page_with_this_name_or_hierarchy": "You can not create page with this name or page hierarchy", "not_allowed_to_see_this_page": "You cannot see this page", "Confirm": "Confirm", "Successfully requested": "Successfully requested.", diff --git a/apps/app/public/static/locales/fr_FR/translation.json b/apps/app/public/static/locales/fr_FR/translation.json index bb0d0686ba2..8c2de3482e1 100644 --- a/apps/app/public/static/locales/fr_FR/translation.json +++ b/apps/app/public/static/locales/fr_FR/translation.json @@ -157,7 +157,7 @@ "duplicated_path": "Chemin dupliqué", "Link sharing is disabled": "Le partage est désactivé", "successfully_saved_the_page": "Page sauvegardée", - "you_can_not_create_page_with_this_name": "Vous ne pouvez pas créer cette page", + "you_can_not_create_page_with_this_name_or_hierarchy": "Vous ne pouvez pas créer de page avec ce nom ou cette hiérarchie de pages", "not_allowed_to_see_this_page": "Vous ne pouvez pas voir cette page", "Confirm": "Confirmer", "Successfully requested": "Demande envoyée.", diff --git a/apps/app/public/static/locales/ja_JP/translation.json b/apps/app/public/static/locales/ja_JP/translation.json index dc7c3021ed9..49fecc4b3fa 100644 --- a/apps/app/public/static/locales/ja_JP/translation.json +++ b/apps/app/public/static/locales/ja_JP/translation.json @@ -158,7 +158,7 @@ "duplicated_path": "重複したパス", "Link sharing is disabled": "リンクのシェアは無効化されています", "successfully_saved_the_page": "ページが正常に保存されました", - "you_can_not_create_page_with_this_name": "この名前でページを作成することはできません", + "you_can_not_create_page_with_this_name_or_hierarchy": "この名前、または階層でページを作成することはできません", "not_allowed_to_see_this_page": "このページは閲覧できません", "Confirm": "確認", "Successfully requested": "正常に処理を受け付けました", diff --git a/apps/app/public/static/locales/zh_CN/translation.json b/apps/app/public/static/locales/zh_CN/translation.json index 3a3fb1e8e42..beff5df7b3a 100644 --- a/apps/app/public/static/locales/zh_CN/translation.json +++ b/apps/app/public/static/locales/zh_CN/translation.json @@ -163,7 +163,7 @@ "duplicated_path": "Duplicated path", "Link sharing is disabled": "你不允许分享该链接", "successfully_saved_the_page": "成功地保存了该页面", - "you_can_not_create_page_with_this_name": "您无法使用此名称创建页面", + "you_can_not_create_page_with_this_name_or_hierarchy": "您無法使用此名稱或頁面層級建立頁面", "not_allowed_to_see_this_page": "你不能看到这个页面", "Confirm": "确定", "Successfully requested": "进程成功接受", diff --git a/apps/app/src/client/components/TreeItem/NewPageInput/use-new-page-input.tsx b/apps/app/src/client/components/TreeItem/NewPageInput/use-new-page-input.tsx index cd86eaf517b..e3053fcf19b 100644 --- a/apps/app/src/client/components/TreeItem/NewPageInput/use-new-page-input.tsx +++ b/apps/app/src/client/components/TreeItem/NewPageInput/use-new-page-input.tsx @@ -99,7 +99,7 @@ export const useNewPageInput = (): UseNewPageInput => { const isCreatable = pagePathUtils.isCreatablePage(newPagePath); if (!isCreatable) { - toastWarning(t('you_can_not_create_page_with_this_name')); + toastWarning(t('you_can_not_create_page_with_this_name_or_hierarchy')); return; } From 2a5d6ea33fabadc587bdd966db90f4b3ae8f6c77 Mon Sep 17 00:00:00 2001 From: ryosei-f Date: Fri, 13 Dec 2024 07:42:07 +0000 Subject: [PATCH 19/33] hit area expanded, leaving the elements --- .../Common/PagePathNav/PagePathNav.module.scss | 7 ++----- .../Common/PagePathNav/PagePathNavLayout.tsx | 16 ++++++++++------ .../PagePathNavTitle.module.scss | 5 ----- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/apps/app/src/components/Common/PagePathNav/PagePathNav.module.scss b/apps/app/src/components/Common/PagePathNav/PagePathNav.module.scss index 35c0a52fe6c..34a506a19d8 100644 --- a/apps/app/src/components/Common/PagePathNav/PagePathNav.module.scss +++ b/apps/app/src/components/Common/PagePathNav/PagePathNav.module.scss @@ -4,8 +4,7 @@ .grw-page-path-nav-layout :global { .grw-page-path-nav-copydropdown { - visibility: hidden; /* 通常時は非表示(スペースは維持) */ - // display: none; + visibility: hidden; @include bs.media-breakpoint-down(md) { display: block; } @@ -16,9 +15,7 @@ &:global { &:hover { .grw-page-path-nav-copydropdown { - visibility: visible; /* ホバー時に表示 */ - // opacity: 1; - // display: block; + visibility: visible; } } } diff --git a/apps/app/src/components/Common/PagePathNav/PagePathNavLayout.tsx b/apps/app/src/components/Common/PagePathNav/PagePathNavLayout.tsx index 0a86eb5dc20..dcfd45c769c 100644 --- a/apps/app/src/components/Common/PagePathNav/PagePathNavLayout.tsx +++ b/apps/app/src/components/Common/PagePathNav/PagePathNavLayout.tsx @@ -1,4 +1,3 @@ -// import type { ReactNode } from 'react'; import React, { useState } from 'react'; import dynamic from 'next/dynamic'; @@ -41,16 +40,21 @@ export const PagePathNavLayout = (props: Props): JSX.Element => { const copyDropdownId = `copydropdown-${pageId}`; - const [, setIsHovered] = useState(false); + const [isHovered, setIsHovered] = useState(false); const [hideTimeout, setHideTimeout] = useState(null); const handleMouseEnter = () => { - if (hideTimeout) clearTimeout(hideTimeout); // 非表示タイマーをリセット - setIsHovered(true); // ボタンを表示 + if (hideTimeout) { + clearTimeout(hideTimeout); + setHideTimeout(null); + } + setIsHovered(true); }; const handleMouseLeave = () => { - const timeout = setTimeout(() => setIsHovered(false), 3000); // 3秒後にボタンを非表示 + const timeout = setTimeout(() => { + setIsHovered(false); + }, 1000); setHideTimeout(timeout); }; @@ -70,7 +74,7 @@ export const PagePathNavLayout = (props: Props): JSX.Element => { WIP )} diff --git a/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss b/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss index 6db80e65813..3c62f47ea35 100644 --- a/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss +++ b/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss @@ -2,9 +2,4 @@ .grw-page-path-nav-title :global { min-height: 75px; - padding-right: 70px; -} - -.grw-page-path-nav-title:hover { - background-color: rgba(0, 0, 0, 0.05); /* ホバー範囲を視覚的に確認したい場合の背景 */ } From e702b2e1ac37505ffc2dd9cbffc5125154eb1f82 Mon Sep 17 00:00:00 2001 From: reiji-h Date: Fri, 13 Dec 2024 07:57:57 +0000 Subject: [PATCH 20/33] remove unused import --- apps/app/src/server/models/page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app/src/server/models/page.ts b/apps/app/src/server/models/page.ts index 30684de2b25..48c2d812c1c 100644 --- a/apps/app/src/server/models/page.ts +++ b/apps/app/src/server/models/page.ts @@ -9,7 +9,7 @@ import { } from '@growi/core'; import type { IPagePopulatedToShowRevision } from '@growi/core/dist/interfaces'; import { getIdForRef, isPopulated } from '@growi/core/dist/interfaces'; -import { isTopPage, hasSlash } from '@growi/core/dist/utils/page-path-utils'; +import { isTopPage, hasSlash, isCreatablePage } from '@growi/core/dist/utils/page-path-utils'; import { addTrailingSlash, normalizePath } from '@growi/core/dist/utils/path-utils'; import escapeStringRegexp from 'escape-string-regexp'; import type { From 84362eabcd81ff408a20a676378f7c4d49d03940 Mon Sep 17 00:00:00 2001 From: reiji-h Date: Fri, 13 Dec 2024 07:58:14 +0000 Subject: [PATCH 21/33] remove unused import --- apps/app/src/server/models/page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app/src/server/models/page.ts b/apps/app/src/server/models/page.ts index 48c2d812c1c..30684de2b25 100644 --- a/apps/app/src/server/models/page.ts +++ b/apps/app/src/server/models/page.ts @@ -9,7 +9,7 @@ import { } from '@growi/core'; import type { IPagePopulatedToShowRevision } from '@growi/core/dist/interfaces'; import { getIdForRef, isPopulated } from '@growi/core/dist/interfaces'; -import { isTopPage, hasSlash, isCreatablePage } from '@growi/core/dist/utils/page-path-utils'; +import { isTopPage, hasSlash } from '@growi/core/dist/utils/page-path-utils'; import { addTrailingSlash, normalizePath } from '@growi/core/dist/utils/path-utils'; import escapeStringRegexp from 'escape-string-regexp'; import type { From fb24cb9e00ed0da2f8831099da8e81cb34ceceb4 Mon Sep 17 00:00:00 2001 From: ryosei-f Date: Fri, 13 Dec 2024 07:59:16 +0000 Subject: [PATCH 22/33] Revert "Resolve conflicts" This reverts commit 0948c30cb887392824853f4799a93a62c2061f6a. --- .../Common/PagePathNavTitle/PagePathNavTitle.module.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss b/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss index 3c62f47ea35..777fbad5be2 100644 --- a/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss +++ b/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss @@ -2,4 +2,8 @@ .grw-page-path-nav-title :global { min-height: 75px; +<<<<<<< Updated upstream +======= + // padding-right: 70px; +>>>>>>> Stashed changes } From d69cd8952e4a5567eea142dddcd90514bd8aa344 Mon Sep 17 00:00:00 2001 From: ryosei-f Date: Fri, 13 Dec 2024 08:08:07 +0000 Subject: [PATCH 23/33] fix file --- .../Common/PagePathNavTitle/PagePathNavTitle.module.scss | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss b/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss index 777fbad5be2..3c62f47ea35 100644 --- a/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss +++ b/apps/app/src/components/Common/PagePathNavTitle/PagePathNavTitle.module.scss @@ -2,8 +2,4 @@ .grw-page-path-nav-title :global { min-height: 75px; -<<<<<<< Updated upstream -======= - // padding-right: 70px; ->>>>>>> Stashed changes } From 7d283e64efa33ad5602835b493ef93d32f4239f8 Mon Sep 17 00:00:00 2001 From: ryosei-f Date: Fri, 13 Dec 2024 08:24:16 +0000 Subject: [PATCH 24/33] Revert "Resolve conflicts" This reverts commit 0e46e2b74c4c3db8e521be5cf08efe100dede49a. --- .../PagePathNavSticky/PagePathNavSticky.module.scss | 2 -- apps/app/src/client/components/PagePresentationModal.tsx | 3 +-- apps/app/src/pages/[[...path]].page.tsx | 2 +- apps/app/src/stores-universal/context.tsx | 1 - apps/app/src/stores/renderer.tsx | 5 ----- 5 files changed, 2 insertions(+), 11 deletions(-) diff --git a/apps/app/src/client/components/PagePathNavSticky/PagePathNavSticky.module.scss b/apps/app/src/client/components/PagePathNavSticky/PagePathNavSticky.module.scss index 9dd96f4284d..2948618afcb 100644 --- a/apps/app/src/client/components/PagePathNavSticky/PagePathNavSticky.module.scss +++ b/apps/app/src/client/components/PagePathNavSticky/PagePathNavSticky.module.scss @@ -1,8 +1,6 @@ @use '@growi/core-styles/scss/bootstrap/init' as bs; .grw-page-path-nav-sticky :global { - // width: 100%; - .sticky-inner-wrapper { z-index: bs.$zindex-sticky; } diff --git a/apps/app/src/client/components/PagePresentationModal.tsx b/apps/app/src/client/components/PagePresentationModal.tsx index 51468e781eb..7796841113c 100644 --- a/apps/app/src/client/components/PagePresentationModal.tsx +++ b/apps/app/src/client/components/PagePresentationModal.tsx @@ -67,8 +67,7 @@ const PagePresentationModal = (): JSX.Element => { if (!isOpen) { return <>; } - console.log(isEnabledMarp, 'Marp'); - console.log(rendererOptions, 'renderOption'); + return ( = (props: Props) => { useDefaultIndentSize(props.adminPreferredIndentSize); useIsIndentSizeForced(props.isIndentSizeForced); useDisableLinkSharing(props.disableLinkSharing); - // useRendererConfig(props.rendererConfig); + useRendererConfig(props.rendererConfig); useIsEnabledMarp(props.rendererConfig.isEnabledMarp); // useRendererSettings(props.rendererSettingsStr != null ? JSON.parse(props.rendererSettingsStr) : undefined); // useGrowiRendererConfig(props.growiRendererConfigStr != null ? JSON.parse(props.growiRendererConfigStr) : undefined); diff --git a/apps/app/src/stores-universal/context.tsx b/apps/app/src/stores-universal/context.tsx index e29ada8d300..a62586dacc7 100644 --- a/apps/app/src/stores-universal/context.tsx +++ b/apps/app/src/stores-universal/context.tsx @@ -147,7 +147,6 @@ export const useIsEnabledStaleNotification = (initialData?: boolean): SWRRespons }; export const useRendererConfig = (initialData?: RendererConfig): SWRResponse => { - console.log(initialData, 'undifined or null'); return useContextSWR('growiRendererConfig', initialData); }; diff --git a/apps/app/src/stores/renderer.tsx b/apps/app/src/stores/renderer.tsx index 97dd1cfa748..bd4a4776bd3 100644 --- a/apps/app/src/stores/renderer.tsx +++ b/apps/app/src/stores/renderer.tsx @@ -171,11 +171,6 @@ export const useCustomSidebarOptions = (config?: SWRConfiguration): SWRResponse< export const usePresentationViewOptions = (): SWRResponse => { const { data: currentPagePath } = useCurrentPagePath(); const { data: rendererConfig } = useRendererConfig(); - console.log(rendererConfig, 'rendererconfig'); - if (!rendererConfig) { - console.log('RendererConfig is missing.'); - } - const isAllDataValid = currentPagePath != null && rendererConfig != null; From 15f416cfb3d07291ef43497fe634f9e19efa63b3 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Wed, 18 Dec 2024 00:05:56 +0900 Subject: [PATCH 25/33] Update restrictedPatternsToCreate to avoid 130 or above layer path --- packages/core/src/utils/page-path-utils/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/utils/page-path-utils/index.ts b/packages/core/src/utils/page-path-utils/index.ts index b970deddcce..59af24a2255 100644 --- a/packages/core/src/utils/page-path-utils/index.ts +++ b/packages/core/src/utils/page-path-utils/index.ts @@ -117,7 +117,7 @@ const restrictedPatternsToCreate: Array = [ /^\/(_search|_private-legacy-pages)(\/.*|$)/, /^\/(installer|register|login|logout|admin|me|files|trash|paste|comments|tags|share|attachment)(\/.*|$)/, /^\/user(?:\/[^/]+)?$/, // https://regex101.com/r/9Eh2S1/1 - /^(\/.+){500,}$/, // avoid deep layer path. see: https://regex101.com/r/L0kzOD/1 + /^(\/.+){130,}$/, // avoid deep layer path. see: https://regex101.com/r/L0kzOD/1 ]; export const isCreatablePage = (path: string): boolean => { return !restrictedPatternsToCreate.some(pattern => path.match(pattern)); From a42601948bf852f0aaa4a76d0c1e12e17f23730f Mon Sep 17 00:00:00 2001 From: ryosei-f Date: Wed, 18 Dec 2024 04:32:12 +0000 Subject: [PATCH 26/33] PagePathNavLayout.tsx was reverted --- .../Common/PagePathNav/PagePathNavLayout.tsx | 30 +++---------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/apps/app/src/components/Common/PagePathNav/PagePathNavLayout.tsx b/apps/app/src/components/Common/PagePathNav/PagePathNavLayout.tsx index dcfd45c769c..9dd8696cc6b 100644 --- a/apps/app/src/components/Common/PagePathNav/PagePathNavLayout.tsx +++ b/apps/app/src/components/Common/PagePathNav/PagePathNavLayout.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import type { ReactNode } from 'react'; import dynamic from 'next/dynamic'; @@ -19,8 +19,8 @@ export type PagePathNavLayoutProps = { } type Props = PagePathNavLayoutProps & { - formerLink?: React.ReactNode, - latterLink?: React.ReactNode, + formerLink?: ReactNode, + latterLink?: ReactNode, } const CopyDropdown = dynamic(() => import('~/client/components/Common/CopyDropdown').then(mod => mod.CopyDropdown), { ssr: false }); @@ -40,24 +40,6 @@ export const PagePathNavLayout = (props: Props): JSX.Element => { const copyDropdownId = `copydropdown-${pageId}`; - const [isHovered, setIsHovered] = useState(false); - const [hideTimeout, setHideTimeout] = useState(null); - - const handleMouseEnter = () => { - if (hideTimeout) { - clearTimeout(hideTimeout); - setHideTimeout(null); - } - setIsHovered(true); - }; - - const handleMouseLeave = () => { - const timeout = setTimeout(() => { - setIsHovered(false); - }, 1000); - setHideTimeout(timeout); - }; - return (
{ { isWipPage && ( WIP )} - + content_paste From c1d27543af739a131375096fea962a126b397603 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 19:36:34 +0000 Subject: [PATCH 27/33] ci(deps): bump next from 14.2.13 to 14.2.15 Bumps [next](https://github.com/vercel/next.js) from 14.2.13 to 14.2.15. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](https://github.com/vercel/next.js/compare/v14.2.13...v14.2.15) --- updated-dependencies: - dependency-name: next dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- apps/app/package.json | 2 +- pnpm-lock.yaml | 294 +++++++++++++++++++++++++++++------------- 2 files changed, 208 insertions(+), 88 deletions(-) diff --git a/apps/app/package.json b/apps/app/package.json index 4718976c500..3fb3a5f5b67 100644 --- a/apps/app/package.json +++ b/apps/app/package.json @@ -157,7 +157,7 @@ "multer": "~1.4.0", "multer-autoreap": "^1.0.3", "mustache": "^4.2.0", - "next": "^14.2.13", + "next": "^14.2.15", "next-dynamic-loading-props": "^0.1.1", "next-i18next": "^15.3.1", "next-superjson": "^0.0.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 77af8f0cea0..f4233890b0e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -59,7 +59,7 @@ importers: version: 4.3.1(vite@5.4.6(@types/node@20.14.0)(sass@1.77.6)(terser@5.36.0)) '@vitest/coverage-v8': specifier: ^2.1.1 - version: 2.1.1(vitest@2.1.1) + version: 2.1.1(vitest@2.1.1(@types/node@20.14.0)(@vitest/ui@2.1.1)(happy-dom@15.7.4)(sass@1.77.6)(terser@5.36.0)) '@vitest/ui': specifier: ^2.1.1 version: 2.1.1(vitest@2.1.1) @@ -74,10 +74,10 @@ importers: version: 8.41.0 eslint-config-next: specifier: ^12.1.6 - version: 12.1.6(eslint@8.41.0)(next@14.2.13(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(typescript@5.0.4) + version: 12.1.6(eslint@8.41.0)(next@14.2.15(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(typescript@5.0.4) eslint-config-weseek: specifier: ^2.1.1 - version: 2.1.1(@babel/core@7.24.6)(@babel/eslint-parser@7.24.7(@babel/core@7.24.6)(eslint@8.41.0))(@typescript-eslint/eslint-plugin@5.59.7(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint@8.41.0)(typescript@5.0.4))(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@3.2.5)(eslint-plugin-import@2.26.0)(eslint-plugin-jsx-a11y@6.5.1(eslint@8.41.0))(eslint-plugin-react-hooks@4.6.0(eslint@8.41.0))(eslint-plugin-react@7.30.1(eslint@8.41.0))(eslint-plugin-vue@7.20.0(eslint@8.41.0))(eslint@8.41.0) + version: 2.1.1(@babel/core@7.24.6)(@babel/eslint-parser@7.24.7(@babel/core@7.24.6)(eslint@8.41.0))(@typescript-eslint/eslint-plugin@5.59.7(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint@8.41.0)(typescript@5.0.4))(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@3.2.5(eslint-plugin-import@2.26.0)(eslint@8.41.0))(eslint-plugin-import@2.26.0(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@3.2.5)(eslint@8.41.0))(eslint-plugin-jsx-a11y@6.5.1(eslint@8.41.0))(eslint-plugin-react-hooks@4.6.0(eslint@8.41.0))(eslint-plugin-react@7.30.1(eslint@8.41.0))(eslint-plugin-vue@7.20.0(eslint@8.41.0))(eslint@8.41.0) eslint-import-resolver-typescript: specifier: ^3.2.5 version: 3.2.5(eslint-plugin-import@2.26.0)(eslint@8.41.0) @@ -182,7 +182,7 @@ importers: version: 2.1.1(@types/node@20.14.0)(@vitest/ui@2.1.1)(happy-dom@15.7.4)(sass@1.77.6)(terser@5.36.0) vitest-mock-extended: specifier: ^2.0.2 - version: 2.0.2(typescript@5.0.4)(vitest@2.1.1) + version: 2.0.2(typescript@5.0.4)(vitest@2.1.1(@types/node@20.14.0)(@vitest/ui@2.1.1)(happy-dom@15.7.4)(sass@1.77.6)(terser@5.36.0)) vue-tsc: specifier: ^2.1.10 version: 2.1.10(typescript@5.0.4) @@ -478,20 +478,20 @@ importers: specifier: ^4.2.0 version: 4.2.0 next: - specifier: ^14.2.13 - version: 14.2.13(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6) + specifier: ^14.2.15 + version: 14.2.15(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6) next-dynamic-loading-props: specifier: ^0.1.1 version: 0.1.1(react@18.2.0) next-i18next: specifier: ^15.3.1 - version: 15.3.1(i18next@23.16.5)(next@14.2.13(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(react-i18next@15.1.1(i18next@23.16.5)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0) + version: 15.3.1(i18next@23.16.5)(next@14.2.15(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(react-i18next@15.1.1(i18next@23.16.5)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0) next-superjson: specifier: ^0.0.4 - version: 0.0.4(next@14.2.13(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(superjson@1.13.3)(webpack@5.92.1(@swc/core@1.5.25(@swc/helpers@0.5.11))) + version: 0.0.4(next@14.2.15(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(superjson@1.13.3)(webpack@5.92.1(@swc/core@1.5.25(@swc/helpers@0.5.11))) next-themes: specifier: ^0.2.1 - version: 0.2.1(next@14.2.13(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + version: 0.2.1(next@14.2.15(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) nocache: specifier: ^4.0.0 version: 4.0.0 @@ -825,7 +825,7 @@ importers: version: 3.1.0 eslint-plugin-jest: specifier: ^26.5.3 - version: 26.9.0(@typescript-eslint/eslint-plugin@5.59.7(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.4.2))(eslint@8.41.0)(typescript@5.4.2))(eslint@8.41.0)(jest@29.7.0(@types/node@20.14.0)(ts-node@10.9.2(@swc/core@1.5.25(@swc/helpers@0.5.11))(@types/node@20.14.0)(typescript@5.4.2)))(typescript@5.4.2) + version: 26.9.0(@typescript-eslint/eslint-plugin@5.59.7(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint@8.41.0)(typescript@5.4.2))(eslint@8.41.0)(jest@29.7.0(@types/node@20.14.0)(ts-node@10.9.2(@swc/core@1.5.25(@swc/helpers@0.5.11))(@types/node@20.14.0)(typescript@5.4.2)))(typescript@5.4.2) fslightbox-react: specifier: ^1.7.6 version: 1.7.6(prop-types@15.8.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -3019,6 +3019,9 @@ packages: '@next/env@14.2.13': resolution: {integrity: sha512-s3lh6K8cbW1h5Nga7NNeXrbe0+2jIIYK9YaA9T7IufDWnZpozdFUp6Hf0d5rNWUKu4fEuSX2rCKlGjCrtylfDw==} + '@next/env@14.2.15': + resolution: {integrity: sha512-S1qaj25Wru2dUpcIZMjxeMVSwkt8BK4dmWHHiBuRstcIyOsMapqT4A4jSB6onvqeygkSSmOkyny9VVx8JIGamQ==} + '@next/eslint-plugin-next@12.1.6': resolution: {integrity: sha512-yNUtJ90NEiYFT6TJnNyofKMPYqirKDwpahcbxBgSIuABwYOdkGwzos1ZkYD51Qf0diYwpQZBeVqElTk7Q2WNqw==} @@ -3028,54 +3031,108 @@ packages: cpu: [arm64] os: [darwin] + '@next/swc-darwin-arm64@14.2.15': + resolution: {integrity: sha512-Rvh7KU9hOUBnZ9TJ28n2Oa7dD9cvDBKua9IKx7cfQQ0GoYUwg9ig31O2oMwH3wm+pE3IkAQ67ZobPfEgurPZIA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + '@next/swc-darwin-x64@14.2.13': resolution: {integrity: sha512-Dv1RBGs2TTjkwEnFMVL5XIfJEavnLqqwYSD6LXgTPdEy/u6FlSrLBSSfe1pcfqhFEXRAgVL3Wpjibe5wXJzWog==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] + '@next/swc-darwin-x64@14.2.15': + resolution: {integrity: sha512-5TGyjFcf8ampZP3e+FyCax5zFVHi+Oe7sZyaKOngsqyaNEpOgkKB3sqmymkZfowy3ufGA/tUgDPPxpQx931lHg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + '@next/swc-linux-arm64-gnu@14.2.13': resolution: {integrity: sha512-yB1tYEFFqo4ZNWkwrJultbsw7NPAAxlPXURXioRl9SdW6aIefOLS+0TEsKrWBtbJ9moTDgU3HRILL6QBQnMevg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + '@next/swc-linux-arm64-gnu@14.2.15': + resolution: {integrity: sha512-3Bwv4oc08ONiQ3FiOLKT72Q+ndEMyLNsc/D3qnLMbtUYTQAmkx9E/JRu0DBpHxNddBmNT5hxz1mYBphJ3mfrrw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + '@next/swc-linux-arm64-musl@14.2.13': resolution: {integrity: sha512-v5jZ/FV/eHGoWhMKYrsAweQ7CWb8xsWGM/8m1mwwZQ/sutJjoFaXchwK4pX8NqwImILEvQmZWyb8pPTcP7htWg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + '@next/swc-linux-arm64-musl@14.2.15': + resolution: {integrity: sha512-k5xf/tg1FBv/M4CMd8S+JL3uV9BnnRmoe7F+GWC3DxkTCD9aewFRH1s5rJ1zkzDa+Do4zyN8qD0N8c84Hu96FQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + '@next/swc-linux-x64-gnu@14.2.13': resolution: {integrity: sha512-aVc7m4YL7ViiRv7SOXK3RplXzOEe/qQzRA5R2vpXboHABs3w8vtFslGTz+5tKiQzWUmTmBNVW0UQdhkKRORmGA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + '@next/swc-linux-x64-gnu@14.2.15': + resolution: {integrity: sha512-kE6q38hbrRbKEkkVn62reLXhThLRh6/TvgSP56GkFNhU22TbIrQDEMrO7j0IcQHcew2wfykq8lZyHFabz0oBrA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + '@next/swc-linux-x64-musl@14.2.13': resolution: {integrity: sha512-4wWY7/OsSaJOOKvMsu1Teylku7vKyTuocvDLTZQq0TYv9OjiYYWt63PiE1nTuZnqQ4RPvME7Xai+9enoiN0Wrg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + '@next/swc-linux-x64-musl@14.2.15': + resolution: {integrity: sha512-PZ5YE9ouy/IdO7QVJeIcyLn/Rc4ml9M2G4y3kCM9MNf1YKvFY4heg3pVa/jQbMro+tP6yc4G2o9LjAz1zxD7tQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + '@next/swc-win32-arm64-msvc@14.2.13': resolution: {integrity: sha512-uP1XkqCqV2NVH9+g2sC7qIw+w2tRbcMiXFEbMihkQ8B1+V6m28sshBwAB0SDmOe0u44ne1vFU66+gx/28RsBVQ==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] + '@next/swc-win32-arm64-msvc@14.2.15': + resolution: {integrity: sha512-2raR16703kBvYEQD9HNLyb0/394yfqzmIeyp2nDzcPV4yPjqNUG3ohX6jX00WryXz6s1FXpVhsCo3i+g4RUX+g==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + '@next/swc-win32-ia32-msvc@14.2.13': resolution: {integrity: sha512-V26ezyjPqQpDBV4lcWIh8B/QICQ4v+M5Bo9ykLN+sqeKKBxJVDpEc6biDVyluTXTC40f5IqCU0ttth7Es2ZuMw==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] + '@next/swc-win32-ia32-msvc@14.2.15': + resolution: {integrity: sha512-fyTE8cklgkyR1p03kJa5zXEaZ9El+kDNM5A+66+8evQS5e/6v0Gk28LqA0Jet8gKSOyP+OTm/tJHzMlGdQerdQ==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + '@next/swc-win32-x64-msvc@14.2.13': resolution: {integrity: sha512-WwzOEAFBGhlDHE5Z73mNU8CO8mqMNLqaG+AO9ETmzdCQlJhVtWZnOl2+rqgVQS+YHunjOWptdFmNfbpwcUuEsw==} engines: {node: '>= 10'} cpu: [x64] os: [win32] + '@next/swc-win32-x64-msvc@14.2.15': + resolution: {integrity: sha512-SzqGbsLsP9OwKNUG9nekShTwhj6JSB9ZLMWQ8g1gG6hdE5gQLncbnbymrwy2yVmH9nikSLYRYxYMFu78Ggp7/g==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + '@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1': resolution: {integrity: sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==} @@ -4474,10 +4531,12 @@ packages: abstract-leveldown@6.2.3: resolution: {integrity: sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==} engines: {node: '>=6'} + deprecated: Superseded by abstract-level (https://github.com/Level/community#faq) abstract-leveldown@6.3.0: resolution: {integrity: sha512-TU5nlYgta8YrBMNpc9FwQzRbiXsj49gsALsXadbGHt9CROPzX5fB0rWDR5mtdpOOKa5XqRFpbj1QroPAoPzVjQ==} engines: {node: '>=6'} + deprecated: Superseded by abstract-level (https://github.com/Level/community#faq) abstract-logging@2.0.1: resolution: {integrity: sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA==} @@ -6079,6 +6138,7 @@ packages: deferred-leveldown@5.3.0: resolution: {integrity: sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==} engines: {node: '>=6'} + deprecated: Superseded by abstract-level (https://github.com/Level/community#faq) define-data-property@1.1.4: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} @@ -8206,6 +8266,7 @@ packages: level-js@5.0.2: resolution: {integrity: sha512-SnBIDo2pdO5VXh02ZmtAyPP6/+6YTJg2ibLtl9C34pWvmtMEmRTWpra+qO/hifkUtBTOtfx6S9vLDjBsBK4gRg==} + deprecated: Superseded by browser-level (https://github.com/Level/community#faq) level-packager@5.1.1: resolution: {integrity: sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ==} @@ -8222,10 +8283,12 @@ packages: leveldown@5.6.0: resolution: {integrity: sha512-iB8O/7Db9lPaITU1aA2txU/cBEXAt4vWwKQRrrWuS6XDgbP4QZGj9BL2aNbwb002atoQ/lIotJkfyzz+ygQnUQ==} engines: {node: '>=8.6.0'} + deprecated: Superseded by classic-level (https://github.com/Level/community#faq) levelup@4.4.0: resolution: {integrity: sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ==} engines: {node: '>=6'} + deprecated: Superseded by abstract-level (https://github.com/Level/community#faq) leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} @@ -9104,6 +9167,24 @@ packages: sass: optional: true + next@14.2.15: + resolution: {integrity: sha512-h9ctmOokpoDphRvMGnwOJAedT6zKhwqyZML9mDtspgf4Rh3Pn7UTYKqePNoDvhsWBAO5GoPNYshnAUGIazVGmw==} + engines: {node: '>=18.17.0'} + hasBin: true + peerDependencies: + '@opentelemetry/api': ^1.1.0 + '@playwright/test': ^1.41.2 + react: ^18.2.0 + react-dom: ^18.2.0 + sass: ^1.3.0 + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + '@playwright/test': + optional: true + sass: + optional: true + nice-try@1.0.4: resolution: {integrity: sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==} @@ -13389,7 +13470,7 @@ snapshots: '@babel/traverse': 7.24.6 '@babel/types': 7.25.6 convert-source-map: 2.0.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -13580,7 +13661,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.24.6 '@babel/parser': 7.25.6 '@babel/types': 7.25.6 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -14085,7 +14166,7 @@ snapshots: '@elastic/elasticsearch@7.17.13': dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) hpagent: 0.1.2 ms: 2.1.3 secure-json-parse: 2.7.0 @@ -14101,7 +14182,7 @@ snapshots: '@elastic/transport@8.6.1': dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) hpagent: 1.2.0 ms: 2.1.3 secure-json-parse: 2.7.0 @@ -14212,7 +14293,7 @@ snapshots: '@eslint/eslintrc@2.0.3': dependencies: ajv: 6.12.6 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) espree: 9.6.1 globals: 13.24.0 ignore: 5.3.1 @@ -14285,7 +14366,7 @@ snapshots: '@humanwhocodes/config-array@0.11.8': dependencies: '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -14301,7 +14382,7 @@ snapshots: '@antfu/install-pkg': 0.4.1 '@antfu/utils': 0.7.10 '@iconify/types': 2.0.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) kolorist: 1.8.0 local-pkg: 0.5.0 mlly: 1.7.1 @@ -14809,6 +14890,8 @@ snapshots: '@next/env@14.2.13': {} + '@next/env@14.2.15': {} + '@next/eslint-plugin-next@12.1.6': dependencies: glob: 7.1.7 @@ -14816,30 +14899,57 @@ snapshots: '@next/swc-darwin-arm64@14.2.13': optional: true + '@next/swc-darwin-arm64@14.2.15': + optional: true + '@next/swc-darwin-x64@14.2.13': optional: true + '@next/swc-darwin-x64@14.2.15': + optional: true + '@next/swc-linux-arm64-gnu@14.2.13': optional: true + '@next/swc-linux-arm64-gnu@14.2.15': + optional: true + '@next/swc-linux-arm64-musl@14.2.13': optional: true + '@next/swc-linux-arm64-musl@14.2.15': + optional: true + '@next/swc-linux-x64-gnu@14.2.13': optional: true + '@next/swc-linux-x64-gnu@14.2.15': + optional: true + '@next/swc-linux-x64-musl@14.2.13': optional: true + '@next/swc-linux-x64-musl@14.2.15': + optional: true + '@next/swc-win32-arm64-msvc@14.2.13': optional: true + '@next/swc-win32-arm64-msvc@14.2.15': + optional: true + '@next/swc-win32-ia32-msvc@14.2.13': optional: true + '@next/swc-win32-ia32-msvc@14.2.15': + optional: true + '@next/swc-win32-x64-msvc@14.2.13': optional: true + '@next/swc-win32-x64-msvc@14.2.15': + optional: true + '@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1': dependencies: eslint-scope: 5.1.1 @@ -15760,7 +15870,7 @@ snapshots: '@swc-node/sourcemap-support': 0.5.0 '@swc/core': 1.5.25(@swc/helpers@0.5.11) colorette: 2.0.20 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) pirates: 4.0.6 tslib: 2.8.0 typescript: 5.4.2 @@ -16354,14 +16464,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@5.59.7(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.4.2))(eslint@8.41.0)(typescript@5.4.2)': + '@typescript-eslint/eslint-plugin@5.59.7(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint@8.41.0)(typescript@5.4.2)': dependencies: '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 5.59.7(eslint@8.41.0)(typescript@5.4.2) + '@typescript-eslint/parser': 5.59.7(eslint@8.41.0)(typescript@5.0.4) '@typescript-eslint/scope-manager': 5.59.7 '@typescript-eslint/type-utils': 5.59.7(eslint@8.41.0)(typescript@5.4.2) '@typescript-eslint/utils': 5.59.7(eslint@8.41.0)(typescript@5.4.2) - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) eslint: 8.41.0 grapheme-splitter: 1.0.4 ignore: 5.3.1 @@ -16386,19 +16496,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.4.2)': - dependencies: - '@typescript-eslint/scope-manager': 5.59.7 - '@typescript-eslint/types': 5.59.7 - '@typescript-eslint/typescript-estree': 5.59.7(typescript@5.4.2) - debug: 4.3.7 - eslint: 8.41.0 - optionalDependencies: - typescript: 5.4.2 - transitivePeerDependencies: - - supports-color - optional: true - '@typescript-eslint/scope-manager@5.59.7': dependencies: '@typescript-eslint/types': 5.59.7 @@ -16420,7 +16517,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 5.59.7(typescript@5.4.2) '@typescript-eslint/utils': 5.59.7(eslint@8.41.0)(typescript@5.4.2) - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) eslint: 8.41.0 tsutils: 3.21.0(typescript@5.4.2) optionalDependencies: @@ -16449,7 +16546,7 @@ snapshots: dependencies: '@typescript-eslint/types': 5.59.7 '@typescript-eslint/visitor-keys': 5.59.7 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) globby: 11.1.0 is-glob: 4.0.3 semver: 7.6.3 @@ -16558,7 +16655,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitest/coverage-v8@2.1.1(vitest@2.1.1)': + '@vitest/coverage-v8@2.1.1(vitest@2.1.1(@types/node@20.14.0)(@vitest/ui@2.1.1)(happy-dom@15.7.4)(sass@1.77.6)(terser@5.36.0))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -16835,13 +16932,13 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color agent-base@7.1.1: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -17188,12 +17285,12 @@ snapshots: '@types/babel__core': 7.20.5 '@types/babel__traverse': 7.0.7 - babel-plugin-superjson-next@0.4.5(next@14.2.13(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(superjson@1.13.3): + babel-plugin-superjson-next@0.4.5(next@14.2.15(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(superjson@1.13.3): dependencies: '@babel/helper-module-imports': 7.24.6 '@babel/types': 7.25.6 hoist-non-react-statics: 3.3.2 - next: 14.2.13(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6) + next: 14.2.15(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6) superjson: 1.13.3 babel-preset-current-node-syntax@1.0.1(@babel/core@7.24.6): @@ -17915,7 +18012,7 @@ snapshots: connect-mongo@4.6.0(express-session@1.18.0)(mongodb@4.17.2(@aws-sdk/client-sso-oidc@3.600.0)): dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) express-session: 1.18.0 kruptein: 3.0.6 mongodb: 4.17.2(@aws-sdk/client-sso-oidc@3.600.0) @@ -18395,10 +18492,6 @@ snapshots: dependencies: ms: 2.1.3 - debug@4.3.7: - dependencies: - ms: 2.1.3 - debug@4.3.7(supports-color@5.5.0): dependencies: ms: 2.1.3 @@ -18693,7 +18786,7 @@ snapshots: engine.io-client@6.6.2: dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) engine.io-parser: 5.2.3 ws: 8.17.1 xmlhttprequest-ssl: 2.1.2 @@ -18713,7 +18806,7 @@ snapshots: base64id: 2.0.0 cookie: 0.7.2 cors: 2.8.5 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) engine.io-parser: 5.2.3 ws: 8.17.1 transitivePeerDependencies: @@ -18876,7 +18969,7 @@ snapshots: escape-string-regexp@5.0.0: {} - eslint-config-airbnb-base@13.1.0(eslint-plugin-import@2.26.0)(eslint@8.41.0): + eslint-config-airbnb-base@13.1.0(eslint-plugin-import@2.26.0(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@3.2.5)(eslint@8.41.0))(eslint@8.41.0): dependencies: eslint: 8.41.0 eslint-plugin-import: 2.26.0(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@3.2.5)(eslint@8.41.0) @@ -18884,17 +18977,17 @@ snapshots: object.assign: 4.1.5 object.entries: 1.1.5 - eslint-config-airbnb@17.1.0(eslint-plugin-import@2.26.0)(eslint-plugin-jsx-a11y@6.5.1(eslint@8.41.0))(eslint-plugin-react@7.30.1(eslint@8.41.0))(eslint@8.41.0): + eslint-config-airbnb@17.1.0(eslint-plugin-import@2.26.0(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@3.2.5)(eslint@8.41.0))(eslint-plugin-jsx-a11y@6.5.1(eslint@8.41.0))(eslint-plugin-react@7.30.1(eslint@8.41.0))(eslint@8.41.0): dependencies: eslint: 8.41.0 - eslint-config-airbnb-base: 13.1.0(eslint-plugin-import@2.26.0)(eslint@8.41.0) + eslint-config-airbnb-base: 13.1.0(eslint-plugin-import@2.26.0(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@3.2.5)(eslint@8.41.0))(eslint@8.41.0) eslint-plugin-import: 2.26.0(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@3.2.5)(eslint@8.41.0) eslint-plugin-jsx-a11y: 6.5.1(eslint@8.41.0) eslint-plugin-react: 7.30.1(eslint@8.41.0) object.assign: 4.1.5 object.entries: 1.1.5 - eslint-config-next@12.1.6(eslint@8.41.0)(next@14.2.13(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(typescript@5.0.4): + eslint-config-next@12.1.6(eslint@8.41.0)(next@14.2.15(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(typescript@5.0.4): dependencies: '@next/eslint-plugin-next': 12.1.6 '@rushstack/eslint-patch': 1.1.3 @@ -18902,25 +18995,25 @@ snapshots: eslint: 8.41.0 eslint-import-resolver-node: 0.3.6 eslint-import-resolver-typescript: 2.7.1(eslint-plugin-import@2.26.0)(eslint@8.41.0) - eslint-plugin-import: 2.26.0(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.26.0)(eslint@8.41.0))(eslint@8.41.0) + eslint-plugin-import: 2.26.0(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@2.7.1)(eslint@8.41.0) eslint-plugin-jsx-a11y: 6.5.1(eslint@8.41.0) eslint-plugin-react: 7.30.1(eslint@8.41.0) eslint-plugin-react-hooks: 4.6.0(eslint@8.41.0) - next: 14.2.13(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6) + next: 14.2.15(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6) optionalDependencies: typescript: 5.0.4 transitivePeerDependencies: - eslint-import-resolver-webpack - supports-color - eslint-config-weseek@2.1.1(@babel/core@7.24.6)(@babel/eslint-parser@7.24.7(@babel/core@7.24.6)(eslint@8.41.0))(@typescript-eslint/eslint-plugin@5.59.7(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint@8.41.0)(typescript@5.0.4))(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@3.2.5)(eslint-plugin-import@2.26.0)(eslint-plugin-jsx-a11y@6.5.1(eslint@8.41.0))(eslint-plugin-react-hooks@4.6.0(eslint@8.41.0))(eslint-plugin-react@7.30.1(eslint@8.41.0))(eslint-plugin-vue@7.20.0(eslint@8.41.0))(eslint@8.41.0): + eslint-config-weseek@2.1.1(@babel/core@7.24.6)(@babel/eslint-parser@7.24.7(@babel/core@7.24.6)(eslint@8.41.0))(@typescript-eslint/eslint-plugin@5.59.7(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint@8.41.0)(typescript@5.0.4))(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@3.2.5(eslint-plugin-import@2.26.0)(eslint@8.41.0))(eslint-plugin-import@2.26.0(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@3.2.5)(eslint@8.41.0))(eslint-plugin-jsx-a11y@6.5.1(eslint@8.41.0))(eslint-plugin-react-hooks@4.6.0(eslint@8.41.0))(eslint-plugin-react@7.30.1(eslint@8.41.0))(eslint-plugin-vue@7.20.0(eslint@8.41.0))(eslint@8.41.0): dependencies: '@babel/core': 7.24.6 '@babel/eslint-parser': 7.24.7(@babel/core@7.24.6)(eslint@8.41.0) '@typescript-eslint/eslint-plugin': 5.59.7(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint@8.41.0)(typescript@5.0.4) '@typescript-eslint/parser': 5.59.7(eslint@8.41.0)(typescript@5.0.4) eslint: 8.41.0 - eslint-config-airbnb: 17.1.0(eslint-plugin-import@2.26.0)(eslint-plugin-jsx-a11y@6.5.1(eslint@8.41.0))(eslint-plugin-react@7.30.1(eslint@8.41.0))(eslint@8.41.0) + eslint-config-airbnb: 17.1.0(eslint-plugin-import@2.26.0(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@3.2.5)(eslint@8.41.0))(eslint-plugin-jsx-a11y@6.5.1(eslint@8.41.0))(eslint-plugin-react@7.30.1(eslint@8.41.0))(eslint@8.41.0) eslint-import-resolver-typescript: 3.2.5(eslint-plugin-import@2.26.0)(eslint@8.41.0) eslint-plugin-import: 2.26.0(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@3.2.5)(eslint@8.41.0) eslint-plugin-react: 7.30.1(eslint@8.41.0) @@ -18940,7 +19033,7 @@ snapshots: dependencies: debug: 4.3.7(supports-color@5.5.0) eslint: 8.41.0 - eslint-plugin-import: 2.26.0(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@3.2.5)(eslint@8.41.0) + eslint-plugin-import: 2.26.0(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@2.7.1)(eslint@8.41.0) glob: 7.2.3 is-glob: 4.0.3 resolve: 1.22.8 @@ -18973,7 +19066,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.7.3(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-node@0.3.6)(eslint-import-resolver-typescript@3.2.5): + eslint-module-utils@2.7.3(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-node@0.3.6)(eslint-import-resolver-typescript@3.2.5(eslint-plugin-import@2.26.0)(eslint@8.41.0)): dependencies: debug: 3.2.7 find-up: 2.1.0 @@ -18984,7 +19077,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import@2.26.0(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.26.0)(eslint@8.41.0))(eslint@8.41.0): + eslint-plugin-import@2.26.0(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-typescript@2.7.1)(eslint@8.41.0): dependencies: array-includes: 3.1.5 array.prototype.flat: 1.3.2 @@ -19015,7 +19108,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.41.0 eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.3(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-node@0.3.6)(eslint-import-resolver-typescript@3.2.5) + eslint-module-utils: 2.7.3(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint-import-resolver-node@0.3.6)(eslint-import-resolver-typescript@3.2.5(eslint-plugin-import@2.26.0)(eslint@8.41.0)) has: 1.0.3 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -19041,12 +19134,12 @@ snapshots: - typescript optional: true - eslint-plugin-jest@26.9.0(@typescript-eslint/eslint-plugin@5.59.7(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.4.2))(eslint@8.41.0)(typescript@5.4.2))(eslint@8.41.0)(jest@29.7.0(@types/node@20.14.0)(ts-node@10.9.2(@swc/core@1.5.25(@swc/helpers@0.5.11))(@types/node@20.14.0)(typescript@5.4.2)))(typescript@5.4.2): + eslint-plugin-jest@26.9.0(@typescript-eslint/eslint-plugin@5.59.7(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint@8.41.0)(typescript@5.4.2))(eslint@8.41.0)(jest@29.7.0(@types/node@20.14.0)(ts-node@10.9.2(@swc/core@1.5.25(@swc/helpers@0.5.11))(@types/node@20.14.0)(typescript@5.4.2)))(typescript@5.4.2): dependencies: '@typescript-eslint/utils': 5.59.7(eslint@8.41.0)(typescript@5.4.2) eslint: 8.41.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 5.59.7(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.4.2))(eslint@8.41.0)(typescript@5.4.2) + '@typescript-eslint/eslint-plugin': 5.59.7(@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@5.0.4))(eslint@8.41.0)(typescript@5.4.2) jest: 29.7.0(@types/node@20.14.0)(ts-node@10.9.2(@swc/core@1.5.25(@swc/helpers@0.5.11))(@types/node@20.14.0)(typescript@5.4.2)) transitivePeerDependencies: - supports-color @@ -19159,7 +19252,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.0 @@ -19499,7 +19592,7 @@ snapshots: follow-redirects@1.15.9(debug@4.3.7): optionalDependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) follow-redirects@1.5.10: dependencies: @@ -20147,14 +20240,14 @@ snapshots: dependencies: '@tootallnate/once': 2.0.0 agent-base: 6.0.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -20177,14 +20270,14 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color https-proxy-agent@7.0.5: dependencies: agent-base: 7.1.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -20543,7 +20636,7 @@ snapshots: istanbul-lib-source-maps@4.0.1: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: @@ -21942,7 +22035,7 @@ snapshots: micromark@4.0.0: dependencies: '@types/debug': 4.1.7 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) decode-named-character-reference: 1.0.2 devlop: 1.1.0 micromark-core-commonmark: 2.0.1 @@ -22105,7 +22198,7 @@ snapshots: dependencies: async-mutex: 0.4.1 camelcase: 6.3.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) find-cache-dir: 3.3.2 follow-redirects: 1.15.9(debug@4.3.7) https-proxy-agent: 7.0.5 @@ -22213,7 +22306,7 @@ snapshots: mquery@4.0.3: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -22303,7 +22396,7 @@ snapshots: new-find-package-json@2.0.0: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -22311,7 +22404,7 @@ snapshots: dependencies: react: 18.2.0 - next-i18next@15.3.1(i18next@23.16.5)(next@14.2.13(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(react-i18next@15.1.1(i18next@23.16.5)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0): + next-i18next@15.3.1(i18next@23.16.5)(next@14.2.15(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(react-i18next@15.1.1(i18next@23.16.5)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0): dependencies: '@babel/runtime': 7.25.4 '@types/hoist-non-react-statics': 3.3.5 @@ -22319,26 +22412,26 @@ snapshots: hoist-non-react-statics: 3.3.2 i18next: 23.16.5 i18next-fs-backend: 2.3.2 - next: 14.2.13(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6) + next: 14.2.15(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6) react: 18.2.0 react-i18next: 15.1.1(i18next@23.16.5)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - next-superjson@0.0.4(next@14.2.13(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(superjson@1.13.3)(webpack@5.92.1(@swc/core@1.5.25(@swc/helpers@0.5.11))): + next-superjson@0.0.4(next@14.2.15(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(superjson@1.13.3)(webpack@5.92.1(@swc/core@1.5.25(@swc/helpers@0.5.11))): dependencies: '@babel/core': 7.24.6 '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.24.6) '@babel/plugin-syntax-typescript': 7.24.7(@babel/core@7.24.6) babel-loader: 8.3.0(@babel/core@7.24.6)(webpack@5.92.1(@swc/core@1.5.25(@swc/helpers@0.5.11))) - babel-plugin-superjson-next: 0.4.5(next@14.2.13(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(superjson@1.13.3) - next: 14.2.13(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6) + babel-plugin-superjson-next: 0.4.5(next@14.2.15(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(superjson@1.13.3) + next: 14.2.15(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6) transitivePeerDependencies: - superjson - supports-color - webpack - next-themes@0.2.1(next@14.2.13(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(react-dom@18.2.0(react@18.2.0))(react@18.2.0): + next-themes@0.2.1(next@14.2.15(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6))(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: - next: 14.2.13(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6) + next: 14.2.15(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -22369,6 +22462,33 @@ snapshots: - '@babel/core' - babel-plugin-macros + next@14.2.15(@babel/core@7.24.6)(@playwright/test@1.46.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.77.6): + dependencies: + '@next/env': 14.2.15 + '@swc/helpers': 0.5.5 + busboy: 1.6.0 + caniuse-lite: 1.0.30001680 + graceful-fs: 4.2.11 + postcss: 8.4.31 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + styled-jsx: 5.1.1(@babel/core@7.24.6)(react@18.2.0) + optionalDependencies: + '@next/swc-darwin-arm64': 14.2.15 + '@next/swc-darwin-x64': 14.2.15 + '@next/swc-linux-arm64-gnu': 14.2.15 + '@next/swc-linux-arm64-musl': 14.2.15 + '@next/swc-linux-x64-gnu': 14.2.15 + '@next/swc-linux-x64-musl': 14.2.15 + '@next/swc-win32-arm64-msvc': 14.2.15 + '@next/swc-win32-ia32-msvc': 14.2.15 + '@next/swc-win32-x64-msvc': 14.2.15 + '@playwright/test': 1.46.0 + sass: 1.77.6 + transitivePeerDependencies: + - '@babel/core' + - babel-plugin-macros + nice-try@1.0.4: {} no-case@3.0.4: @@ -22834,7 +22954,7 @@ snapshots: passport-saml@3.2.4: dependencies: '@xmldom/xmldom': 0.7.13 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) passport-strategy: 1.0.0 xml-crypto: 2.1.5 xml-encryption: 2.0.0 @@ -23821,7 +23941,7 @@ snapshots: retry-request@4.2.2: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) extend: 3.0.2 transitivePeerDependencies: - supports-color @@ -24211,7 +24331,7 @@ snapshots: socket.io-adapter@2.5.5: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) ws: 8.17.1 transitivePeerDependencies: - bufferutil @@ -24221,7 +24341,7 @@ snapshots: socket.io-client@4.8.1: dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) engine.io-client: 6.6.2 socket.io-parser: 4.2.4 transitivePeerDependencies: @@ -24232,7 +24352,7 @@ snapshots: socket.io-parser@4.2.4: dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -24241,7 +24361,7 @@ snapshots: accepts: 1.3.8 base64id: 2.0.0 cors: 2.8.5 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) engine.io: 6.6.2 socket.io-adapter: 2.5.5 socket.io-parser: 4.2.4 @@ -25556,7 +25676,7 @@ snapshots: sass: 1.77.6 terser: 5.36.0 - vitest-mock-extended@2.0.2(typescript@5.0.4)(vitest@2.1.1): + vitest-mock-extended@2.0.2(typescript@5.0.4)(vitest@2.1.1(@types/node@20.14.0)(@vitest/ui@2.1.1)(happy-dom@15.7.4)(sass@1.77.6)(terser@5.36.0)): dependencies: ts-essentials: 10.0.2(typescript@5.0.4) typescript: 5.0.4 From c7068fbde9bae6ae8883299d99917d5a4e4e122e Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Fri, 20 Dec 2024 05:39:03 +0000 Subject: [PATCH 28/33] Simplify cvertMarkdownToHtml argument types --- .../src/features/openai/server/services/openai.ts | 15 +++++++++++++-- .../server/utils/convert-markdown-to-html.ts | 12 ++---------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/apps/app/src/features/openai/server/services/openai.ts b/apps/app/src/features/openai/server/services/openai.ts index f9dfa82e1de..3c35ba0b89b 100644 --- a/apps/app/src/features/openai/server/services/openai.ts +++ b/apps/app/src/features/openai/server/services/openai.ts @@ -36,6 +36,13 @@ let isVectorStoreForPublicScopeExist = false; type VectorStoreFileRelationsMap = Map +const isPagePopulatedToShowRevision = (page: HydratedDocument): page is IPagePopulatedToShowRevision & PageDocument => { + if (page?.revision != null && !isPopulated(page.revision)) { + return false; + } + + return true; +}; export interface IOpenaiService { getOrCreateThread(userId: string, vectorStoreId?: string, threadId?: string): Promise; getOrCreateVectorStoreForPublicScope(): Promise; @@ -158,7 +165,7 @@ class OpenaiService implements IOpenaiService { // } // } - private async uploadFile(page: HydratedDocument | IPagePopulatedToShowRevision): Promise { + private async uploadFile(page: IPagePopulatedToShowRevision): Promise { const convertedHtml = await convertMarkdownToHtml(page); const file = await toFile(Readable.from(convertedHtml), `${page._id}.html`); const uploadedFile = await this.client.uploadFile(file); @@ -186,7 +193,11 @@ class OpenaiService implements IOpenaiService { const vectorStoreFileRelationsMap: VectorStoreFileRelationsMap = new Map(); const processUploadFile = async(page: HydratedDocument) => { if (page._id != null && page.grant === PageGrant.GRANT_PUBLIC && page.revision != null) { - if (isPopulated(page.revision) && page.revision.body.length > 0) { + if (isPagePopulatedToShowRevision(page)) { + if (page.revision.body.length > 0) { + return; + } + const uploadedFile = await this.uploadFile(page); prepareVectorStoreFileRelations(vectorStore._id, page._id, uploadedFile.id, vectorStoreFileRelationsMap); return; diff --git a/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts b/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts index 531099402e9..22e270f585b 100644 --- a/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts +++ b/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts @@ -1,8 +1,6 @@ import { dynamicImport } from '@cspell/dynamic-import'; -import { isPopulated } from '@growi/core'; import type { IPagePopulatedToShowRevision } from '@growi/core/dist/interfaces'; import type { Root, Code } from 'mdast'; -import type { HydratedDocument } from 'mongoose'; import type * as RehypeMeta from 'rehype-meta'; import type * as RehypeStringify from 'rehype-stringify'; import type * as RemarkParse from 'remark-parse'; @@ -10,8 +8,6 @@ import type * as RemarkRehype from 'remark-rehype'; import type * as Unified from 'unified'; import type * as UnistUtilVisit from 'unist-util-visit'; -import type { PageDocument } from '~/server/models/page'; - interface ModuleCache { unified?: typeof Unified.unified; visit?: typeof UnistUtilVisit.visit; @@ -60,7 +56,7 @@ const initializeModules = async(): Promise => { }; }; -export const convertMarkdownToHtml = async(page: HydratedDocument | IPagePopulatedToShowRevision): Promise => { +export const convertMarkdownToHtml = async(page: IPagePopulatedToShowRevision): Promise => { await initializeModules(); const { @@ -81,10 +77,6 @@ export const convertMarkdownToHtml = async(page: HydratedDocument }; }; - const revisionBody = page.revision != null && isPopulated(page.revision) - ? page.revision.body - : undefined; - const processor = unified() .use(remarkParse) .use(sanitizeMarkdown) @@ -94,5 +86,5 @@ export const convertMarkdownToHtml = async(page: HydratedDocument }) .use(rehypeStringify); - return processor.processSync(revisionBody).toString(); + return processor.processSync(page.revision?.body).toString(); }; From 3e17890b25f0c7985c2e8e7dfab62f99a1165c6b Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Fri, 20 Dec 2024 06:08:28 +0000 Subject: [PATCH 29/33] Fix logic error in page revision body length check --- apps/app/src/features/openai/server/services/openai.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app/src/features/openai/server/services/openai.ts b/apps/app/src/features/openai/server/services/openai.ts index 3c35ba0b89b..e44b0a16278 100644 --- a/apps/app/src/features/openai/server/services/openai.ts +++ b/apps/app/src/features/openai/server/services/openai.ts @@ -194,7 +194,7 @@ class OpenaiService implements IOpenaiService { const processUploadFile = async(page: HydratedDocument) => { if (page._id != null && page.grant === PageGrant.GRANT_PUBLIC && page.revision != null) { if (isPagePopulatedToShowRevision(page)) { - if (page.revision.body.length > 0) { + if (page.revision.body.length < 0) { return; } From bac5032c56b15e4d73378f30d5c9a27eec079dea Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Fri, 20 Dec 2024 06:29:24 +0000 Subject: [PATCH 30/33] add comment --- apps/app/src/features/openai/server/services/openai.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/app/src/features/openai/server/services/openai.ts b/apps/app/src/features/openai/server/services/openai.ts index e44b0a16278..597226a6984 100644 --- a/apps/app/src/features/openai/server/services/openai.ts +++ b/apps/app/src/features/openai/server/services/openai.ts @@ -36,6 +36,7 @@ let isVectorStoreForPublicScopeExist = false; type VectorStoreFileRelationsMap = Map +// type guard const isPagePopulatedToShowRevision = (page: HydratedDocument): page is IPagePopulatedToShowRevision & PageDocument => { if (page?.revision != null && !isPopulated(page.revision)) { return false; From 8217a12d427845e672cbbdcc04448c631bd61a6b Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 23 Dec 2024 04:26:29 +0000 Subject: [PATCH 31/33] Convert query parameters 'offset' and 'limit' to integers --- packages/remark-lsx/src/server/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/remark-lsx/src/server/index.ts b/packages/remark-lsx/src/server/index.ts index 33db8e02544..86f06788d9e 100644 --- a/packages/remark-lsx/src/server/index.ts +++ b/packages/remark-lsx/src/server/index.ts @@ -14,8 +14,8 @@ const filterXSS = new FilterXSS(); const lsxValidator = [ query('pagePath').notEmpty().isString(), - query('offset').optional().isInt(), - query('limit').optional().isInt(), + query('offset').optional().isInt().toInt(), + query('limit').optional().isInt().toInt(), query('options') .optional() .customSanitizer((options) => { From 1bebb75be0cb35009755466a4a9bf849f0b65bac Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 23 Dec 2024 09:49:45 +0000 Subject: [PATCH 32/33] Refactor uploadFile and convertMarkdownToHtml to use simplified parameters --- .../features/openai/server/services/openai.ts | 24 +++++-------------- .../server/utils/convert-markdown-to-html.ts | 12 ++++++---- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/apps/app/src/features/openai/server/services/openai.ts b/apps/app/src/features/openai/server/services/openai.ts index 597226a6984..bf9c4dcc765 100644 --- a/apps/app/src/features/openai/server/services/openai.ts +++ b/apps/app/src/features/openai/server/services/openai.ts @@ -36,14 +36,6 @@ let isVectorStoreForPublicScopeExist = false; type VectorStoreFileRelationsMap = Map -// type guard -const isPagePopulatedToShowRevision = (page: HydratedDocument): page is IPagePopulatedToShowRevision & PageDocument => { - if (page?.revision != null && !isPopulated(page.revision)) { - return false; - } - - return true; -}; export interface IOpenaiService { getOrCreateThread(userId: string, vectorStoreId?: string, threadId?: string): Promise; getOrCreateVectorStoreForPublicScope(): Promise; @@ -166,9 +158,9 @@ class OpenaiService implements IOpenaiService { // } // } - private async uploadFile(page: IPagePopulatedToShowRevision): Promise { - const convertedHtml = await convertMarkdownToHtml(page); - const file = await toFile(Readable.from(convertedHtml), `${page._id}.html`); + private async uploadFile(pageId: Types.ObjectId, pagePath: string, revisionBody: string): Promise { + const convertedHtml = await convertMarkdownToHtml({ pagePath, revisionBody }); + const file = await toFile(Readable.from(convertedHtml), `${pageId}.html`); const uploadedFile = await this.client.uploadFile(file); return uploadedFile; } @@ -194,19 +186,15 @@ class OpenaiService implements IOpenaiService { const vectorStoreFileRelationsMap: VectorStoreFileRelationsMap = new Map(); const processUploadFile = async(page: HydratedDocument) => { if (page._id != null && page.grant === PageGrant.GRANT_PUBLIC && page.revision != null) { - if (isPagePopulatedToShowRevision(page)) { - if (page.revision.body.length < 0) { - return; - } - - const uploadedFile = await this.uploadFile(page); + if (isPopulated(page.revision) && page.revision.body.length > 0) { + const uploadedFile = await this.uploadFile(page._id, page.path, page.revision.body); prepareVectorStoreFileRelations(vectorStore._id, page._id, uploadedFile.id, vectorStoreFileRelationsMap); return; } const pagePopulatedToShowRevision = await page.populateDataToShowRevision(); if (pagePopulatedToShowRevision.revision != null && pagePopulatedToShowRevision.revision.body.length > 0) { - const uploadedFile = await this.uploadFile(pagePopulatedToShowRevision); + const uploadedFile = await this.uploadFile(page._id, page.path, pagePopulatedToShowRevision.revision.body); prepareVectorStoreFileRelations(vectorStore._id, page._id, uploadedFile.id, vectorStoreFileRelationsMap); } } diff --git a/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts b/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts index 22e270f585b..804ce534852 100644 --- a/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts +++ b/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts @@ -1,5 +1,4 @@ import { dynamicImport } from '@cspell/dynamic-import'; -import type { IPagePopulatedToShowRevision } from '@growi/core/dist/interfaces'; import type { Root, Code } from 'mdast'; import type * as RehypeMeta from 'rehype-meta'; import type * as RehypeStringify from 'rehype-stringify'; @@ -56,7 +55,12 @@ const initializeModules = async(): Promise => { }; }; -export const convertMarkdownToHtml = async(page: IPagePopulatedToShowRevision): Promise => { +type ConvertMarkdownToHtmlParams = { + pagePath: string; + revisionBody: string; +}; + +export const convertMarkdownToHtml = async({ pagePath, revisionBody }: ConvertMarkdownToHtmlParams): Promise => { await initializeModules(); const { @@ -82,9 +86,9 @@ export const convertMarkdownToHtml = async(page: IPagePopulatedToShowRevision): .use(sanitizeMarkdown) .use(remarkRehype) .use(rehypeMeta, { - title: page.path, + title: pagePath, }) .use(rehypeStringify); - return processor.processSync(page.revision?.body).toString(); + return processor.processSync(revisionBody).toString(); }; From 35618a67d947ce042831255f98de1c091ca43daa Mon Sep 17 00:00:00 2001 From: Shun Miyazawa Date: Mon, 23 Dec 2024 09:54:44 +0000 Subject: [PATCH 33/33] Simplify parameter type definition in convertMarkdownToHtml function --- .../openai/server/utils/convert-markdown-to-html.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts b/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts index 804ce534852..fa0dcf4dbe4 100644 --- a/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts +++ b/apps/app/src/features/openai/server/utils/convert-markdown-to-html.ts @@ -55,12 +55,7 @@ const initializeModules = async(): Promise => { }; }; -type ConvertMarkdownToHtmlParams = { - pagePath: string; - revisionBody: string; -}; - -export const convertMarkdownToHtml = async({ pagePath, revisionBody }: ConvertMarkdownToHtmlParams): Promise => { +export const convertMarkdownToHtml = async({ pagePath, revisionBody }: { pagePath: string, revisionBody: string }): Promise => { await initializeModules(); const {