Taking advantage of app as a global var
This commit is contained in:
@@ -13,12 +13,12 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tsconfig/svelte": "^3.0.0",
|
"@tsconfig/svelte": "^3.0.0",
|
||||||
"@types/node": "^16.11.6",
|
"@types/node": "^16.11.27",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.18.0",
|
"@typescript-eslint/eslint-plugin": "^5.20.0",
|
||||||
"@typescript-eslint/parser": "^5.18.0",
|
"@typescript-eslint/parser": "^5.20.0",
|
||||||
"builtin-modules": "^3.2.0",
|
"builtin-modules": "^3.2.0",
|
||||||
"esbuild": "0.13.12",
|
"esbuild": "0.13.12",
|
||||||
"esbuild-plugin-copy": "^1.2.1",
|
"esbuild-plugin-copy": "^1.3.0",
|
||||||
"esbuild-svelte": "^0.7.0",
|
"esbuild-svelte": "^0.7.0",
|
||||||
"eslint": "7.12.1",
|
"eslint": "7.12.1",
|
||||||
"eslint-config-standard": "^16.0.3",
|
"eslint-config-standard": "^16.0.3",
|
||||||
|
|||||||
195
pnpm-lock.yaml
generated
195
pnpm-lock.yaml
generated
@@ -2,12 +2,12 @@ lockfileVersion: 5.3
|
|||||||
|
|
||||||
specifiers:
|
specifiers:
|
||||||
'@tsconfig/svelte': ^3.0.0
|
'@tsconfig/svelte': ^3.0.0
|
||||||
'@types/node': ^16.11.6
|
'@types/node': ^16.11.27
|
||||||
'@typescript-eslint/eslint-plugin': ^5.18.0
|
'@typescript-eslint/eslint-plugin': ^5.20.0
|
||||||
'@typescript-eslint/parser': ^5.18.0
|
'@typescript-eslint/parser': ^5.20.0
|
||||||
builtin-modules: ^3.2.0
|
builtin-modules: ^3.2.0
|
||||||
esbuild: 0.13.12
|
esbuild: 0.13.12
|
||||||
esbuild-plugin-copy: ^1.2.1
|
esbuild-plugin-copy: ^1.3.0
|
||||||
esbuild-svelte: ^0.7.0
|
esbuild-svelte: ^0.7.0
|
||||||
eslint: 7.12.1
|
eslint: 7.12.1
|
||||||
eslint-config-standard: ^16.0.3
|
eslint-config-standard: ^16.0.3
|
||||||
@@ -29,12 +29,12 @@ dependencies:
|
|||||||
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@tsconfig/svelte': 3.0.0
|
'@tsconfig/svelte': 3.0.0
|
||||||
'@types/node': 16.11.26
|
'@types/node': 16.11.27
|
||||||
'@typescript-eslint/eslint-plugin': 5.18.0_2e93aa916703472007e9b5dfec98785b
|
'@typescript-eslint/eslint-plugin': 5.20.0_4fbab8ed861393b891eae3bdfcc6594e
|
||||||
'@typescript-eslint/parser': 5.18.0_eslint@7.12.1+typescript@4.6.3
|
'@typescript-eslint/parser': 5.20.0_eslint@7.12.1+typescript@4.6.3
|
||||||
builtin-modules: 3.2.0
|
builtin-modules: 3.2.0
|
||||||
esbuild: 0.13.12
|
esbuild: 0.13.12
|
||||||
esbuild-plugin-copy: 1.2.1_esbuild@0.13.12
|
esbuild-plugin-copy: 1.3.0_esbuild@0.13.12
|
||||||
esbuild-svelte: 0.7.0_esbuild@0.13.12+svelte@3.47.0
|
esbuild-svelte: 0.7.0_esbuild@0.13.12+svelte@3.47.0
|
||||||
eslint: 7.12.1
|
eslint: 7.12.1
|
||||||
eslint-config-standard: 16.0.3_0fed5a0754053d34bf68c4e5b9539157
|
eslint-config-standard: 16.0.3_0fed5a0754053d34bf68c4e5b9539157
|
||||||
@@ -164,8 +164,8 @@ packages:
|
|||||||
resolution: {integrity: sha1-7ihweulOEdK4J7y+UnC86n8+ce4=}
|
resolution: {integrity: sha1-7ihweulOEdK4J7y+UnC86n8+ce4=}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@types/node/16.11.26:
|
/@types/node/16.11.27:
|
||||||
resolution: {integrity: sha512-GZ7bu5A6+4DtG7q9GsoHXy3ALcgeIHP4NnL0Vv2wu0uUB/yQex26v0tf6/na1mm0+bS9Uw+0DFex7aaKr2qawQ==}
|
resolution: {integrity: sha512-C1pD3kgLoZ56Uuy5lhfOxie4aZlA3UMGLX9rXteq4WitEZH6Rl80mwactt9QG0w0gLFlN/kLBTFnGXtDVWvWQw==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@types/pug/2.0.6:
|
/@types/pug/2.0.6:
|
||||||
@@ -175,7 +175,7 @@ packages:
|
|||||||
/@types/sass/1.43.1:
|
/@types/sass/1.43.1:
|
||||||
resolution: {integrity: sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==}
|
resolution: {integrity: sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 16.11.26
|
'@types/node': 16.11.27
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@types/tern/0.23.4:
|
/@types/tern/0.23.4:
|
||||||
@@ -184,8 +184,8 @@ packages:
|
|||||||
'@types/estree': 0.0.51
|
'@types/estree': 0.0.51
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@typescript-eslint/eslint-plugin/5.18.0_2e93aa916703472007e9b5dfec98785b:
|
/@typescript-eslint/eslint-plugin/5.20.0_4fbab8ed861393b891eae3bdfcc6594e:
|
||||||
resolution: {integrity: sha512-tzrmdGMJI/uii9/V6lurMo4/o+dMTKDH82LkNjhJ3adCW22YQydoRs5MwTiqxGF9CSYxPxQ7EYb4jLNlIs+E+A==}
|
resolution: {integrity: sha512-fapGzoxilCn3sBtC6NtXZX6+P/Hef7VDbyfGqTTpzYydwhlkevB+0vE0EnmHPVTVSy68GUncyJ/2PcrFBeCo5Q==}
|
||||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@typescript-eslint/parser': ^5.0.0
|
'@typescript-eslint/parser': ^5.0.0
|
||||||
@@ -195,16 +195,16 @@ packages:
|
|||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/parser': 5.18.0_eslint@7.12.1+typescript@4.6.3
|
'@typescript-eslint/parser': 5.20.0_eslint@7.12.1+typescript@4.6.3
|
||||||
'@typescript-eslint/scope-manager': 5.18.0
|
'@typescript-eslint/scope-manager': 5.20.0
|
||||||
'@typescript-eslint/type-utils': 5.18.0_eslint@7.12.1+typescript@4.6.3
|
'@typescript-eslint/type-utils': 5.20.0_eslint@7.12.1+typescript@4.6.3
|
||||||
'@typescript-eslint/utils': 5.18.0_eslint@7.12.1+typescript@4.6.3
|
'@typescript-eslint/utils': 5.20.0_eslint@7.12.1+typescript@4.6.3
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
eslint: 7.12.1
|
eslint: 7.12.1
|
||||||
functional-red-black-tree: 1.0.1
|
functional-red-black-tree: 1.0.1
|
||||||
ignore: 5.2.0
|
ignore: 5.2.0
|
||||||
regexpp: 3.2.0
|
regexpp: 3.2.0
|
||||||
semver: 7.3.5
|
semver: 7.3.7
|
||||||
tsutils: 3.21.0_typescript@4.6.3
|
tsutils: 3.21.0_typescript@4.6.3
|
||||||
typescript: 4.6.3
|
typescript: 4.6.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@@ -249,8 +249,8 @@ packages:
|
|||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@typescript-eslint/parser/5.18.0_eslint@7.12.1+typescript@4.6.3:
|
/@typescript-eslint/parser/5.20.0_eslint@7.12.1+typescript@4.6.3:
|
||||||
resolution: {integrity: sha512-+08nYfurBzSSPndngnHvFw/fniWYJ5ymOrn/63oMIbgomVQOvIDhBoJmYZ9lwQOCnQV9xHGvf88ze3jFGUYooQ==}
|
resolution: {integrity: sha512-UWKibrCZQCYvobmu3/N8TWbEeo/EPQbS41Ux1F9XqPzGuV7pfg6n50ZrFo6hryynD8qOTTfLHtHjjdQtxJ0h/w==}
|
||||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
|
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
|
||||||
@@ -259,9 +259,9 @@ packages:
|
|||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/scope-manager': 5.18.0
|
'@typescript-eslint/scope-manager': 5.20.0
|
||||||
'@typescript-eslint/types': 5.18.0
|
'@typescript-eslint/types': 5.20.0
|
||||||
'@typescript-eslint/typescript-estree': 5.18.0_typescript@4.6.3
|
'@typescript-eslint/typescript-estree': 5.20.0_typescript@4.6.3
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
eslint: 7.12.1
|
eslint: 7.12.1
|
||||||
typescript: 4.6.3
|
typescript: 4.6.3
|
||||||
@@ -269,16 +269,16 @@ packages:
|
|||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@typescript-eslint/scope-manager/5.18.0:
|
/@typescript-eslint/scope-manager/5.20.0:
|
||||||
resolution: {integrity: sha512-C0CZML6NyRDj+ZbMqh9FnPscg2PrzSaVQg3IpTmpe0NURMVBXlghGZgMYqBw07YW73i0MCqSDqv2SbywnCS8jQ==}
|
resolution: {integrity: sha512-h9KtuPZ4D/JuX7rpp1iKg3zOH0WNEa+ZIXwpW/KWmEFDxlA/HSfCMhiyF1HS/drTICjIbpA6OqkAhrP/zkCStg==}
|
||||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/types': 5.18.0
|
'@typescript-eslint/types': 5.20.0
|
||||||
'@typescript-eslint/visitor-keys': 5.18.0
|
'@typescript-eslint/visitor-keys': 5.20.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@typescript-eslint/type-utils/5.18.0_eslint@7.12.1+typescript@4.6.3:
|
/@typescript-eslint/type-utils/5.20.0_eslint@7.12.1+typescript@4.6.3:
|
||||||
resolution: {integrity: sha512-vcn9/6J5D6jtHxpEJrgK8FhaM8r6J1/ZiNu70ZUJN554Y3D9t3iovi6u7JF8l/e7FcBIxeuTEidZDR70UuCIfA==}
|
resolution: {integrity: sha512-WxNrCwYB3N/m8ceyoGCgbLmuZwupvzN0rE8NBuwnl7APgjv24ZJIjkNzoFBXPRCGzLNkoU/WfanW0exvp/+3Iw==}
|
||||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: '*'
|
eslint: '*'
|
||||||
@@ -287,7 +287,7 @@ packages:
|
|||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/utils': 5.18.0_eslint@7.12.1+typescript@4.6.3
|
'@typescript-eslint/utils': 5.20.0_eslint@7.12.1+typescript@4.6.3
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
eslint: 7.12.1
|
eslint: 7.12.1
|
||||||
tsutils: 3.21.0_typescript@4.6.3
|
tsutils: 3.21.0_typescript@4.6.3
|
||||||
@@ -301,8 +301,8 @@ packages:
|
|||||||
engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1}
|
engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@typescript-eslint/types/5.18.0:
|
/@typescript-eslint/types/5.20.0:
|
||||||
resolution: {integrity: sha512-bhV1+XjM+9bHMTmXi46p1Led5NP6iqQcsOxgx7fvk6gGiV48c6IynY0apQb7693twJDsXiVzNXTflhplmaiJaw==}
|
resolution: {integrity: sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg==}
|
||||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
@@ -321,15 +321,15 @@ packages:
|
|||||||
glob: 7.2.0
|
glob: 7.2.0
|
||||||
is-glob: 4.0.3
|
is-glob: 4.0.3
|
||||||
lodash: 4.17.21
|
lodash: 4.17.21
|
||||||
semver: 7.3.5
|
semver: 7.3.7
|
||||||
tsutils: 3.21.0_typescript@3.9.10
|
tsutils: 3.21.0_typescript@3.9.10
|
||||||
typescript: 3.9.10
|
typescript: 3.9.10
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@typescript-eslint/typescript-estree/5.18.0_typescript@4.6.3:
|
/@typescript-eslint/typescript-estree/5.20.0_typescript@4.6.3:
|
||||||
resolution: {integrity: sha512-wa+2VAhOPpZs1bVij9e5gyVu60ReMi/KuOx4LKjGx2Y3XTNUDJgQ+5f77D49pHtqef/klglf+mibuHs9TrPxdQ==}
|
resolution: {integrity: sha512-36xLjP/+bXusLMrT9fMMYy1KJAGgHhlER2TqpUVDYUQg4w0q/NW/sg4UGAgVwAqb8V4zYg43KMUpM8vV2lve6w==}
|
||||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
typescript: '*'
|
typescript: '*'
|
||||||
@@ -337,28 +337,28 @@ packages:
|
|||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/types': 5.18.0
|
'@typescript-eslint/types': 5.20.0
|
||||||
'@typescript-eslint/visitor-keys': 5.18.0
|
'@typescript-eslint/visitor-keys': 5.20.0
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
globby: 11.1.0
|
globby: 11.1.0
|
||||||
is-glob: 4.0.3
|
is-glob: 4.0.3
|
||||||
semver: 7.3.5
|
semver: 7.3.7
|
||||||
tsutils: 3.21.0_typescript@4.6.3
|
tsutils: 3.21.0_typescript@4.6.3
|
||||||
typescript: 4.6.3
|
typescript: 4.6.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@typescript-eslint/utils/5.18.0_eslint@7.12.1+typescript@4.6.3:
|
/@typescript-eslint/utils/5.20.0_eslint@7.12.1+typescript@4.6.3:
|
||||||
resolution: {integrity: sha512-+hFGWUMMri7OFY26TsOlGa+zgjEy1ssEipxpLjtl4wSll8zy85x0GrUSju/FHdKfVorZPYJLkF3I4XPtnCTewA==}
|
resolution: {integrity: sha512-lHONGJL1LIO12Ujyx8L8xKbwWSkoUKFSO+0wDAqGXiudWB2EO7WEUT+YZLtVbmOmSllAjLb9tpoIPwpRe5Tn6w==}
|
||||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
|
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/json-schema': 7.0.11
|
'@types/json-schema': 7.0.11
|
||||||
'@typescript-eslint/scope-manager': 5.18.0
|
'@typescript-eslint/scope-manager': 5.20.0
|
||||||
'@typescript-eslint/types': 5.18.0
|
'@typescript-eslint/types': 5.20.0
|
||||||
'@typescript-eslint/typescript-estree': 5.18.0_typescript@4.6.3
|
'@typescript-eslint/typescript-estree': 5.20.0_typescript@4.6.3
|
||||||
eslint: 7.12.1
|
eslint: 7.12.1
|
||||||
eslint-scope: 5.1.1
|
eslint-scope: 5.1.1
|
||||||
eslint-utils: 3.0.0_eslint@7.12.1
|
eslint-utils: 3.0.0_eslint@7.12.1
|
||||||
@@ -374,11 +374,11 @@ packages:
|
|||||||
eslint-visitor-keys: 1.3.0
|
eslint-visitor-keys: 1.3.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@typescript-eslint/visitor-keys/5.18.0:
|
/@typescript-eslint/visitor-keys/5.20.0:
|
||||||
resolution: {integrity: sha512-Hf+t+dJsjAKpKSkg3EHvbtEpFFb/1CiOHnvI8bjHgOD4/wAw3gKrA0i94LrbekypiZVanJu3McWJg7rWDMzRTg==}
|
resolution: {integrity: sha512-1flRpNF+0CAQkMNlTJ6L/Z5jiODG/e5+7mk6XwtPOUS3UrTz3UOiAg9jG2VtKsWI6rZQfy4C6a232QNRZTRGlg==}
|
||||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/types': 5.18.0
|
'@typescript-eslint/types': 5.20.0
|
||||||
eslint-visitor-keys: 3.3.0
|
eslint-visitor-keys: 3.3.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
@@ -460,8 +460,8 @@ packages:
|
|||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
dependencies:
|
dependencies:
|
||||||
call-bind: 1.0.2
|
call-bind: 1.0.2
|
||||||
define-properties: 1.1.3
|
define-properties: 1.1.4
|
||||||
es-abstract: 1.19.2
|
es-abstract: 1.19.5
|
||||||
get-intrinsic: 1.1.1
|
get-intrinsic: 1.1.1
|
||||||
is-string: 1.0.7
|
is-string: 1.0.7
|
||||||
dev: true
|
dev: true
|
||||||
@@ -471,13 +471,14 @@ packages:
|
|||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/array.prototype.flat/1.2.5:
|
/array.prototype.flat/1.3.0:
|
||||||
resolution: {integrity: sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==}
|
resolution: {integrity: sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
dependencies:
|
dependencies:
|
||||||
call-bind: 1.0.2
|
call-bind: 1.0.2
|
||||||
define-properties: 1.1.3
|
define-properties: 1.1.4
|
||||||
es-abstract: 1.19.2
|
es-abstract: 1.19.5
|
||||||
|
es-shim-unscopables: 1.0.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/astral-regex/1.0.0:
|
/astral-regex/1.0.0:
|
||||||
@@ -605,7 +606,7 @@ packages:
|
|||||||
/debug/3.2.7:
|
/debug/3.2.7:
|
||||||
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
|
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
|
||||||
dependencies:
|
dependencies:
|
||||||
ms: 2.1.2
|
ms: 2.1.3
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/debug/4.3.4:
|
/debug/4.3.4:
|
||||||
@@ -624,10 +625,11 @@ packages:
|
|||||||
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
|
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/define-properties/1.1.3:
|
/define-properties/1.1.4:
|
||||||
resolution: {integrity: sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==}
|
resolution: {integrity: sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
has-property-descriptors: 1.0.0
|
||||||
object-keys: 1.1.1
|
object-keys: 1.1.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
@@ -679,8 +681,8 @@ packages:
|
|||||||
is-arrayish: 0.2.1
|
is-arrayish: 0.2.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/es-abstract/1.19.2:
|
/es-abstract/1.19.5:
|
||||||
resolution: {integrity: sha512-gfSBJoZdlL2xRiOCy0g8gLMryhoe1TlimjzU99L/31Z8QEGIhVQI+EWwt5lT+AuU9SnorVupXFqqOGqGfsyO6w==}
|
resolution: {integrity: sha512-Aa2G2+Rd3b6kxEUKTF4TaW67czBLyAv3z7VOhYRU50YBx+bbsYZ9xQP4lMNazePuFlybXI0V4MruPos7qUo5fA==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
dependencies:
|
dependencies:
|
||||||
call-bind: 1.0.2
|
call-bind: 1.0.2
|
||||||
@@ -705,6 +707,12 @@ packages:
|
|||||||
unbox-primitive: 1.0.1
|
unbox-primitive: 1.0.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/es-shim-unscopables/1.0.0:
|
||||||
|
resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==}
|
||||||
|
dependencies:
|
||||||
|
has: 1.0.3
|
||||||
|
dev: true
|
||||||
|
|
||||||
/es-to-primitive/1.2.1:
|
/es-to-primitive/1.2.1:
|
||||||
resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==}
|
resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
@@ -822,14 +830,14 @@ packages:
|
|||||||
dev: true
|
dev: true
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-plugin-copy/1.2.1_esbuild@0.13.12:
|
/esbuild-plugin-copy/1.3.0_esbuild@0.13.12:
|
||||||
resolution: {integrity: sha512-DIdiDOZHGw7sA7AF41T4iiWsQGmcNkDke3wGuMJQv3PYN2m7XGJF4BuTSfu1d+Br1iGiUT9ZRwW+7VIG9+VxSg==}
|
resolution: {integrity: sha512-LOx1xJOlAaCFMRtokHjsJfEkrosy3RDRa8SUHmn7loo0gwrouBQQwLAmOyMECshf7gSR1cPSRtAHu3KF/kQsyw==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
esbuild: ^0.14.0
|
esbuild: ^0.14.0
|
||||||
dependencies:
|
dependencies:
|
||||||
chalk: 4.1.2
|
chalk: 4.1.2
|
||||||
esbuild: 0.13.12
|
esbuild: 0.13.12
|
||||||
fs-extra: 10.0.1
|
fs-extra: 10.1.0
|
||||||
globby: 11.1.0
|
globby: 11.1.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
@@ -952,7 +960,7 @@ packages:
|
|||||||
eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0
|
eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0
|
||||||
dependencies:
|
dependencies:
|
||||||
array-includes: 3.1.4
|
array-includes: 3.1.4
|
||||||
array.prototype.flat: 1.2.5
|
array.prototype.flat: 1.3.0
|
||||||
contains-path: 0.1.0
|
contains-path: 0.1.0
|
||||||
debug: 2.6.9
|
debug: 2.6.9
|
||||||
doctrine: 1.5.0
|
doctrine: 1.5.0
|
||||||
@@ -1078,7 +1086,7 @@ packages:
|
|||||||
optionator: 0.9.1
|
optionator: 0.9.1
|
||||||
progress: 2.0.3
|
progress: 2.0.3
|
||||||
regexpp: 3.2.0
|
regexpp: 3.2.0
|
||||||
semver: 7.3.5
|
semver: 7.3.7
|
||||||
strip-ansi: 6.0.1
|
strip-ansi: 6.0.1
|
||||||
strip-json-comments: 3.1.1
|
strip-json-comments: 3.1.1
|
||||||
table: 5.4.6
|
table: 5.4.6
|
||||||
@@ -1204,11 +1212,11 @@ packages:
|
|||||||
resolution: {integrity: sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==}
|
resolution: {integrity: sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/fs-extra/10.0.1:
|
/fs-extra/10.1.0:
|
||||||
resolution: {integrity: sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==}
|
resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
dependencies:
|
dependencies:
|
||||||
graceful-fs: 4.2.9
|
graceful-fs: 4.2.10
|
||||||
jsonfile: 6.1.0
|
jsonfile: 6.1.0
|
||||||
universalify: 2.0.0
|
universalify: 2.0.0
|
||||||
dev: true
|
dev: true
|
||||||
@@ -1278,8 +1286,8 @@ packages:
|
|||||||
slash: 3.0.0
|
slash: 3.0.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/graceful-fs/4.2.9:
|
/graceful-fs/4.2.10:
|
||||||
resolution: {integrity: sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==}
|
resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/has-ansi/2.0.0:
|
/has-ansi/2.0.0:
|
||||||
@@ -1289,8 +1297,8 @@ packages:
|
|||||||
ansi-regex: 2.1.1
|
ansi-regex: 2.1.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/has-bigints/1.0.1:
|
/has-bigints/1.0.2:
|
||||||
resolution: {integrity: sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==}
|
resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/has-flag/3.0.0:
|
/has-flag/3.0.0:
|
||||||
@@ -1303,6 +1311,12 @@ packages:
|
|||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/has-property-descriptors/1.0.0:
|
||||||
|
resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==}
|
||||||
|
dependencies:
|
||||||
|
get-intrinsic: 1.1.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
/has-symbols/1.0.3:
|
/has-symbols/1.0.3:
|
||||||
resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==}
|
resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
@@ -1381,7 +1395,7 @@ packages:
|
|||||||
/is-bigint/1.0.4:
|
/is-bigint/1.0.4:
|
||||||
resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==}
|
resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
has-bigints: 1.0.1
|
has-bigints: 1.0.2
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/is-boolean-object/1.1.2:
|
/is-boolean-object/1.1.2:
|
||||||
@@ -1397,8 +1411,8 @@ packages:
|
|||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/is-core-module/2.8.1:
|
/is-core-module/2.9.0:
|
||||||
resolution: {integrity: sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==}
|
resolution: {integrity: sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==}
|
||||||
dependencies:
|
dependencies:
|
||||||
has: 1.0.3
|
has: 1.0.3
|
||||||
dev: true
|
dev: true
|
||||||
@@ -1518,7 +1532,7 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
universalify: 2.0.0
|
universalify: 2.0.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
graceful-fs: 4.2.9
|
graceful-fs: 4.2.10
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/levn/0.4.1:
|
/levn/0.4.1:
|
||||||
@@ -1533,7 +1547,7 @@ packages:
|
|||||||
resolution: {integrity: sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=}
|
resolution: {integrity: sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=}
|
||||||
engines: {node: '>=4'}
|
engines: {node: '>=4'}
|
||||||
dependencies:
|
dependencies:
|
||||||
graceful-fs: 4.2.9
|
graceful-fs: 4.2.10
|
||||||
parse-json: 2.2.0
|
parse-json: 2.2.0
|
||||||
pify: 2.3.0
|
pify: 2.3.0
|
||||||
strip-bom: 3.0.0
|
strip-bom: 3.0.0
|
||||||
@@ -1631,6 +1645,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
|
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/ms/2.1.3:
|
||||||
|
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
/natural-compare/1.4.0:
|
/natural-compare/1.4.0:
|
||||||
resolution: {integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=}
|
resolution: {integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=}
|
||||||
dev: true
|
dev: true
|
||||||
@@ -1658,7 +1676,7 @@ packages:
|
|||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
dependencies:
|
dependencies:
|
||||||
call-bind: 1.0.2
|
call-bind: 1.0.2
|
||||||
define-properties: 1.1.3
|
define-properties: 1.1.4
|
||||||
has-symbols: 1.0.3
|
has-symbols: 1.0.3
|
||||||
object-keys: 1.1.1
|
object-keys: 1.1.1
|
||||||
dev: true
|
dev: true
|
||||||
@@ -1668,8 +1686,8 @@ packages:
|
|||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
dependencies:
|
dependencies:
|
||||||
call-bind: 1.0.2
|
call-bind: 1.0.2
|
||||||
define-properties: 1.1.3
|
define-properties: 1.1.4
|
||||||
es-abstract: 1.19.2
|
es-abstract: 1.19.5
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/obsidian/0.14.6:
|
/obsidian/0.14.6:
|
||||||
@@ -1860,7 +1878,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==}
|
resolution: {integrity: sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
is-core-module: 2.8.1
|
is-core-module: 2.9.0
|
||||||
path-parse: 1.0.7
|
path-parse: 1.0.7
|
||||||
supports-preserve-symlinks-flag: 1.0.0
|
supports-preserve-symlinks-flag: 1.0.0
|
||||||
dev: true
|
dev: true
|
||||||
@@ -1877,6 +1895,13 @@ packages:
|
|||||||
glob: 7.2.0
|
glob: 7.2.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/rimraf/2.7.1:
|
||||||
|
resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==}
|
||||||
|
hasBin: true
|
||||||
|
dependencies:
|
||||||
|
glob: 7.2.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
/run-parallel/1.2.0:
|
/run-parallel/1.2.0:
|
||||||
resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
|
resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -1887,9 +1912,9 @@ packages:
|
|||||||
resolution: {integrity: sha1-dB4kXiMfB8r7b98PEzrfohalAq0=}
|
resolution: {integrity: sha1-dB4kXiMfB8r7b98PEzrfohalAq0=}
|
||||||
dependencies:
|
dependencies:
|
||||||
es6-promise: 3.3.1
|
es6-promise: 3.3.1
|
||||||
graceful-fs: 4.2.9
|
graceful-fs: 4.2.10
|
||||||
mkdirp: 0.5.6
|
mkdirp: 0.5.6
|
||||||
rimraf: 2.6.3
|
rimraf: 2.7.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/semver/5.7.1:
|
/semver/5.7.1:
|
||||||
@@ -1902,8 +1927,8 @@ packages:
|
|||||||
hasBin: true
|
hasBin: true
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/semver/7.3.5:
|
/semver/7.3.7:
|
||||||
resolution: {integrity: sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==}
|
resolution: {integrity: sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==}
|
||||||
engines: {node: '>=10'}
|
engines: {node: '>=10'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -1997,14 +2022,14 @@ packages:
|
|||||||
resolution: {integrity: sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==}
|
resolution: {integrity: sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==}
|
||||||
dependencies:
|
dependencies:
|
||||||
call-bind: 1.0.2
|
call-bind: 1.0.2
|
||||||
define-properties: 1.1.3
|
define-properties: 1.1.4
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/string.prototype.trimstart/1.0.4:
|
/string.prototype.trimstart/1.0.4:
|
||||||
resolution: {integrity: sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==}
|
resolution: {integrity: sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
call-bind: 1.0.2
|
call-bind: 1.0.2
|
||||||
define-properties: 1.1.3
|
define-properties: 1.1.4
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/strip-ansi/3.0.1:
|
/strip-ansi/3.0.1:
|
||||||
@@ -2215,7 +2240,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==}
|
resolution: {integrity: sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
function-bind: 1.1.1
|
function-bind: 1.1.1
|
||||||
has-bigints: 1.0.1
|
has-bigints: 1.0.2
|
||||||
has-symbols: 1.0.3
|
has-symbols: 1.0.3
|
||||||
which-boxed-primitive: 1.0.2
|
which-boxed-primitive: 1.0.2
|
||||||
dev: true
|
dev: true
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ let lastSearch = ""
|
|||||||
import CmpInput from "./CmpInput.svelte"
|
import CmpInput from "./CmpInput.svelte"
|
||||||
import CmpResultInFile from "./CmpResultInFile.svelte"
|
import CmpResultInFile from "./CmpResultInFile.svelte"
|
||||||
import { excerptAfter, type ResultNote, type SearchMatch } from "./globals"
|
import { excerptAfter, type ResultNote, type SearchMatch } from "./globals"
|
||||||
import { plugin } from "./stores"
|
|
||||||
import { loopIndex } from "./utils"
|
import { loopIndex } from "./utils"
|
||||||
import { onMount, tick } from "svelte"
|
import { onMount, tick } from "svelte"
|
||||||
import { MarkdownView } from "obsidian"
|
import { MarkdownView } from "obsidian"
|
||||||
@@ -91,8 +90,8 @@ async function openSelection(): Promise<void> {
|
|||||||
modal.close()
|
modal.close()
|
||||||
if (parent) parent.close()
|
if (parent) parent.close()
|
||||||
|
|
||||||
await $plugin.app.workspace.openLinkText(note.path, "")
|
await app.workspace.openLinkText(note.path, "")
|
||||||
const view = $plugin.app.workspace.getActiveViewOfType(MarkdownView)
|
const view = app.workspace.getActiveViewOfType(MarkdownView)
|
||||||
if (!view) {
|
if (!view) {
|
||||||
throw new Error("OmniSearch - No active MarkdownView")
|
throw new Error("OmniSearch - No active MarkdownView")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import type { ResultNote } from "./globals"
|
|||||||
import { ModalInFile, type ModalVault } from "./modal"
|
import { ModalInFile, type ModalVault } from "./modal"
|
||||||
import { openNote } from "./notes"
|
import { openNote } from "./notes"
|
||||||
import { getSuggestions } from "./search"
|
import { getSuggestions } from "./search"
|
||||||
import { plugin } from "./stores"
|
|
||||||
import { loopIndex } from "./utils"
|
import { loopIndex } from "./utils"
|
||||||
|
|
||||||
export let modal: ModalVault
|
export let modal: ModalVault
|
||||||
@@ -35,11 +34,8 @@ onMount(() => {
|
|||||||
|
|
||||||
async function createOrOpenNote(item: ResultNote): Promise<void> {
|
async function createOrOpenNote(item: ResultNote): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const file = await $plugin.app.vault.create(
|
const file = await app.vault.create(searchQuery + ".md", "# " + searchQuery)
|
||||||
searchQuery + ".md",
|
await app.workspace.openLinkText(file.path, "")
|
||||||
"# " + searchQuery
|
|
||||||
)
|
|
||||||
await $plugin.app.workspace.openLinkText(file.path, "")
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e instanceof Error && e.message === "File already exists.") {
|
if (e instanceof Error && e.message === "File already exists.") {
|
||||||
// Open the existing file instead of creating it
|
// Open the existing file instead of creating it
|
||||||
@@ -77,10 +73,10 @@ function onInputShiftEnter(): void {
|
|||||||
|
|
||||||
function onInputAltEnter(): void {
|
function onInputAltEnter(): void {
|
||||||
if (selectedNote) {
|
if (selectedNote) {
|
||||||
const file = $plugin.app.vault.getAbstractFileByPath(selectedNote.path)
|
const file = app.vault.getAbstractFileByPath(selectedNote.path)
|
||||||
if (file && file instanceof TFile) {
|
if (file && file instanceof TFile) {
|
||||||
// modal.close()
|
// modal.close()
|
||||||
new ModalInFile($plugin, file, searchQuery, modal).open()
|
new ModalInFile(app, file, searchQuery, modal).open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
src/main.ts
10
src/main.ts
@@ -1,5 +1,5 @@
|
|||||||
|
/* global app */ // make eslint happy with Obisidian's global app reference
|
||||||
import { MarkdownView, Plugin, TFile } from 'obsidian'
|
import { MarkdownView, Plugin, TFile } from 'obsidian'
|
||||||
import { plugin } from './stores'
|
|
||||||
import {
|
import {
|
||||||
addToIndex,
|
addToIndex,
|
||||||
initGlobalSearchIndex,
|
initGlobalSearchIndex,
|
||||||
@@ -10,14 +10,12 @@ import { ModalInFile, ModalVault } from './modal'
|
|||||||
|
|
||||||
export default class OmnisearchPlugin extends Plugin {
|
export default class OmnisearchPlugin extends Plugin {
|
||||||
async onload(): Promise<void> {
|
async onload(): Promise<void> {
|
||||||
plugin.set(this)
|
|
||||||
|
|
||||||
// Commands to display Omnisearch modals
|
// Commands to display Omnisearch modals
|
||||||
this.addCommand({
|
this.addCommand({
|
||||||
id: 'show-modal',
|
id: 'show-modal',
|
||||||
name: 'Vault search',
|
name: 'Vault search',
|
||||||
callback: () => {
|
callback: () => {
|
||||||
new ModalVault(this).open()
|
new ModalVault(app).open()
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -25,10 +23,10 @@ export default class OmnisearchPlugin extends Plugin {
|
|||||||
id: 'show-modal-infile',
|
id: 'show-modal-infile',
|
||||||
name: 'In-file search',
|
name: 'In-file search',
|
||||||
checkCallback: (checking: boolean) => {
|
checkCallback: (checking: boolean) => {
|
||||||
const view = this.app.workspace.getActiveViewOfType(MarkdownView)
|
const view = app.workspace.getActiveViewOfType(MarkdownView)
|
||||||
if (view) {
|
if (view) {
|
||||||
if (!checking) {
|
if (!checking) {
|
||||||
new ModalInFile(this, view.file).open()
|
new ModalInFile(app, view.file).open()
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
15
src/modal.ts
15
src/modal.ts
@@ -1,11 +1,10 @@
|
|||||||
import { Modal, TFile } from 'obsidian'
|
import { App, Modal, TFile } from 'obsidian'
|
||||||
import type OmnisearchPlugin from './main'
|
|
||||||
import CmpModalVault from './CmpModalVault.svelte'
|
import CmpModalVault from './CmpModalVault.svelte'
|
||||||
import CmpModalInFile from './CmpModalInFile.svelte'
|
import CmpModalInFile from './CmpModalInFile.svelte'
|
||||||
|
|
||||||
abstract class ModalOmnisearch extends Modal {
|
abstract class ModalOmnisearch extends Modal {
|
||||||
constructor(plugin: OmnisearchPlugin) {
|
constructor(app: App) {
|
||||||
super(plugin.app)
|
super(app)
|
||||||
|
|
||||||
// Remove all the default modal's children (except the close button)
|
// Remove all the default modal's children (except the close button)
|
||||||
// so that we can more easily customize it
|
// so that we can more easily customize it
|
||||||
@@ -17,8 +16,8 @@ abstract class ModalOmnisearch extends Modal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class ModalVault extends ModalOmnisearch {
|
export class ModalVault extends ModalOmnisearch {
|
||||||
constructor(plugin: OmnisearchPlugin) {
|
constructor(app: App) {
|
||||||
super(plugin)
|
super(app)
|
||||||
|
|
||||||
new CmpModalVault({
|
new CmpModalVault({
|
||||||
target: this.modalEl,
|
target: this.modalEl,
|
||||||
@@ -31,12 +30,12 @@ export class ModalVault extends ModalOmnisearch {
|
|||||||
|
|
||||||
export class ModalInFile extends ModalOmnisearch {
|
export class ModalInFile extends ModalOmnisearch {
|
||||||
constructor(
|
constructor(
|
||||||
plugin: OmnisearchPlugin,
|
app: App,
|
||||||
file: TFile,
|
file: TFile,
|
||||||
searchQuery: string = '',
|
searchQuery: string = '',
|
||||||
parent?: ModalOmnisearch,
|
parent?: ModalOmnisearch,
|
||||||
) {
|
) {
|
||||||
super(plugin)
|
super(app)
|
||||||
|
|
||||||
if (parent) {
|
if (parent) {
|
||||||
// Hide the parent modal
|
// Hide the parent modal
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
import { MarkdownView } from 'obsidian'
|
import { MarkdownView } from 'obsidian'
|
||||||
import { get } from 'svelte/store'
|
|
||||||
import type { ResultNote } from './globals'
|
import type { ResultNote } from './globals'
|
||||||
import { plugin } from './stores'
|
|
||||||
import { stringsToRegex } from './utils'
|
import { stringsToRegex } from './utils'
|
||||||
|
|
||||||
export async function openNote(
|
export async function openNote(
|
||||||
item: ResultNote,
|
item: ResultNote,
|
||||||
newPane = false,
|
newPane = false,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const app = get(plugin).app
|
|
||||||
const reg = stringsToRegex(item.foundWords)
|
const reg = stringsToRegex(item.foundWords)
|
||||||
reg.exec(item.content)
|
reg.exec(item.content)
|
||||||
const offset = reg.lastIndex
|
const offset = reg.lastIndex
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import {
|
|||||||
type ResultNote,
|
type ResultNote,
|
||||||
type SearchMatch,
|
type SearchMatch,
|
||||||
} from './globals'
|
} from './globals'
|
||||||
import { plugin } from './stores'
|
|
||||||
import { get } from 'svelte/store'
|
import { get } from 'svelte/store'
|
||||||
import { extractHeadingsFromCache, stringsToRegex, wait } from './utils'
|
import { extractHeadingsFromCache, stringsToRegex, wait } from './utils'
|
||||||
|
|
||||||
@@ -28,7 +27,7 @@ export async function initGlobalSearchIndex(): Promise<void> {
|
|||||||
|
|
||||||
// Index files that are already present
|
// Index files that are already present
|
||||||
const start = new Date().getTime()
|
const start = new Date().getTime()
|
||||||
const files = get(plugin).app.vault.getMarkdownFiles()
|
const files = app.vault.getMarkdownFiles()
|
||||||
|
|
||||||
// This is basically the same behavior as MiniSearch's `addAllAsync()`.
|
// This is basically the same behavior as MiniSearch's `addAllAsync()`.
|
||||||
// We index files by batches of 10
|
// We index files by batches of 10
|
||||||
@@ -147,7 +146,6 @@ export async function addToIndex(file: TAbstractFile): Promise<void> {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const app = get(plugin).app
|
|
||||||
// console.log(`Omnisearch - adding ${file.path} to index`)
|
// console.log(`Omnisearch - adding ${file.path} to index`)
|
||||||
const fileCache = app.metadataCache.getFileCache(file)
|
const fileCache = app.metadataCache.getFileCache(file)
|
||||||
// console.log(fileCache)
|
// console.log(fileCache)
|
||||||
|
|||||||
@@ -1,7 +1,2 @@
|
|||||||
import { writable } from 'svelte/store'
|
import { writable } from 'svelte/store'
|
||||||
import type OmnisearchPlugin from './main'
|
import type OmnisearchPlugin from './main'
|
||||||
|
|
||||||
/**
|
|
||||||
* A reference to the plugin instance
|
|
||||||
*/
|
|
||||||
export const plugin = writable<OmnisearchPlugin>()
|
|
||||||
|
|||||||
Reference in New Issue
Block a user