From 7ea20ad1e24a03549ec7d59974295d4edacf2ad6 Mon Sep 17 00:00:00 2001 From: Peng Xiao <584378+pengx17@users.noreply.github.com> Date: Sun, 26 Sep 2021 09:40:14 +0800 Subject: [PATCH] feat: allow use shift+cmd+click to open and visit new tab --- package.json | 12 +- pnpm-lock.yaml | 475 ++++++++++++++++++++++++----------------------- src/PageTabs.tsx | 57 +++--- 3 files changed, 284 insertions(+), 260 deletions(-) diff --git a/package.json b/package.json index 90c92d4..85bb268 100644 --- a/package.json +++ b/package.json @@ -9,14 +9,14 @@ }, "license": "MIT", "dependencies": { - "@logseq/libs": "^0.0.1-alpha.26", + "@logseq/libs": "^0.0.1-alpha.29", "eslint-plugin-react-hooks": "^4.2.0", "fast-deep-equal": "^3.1.3", - "immer": "^9.0.5", + "immer": "^9.0.6", "keyboardjs": "^2.6.4", "react": "^17.0.2", "react-dom": "^17.0.2", - "react-use": "^17.2.4" + "react-use": "^17.3.1" }, "devDependencies": { "@semantic-release/changelog": "5.0.1", @@ -25,12 +25,12 @@ "@semantic-release/npm": "7.1.3", "@types/react": "17.0.19", "@types/react-dom": "17.0.9", - "@typescript-eslint/eslint-plugin": "^4.29.3", - "@typescript-eslint/parser": "^4.29.3", + "@typescript-eslint/eslint-plugin": "^4.31.2", + "@typescript-eslint/parser": "^4.31.2", "@vitejs/plugin-react-refresh": "1.3.6", "conventional-changelog-conventionalcommits": "4.6.0", "eslint": "^7.32.0", - "eslint-plugin-react": "^7.25.1", + "eslint-plugin-react": "^7.26.0", "typescript": "4.4.2", "vite": "2.5.1", "vite-plugin-windicss": "1.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c8c8959..5840e02 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,40 +1,40 @@ lockfileVersion: 5.3 specifiers: - '@logseq/libs': ^0.0.1-alpha.26 + '@logseq/libs': ^0.0.1-alpha.29 '@semantic-release/changelog': 5.0.1 '@semantic-release/exec': ^5.0.0 '@semantic-release/git': 9.0.0 '@semantic-release/npm': 7.1.3 '@types/react': 17.0.19 '@types/react-dom': 17.0.9 - '@typescript-eslint/eslint-plugin': ^4.29.3 - '@typescript-eslint/parser': ^4.29.3 + '@typescript-eslint/eslint-plugin': ^4.31.2 + '@typescript-eslint/parser': ^4.31.2 '@vitejs/plugin-react-refresh': 1.3.6 conventional-changelog-conventionalcommits: 4.6.0 eslint: ^7.32.0 - eslint-plugin-react: ^7.25.1 + eslint-plugin-react: ^7.26.0 eslint-plugin-react-hooks: ^4.2.0 fast-deep-equal: ^3.1.3 - immer: ^9.0.5 + immer: ^9.0.6 keyboardjs: ^2.6.4 react: ^17.0.2 react-dom: ^17.0.2 - react-use: ^17.2.4 + react-use: ^17.3.1 typescript: 4.4.2 vite: 2.5.1 vite-plugin-windicss: 1.3.0 windicss: 3.1.7 dependencies: - '@logseq/libs': 0.0.1-alpha.26 + '@logseq/libs': 0.0.1-alpha.29 eslint-plugin-react-hooks: 4.2.0_eslint@7.32.0 fast-deep-equal: 3.1.3 - immer: 9.0.5 + immer: 9.0.6 keyboardjs: 2.6.4 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 - react-use: 17.2.4_react-dom@17.0.2+react@17.0.2 + react-use: 17.3.1_react-dom@17.0.2+react@17.0.2 devDependencies: '@semantic-release/changelog': 5.0.1 @@ -43,12 +43,12 @@ devDependencies: '@semantic-release/npm': 7.1.3 '@types/react': 17.0.19 '@types/react-dom': 17.0.9 - '@typescript-eslint/eslint-plugin': 4.29.3_5b13bab190e8051f191796d8c4619073 - '@typescript-eslint/parser': 4.29.3_eslint@7.32.0+typescript@4.4.2 + '@typescript-eslint/eslint-plugin': 4.31.2_326168addec61fdd42b406abb1a8f069 + '@typescript-eslint/parser': 4.31.2_eslint@7.32.0+typescript@4.4.2 '@vitejs/plugin-react-refresh': 1.3.6 conventional-changelog-conventionalcommits: 4.6.0 eslint: 7.32.0 - eslint-plugin-react: 7.25.1_eslint@7.32.0 + eslint-plugin-react: 7.26.0_eslint@7.32.0 typescript: 4.4.2 vite: 2.5.1 vite-plugin-windicss: 1.3.0_typescript@4.4.2+vite@2.5.1 @@ -80,19 +80,19 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/core/7.15.0: - resolution: {integrity: sha512-tXtmTminrze5HEUPn/a0JtOzzfp0nk+UEXQ/tqIJo3WDGypl/2OFQEMll/zSFU8f/lfmfLXvTaORHF3cfXIQMw==} + /@babel/core/7.15.5: + resolution: {integrity: sha512-pYgXxiwAgQpgM1bNkZsDEq85f0ggXMA5L7c+o3tskGMh2BunCI9QUwB9Z4jpvXUOuMdyGKiGKQiRe11VS6Jzvg==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.14.5 - '@babel/generator': 7.15.0 - '@babel/helper-compilation-targets': 7.15.0_@babel+core@7.15.0 - '@babel/helper-module-transforms': 7.15.0 - '@babel/helpers': 7.15.3 - '@babel/parser': 7.15.3 - '@babel/template': 7.14.5 - '@babel/traverse': 7.15.0 - '@babel/types': 7.15.0 + '@babel/generator': 7.15.4 + '@babel/helper-compilation-targets': 7.15.4_@babel+core@7.15.5 + '@babel/helper-module-transforms': 7.15.7 + '@babel/helpers': 7.15.4 + '@babel/parser': 7.15.7 + '@babel/template': 7.15.4 + '@babel/traverse': 7.15.4 + '@babel/types': 7.15.6 convert-source-map: 1.8.0 debug: 4.3.2 gensync: 1.0.0-beta.2 @@ -103,86 +103,86 @@ packages: - supports-color dev: true - /@babel/generator/7.15.0: - resolution: {integrity: sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ==} + /@babel/generator/7.15.4: + resolution: {integrity: sha512-d3itta0tu+UayjEORPNz6e1T3FtvWlP5N4V5M+lhp/CxT4oAA7/NcScnpRyspUMLK6tu9MNHmQHxRykuN2R7hw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.15.0 + '@babel/types': 7.15.6 jsesc: 2.5.2 source-map: 0.5.7 dev: true - /@babel/helper-compilation-targets/7.15.0_@babel+core@7.15.0: - resolution: {integrity: sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A==} + /@babel/helper-compilation-targets/7.15.4_@babel+core@7.15.5: + resolution: {integrity: sha512-rMWPCirulnPSe4d+gwdWXLfAXTTBj8M3guAf5xFQJ0nvFY7tfNAFnWdqaHegHlgDZOCT4qvhF3BYlSJag8yhqQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: '@babel/compat-data': 7.15.0 - '@babel/core': 7.15.0 + '@babel/core': 7.15.5 '@babel/helper-validator-option': 7.14.5 - browserslist: 4.16.8 + browserslist: 4.17.1 semver: 6.3.0 dev: true - /@babel/helper-function-name/7.14.5: - resolution: {integrity: sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==} + /@babel/helper-function-name/7.15.4: + resolution: {integrity: sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-get-function-arity': 7.14.5 - '@babel/template': 7.14.5 - '@babel/types': 7.15.0 + '@babel/helper-get-function-arity': 7.15.4 + '@babel/template': 7.15.4 + '@babel/types': 7.15.6 dev: true - /@babel/helper-get-function-arity/7.14.5: - resolution: {integrity: sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==} + /@babel/helper-get-function-arity/7.15.4: + resolution: {integrity: sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.15.0 + '@babel/types': 7.15.6 dev: true - /@babel/helper-hoist-variables/7.14.5: - resolution: {integrity: sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ==} + /@babel/helper-hoist-variables/7.15.4: + resolution: {integrity: sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.15.0 + '@babel/types': 7.15.6 dev: true - /@babel/helper-member-expression-to-functions/7.15.0: - resolution: {integrity: sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg==} + /@babel/helper-member-expression-to-functions/7.15.4: + resolution: {integrity: sha512-cokOMkxC/BTyNP1AlY25HuBWM32iCEsLPI4BHDpJCHHm1FU2E7dKWWIXJgQgSFiu4lp8q3bL1BIKwqkSUviqtA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.15.0 + '@babel/types': 7.15.6 dev: true - /@babel/helper-module-imports/7.14.5: - resolution: {integrity: sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ==} + /@babel/helper-module-imports/7.15.4: + resolution: {integrity: sha512-jeAHZbzUwdW/xHgHQ3QmWR4Jg6j15q4w/gCfwZvtqOxoo5DKtLHk8Bsf4c5RZRC7NmLEs+ohkdq8jFefuvIxAA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.15.0 + '@babel/types': 7.15.6 dev: true - /@babel/helper-module-transforms/7.15.0: - resolution: {integrity: sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg==} + /@babel/helper-module-transforms/7.15.7: + resolution: {integrity: sha512-ZNqjjQG/AuFfekFTY+7nY4RgBSklgTu970c7Rj3m/JOhIu5KPBUuTA9AY6zaKcUvk4g6EbDXdBnhi35FAssdSw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-module-imports': 7.14.5 - '@babel/helper-replace-supers': 7.15.0 - '@babel/helper-simple-access': 7.14.8 - '@babel/helper-split-export-declaration': 7.14.5 - '@babel/helper-validator-identifier': 7.14.9 - '@babel/template': 7.14.5 - '@babel/traverse': 7.15.0 - '@babel/types': 7.15.0 + '@babel/helper-module-imports': 7.15.4 + '@babel/helper-replace-supers': 7.15.4 + '@babel/helper-simple-access': 7.15.4 + '@babel/helper-split-export-declaration': 7.15.4 + '@babel/helper-validator-identifier': 7.15.7 + '@babel/template': 7.15.4 + '@babel/traverse': 7.15.4 + '@babel/types': 7.15.6 transitivePeerDependencies: - supports-color dev: true - /@babel/helper-optimise-call-expression/7.14.5: - resolution: {integrity: sha512-IqiLIrODUOdnPU9/F8ib1Fx2ohlgDhxnIDU7OEVi+kAbEZcyiF7BLU8W6PfvPi9LzztjS7kcbzbmL7oG8kD6VA==} + /@babel/helper-optimise-call-expression/7.15.4: + resolution: {integrity: sha512-E/z9rfbAOt1vDW1DR7k4SzhzotVV5+qMciWV6LaG1g4jeFrkDlJedjtV4h0i4Q/ITnUu+Pk08M7fczsB9GXBDw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.15.0 + '@babel/types': 7.15.6 dev: true /@babel/helper-plugin-utils/7.14.5: @@ -190,34 +190,34 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helper-replace-supers/7.15.0: - resolution: {integrity: sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA==} + /@babel/helper-replace-supers/7.15.4: + resolution: {integrity: sha512-/ztT6khaXF37MS47fufrKvIsiQkx1LBRvSJNzRqmbyeZnTwU9qBxXYLaaT/6KaxfKhjs2Wy8kG8ZdsFUuWBjzw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-member-expression-to-functions': 7.15.0 - '@babel/helper-optimise-call-expression': 7.14.5 - '@babel/traverse': 7.15.0 - '@babel/types': 7.15.0 + '@babel/helper-member-expression-to-functions': 7.15.4 + '@babel/helper-optimise-call-expression': 7.15.4 + '@babel/traverse': 7.15.4 + '@babel/types': 7.15.6 transitivePeerDependencies: - supports-color dev: true - /@babel/helper-simple-access/7.14.8: - resolution: {integrity: sha512-TrFN4RHh9gnWEU+s7JloIho2T76GPwRHhdzOWLqTrMnlas8T9O7ec+oEDNsRXndOmru9ymH9DFrEOxpzPoSbdg==} + /@babel/helper-simple-access/7.15.4: + resolution: {integrity: sha512-UzazrDoIVOZZcTeHHEPYrr1MvTR/K+wgLg6MY6e1CJyaRhbibftF6fR2KU2sFRtI/nERUZR9fBd6aKgBlIBaPg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.15.0 + '@babel/types': 7.15.6 dev: true - /@babel/helper-split-export-declaration/7.14.5: - resolution: {integrity: sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==} + /@babel/helper-split-export-declaration/7.15.4: + resolution: {integrity: sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.15.0 + '@babel/types': 7.15.6 dev: true - /@babel/helper-validator-identifier/7.14.9: - resolution: {integrity: sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==} + /@babel/helper-validator-identifier/7.15.7: + resolution: {integrity: sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==} engines: {node: '>=6.9.0'} dev: true @@ -226,13 +226,13 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helpers/7.15.3: - resolution: {integrity: sha512-HwJiz52XaS96lX+28Tnbu31VeFSQJGOeKHJeaEPQlTl7PnlhFElWPj8tUXtqFIzeN86XxXoBr+WFAyK2PPVz6g==} + /@babel/helpers/7.15.4: + resolution: {integrity: sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.14.5 - '@babel/traverse': 7.15.0 - '@babel/types': 7.15.0 + '@babel/template': 7.15.4 + '@babel/traverse': 7.15.4 + '@babel/types': 7.15.6 transitivePeerDependencies: - supports-color dev: true @@ -241,75 +241,75 @@ packages: resolution: {integrity: sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.14.9 + '@babel/helper-validator-identifier': 7.15.7 chalk: 2.4.2 js-tokens: 4.0.0 dev: true - /@babel/parser/7.15.3: - resolution: {integrity: sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==} + /@babel/parser/7.15.7: + resolution: {integrity: sha512-rycZXvQ+xS9QyIcJ9HXeDWf1uxqlbVFAUq0Rq0dbc50Zb/+wUe/ehyfzGfm9KZZF0kBejYgxltBXocP+gKdL2g==} engines: {node: '>=6.0.0'} hasBin: true dev: true - /@babel/plugin-transform-react-jsx-self/7.14.9_@babel+core@7.15.0: + /@babel/plugin-transform-react-jsx-self/7.14.9_@babel+core@7.15.5: resolution: {integrity: sha512-Fqqu0f8zv9W+RyOnx29BX/RlEsBRANbOf5xs5oxb2aHP4FKbLXxIaVPUiCti56LAR1IixMH4EyaixhUsKqoBHw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.15.0 + '@babel/core': 7.15.5 '@babel/helper-plugin-utils': 7.14.5 dev: true - /@babel/plugin-transform-react-jsx-source/7.14.5_@babel+core@7.15.0: + /@babel/plugin-transform-react-jsx-source/7.14.5_@babel+core@7.15.5: resolution: {integrity: sha512-1TpSDnD9XR/rQ2tzunBVPThF5poaYT9GqP+of8fAtguYuI/dm2RkrMBDemsxtY0XBzvW7nXjYM0hRyKX9QYj7Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.15.0 + '@babel/core': 7.15.5 '@babel/helper-plugin-utils': 7.14.5 dev: true - /@babel/runtime/7.15.3: - resolution: {integrity: sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==} + /@babel/runtime/7.15.4: + resolution: {integrity: sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.13.9 dev: false - /@babel/template/7.14.5: - resolution: {integrity: sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==} + /@babel/template/7.15.4: + resolution: {integrity: sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.14.5 - '@babel/parser': 7.15.3 - '@babel/types': 7.15.0 + '@babel/parser': 7.15.7 + '@babel/types': 7.15.6 dev: true - /@babel/traverse/7.15.0: - resolution: {integrity: sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw==} + /@babel/traverse/7.15.4: + resolution: {integrity: sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.14.5 - '@babel/generator': 7.15.0 - '@babel/helper-function-name': 7.14.5 - '@babel/helper-hoist-variables': 7.14.5 - '@babel/helper-split-export-declaration': 7.14.5 - '@babel/parser': 7.15.3 - '@babel/types': 7.15.0 + '@babel/generator': 7.15.4 + '@babel/helper-function-name': 7.15.4 + '@babel/helper-hoist-variables': 7.15.4 + '@babel/helper-split-export-declaration': 7.15.4 + '@babel/parser': 7.15.7 + '@babel/types': 7.15.6 debug: 4.3.2 globals: 11.12.0 transitivePeerDependencies: - supports-color dev: true - /@babel/types/7.15.0: - resolution: {integrity: sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==} + /@babel/types/7.15.6: + resolution: {integrity: sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.14.9 + '@babel/helper-validator-identifier': 7.15.7 to-fast-properties: 2.0.0 dev: true @@ -345,15 +345,14 @@ packages: resolution: {integrity: sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==} dev: true - /@logseq/libs/0.0.1-alpha.26: - resolution: {integrity: sha512-KmgK+SzMuNPnIoI3Prg5P8upYezIqGI6FqB55atCyNHXK3tbkVOw6Qev5hyj9gM2r2RaKLEXQhz0TBHBrrlBSg==} + /@logseq/libs/0.0.1-alpha.29: + resolution: {integrity: sha512-OgFyaPh6OCJiSuuY+BtWxXxLi9hdkU54qCw0zLCroJXcOhzie4Ib9cNMRPguplZ5mjRr3K5hYkyqZNOjyPguBg==} dependencies: - csstype: 3.0.8 + csstype: 3.0.9 debug: 4.3.2 - dompurify: 2.3.1 + dompurify: 2.3.3 eventemitter3: 4.0.7 path: 0.12.7 - postmate: 1.5.2 snake-case: 3.0.4 transitivePeerDependencies: - supports-color @@ -377,7 +376,7 @@ packages: engines: {node: '>= 8'} dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.12.0 + fastq: 1.13.0 dev: true /@rollup/pluginutils/4.1.1: @@ -451,7 +450,7 @@ packages: lodash: 4.17.21 nerf-dart: 1.0.0 normalize-url: 6.1.0 - npm: 7.21.1 + npm: 7.24.1 rc: 1.2.8 read-pkg: 5.2.0 registry-auth-token: 4.2.1 @@ -486,7 +485,7 @@ packages: dependencies: '@types/prop-types': 15.7.4 '@types/scheduler': 0.16.2 - csstype: 3.0.8 + csstype: 3.0.9 dev: true /@types/scheduler/0.16.2: @@ -497,8 +496,8 @@ packages: resolution: {integrity: sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ==} dev: true - /@typescript-eslint/eslint-plugin/4.29.3_5b13bab190e8051f191796d8c4619073: - resolution: {integrity: sha512-tBgfA3K/3TsZY46ROGvoRxQr1wBkclbVqRQep97MjVHJzcRBURRY3sNFqLk0/Xr//BY5hM9H2p/kp+6qim85SA==} + /@typescript-eslint/eslint-plugin/4.31.2_326168addec61fdd42b406abb1a8f069: + resolution: {integrity: sha512-w63SCQ4bIwWN/+3FxzpnWrDjQRXVEGiTt9tJTRptRXeFvdZc/wLiz3FQUwNQ2CVoRGI6KUWMNUj/pk63noUfcA==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: '@typescript-eslint/parser': ^4.0.0 @@ -508,9 +507,9 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/experimental-utils': 4.29.3_eslint@7.32.0+typescript@4.4.2 - '@typescript-eslint/parser': 4.29.3_eslint@7.32.0+typescript@4.4.2 - '@typescript-eslint/scope-manager': 4.29.3 + '@typescript-eslint/experimental-utils': 4.31.2_eslint@7.32.0+typescript@4.4.2 + '@typescript-eslint/parser': 4.31.2_eslint@7.32.0+typescript@4.4.2 + '@typescript-eslint/scope-manager': 4.31.2 debug: 4.3.2 eslint: 7.32.0 functional-red-black-tree: 1.0.1 @@ -522,16 +521,16 @@ packages: - supports-color dev: true - /@typescript-eslint/experimental-utils/4.29.3_eslint@7.32.0+typescript@4.4.2: - resolution: {integrity: sha512-ffIvbytTVWz+3keg+Sy94FG1QeOvmV9dP2YSdLFHw/ieLXWCa3U1TYu8IRCOpMv2/SPS8XqhM1+ou1YHsdzKrg==} + /@typescript-eslint/experimental-utils/4.31.2_eslint@7.32.0+typescript@4.4.2: + resolution: {integrity: sha512-3tm2T4nyA970yQ6R3JZV9l0yilE2FedYg8dcXrTar34zC9r6JB7WyBQbpIVongKPlhEMjhQ01qkwrzWy38Bk1Q==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: eslint: '*' dependencies: '@types/json-schema': 7.0.9 - '@typescript-eslint/scope-manager': 4.29.3 - '@typescript-eslint/types': 4.29.3 - '@typescript-eslint/typescript-estree': 4.29.3_typescript@4.4.2 + '@typescript-eslint/scope-manager': 4.31.2 + '@typescript-eslint/types': 4.31.2 + '@typescript-eslint/typescript-estree': 4.31.2_typescript@4.4.2 eslint: 7.32.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0_eslint@7.32.0 @@ -540,8 +539,8 @@ packages: - typescript dev: true - /@typescript-eslint/parser/4.29.3_eslint@7.32.0+typescript@4.4.2: - resolution: {integrity: sha512-jrHOV5g2u8ROghmspKoW7pN8T/qUzk0+DITun0MELptvngtMrwUJ1tv5zMI04CYVEUsSrN4jV7AKSv+I0y0EfQ==} + /@typescript-eslint/parser/4.31.2_eslint@7.32.0+typescript@4.4.2: + resolution: {integrity: sha512-EcdO0E7M/sv23S/rLvenHkb58l3XhuSZzKf6DBvLgHqOYdL6YFMYVtreGFWirxaU2mS1GYDby3Lyxco7X5+Vjw==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 @@ -550,9 +549,9 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 4.29.3 - '@typescript-eslint/types': 4.29.3 - '@typescript-eslint/typescript-estree': 4.29.3_typescript@4.4.2 + '@typescript-eslint/scope-manager': 4.31.2 + '@typescript-eslint/types': 4.31.2 + '@typescript-eslint/typescript-estree': 4.31.2_typescript@4.4.2 debug: 4.3.2 eslint: 7.32.0 typescript: 4.4.2 @@ -560,21 +559,21 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager/4.29.3: - resolution: {integrity: sha512-x+w8BLXO7iWPkG5mEy9bA1iFRnk36p/goVlYobVWHyDw69YmaH9q6eA+Fgl7kYHmFvWlebUTUfhtIg4zbbl8PA==} + /@typescript-eslint/scope-manager/4.31.2: + resolution: {integrity: sha512-2JGwudpFoR/3Czq6mPpE8zBPYdHWFGL6lUNIGolbKQeSNv4EAiHaR5GVDQaLA0FwgcdcMtRk+SBJbFGL7+La5w==} engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} dependencies: - '@typescript-eslint/types': 4.29.3 - '@typescript-eslint/visitor-keys': 4.29.3 + '@typescript-eslint/types': 4.31.2 + '@typescript-eslint/visitor-keys': 4.31.2 dev: true - /@typescript-eslint/types/4.29.3: - resolution: {integrity: sha512-s1eV1lKNgoIYLAl1JUba8NhULmf+jOmmeFO1G5MN/RBCyyzg4TIOfIOICVNC06lor+Xmy4FypIIhFiJXOknhIg==} + /@typescript-eslint/types/4.31.2: + resolution: {integrity: sha512-kWiTTBCTKEdBGrZKwFvOlGNcAsKGJSBc8xLvSjSppFO88AqGxGNYtF36EuEYG6XZ9vT0xX8RNiHbQUKglbSi1w==} engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} dev: true - /@typescript-eslint/typescript-estree/4.29.3_typescript@4.4.2: - resolution: {integrity: sha512-45oQJA0bxna4O5TMwz55/TpgjX1YrAPOI/rb6kPgmdnemRZx/dB0rsx+Ku8jpDvqTxcE1C/qEbVHbS3h0hflag==} + /@typescript-eslint/typescript-estree/4.31.2_typescript@4.4.2: + resolution: {integrity: sha512-ieBq8U9at6PvaC7/Z6oe8D3czeW5d//Fo1xkF/s9394VR0bg/UaMYPdARiWyKX+lLEjY3w/FNZJxitMsiWv+wA==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: typescript: '*' @@ -582,8 +581,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 4.29.3 - '@typescript-eslint/visitor-keys': 4.29.3 + '@typescript-eslint/types': 4.31.2 + '@typescript-eslint/visitor-keys': 4.31.2 debug: 4.3.2 globby: 11.0.4 is-glob: 4.0.1 @@ -594,11 +593,11 @@ packages: - supports-color dev: true - /@typescript-eslint/visitor-keys/4.29.3: - resolution: {integrity: sha512-MGGfJvXT4asUTeVs0Q2m+sY63UsfnA+C/FDgBKV3itLBmM9H0u+URcneePtkd0at1YELmZK6HSolCqM4Fzs6yA==} + /@typescript-eslint/visitor-keys/4.31.2: + resolution: {integrity: sha512-PrBId7EQq2Nibns7dd/ch6S6/M4/iwLM9McbgeEbCXfxdwRUNxJ4UNreJ6Gh3fI2GNKNrWnQxKL7oCPmngKBug==} engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} dependencies: - '@typescript-eslint/types': 4.29.3 + '@typescript-eslint/types': 4.31.2 eslint-visitor-keys: 2.1.0 dev: true @@ -606,9 +605,9 @@ packages: resolution: {integrity: sha512-iNR/UqhUOmFFxiezt0em9CgmiJBdWR+5jGxB2FihaoJfqGt76kiwaKoVOJVU5NYcDWMdN06LbyN2VIGIoYdsEA==} engines: {node: '>=12.0.0'} dependencies: - '@babel/core': 7.15.0 - '@babel/plugin-transform-react-jsx-self': 7.14.9_@babel+core@7.15.0 - '@babel/plugin-transform-react-jsx-source': 7.14.5_@babel+core@7.15.0 + '@babel/core': 7.15.5 + '@babel/plugin-transform-react-jsx-self': 7.14.9_@babel+core@7.15.5 + '@babel/plugin-transform-react-jsx-source': 7.14.5_@babel+core@7.15.5 '@rollup/pluginutils': 4.1.1 react-refresh: 0.10.0 transitivePeerDependencies: @@ -619,7 +618,7 @@ packages: resolution: {integrity: sha512-/F2dg9ltkoQLA4cpr4YQP4V+Y1hO0WOF8jtHoErCKKBr1wBnFLieRjhsXcolM5ZbqH7wLoUrPkdBkIFlocDblg==} dependencies: debug: 4.3.2 - jiti: 1.11.0 + jiti: 1.12.3 tsup: 4.14.0_typescript@4.4.2 windicss: 3.1.7 transitivePeerDependencies: @@ -679,8 +678,8 @@ packages: uri-js: 4.4.1 dev: true - /ajv/8.6.2: - resolution: {integrity: sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==} + /ajv/8.6.3: + resolution: {integrity: sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw==} dependencies: fast-deep-equal: 3.1.3 json-schema-traverse: 1.0.0 @@ -693,8 +692,8 @@ packages: engines: {node: '>=6'} dev: true - /ansi-regex/5.0.0: - resolution: {integrity: sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==} + /ansi-regex/5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} dev: true @@ -740,7 +739,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.18.5 + es-abstract: 1.18.6 get-intrinsic: 1.1.1 is-string: 1.0.7 dev: true @@ -756,7 +755,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.18.5 + es-abstract: 1.18.6 function-bind: 1.1.1 dev: true @@ -793,16 +792,16 @@ packages: fill-range: 7.0.1 dev: true - /browserslist/4.16.8: - resolution: {integrity: sha512-sc2m9ohR/49sWEbPj14ZSSZqp+kbi16aLao42Hmn3Z8FpjuMaq2xCA2l4zl9ITfyzvnvyE0hcg62YkIGKxgaNQ==} + /browserslist/4.17.1: + resolution: {integrity: sha512-aLD0ZMDSnF4lUt4ZDNgqi5BUn9BZ7YdQdI/cYlILrhdSSZJLU9aNZoD5/NBmM4SK34APB2e83MOsRt1EnkuyaQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001252 - colorette: 1.3.0 - electron-to-chromium: 1.3.822 + caniuse-lite: 1.0.30001260 + electron-to-chromium: 1.3.850 escalade: 3.1.1 - node-releases: 1.1.75 + nanocolors: 0.1.12 + node-releases: 1.1.76 dev: true /cac/6.7.3: @@ -822,8 +821,10 @@ packages: engines: {node: '>=6'} dev: true - /caniuse-lite/1.0.30001252: - resolution: {integrity: sha512-I56jhWDGMtdILQORdusxBOH+Nl/KgQSdDmpJezYddnAkVOmnoU8zwjTV9xAjMIYxr0iPreEAVylCGcmHCjfaOw==} + /caniuse-lite/1.0.30001260: + resolution: {integrity: sha512-Fhjc/k8725ItmrvW5QomzxLeojewxvqiYCKeFcfFEhut28IVLdpHU19dneOmltZQIE5HNbawj1HYD+1f2bM1Dg==} + dependencies: + nanocolors: 0.1.12 dev: true /chalk/2.4.2: @@ -884,10 +885,6 @@ packages: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true - /colorette/1.3.0: - resolution: {integrity: sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==} - dev: true - /commander/4.1.1: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} @@ -954,8 +951,8 @@ packages: source-map: 0.6.1 dev: false - /csstype/3.0.8: - resolution: {integrity: sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw==} + /csstype/3.0.9: + resolution: {integrity: sha512-rpw6JPxK6Rfg1zLOYCSwle2GFOOsnjmDYDaBwEcwoOg4qlsIVCN789VkBZDJAGi4T07gI4YSutR43t9Zz4Lzuw==} /debug/4.3.2: resolution: {integrity: sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==} @@ -973,8 +970,8 @@ packages: engines: {node: '>=4.0.0'} dev: true - /deep-is/0.1.3: - resolution: {integrity: sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=} + /deep-is/0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true /define-properties/1.1.3: @@ -1019,8 +1016,8 @@ packages: esutils: 2.0.3 dev: true - /dompurify/2.3.1: - resolution: {integrity: sha512-xGWt+NHAQS+4tpgbOAI08yxW0Pr256Gu/FNE2frZVTbgrBUn8M7tz7/ktS/LZ2MHeGqz6topj0/xY+y8R5FBFw==} + /dompurify/2.3.3: + resolution: {integrity: sha512-dqnqRkPMAjOZE0FogZ+ceJNM2dZ3V/yNOuFB7+39qpO93hHhfRpHw3heYQC7DPK9FqbQTfBKUJhiSfz4MvXYwg==} dev: false /dot-case/3.0.4: @@ -1037,8 +1034,8 @@ packages: is-obj: 2.0.0 dev: true - /electron-to-chromium/1.3.822: - resolution: {integrity: sha512-k7jG5oYYHxF4jx6PcqwHX3JVME/OjzolqOZiIogi9xtsfsmTjTdie4x88OakYFPEa8euciTgCCzvVNwvmjHb1Q==} + /electron-to-chromium/1.3.850: + resolution: {integrity: sha512-ZzkDcdzePeF4dhoGZQT77V2CyJOpwfTZEOg4h0x6R/jQhGt/rIRpbRyVreWLtD7B/WsVxo91URm2WxMKR9JQZA==} dev: true /emoji-regex/8.0.0: @@ -1070,14 +1067,15 @@ packages: stackframe: 1.2.0 dev: false - /es-abstract/1.18.5: - resolution: {integrity: sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==} + /es-abstract/1.18.6: + resolution: {integrity: sha512-kAeIT4cku5eNLNuUKhlmtuk1/TRZvQoYccn6TO0cSVdf1kzB0T7+dYuVK9MWM7l+/53W2Q8M7N2c6MQvhXFcUQ==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 es-to-primitive: 1.2.1 function-bind: 1.1.1 get-intrinsic: 1.1.1 + get-symbol-description: 1.0.0 has: 1.0.3 has-symbols: 1.0.2 internal-slot: 1.0.3 @@ -1102,8 +1100,8 @@ packages: is-symbol: 1.0.4 dev: true - /esbuild/0.12.24: - resolution: {integrity: sha512-C0ibY+HsXzYB6L/pLWEiWjMpghKsIc58Q5yumARwBQsHl9DXPakW+5NI/Y9w4YXiz0PEP6XTGTT/OV4Nnsmb4A==} + /esbuild/0.12.29: + resolution: {integrity: sha512-w/XuoBCSwepyiZtIRsKsetiLDUVGPVw1E/R3VTFSecIy8UR7Cq3SOtwKHJMFoVqqVG36aGkzh4e8BvpO1Fdc7g==} hasBin: true requiresBuild: true dev: true @@ -1132,8 +1130,8 @@ packages: eslint: 7.32.0 dev: false - /eslint-plugin-react/7.25.1_eslint@7.32.0: - resolution: {integrity: sha512-P4j9K1dHoFXxDNP05AtixcJEvIT6ht8FhYKsrkY0MPCPaUMYijhpWwNiRDZVtA8KFuZOkGSeft6QwH8KuVpJug==} + /eslint-plugin-react/7.26.0_eslint@7.32.0: + resolution: {integrity: sha512-dceliS5itjk4EZdQYtLMz6GulcsasguIs+VTXuiC7Q5IPIdGTkyfXVdmsQOqEhlD9MciofH4cMcT1bw1WWNxCQ==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 @@ -1143,14 +1141,15 @@ packages: doctrine: 2.1.0 eslint: 7.32.0 estraverse: 5.2.0 - has: 1.0.3 - jsx-ast-utils: 3.2.0 + jsx-ast-utils: 3.2.1 minimatch: 3.0.4 object.entries: 1.1.4 object.fromentries: 2.0.4 + object.hasown: 1.0.0 object.values: 1.1.4 prop-types: 15.7.2 resolve: 2.0.0-next.3 + semver: 6.3.0 string.prototype.matchall: 4.0.5 dev: true @@ -1229,7 +1228,7 @@ packages: progress: 2.0.3 regexpp: 3.2.0 semver: 7.3.5 - strip-ansi: 6.0.0 + strip-ansi: 6.0.1 strip-json-comments: 3.1.1 table: 6.7.1 text-table: 0.2.0 @@ -1301,7 +1300,7 @@ packages: merge-stream: 2.0.0 npm-run-path: 4.0.1 onetime: 5.1.2 - signal-exit: 3.0.3 + signal-exit: 3.0.4 strip-final-newline: 2.0.0 dev: true @@ -1316,7 +1315,7 @@ packages: merge-stream: 2.0.0 npm-run-path: 4.0.1 onetime: 5.1.2 - signal-exit: 3.0.3 + signal-exit: 3.0.4 strip-final-newline: 2.0.0 dev: true @@ -1350,8 +1349,8 @@ packages: resolution: {integrity: sha512-bijHueCGd0LqqNK9b5oCMHc0MluJAx0cwqASgbWMvkO01lCYgIhacVRLcaDz3QnyYIRNJRDwMb41VuT6pHJ91Q==} dev: false - /fastq/1.12.0: - resolution: {integrity: sha512-VNX0QkHK3RsXVKr9KrlUv/FoTa0NdbYoHHl7uXHv2rzyHSlxjdNAKug2twd9luJxpcyNeAgf5iPPMutJO67Dfg==} + /fastq/1.13.0: + resolution: {integrity: sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==} dependencies: reusify: 1.0.4 dev: true @@ -1446,6 +1445,14 @@ packages: engines: {node: '>=10'} dev: true + /get-symbol-description/1.0.0: + resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.1.1 + dev: true + /glob-parent/5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -1464,8 +1471,8 @@ packages: path-is-absolute: 1.0.1 dev: true - /glob/7.1.7: - resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} + /glob/7.2.0: + resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 @@ -1564,8 +1571,8 @@ packages: engines: {node: '>= 4'} dev: true - /immer/9.0.5: - resolution: {integrity: sha512-2WuIehr2y4lmYz9gaQzetPR2ECniCifk4ORaQbU3g5EalLt+0IVTosEPJ5BoYl/75ky2mivzdRzV8wWgQGOSYQ==} + /immer/9.0.6: + resolution: {integrity: sha512-G95ivKpy+EvVAnAab4fVa4YGYn24J1SpEktnJX7JJ45Bd7xqME/SCplFzYFmTbrkwZbQ4xJK1xMTUYBkN6pWsQ==} dev: false /import-cwd/3.0.0: @@ -1762,8 +1769,8 @@ packages: engines: {node: '>=0.10.0'} dev: false - /jiti/1.11.0: - resolution: {integrity: sha512-/2c7e61hxxTIN34UeHBB0LCJ5Tq64kgJDV7GR+++e8XRxCKRIKmB8tH6ww1W+Z6Kgd6By+C3RSCu1lXjbPT68A==} + /jiti/1.12.3: + resolution: {integrity: sha512-p88jl9WzvZYekMS5ZOB61bJ1SPV69o7nEpAU+mFpGzXErqLEg3WvNz3jeXylAiSfLZzvqZssrAu08N3AuvaqwQ==} hasBin: true dev: true @@ -1825,8 +1832,8 @@ packages: graceful-fs: 4.2.8 dev: true - /jsx-ast-utils/3.2.0: - resolution: {integrity: sha512-EIsmt3O3ljsU6sot/J4E1zDRxfBNrhjyf/OKjlydwgEimQuznlM4Wv7U+ueONJMyEn1WRE0K8dhi3dVAXYT24Q==} + /jsx-ast-utils/3.2.1: + resolution: {integrity: sha512-uP5vu8xfy2F9A6LGC22KO7e2/vGTS1MhP+18f++ZNlf0Ohaxbc9nIEwHAsejlJKyzfZzU5UIhe5ItYkitcZnZA==} engines: {node: '>=4.0'} dependencies: array-includes: 3.1.3 @@ -1949,7 +1956,7 @@ packages: react-dom: '*' dependencies: css-tree: 1.1.3 - csstype: 3.0.8 + csstype: 3.0.9 fastest-stable-stringify: 2.0.2 inline-style-prefixer: 6.0.0 react: 17.0.2 @@ -1960,6 +1967,14 @@ packages: stylis: 4.0.10 dev: false + /nanocolors/0.1.12: + resolution: {integrity: sha512-2nMHqg1x5PU+unxX7PGY7AuYxl2qDx7PSrTRjizr8sxdd3l/3hBuWWaki62qmtYm2U5i4Z5E7GbjlyDFhs9/EQ==} + dev: true + + /nanocolors/0.2.6: + resolution: {integrity: sha512-lP8hjPSXTQ7qpYl5hFPVTBXGdd7+Rn3oi8GqIPNZP63L09tewRzWYFxAy26B1BYOOYaPWgmVF/BFIhDAHihwUQ==} + dev: true + /nanoid/3.1.25: resolution: {integrity: sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -1986,8 +2001,8 @@ packages: engines: {node: '>=0.10.0'} dev: true - /node-releases/1.1.75: - resolution: {integrity: sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==} + /node-releases/1.1.76: + resolution: {integrity: sha512-9/IECtNr8dXNmPWmFXepT0/7o5eolGesHUa3mtr0KlgnCvnZxwh2qensKL42JJY2vQKC3nIBXetFAqR+PW1CmA==} dev: true /normalize-package-data/2.5.0: @@ -2016,8 +2031,8 @@ packages: path-key: 3.1.1 dev: true - /npm/7.21.1: - resolution: {integrity: sha512-k7XQNHGHAp0VowMMUMRMtntxWatNad9hhYrelUKDPvZ++DBxvofA8QTNPiuMKtx8CBOFA8iJ4aizhbx6ZYVfzQ==} + /npm/7.24.1: + resolution: {integrity: sha512-U7/C++ZgB3zNH/kzhSJMnp3pO2iLrZRGUUXAgCCLB/by+sR+dKVhP/ik9+sTOGk9wk3zbmwHAYDT8igkv1ss0g==} engines: {node: '>=10'} hasBin: true dev: true @@ -2066,6 +2081,7 @@ packages: - node-gyp - nopt - npm-audit-report + - npm-install-checks - npm-package-arg - npm-pick-manifest - npm-profile @@ -2120,7 +2136,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.18.5 + es-abstract: 1.18.6 dev: true /object.fromentries/2.0.4: @@ -2129,17 +2145,24 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.18.5 + es-abstract: 1.18.6 has: 1.0.3 dev: true + /object.hasown/1.0.0: + resolution: {integrity: sha512-qYMF2CLIjxxLGleeM0jrcB4kiv3loGVAjKQKvH8pSU/i2VcRRvUNmxbD+nEMmrXRfORhuVJuH8OtSYCZoue3zA==} + dependencies: + define-properties: 1.1.3 + es-abstract: 1.18.6 + dev: true + /object.values/1.1.4: resolution: {integrity: sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.18.5 + es-abstract: 1.18.6 dev: true /once/1.4.0: @@ -2159,7 +2182,7 @@ packages: resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} engines: {node: '>= 0.8.0'} dependencies: - deep-is: 0.1.3 + deep-is: 0.1.4 fast-levenshtein: 2.0.6 levn: 0.4.1 prelude-ls: 1.2.1 @@ -2248,19 +2271,15 @@ packages: yaml: 1.10.2 dev: true - /postcss/8.3.6: - resolution: {integrity: sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==} + /postcss/8.3.8: + resolution: {integrity: sha512-GT5bTjjZnwDifajzczOC+r3FI3Cu+PgPvrsjhQdRqa2kTJ4968/X9CUce9xttIB0xOs5c6xf0TCWZo/y9lF6bA==} engines: {node: ^10 || ^12 || >=14} dependencies: - colorette: 1.3.0 + nanocolors: 0.2.6 nanoid: 3.1.25 source-map-js: 0.6.2 dev: true - /postmate/1.5.2: - resolution: {integrity: sha512-EHLlEmrUA/hALls49oBrtE7BzDXXjB9EiO4MZpsoO3R/jRuBmD+2WKQuYAbeuVEpTzrPpUTT79z2cz4qaFgPRg==} - dev: false - /prelude-ls/1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -2345,8 +2364,8 @@ packages: tslib: 2.3.1 dev: false - /react-use/17.2.4_react-dom@17.0.2+react@17.0.2: - resolution: {integrity: sha512-vQGpsAM0F5UIlshw5UI8ULGPS4yn5rm7/qvn3T1Gnkrz7YRMEEMh+ynKcmRloOyiIeLvKWiQjMiwRGtdbgs5qQ==} + /react-use/17.3.1_react-dom@17.0.2+react@17.0.2: + resolution: {integrity: sha512-hs7+tS4rRm1QLHPfanLCqXIi632tP4V7Sai1ENUP2WTufU6am++tU9uSw9YrNCFqbABiEv0ndKU1XCUcfu2tXA==} peerDependencies: react: ^16.8.0 || ^17.0.0 react-dom: ^16.8.0 || ^17.0.0 @@ -2460,11 +2479,11 @@ packages: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true dependencies: - glob: 7.1.7 + glob: 7.2.0 dev: true - /rollup/2.56.3: - resolution: {integrity: sha512-Au92NuznFklgQCUcV96iXlxUbHuB1vQMaH76DHl5M11TotjOHwqk9CwcrT78+Tnv4FN9uTBxq6p4EJoYkpyekg==} + /rollup/2.57.0: + resolution: {integrity: sha512-bKQIh1rWKofRee6mv8SrF2HdP6pea5QkwBZSMImJysFj39gQuiV8MEPBjXOCpzk3wSYp63M2v2wkWBmFC8O/rg==} engines: {node: '>=10.0.0'} hasBin: true optionalDependencies: @@ -2474,7 +2493,7 @@ packages: /rtl-css-js/1.14.2: resolution: {integrity: sha512-t6Wc/wpqm8s3kuXAV6tL/T7VS6n0XszzX58CgCsLj3O2xi9ITSLfzYhtl+GKyxCi/3QEqVctOJQwCiDzb2vteQ==} dependencies: - '@babel/runtime': 7.15.3 + '@babel/runtime': 7.15.4 dev: false /run-parallel/1.2.0: @@ -2542,8 +2561,8 @@ packages: object-inspect: 1.11.0 dev: true - /signal-exit/3.0.3: - resolution: {integrity: sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==} + /signal-exit/3.0.4: + resolution: {integrity: sha512-rqYhcAnZ6d/vTPGghdrw7iumdcbXpsk1b8IG/rz+VWV51DM0p7XCtMoJ3qhPLIbp3tvyt3pKRbaaEMZYpHto8Q==} dev: true /slash/3.0.0: @@ -2641,13 +2660,13 @@ packages: stacktrace-gps: 3.0.4 dev: false - /string-width/4.2.2: - resolution: {integrity: sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==} + /string-width/4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} dependencies: emoji-regex: 8.0.0 is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.0 + strip-ansi: 6.0.1 dev: true /string.prototype.matchall/4.0.5: @@ -2655,7 +2674,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.18.5 + es-abstract: 1.18.6 get-intrinsic: 1.1.1 has-symbols: 1.0.2 internal-slot: 1.0.3 @@ -2677,11 +2696,11 @@ packages: define-properties: 1.1.3 dev: true - /strip-ansi/6.0.0: - resolution: {integrity: sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==} + /strip-ansi/6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} dependencies: - ansi-regex: 5.0.0 + ansi-regex: 5.0.1 dev: true /strip-final-newline/2.0.0: @@ -2734,12 +2753,12 @@ packages: resolution: {integrity: sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==} engines: {node: '>=10.0.0'} dependencies: - ajv: 8.6.2 + ajv: 8.6.3 lodash.clonedeep: 4.5.0 lodash.truncate: 4.4.2 slice-ansi: 4.0.0 - string-width: 4.2.2 - strip-ansi: 6.0.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 dev: true /temp-dir/2.0.0: @@ -2830,13 +2849,13 @@ packages: chalk: 4.1.2 chokidar: 3.5.2 debug: 4.3.2 - esbuild: 0.12.24 + esbuild: 0.12.29 execa: 5.1.1 globby: 11.0.4 joycon: 3.0.1 postcss-load-config: 3.1.0 resolve-from: 5.0.0 - rollup: 2.56.3 + rollup: 2.57.0 sucrase: 3.20.1 tree-kill: 1.2.2 typescript: 4.4.2 @@ -2948,10 +2967,10 @@ packages: engines: {node: '>=12.2.0'} hasBin: true dependencies: - esbuild: 0.12.24 - postcss: 8.3.6 + esbuild: 0.12.29 + postcss: 8.3.8 resolve: 1.20.0 - rollup: 2.56.3 + rollup: 2.57.0 optionalDependencies: fsevents: 2.3.2 dev: true diff --git a/src/PageTabs.tsx b/src/PageTabs.tsx index e844829..20d6ae8 100644 --- a/src/PageTabs.tsx +++ b/src/PageTabs.tsx @@ -158,7 +158,7 @@ function getBlockUUID(element: HTMLElement) { /** * Captures user CTRL Click a page link. */ -function useCaptureAddPageAction(cb: (e: ITabInfo) => void) { +function useCaptureAddPageAction(cb: (e: ITabInfo, open: boolean) => void) { React.useEffect(() => { const listener = async (e: MouseEvent) => { const target = e.composedPath()[0] as HTMLElement; @@ -166,14 +166,13 @@ function useCaptureAddPageAction(cb: (e: ITabInfo) => void) { const ctrlKey = isMac() ? e.metaKey : e.ctrlKey; if (ctrlKey) { + let newTab: ITabInfo | null = null; if (isPageRef(target)) { e.stopPropagation(); e.stopImmediatePropagation(); const p = await getSourcePage(target.getAttribute("data-ref")); if (p) { - cb(p); - // Preload Page for performance - await logseq.Editor.getPageBlocksTree(p.uuid); + newTab = p; } } else if (getBlockUUID(target)) { e.stopPropagation(); @@ -184,11 +183,14 @@ function useCaptureAddPageAction(cb: (e: ITabInfo) => void) { if (block) { const page = await logseq.Editor.getPage(block?.page.id); if (page) { - cb({ ...page, ...block }); + newTab = { ...page, ...block }; } } } } + if (newTab) { + cb(newTab, e.shiftKey); + } } }; top?.document.addEventListener("mousedown", listener, true); @@ -289,12 +291,33 @@ export function PageTabs(): JSX.Element { } }); - const onNewTab = useEventCallback((t: ITabInfo | null) => { + const onClickTab = useEventCallback(async (t: ITabInfo) => { + setActivePage(t); + // remember current page's scroll position + const idx = tabs.findIndex((ct) => + isTabEqual(ct, currActivePageRef.current) + ); + if (idx !== -1) { + const scrollTop = + top?.document.querySelector("#main-container")?.scrollTop; + + setTabs( + produce(tabs, (draft) => { + draft[idx].scrollTop = scrollTop; + }) + ); + } + }); + + const onNewTab = useEventCallback((t: ITabInfo | null, open = false) => { if (t) { if (tabs.every((_t) => !isTabEqual(t, _t))) { - return setTabs([...tabs, t]); + setTabs([...tabs, t]); } else { - setActivePage(t); + open = true; + } + if (open) { + onClickTab(t); } } }); @@ -383,24 +406,6 @@ export function PageTabs(): JSX.Element { const ref = React.useRef(null); const scrollWidth = useScrollWidth(ref); - const onClickTab = useEventCallback(async (t: ITabInfo) => { - setActivePage(t); - // remember current page's scroll position - const idx = tabs.findIndex((ct) => - isTabEqual(ct, currActivePageRef.current) - ); - if (idx !== -1) { - const scrollTop = - top?.document.querySelector("#main-container")?.scrollTop; - - setTabs( - produce(tabs, (draft) => { - draft[idx].scrollTop = scrollTop; - }) - ); - } - }); - useAdaptMainUIStyle(tabs.length > 0, scrollWidth); React.useEffect(() => {