mirror of
https://github.com/shumadrid/obsidian-git-changelog.git
synced 2026-07-22 05:42:16 +00:00
refactor: make ui simpler and more consistent, removed unnecessary Svelte reactivity
This commit is contained in:
parent
bfbff153a1
commit
814058e746
10 changed files with 637 additions and 315 deletions
403
package-lock.json
generated
403
package-lock.json
generated
|
|
@ -358,9 +358,9 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@cspell/dict-cpp": {
|
||||
"version": "6.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-6.0.5.tgz",
|
||||
"integrity": "sha512-OrWqPuLf5EV+H/2sIYUSDF4UyiyCR4/+Q2n+xRx09CBg7YBx16h61V9892TKWCUr9FiJfAkKY24aWW3WRU9Nqg==",
|
||||
"version": "6.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-6.0.6.tgz",
|
||||
"integrity": "sha512-HMV1chsExuZt5IL9rYBW7GmhNZDVdQJEd1WtFgOO6jqiNxbpTG3Is3Pkldl7FpusBQQZr4BdjMit5bnPpVRy3A==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
|
|
@ -435,9 +435,9 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@cspell/dict-en-common-misspellings": {
|
||||
"version": "2.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@cspell/dict-en-common-misspellings/-/dict-en-common-misspellings-2.0.9.tgz",
|
||||
"integrity": "sha512-O/jAr1VNtuyCFckbTmpeEf43ZFWVD9cJFvWaA6rO2IVmLirJViHWJUyBZOuQcesSplzEIw80MAYmnK06/MDWXQ==",
|
||||
"version": "2.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@cspell/dict-en-common-misspellings/-/dict-en-common-misspellings-2.0.10.tgz",
|
||||
"integrity": "sha512-80mXJLtr0tVEtzowrI7ycVae/ULAYImZUlr0kUTpa8i57AUk7Zy3pYBs44EYIKW7ZC9AHu4Qjjfq4vriAtyTDQ==",
|
||||
"dev": true,
|
||||
"license": "CC BY-SA 4.0"
|
||||
},
|
||||
|
|
@ -498,9 +498,9 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@cspell/dict-golang": {
|
||||
"version": "6.0.18",
|
||||
"resolved": "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-6.0.18.tgz",
|
||||
"integrity": "sha512-Mt+7NwfodDwUk7423DdaQa0YaA+4UoV3XSxQwZioqjpFBCuxfvvv4l80MxCTAAbK6duGj0uHbGTwpv8fyKYPKg==",
|
||||
"version": "6.0.19",
|
||||
"resolved": "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-6.0.19.tgz",
|
||||
"integrity": "sha512-VS+oinB2/CbgmHE06kMJlj52OVMZM0S2EEXph3oaroNTgTuclSwdFylQmOEjquZi55kW+n3FM9MyWXiitB7Dtg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
|
|
@ -616,9 +616,9 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@cspell/dict-npm": {
|
||||
"version": "5.1.29",
|
||||
"resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.1.29.tgz",
|
||||
"integrity": "sha512-FPCE9MpO42WGc9u/lx3J6CZSfPVO5kMUaOQkTVqXo3sTDX6+o5ulb+9W/MD33kiA0AvXr1Lk8knhA6koW9t/Yw==",
|
||||
"version": "5.1.30",
|
||||
"resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.1.30.tgz",
|
||||
"integrity": "sha512-qRMJZFz4FBPECH5rGQN9p2Ld6nfpSaPFQvlG6V2RowWcrJQqF4RFmLUNuRQpvndpSeIUo32yX1hxb7AT45ARCQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
|
|
@ -644,9 +644,9 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@cspell/dict-python": {
|
||||
"version": "4.2.15",
|
||||
"resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.2.15.tgz",
|
||||
"integrity": "sha512-VNXhj0Eh+hdHN89MgyaoSAexBQKmYtJaMhucbMI7XmBs4pf8fuFFN3xugk51/A4TZJr8+RImdFFsGMOw+I4bDA==",
|
||||
"version": "4.2.16",
|
||||
"resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.2.16.tgz",
|
||||
"integrity": "sha512-LkQssFt1hPOWXIQiD8ScTkz/41RL7Ti0V/2ytUzEW82dc0atIEksrBg8MuOjWXktp0Dk5tDwRLgmIvhV3CFFOA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
@ -661,9 +661,9 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@cspell/dict-ruby": {
|
||||
"version": "5.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@cspell/dict-ruby/-/dict-ruby-5.0.7.tgz",
|
||||
"integrity": "sha512-4/d0hcoPzi5Alk0FmcyqlzFW9lQnZh9j07MJzPcyVO62nYJJAGKaPZL2o4qHeCS/od/ctJC5AHRdoUm0ktsw6Q==",
|
||||
"version": "5.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@cspell/dict-ruby/-/dict-ruby-5.0.8.tgz",
|
||||
"integrity": "sha512-ixuTneU0aH1cPQRbWJvtvOntMFfeQR2KxT8LuAv5jBKqQWIHSxzGlp+zX3SVyoeR0kOWiu64/O5Yn836A5yMcQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
|
|
@ -941,6 +941,40 @@
|
|||
"semver": "bin/semver.js"
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/core": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.3.1.tgz",
|
||||
"integrity": "sha512-pVGjBIt1Y6gg3EJN8jTcfpP/+uuRksIo055oE/OBkDNcjZqVbfkWCksG1Jp4yZnj3iKWyWX8fdG/j6UDYPbFog==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@emnapi/wasi-threads": "1.0.1",
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/runtime": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz",
|
||||
"integrity": "sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/wasi-threads": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.0.1.tgz",
|
||||
"integrity": "sha512-iIBu7mwkq4UQGeMEM8bLwNK962nXdhodeScX4slfQnRhEMMzvYivHhutCIk8uojvmASXXPC2WNEjwxFWk72Oqw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/aix-ppc64": {
|
||||
"version": "0.25.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.1.tgz",
|
||||
|
|
@ -1367,9 +1401,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@eslint-community/eslint-utils": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.5.0.tgz",
|
||||
"integrity": "sha512-RoV8Xs9eNwiDvhv7M+xcL4PWyRyIXRY/FLp3buU4h1EYfdF7unWUy3dOjPqb3C7rMUewIcqwW850PgS8h1o1yg==",
|
||||
"version": "4.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.5.1.tgz",
|
||||
"integrity": "sha512-soEIOALTfTK6EjmKMMoLugwaP0rzkad90iIWd1hMO9ARkSAyjfMfkRRhLvD5qH7vvM0Cg72pieUfR6yh6XxC4w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
@ -1772,6 +1806,19 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@napi-rs/wasm-runtime": {
|
||||
"version": "0.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.7.tgz",
|
||||
"integrity": "sha512-5yximcFK5FNompXfJFoWanu5l8v1hNGqNHh9du1xETp9HWk/B/PzvchX55WYOPaIeNglG8++68AAiauBAtbnzw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@emnapi/core": "^1.3.1",
|
||||
"@emnapi/runtime": "^1.3.1",
|
||||
"@tybys/wasm-util": "^0.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@nodelib/fs.scandir": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||
|
|
@ -1820,6 +1867,163 @@
|
|||
"node": ">=12.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@oxc-resolver/binding-darwin-arm64": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-resolver/binding-darwin-arm64/-/binding-darwin-arm64-5.0.0.tgz",
|
||||
"integrity": "sha512-zwHAf+owoxSWTDD4dFuwW+FkpaDzbaL30H5Ltocb+RmLyg4WKuteusRLKh5Y8b/cyu7UzhxM0haIqQjyqA1iuA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
]
|
||||
},
|
||||
"node_modules/@oxc-resolver/binding-darwin-x64": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-resolver/binding-darwin-x64/-/binding-darwin-x64-5.0.0.tgz",
|
||||
"integrity": "sha512-1lS3aBNVjVQKBvZdHm13+8tSjvu2Tl1Cv4FnUyMYxqx6+rsom2YaOylS5LhDUwfZu0zAgpLMwK6kGpF/UPncNg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
]
|
||||
},
|
||||
"node_modules/@oxc-resolver/binding-freebsd-x64": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-resolver/binding-freebsd-x64/-/binding-freebsd-x64-5.0.0.tgz",
|
||||
"integrity": "sha512-q9sRd68wC1/AJ0eu6ClhxlklVfe8gH4wrUkSyEbIYTZ8zY5yjsLY3fpqqsaCvWJUx65nW+XtnAxCGCi5AXr1Mw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"freebsd"
|
||||
]
|
||||
},
|
||||
"node_modules/@oxc-resolver/binding-linux-arm-gnueabihf": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-5.0.0.tgz",
|
||||
"integrity": "sha512-catYavWsvqViYnCveQjhrK6yVYDEPFvIOgGLxnz5r2dcgrjpmquzREoyss0L2QG/J5HTTbwqwZ1kk+g56hE/1A==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@oxc-resolver/binding-linux-arm64-gnu": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-5.0.0.tgz",
|
||||
"integrity": "sha512-l/0pWoQM5kVmJLg4frQ1mKZOXgi0ex/hzvFt8E4WK2ifXr5JgKFUokxsb/oat7f5YzdJJh5r9p+qS/t3dA26Aw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@oxc-resolver/binding-linux-arm64-musl": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm64-musl/-/binding-linux-arm64-musl-5.0.0.tgz",
|
||||
"integrity": "sha512-bx0oz/oaAW4FGYqpIIxJCnmgb906YfMhTEWCJvYkxjpEI8VKLJEL3PQevYiqDq36SA0yRLJ/sQK2fqry8AFBfA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@oxc-resolver/binding-linux-x64-gnu": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-x64-gnu/-/binding-linux-x64-gnu-5.0.0.tgz",
|
||||
"integrity": "sha512-4PH++qbSIhlRsFYdN1P9neDov4OGhTGo5nbQ1D7AL6gWFLo3gdZTc00FM2y8JjeTcPWEXkViZuwpuc0w5i6qHg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@oxc-resolver/binding-linux-x64-musl": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-x64-musl/-/binding-linux-x64-musl-5.0.0.tgz",
|
||||
"integrity": "sha512-mLfQFpX3/5y9oWi0b+9FbWDkL2hM0Y29653beCHiHxAdGyVgb2DsJbK74WkMTwtSz9by8vyBh8jGPZcg1yLZbQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@oxc-resolver/binding-wasm32-wasi": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-resolver/binding-wasm32-wasi/-/binding-wasm32-wasi-5.0.0.tgz",
|
||||
"integrity": "sha512-uEhsAZSo65qsRi6+IfBTEUUFbjg7T2yruJeLYpFfEATpm3ory5Mgo5vx3L0c2/Cz1OUZXBgp3A8x6VMUB2jT2A==",
|
||||
"cpu": [
|
||||
"wasm32"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@napi-rs/wasm-runtime": "^0.2.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@oxc-resolver/binding-win32-arm64-msvc": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-resolver/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-5.0.0.tgz",
|
||||
"integrity": "sha512-8DbSso9Jp1ns8AYuZFXdRfAcdJrzZwkFm/RjPuvAPTENsm685dosBF8G6gTHQlHvULnk6o3sa9ygZaTGC/UoEw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
]
|
||||
},
|
||||
"node_modules/@oxc-resolver/binding-win32-x64-msvc": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-resolver/binding-win32-x64-msvc/-/binding-win32-x64-msvc-5.0.0.tgz",
|
||||
"integrity": "sha512-ylppfPEg63NuRXOPNsXFlgyl37JrtRn0QMO26X3K3Ytp5HtLrMreQMGVtgr30e1l2YmAWqhvmKlCryOqzGPD/g==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
]
|
||||
},
|
||||
"node_modules/@parcel/watcher": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz",
|
||||
|
|
@ -2702,6 +2906,17 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@tybys/wasm-util": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.9.0.tgz",
|
||||
"integrity": "sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/babel__core": {
|
||||
"version": "7.20.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
|
||||
|
|
@ -2932,6 +3147,16 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/react": {
|
||||
"version": "19.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.0.10.tgz",
|
||||
"integrity": "sha512-JuRQ9KXLEjaUNjTWpzuR231Z2WpIwczOkBEIvbHNCzQefFIT0L8IqE6NV6ULLyC1SI/i234JnDoMkfg+RjQj2g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"csstype": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/responselike": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz",
|
||||
|
|
@ -3499,18 +3724,19 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/array.prototype.findlastindex": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz",
|
||||
"integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==",
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz",
|
||||
"integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"call-bind": "^1.0.8",
|
||||
"call-bound": "^1.0.4",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.23.2",
|
||||
"es-abstract": "^1.23.9",
|
||||
"es-errors": "^1.3.0",
|
||||
"es-object-atoms": "^1.0.0",
|
||||
"es-shim-unscopables": "^1.0.2"
|
||||
"es-object-atoms": "^1.1.1",
|
||||
"es-shim-unscopables": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
|
|
@ -3852,9 +4078,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001703",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001703.tgz",
|
||||
"integrity": "sha512-kRlAGTRWgPsOj7oARC9m1okJEXdL/8fekFVcxA8Hl7GH4r/sN4OJn/i6Flde373T50KS7Y37oFbMwlE8+F42kQ==",
|
||||
"version": "1.0.30001704",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001704.tgz",
|
||||
"integrity": "sha512-+L2IgBbV6gXB4ETf0keSvLr7JUrRVbIaB/lrQ1+z8mRcQiisG5k+lG6O4n6Y5q6f5EuNfaYXKgymucphlEXQew==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -4457,6 +4683,13 @@
|
|||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/csstype": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
|
||||
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/data-view-buffer": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz",
|
||||
|
|
@ -4807,9 +5040,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.5.114",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.114.tgz",
|
||||
"integrity": "sha512-DFptFef3iktoKlFQK/afbo274/XNWD00Am0xa7M8FZUepHlHT8PEuiNBoRfFHbH1okqN58AlhbJ4QTkcnXorjA==",
|
||||
"version": "1.5.119",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.119.tgz",
|
||||
"integrity": "sha512-Ku4NMzUjz3e3Vweh7PhApPrZSS4fyiCIbcIrG9eKrriYVLmbMepETR/v6SU7xPm98QTqMSYiCwfO89QNjXLkbQ==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
|
|
@ -5100,9 +5333,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/esbuild-svelte": {
|
||||
"version": "0.9.1",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-svelte/-/esbuild-svelte-0.9.1.tgz",
|
||||
"integrity": "sha512-IZ8tDXl6XaC/oA3fwFTEUcFr4axs0jcJ+UpIvHKvMdpl77ssV+ICRHrMJFsDMXWP6TfvZPU/0+3j7YD4g6NHKA==",
|
||||
"version": "0.9.2",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-svelte/-/esbuild-svelte-0.9.2.tgz",
|
||||
"integrity": "sha512-8Jq6+rh+g1E2mkBOZKdYZ8JtlbtDq2Fydwvn+/cBvUX9S0cdKv6AISZcEbErKQ0TpLC/Cv04l1vKaqXOBO8+VQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
@ -5252,18 +5485,18 @@
|
|||
}
|
||||
},
|
||||
"node_modules/eslint-import-resolver-typescript": {
|
||||
"version": "3.8.5",
|
||||
"resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.8.5.tgz",
|
||||
"integrity": "sha512-0ZRnzOqKc7TRm85w6REOUkVLHevN6nWd/xZsmKhSD/dcDktoxQaQAg59e5EK/QEsGFf7o5JSpE6qTwCEz0WjTw==",
|
||||
"version": "3.9.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.9.0.tgz",
|
||||
"integrity": "sha512-EUcFmaz0zAa6P2C9jAb5XDymRld8S6TURvWcIW7y+czOW+K8hrjgQgbhBsNE0J/dDZ6HLfcn70LqnIil9W+ICw==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@nolyfill/is-core-module": "1.0.39",
|
||||
"debug": "^4.3.7",
|
||||
"enhanced-resolve": "^5.15.0",
|
||||
"get-tsconfig": "^4.10.0",
|
||||
"is-bun-module": "^1.0.2",
|
||||
"stable-hash": "^0.0.4",
|
||||
"oxc-resolver": "^5.0.0",
|
||||
"stable-hash": "^0.0.5",
|
||||
"tinyglobby": "^0.2.12"
|
||||
},
|
||||
"engines": {
|
||||
|
|
@ -5359,25 +5592,24 @@
|
|||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-import-x": {
|
||||
"version": "4.6.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import-x/-/eslint-plugin-import-x-4.6.1.tgz",
|
||||
"integrity": "sha512-wluSUifMIb7UfwWXqx7Yx0lE/SGCcGXECLx/9bCmbY2nneLwvAZ4vkd1IXDjPKFvdcdUgr1BaRnaRpx3k2+Pfw==",
|
||||
"version": "4.7.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import-x/-/eslint-plugin-import-x-4.7.0.tgz",
|
||||
"integrity": "sha512-LHxq8V6SJ99hSFYAexxUKk3gVsjb8fuNRGsbMinwlJGvcuREP9SVzCCNKJ3POdDowEHdExy/bPN6YfjraueIXA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/doctrine": "^0.0.9",
|
||||
"@typescript-eslint/scope-manager": "^8.1.0",
|
||||
"@typescript-eslint/utils": "^8.1.0",
|
||||
"debug": "^4.3.4",
|
||||
"@typescript-eslint/utils": "^8.26.1",
|
||||
"debug": "^4.4.0",
|
||||
"doctrine": "^3.0.0",
|
||||
"enhanced-resolve": "^5.17.1",
|
||||
"eslint-import-resolver-node": "^0.3.9",
|
||||
"get-tsconfig": "^4.7.3",
|
||||
"get-tsconfig": "^4.10.0",
|
||||
"is-glob": "^4.0.3",
|
||||
"minimatch": "^9.0.3",
|
||||
"semver": "^7.6.3",
|
||||
"stable-hash": "^0.0.4",
|
||||
"tslib": "^2.6.3"
|
||||
"minimatch": "^10.0.1",
|
||||
"oxc-resolver": "^5.0.0",
|
||||
"semver": "^7.7.1",
|
||||
"stable-hash": "^0.0.5",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
|
|
@ -5399,6 +5631,22 @@
|
|||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-import-x/node_modules/minimatch": {
|
||||
"version": "10.0.1",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz",
|
||||
"integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-import/node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
|
|
@ -8770,9 +9018,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/obsidian-dev-utils": {
|
||||
"version": "19.9.0",
|
||||
"resolved": "https://registry.npmjs.org/obsidian-dev-utils/-/obsidian-dev-utils-19.9.0.tgz",
|
||||
"integrity": "sha512-RPPLDDxiPDGkU6lTmmt9As/tyamfsF7iIFdCUUJKIAxRWoVKg4HgDt2xNJOWRAaCU7XLqcDbSDsX/4fbE4Zj0A==",
|
||||
"version": "19.10.0",
|
||||
"resolved": "https://registry.npmjs.org/obsidian-dev-utils/-/obsidian-dev-utils-19.10.0.tgz",
|
||||
"integrity": "sha512-0TEOJbZcjwGXSnbr8gzBmvhDvetDQde5zux/O6j51+P4Np+zkj5G/jeow7Jboii7vlVHYdRSEndsq3CDBkmWPw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
@ -8790,6 +9038,7 @@
|
|||
"@types/parsimmon": "^1.10.9",
|
||||
"@types/path-browserify": "^1.0.3",
|
||||
"@types/pug": "^2.0.10",
|
||||
"@types/react": "^19.0.10",
|
||||
"@types/shell-quote": "^1.7.5",
|
||||
"@typescript-eslint/eslint-plugin": "^8.26.1",
|
||||
"@typescript-eslint/parser": "^8.26.1",
|
||||
|
|
@ -8824,6 +9073,7 @@
|
|||
"postcss": "^8.5.3",
|
||||
"postcss-modules": "^6.0.1",
|
||||
"preact": "^10.26.4",
|
||||
"react": "^19.0.0",
|
||||
"remark": "^15.0.1",
|
||||
"remark-parse": "^11.0.0",
|
||||
"remark-wiki-link": "^2.0.1",
|
||||
|
|
@ -8929,6 +9179,29 @@
|
|||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/oxc-resolver": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/oxc-resolver/-/oxc-resolver-5.0.0.tgz",
|
||||
"integrity": "sha512-66fopyAqCN8Mx4tzNiBXWbk8asCSuxUWN62gwTc3yfRs7JfWhX/eVJCf+fUrfbNOdQVOWn+o8pAKllp76ysMXA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/Boshen"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@oxc-resolver/binding-darwin-arm64": "5.0.0",
|
||||
"@oxc-resolver/binding-darwin-x64": "5.0.0",
|
||||
"@oxc-resolver/binding-freebsd-x64": "5.0.0",
|
||||
"@oxc-resolver/binding-linux-arm-gnueabihf": "5.0.0",
|
||||
"@oxc-resolver/binding-linux-arm64-gnu": "5.0.0",
|
||||
"@oxc-resolver/binding-linux-arm64-musl": "5.0.0",
|
||||
"@oxc-resolver/binding-linux-x64-gnu": "5.0.0",
|
||||
"@oxc-resolver/binding-linux-x64-musl": "5.0.0",
|
||||
"@oxc-resolver/binding-wasm32-wasi": "5.0.0",
|
||||
"@oxc-resolver/binding-win32-arm64-msvc": "5.0.0",
|
||||
"@oxc-resolver/binding-win32-x64-msvc": "5.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/p-cancelable": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz",
|
||||
|
|
@ -9575,6 +9848,16 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/react": {
|
||||
"version": "19.0.0",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz",
|
||||
"integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/read-package-up": {
|
||||
"version": "11.0.0",
|
||||
"resolved": "https://registry.npmjs.org/read-package-up/-/read-package-up-11.0.0.tgz",
|
||||
|
|
@ -10830,9 +11113,9 @@
|
|||
"peer": true
|
||||
},
|
||||
"node_modules/stable-hash": {
|
||||
"version": "0.0.4",
|
||||
"resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.4.tgz",
|
||||
"integrity": "sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==",
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz",
|
||||
"integrity": "sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
import type { GitChangelogPlugin } from 'GitChangelogPlugin.svelte.ts';
|
||||
import type { EventRef } from 'obsidian';
|
||||
|
||||
import { setIcon } from 'obsidian';
|
||||
import { onDestroy, untrack } from 'svelte';
|
||||
import { isMoved, isRenamed } from 'utils.ts';
|
||||
import ChangeIntervalButton from 'Views/components/ChangeIntervalButton.svelte';
|
||||
import DependenciesStatusCheck from 'Views/components/DependenciesStatusCheck.svelte';
|
||||
import DiffStatsComponent from 'Views/components/DiffStats.svelte';
|
||||
import { composeAriaLabel, composeVersionTitle } from 'Views/formatters.ts';
|
||||
import { changelogFileClick } from 'Views/helper.ts';
|
||||
import { canOpenInDiffView, changelogFileClick } from 'Views/helper.ts';
|
||||
|
||||
// eslint-disable-next-line capitalized-comments
|
||||
// svelte-ignore non_reactive_update
|
||||
|
|
@ -31,6 +31,7 @@
|
|||
let activeFileChangedReference: EventRef;
|
||||
|
||||
const changelogManager = $derived(plugin.fileChangelogManager);
|
||||
const openFileButton = $state<HTMLElement>();
|
||||
|
||||
const changelogState = $derived.by(() => {
|
||||
if (!changelogManager) {
|
||||
|
|
@ -136,6 +137,13 @@
|
|||
plugin.app.workspace.offref(fileChangelogSettingsChangedReference);
|
||||
});
|
||||
|
||||
$effect(() => {
|
||||
if (openFileButton) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
setIcon(openFileButton, openFileButton.getAttr('data-icon')!);
|
||||
}
|
||||
});
|
||||
|
||||
function cleanupObserver(): void {
|
||||
if (observer) {
|
||||
observer.disconnect();
|
||||
|
|
@ -144,19 +152,38 @@
|
|||
}
|
||||
|
||||
function primaryClick(event: MouseEvent, entryIndex: number | string): void {
|
||||
event.stopPropagation();
|
||||
|
||||
if (isVersionClickable(entryIndex)) {
|
||||
changelogFileClick({
|
||||
aReference:
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
changelogManager!.visibleEntries![(entryIndex as number) + 1]
|
||||
?.commitHash,
|
||||
|
||||
bReference:
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
changelogManager!.visibleEntries![entryIndex as number].commitHash,
|
||||
event,
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
file: changelogManager!.visibleEntries![entryIndex as number],
|
||||
plugin
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function isVersionClickable(entryIndex: number | string): boolean {
|
||||
if (
|
||||
changelogManager?.visibleEntries === undefined ||
|
||||
typeof entryIndex === 'string'
|
||||
) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
changelogFileClick(
|
||||
event,
|
||||
changelogManager.visibleEntries[entryIndex],
|
||||
plugin,
|
||||
changelogManager.visibleEntries[entryIndex + 1]?.commitHash,
|
||||
changelogManager.visibleEntries[entryIndex].commitHash
|
||||
);
|
||||
return canOpenInDiffView({
|
||||
aReference: changelogManager.visibleEntries[entryIndex + 1]?.commitHash,
|
||||
bReference: changelogManager.visibleEntries[entryIndex].commitHash,
|
||||
file: changelogManager.visibleEntries[entryIndex]
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
@ -183,7 +210,7 @@
|
|||
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<div
|
||||
class="tree-item-self git-changelog-file-changelog-entry is-clickable nav-file-title"
|
||||
class="git-changelog-align-file nav-file-title is-clickable git-changelog-file-changelog-entry"
|
||||
aria-label={composeAriaLabel(entry)}
|
||||
data-tooltip-position="bottom"
|
||||
onclick={// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
||||
|
|
@ -191,69 +218,39 @@
|
|||
primaryClick(event, index);
|
||||
}}
|
||||
>
|
||||
<div class="git-changelog-changelog-date">
|
||||
{composeVersionTitle({
|
||||
interval: plugin.settings.fileChangelogInterval,
|
||||
plugin,
|
||||
timezoneAdjustedEntryDate: entry.timezoneAdjustedDate
|
||||
})}
|
||||
</div>
|
||||
|
||||
<div class="file-actions git-changelog-status-tag">
|
||||
{#if entry.fromPathGitRelative === undefined}
|
||||
<span
|
||||
class="git-changelog-stat-color nav-file-tag"
|
||||
data-type={entry.status}
|
||||
>
|
||||
Created
|
||||
</span>
|
||||
{:else}
|
||||
{#if isMoved(entry)}
|
||||
<span
|
||||
class="git-changelog-stat-color nav-file-tag"
|
||||
data-type="F"
|
||||
>
|
||||
Moved
|
||||
</span>
|
||||
{/if}
|
||||
|
||||
{#if isRenamed(entry)}
|
||||
<span
|
||||
class="git-changelog-stat-color nav-file-tag"
|
||||
data-type="R"
|
||||
>
|
||||
Renamed
|
||||
</span>
|
||||
{/if}
|
||||
{/if}
|
||||
{#if entry.textDiffStats?.baseStats !== undefined && entry.textDiffStats.baseStats.additions + entry.textDiffStats.baseStats.deletions > 0}
|
||||
<span class="git-changelog-margin-left">
|
||||
<DiffStatsComponent
|
||||
baseStats={entry.textDiffStats
|
||||
? {
|
||||
additions: entry.textDiffStats.baseStats.additions,
|
||||
deletions: entry.textDiffStats.baseStats.deletions
|
||||
}
|
||||
: undefined}
|
||||
inFileExplorer={false}
|
||||
file={entry}
|
||||
inFileChangelog={true}
|
||||
/></span
|
||||
>
|
||||
{/if}
|
||||
<div class="git-changelog-file-name-container">
|
||||
<div
|
||||
class="git-changelog-one-line {isVersionClickable(index)
|
||||
? ''
|
||||
: 'git-changelog-faint'}"
|
||||
>
|
||||
{composeVersionTitle({
|
||||
interval: plugin.settings.fileChangelogInterval,
|
||||
plugin,
|
||||
timezoneAdjustedEntryDate: entry.timezoneAdjustedDate
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
<DiffStatsComponent
|
||||
baseStats={entry.textDiffStats
|
||||
? {
|
||||
additions: entry.textDiffStats.baseStats.additions,
|
||||
deletions: entry.textDiffStats.baseStats.deletions
|
||||
}
|
||||
: undefined}
|
||||
inFileExplorer={false}
|
||||
file={entry}
|
||||
inFileChangelog={true}
|
||||
/>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
{/each}
|
||||
<div bind:this={sentinel} id="sentinel"></div>
|
||||
{:else if changelogState === FileChangelogState.Recomputing}
|
||||
<div class="pane-empty">Loading...</div>
|
||||
{:else if changelogState === FileChangelogState.NoMarkdownFileOpen}
|
||||
<div class="pane-empty">No markdown file opened.</div>
|
||||
{:else if changelogState === FileChangelogState.EmptyHistory}
|
||||
{:else}
|
||||
<div class="pane-empty">File has no Git history.</div>
|
||||
{:else if changelogState === FileChangelogState.GitIgnoredFileOpen}
|
||||
<div class="pane-empty">File is ignored by Git.</div>
|
||||
{/if}
|
||||
</div>
|
||||
</DependenciesStatusCheck>
|
||||
|
|
@ -265,21 +262,6 @@
|
|||
align-items: center;
|
||||
width: 100%;
|
||||
padding-left: var(--size-4-2);
|
||||
}
|
||||
|
||||
.git-changelog-margin-left {
|
||||
margin-left: var(--size-2-3);
|
||||
}
|
||||
|
||||
.git-changelog-status-tag {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: 0px;
|
||||
overflow: hidden;
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
min-width: 0;
|
||||
width: 100%;
|
||||
justify-content: flex-end;
|
||||
justify-content: space-between; // Better space distribution
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -228,13 +228,11 @@
|
|||
{#if changelogState === VaultChangelogState.HasEntries}
|
||||
<!-- eslint-disable-next-line @typescript-eslint/no-non-null-assertion -->
|
||||
{#each changelogManager!.visibleEntries! as version}
|
||||
<div class="tree-item nav-folder mod-root">
|
||||
<VersionComponent
|
||||
{version}
|
||||
{plugin}
|
||||
showFilesCountSummaries={showFilesCountSummariesMode}
|
||||
/>
|
||||
</div>
|
||||
<VersionComponent
|
||||
{version}
|
||||
{plugin}
|
||||
showFilesCountSummaries={showFilesCountSummariesMode}
|
||||
/>
|
||||
{/each}
|
||||
<div bind:this={sentinel} id="sentinel"></div>
|
||||
{:else if changelogState === VaultChangelogState.Recomputing}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
import { OPEN_FILE_ICON } from 'constants.ts';
|
||||
import { isFileRenamedOrMoved } from 'core/gitOperations/helper.ts';
|
||||
import { setIcon, TFile } from 'obsidian';
|
||||
import { DiffFileStatus } from 'types.ts';
|
||||
import { mayTriggerFileMenu } from 'utils.ts';
|
||||
import {
|
||||
canOpenInDiffView,
|
||||
changelogFileClick,
|
||||
getDisplayPath,
|
||||
openFile
|
||||
|
|
@ -32,23 +32,16 @@
|
|||
}: Properties = $props();
|
||||
const buttons: HTMLElement[] = $state([]);
|
||||
|
||||
const ariaLabel = $derived(
|
||||
isFileRenamedOrMoved(file.status)
|
||||
? `${file.fromPathGitRelative} →\n${file.pathGitRelative}`
|
||||
: file.pathGitRelative
|
||||
);
|
||||
const ariaLabel = isFileRenamedOrMoved(file.status)
|
||||
? `${file.fromPathGitRelative} →\n${file.pathGitRelative}`
|
||||
: file.pathGitRelative;
|
||||
|
||||
const fileStatusText = $derived(
|
||||
isFileRenamedOrMoved(file.status) ? DiffFileStatus.Renamed : file.status
|
||||
);
|
||||
// This isn't perfect because some old file path could match an unrelated file's current path in the current state of the vault.
|
||||
const relativeVaultPath = $state(
|
||||
plugin.getGitPlugin().gitManager.getRelativeVaultPath(file.pathGitRelative)
|
||||
);
|
||||
const relativeVaultPath = plugin
|
||||
.getGitPlugin()
|
||||
.gitManager.getRelativeVaultPath(file.pathGitRelative);
|
||||
|
||||
const tFile = $derived(
|
||||
plugin.app.vault.getAbstractFileByPath(relativeVaultPath)
|
||||
);
|
||||
const tFile = plugin.app.vault.getAbstractFileByPath(relativeVaultPath);
|
||||
|
||||
$effect(() => {
|
||||
for (const b of buttons) {
|
||||
|
|
@ -59,17 +52,27 @@
|
|||
}
|
||||
});
|
||||
|
||||
function mainClick(event: MouseEvent): void {
|
||||
changelogFileClick(
|
||||
const isClickable = canOpenInDiffView({
|
||||
aReference: previousDayLastCommitHash ?? currentDayCommitHash,
|
||||
bReference: currentDayCommitHash,
|
||||
file
|
||||
});
|
||||
|
||||
function primaryClick(event: MouseEvent): void {
|
||||
event.stopPropagation();
|
||||
|
||||
if (!isClickable) return;
|
||||
changelogFileClick({
|
||||
aReference: previousDayLastCommitHash ?? currentDayCommitHash,
|
||||
bReference: currentDayCommitHash,
|
||||
event,
|
||||
file,
|
||||
plugin,
|
||||
previousDayLastCommitHash ?? currentDayCommitHash,
|
||||
currentDayCommitHash
|
||||
);
|
||||
plugin
|
||||
});
|
||||
}
|
||||
|
||||
function openVaultFile(event: MouseEvent): void {
|
||||
event.stopPropagation();
|
||||
openFile({ event, file, plugin, relativeVaultPath });
|
||||
}
|
||||
</script>
|
||||
|
|
@ -78,12 +81,12 @@
|
|||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
|
||||
<div
|
||||
class="tree-item-self git-changelog-align-file nav-file-title
|
||||
class="git-changelog-align-file nav-file-title
|
||||
'is-clickable'"
|
||||
data-path={relativeVaultPath}
|
||||
data-tooltip-position="bottom"
|
||||
aria-label={ariaLabel}
|
||||
onclick={mainClick}
|
||||
onclick={primaryClick}
|
||||
onauxclick={// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
||||
(event) => {
|
||||
event.stopPropagation();
|
||||
|
|
@ -100,13 +103,15 @@
|
|||
});
|
||||
}
|
||||
} else {
|
||||
mainClick(event);
|
||||
primaryClick(event);
|
||||
}
|
||||
}}
|
||||
data-type={file.status}
|
||||
>
|
||||
<div class="git-changelog-file-name-container">
|
||||
<div class="git-changelog-one-line">
|
||||
<div
|
||||
class="git-changelog-one-line {isClickable ? '' : 'git-changelog-faint'}"
|
||||
>
|
||||
{getDisplayPath(file.pathGitRelative)}
|
||||
</div>
|
||||
{#if tFile instanceof TFile && !!plugin.app.viewRegistry?.getTypeByExtension(tFile.extension)}
|
||||
|
|
@ -120,53 +125,18 @@
|
|||
></div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="diff-file-stats">
|
||||
<DiffStatsComponent
|
||||
inFileChangelog={false}
|
||||
baseStats={file.textDiffStats
|
||||
? {
|
||||
additions: file.textDiffStats.baseStats.additions,
|
||||
deletions: file.textDiffStats.baseStats.deletions
|
||||
}
|
||||
: undefined}
|
||||
{file}
|
||||
/>
|
||||
|
||||
<span
|
||||
class="git-changelog-stat-color git-changelog-file-status-letter"
|
||||
data-type={file.status}
|
||||
>
|
||||
<!-- {#if file.status !== DiffFileStatus.Modified} -->
|
||||
{fileStatusText}
|
||||
<!-- {/if} -->
|
||||
</span>
|
||||
</div>
|
||||
<DiffStatsComponent
|
||||
inFileChangelog={false}
|
||||
baseStats={file.textDiffStats
|
||||
? {
|
||||
additions: file.textDiffStats.baseStats.additions,
|
||||
deletions: file.textDiffStats.baseStats.deletions
|
||||
}
|
||||
: undefined}
|
||||
{file}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.diff-file-stats {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--size-4-3);
|
||||
padding-right: 0px;
|
||||
flex: 1 1 auto;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.git-changelog-align-file {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.git-changelog-file-name-container {
|
||||
display: flex;
|
||||
min-width: 54px;
|
||||
margin-right: var(--size-2-3);
|
||||
gap: var(--size-4-1);
|
||||
|
||||
.open-file-icon {
|
||||
padding: 0 4px;
|
||||
height: 16px;
|
||||
min-width: min-content;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -22,33 +22,31 @@
|
|||
|
||||
const { filesSummary }: Properties = $props();
|
||||
|
||||
const iconElements = $state<Record<string, HTMLElement>>({});
|
||||
const iconElements: Record<string, HTMLElement> = {};
|
||||
|
||||
const stats = $derived<SummaryStat[]>(
|
||||
[
|
||||
{
|
||||
count: filesSummary.addedFiles,
|
||||
icon: FILE_ADDED_ICON,
|
||||
type: DiffFileStatus.Added
|
||||
},
|
||||
const stats: SummaryStat[] = [
|
||||
{
|
||||
count: filesSummary.addedFiles,
|
||||
icon: FILE_ADDED_ICON,
|
||||
type: DiffFileStatus.Added
|
||||
},
|
||||
|
||||
{
|
||||
count: filesSummary.modifiedFiles,
|
||||
icon: FILE_MODIFIED_ICON,
|
||||
type: DiffFileStatus.Modified
|
||||
},
|
||||
{
|
||||
count: filesSummary.renamedFiles,
|
||||
icon: FILE_RENAMED_ICON,
|
||||
type: DiffFileStatus.Renamed
|
||||
},
|
||||
{
|
||||
count: filesSummary.deletedFiles,
|
||||
icon: FILE_DELETED_ICON,
|
||||
type: DiffFileStatus.Deleted
|
||||
}
|
||||
].filter((stat) => stat.count > 0)
|
||||
);
|
||||
{
|
||||
count: filesSummary.modifiedFiles,
|
||||
icon: FILE_MODIFIED_ICON,
|
||||
type: DiffFileStatus.Modified
|
||||
},
|
||||
{
|
||||
count: filesSummary.renamedFiles,
|
||||
icon: FILE_RENAMED_ICON,
|
||||
type: DiffFileStatus.Renamed
|
||||
},
|
||||
{
|
||||
count: filesSummary.deletedFiles,
|
||||
icon: FILE_DELETED_ICON,
|
||||
type: DiffFileStatus.Deleted
|
||||
}
|
||||
].filter((stat) => stat.count > 0);
|
||||
|
||||
$effect(() => {
|
||||
for (const [type, element] of Object.entries(iconElements)) {
|
||||
|
|
@ -59,6 +57,10 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
function setStatIcon(node: HTMLElement, icon: string): void {
|
||||
setIcon(node, icon);
|
||||
}
|
||||
</script>
|
||||
|
||||
{#each stats as stat}
|
||||
|
|
@ -66,7 +68,7 @@
|
|||
<span
|
||||
class="icon git-changelog-stat-color"
|
||||
data-type={stat.type}
|
||||
bind:this={iconElements[stat.type]}
|
||||
use:setStatIcon={stat.icon}
|
||||
></span>
|
||||
<span class="number git-changelog-stat-color" data-type={stat.type}>
|
||||
{stat.count}
|
||||
|
|
|
|||
|
|
@ -18,21 +18,19 @@
|
|||
|
||||
const { plugin, showFilesCountSummaries, version }: Properties = $props();
|
||||
|
||||
const formattedDate = $derived(
|
||||
composeVersionTitle({
|
||||
interval: plugin.settings.vaultChangelogInterval,
|
||||
plugin,
|
||||
timezoneAdjustedEntryDate: version.timezoneAdjustedDate
|
||||
})
|
||||
);
|
||||
const formattedDate = composeVersionTitle({
|
||||
interval: plugin.settings.vaultChangelogInterval,
|
||||
plugin,
|
||||
timezoneAdjustedEntryDate: version.timezoneAdjustedDate
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
||||
{#if !version.isInitialCommit()}
|
||||
<div class="tree-item nav-folder" class:is-collapsed={version.isCollapsed}>
|
||||
<div class:is-collapsed={version.isCollapsed}>
|
||||
<div
|
||||
class="tree-item-self is-clickable nav-folder-title git-changelog-bottom-padding"
|
||||
class="tree-item-self is-clickable git-changelog-bottom-padding"
|
||||
data-tooltip-position="bottom"
|
||||
onclick={/* eslint-disable-next-line @typescript-eslint/explicit-function-return-type */
|
||||
() => {
|
||||
|
|
@ -104,7 +102,7 @@
|
|||
</div>
|
||||
{#if !version.isCollapsed}
|
||||
<div
|
||||
class="tree-item-children nav-folder-children"
|
||||
class="tree-item-children"
|
||||
transition:slide|local={// eslint-disable-next-line no-magic-numbers
|
||||
{ duration: 150 }}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
MINUS_ICON,
|
||||
PLUS_ICON
|
||||
} from 'constants.ts';
|
||||
import { DiffFileStatus } from 'types.ts';
|
||||
import { formatDiffFileType } from 'Views/formatters.ts';
|
||||
|
||||
import StatComponent from './Stat.svelte';
|
||||
|
|
@ -25,9 +26,9 @@
|
|||
}
|
||||
const { baseStats, file, inFileChangelog }: Properties = $props();
|
||||
|
||||
const isFileStat = $derived(file !== undefined);
|
||||
const isFileStat = file !== undefined;
|
||||
|
||||
const stats = $derived<StatEntry[]>([
|
||||
const stats: StatEntry[] = [
|
||||
{
|
||||
count: baseStats?.additions ?? 0,
|
||||
icon: isFileStat ? PLUS_ICON : ADDITIONS_ICON,
|
||||
|
|
@ -38,56 +39,100 @@
|
|||
icon: isFileStat ? MINUS_ICON : DELETIONS_ICON,
|
||||
type: 'Deletions'
|
||||
}
|
||||
]);
|
||||
];
|
||||
|
||||
// BUG: not reactive?
|
||||
const findIndex = $derived(
|
||||
stats.findIndex((stat) => stat.count !== undefined && stat.count > 0)
|
||||
const findIndex = stats.findIndex(
|
||||
(stat) => stat.count !== undefined && stat.count > 0
|
||||
);
|
||||
|
||||
const firstAppearingStat = $derived(findIndex === -1 ? Infinity : findIndex);
|
||||
function getFirstAppearingStat(): number {
|
||||
if (file?.status === DiffFileStatus.Modified) {
|
||||
if (findIndex === -1) {
|
||||
return Infinity;
|
||||
}
|
||||
return findIndex;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// BUG: not reactive
|
||||
const statVisibilities = $derived(
|
||||
stats.map((stat) => stat.count !== undefined && stat.count > 0)
|
||||
const firstAppearingStat = getFirstAppearingStat();
|
||||
|
||||
const statVisibilities = stats.map(
|
||||
(stat) => stat.count !== undefined && stat.count > 0
|
||||
);
|
||||
</script>
|
||||
|
||||
<div
|
||||
class=" {isFileStat ? 'git-changelog-stats-container' : 'git-changelog-stat'}"
|
||||
class={isFileStat ? 'git-changelog-stats-container' : 'git-changelog-stat'}
|
||||
>
|
||||
{#if baseStats === undefined && isFileStat}
|
||||
{#if !inFileChangelog}
|
||||
<span class="nav-file-tag git-changelog-file-type-tag">
|
||||
{formatDiffFileType(
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
file!
|
||||
)}
|
||||
</span>
|
||||
{/if}
|
||||
{:else if !stats.some((stat) => stat.count > 0) && !isFileStat}
|
||||
{#if stats.every((stat) => stat.count === 0) && !isFileStat}
|
||||
<StatComponent {isFileStat} isInvisible={false} />
|
||||
{:else}
|
||||
{#each stats as stat, index}
|
||||
{#if statVisibilities[index] || firstAppearingStat < index}
|
||||
<StatComponent
|
||||
{stat}
|
||||
{isFileStat}
|
||||
isInvisible={!statVisibilities[index]}
|
||||
/>
|
||||
<div class="diff-file-stats">
|
||||
<!-- File status indicators -->
|
||||
{#if isFileStat}
|
||||
{#if file.status === DiffFileStatus.RenamedAndMoved}
|
||||
<div class=" git-changelog-renamed-and-moved">
|
||||
<div
|
||||
class="git-changelog-stat-color git-changelog-file-status-letter"
|
||||
data-type={DiffFileStatus.Moved}
|
||||
>
|
||||
M
|
||||
</div>
|
||||
<div
|
||||
class="git-changelog-stat-color git-changelog-file-status-letter"
|
||||
data-type={DiffFileStatus.Renamed}
|
||||
>
|
||||
{DiffFileStatus.Renamed}
|
||||
</div>
|
||||
</div>
|
||||
{:else if file.status !== DiffFileStatus.Modified}
|
||||
<span
|
||||
class="git-changelog-stat-color git-changelog-file-status-letter"
|
||||
data-type={file.status}
|
||||
>
|
||||
{file.status === DiffFileStatus.Moved ? 'M' : file.status}
|
||||
</span>
|
||||
{/if}
|
||||
{/if}
|
||||
{/each}
|
||||
|
||||
{#if baseStats === undefined && isFileStat && !inFileChangelog}
|
||||
<span class="nav-file-tag git-changelog-file-type-tag">
|
||||
{formatDiffFileType(file)}
|
||||
</span>
|
||||
{:else}
|
||||
{#each stats as stat, index}
|
||||
{#if statVisibilities[index] || firstAppearingStat < index}
|
||||
<StatComponent
|
||||
{stat}
|
||||
{isFileStat}
|
||||
isInvisible={!statVisibilities[index]}
|
||||
/>
|
||||
{/if}
|
||||
{/each}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.diff-file-stats {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--size-4-3);
|
||||
padding-right: 0px;
|
||||
justify-content: flex-end;
|
||||
margin-left: auto; // Add this to push content to the right
|
||||
}
|
||||
|
||||
.git-changelog-stats-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
vertical-align: middle;
|
||||
gap: var(--size-4-3);
|
||||
justify-content: flex-end;
|
||||
justify-content: flex-end; // Change from end to flex-end
|
||||
min-width: fit-content; // Prevent shrinking when space is tight
|
||||
}
|
||||
|
||||
.git-changelog-file-type-tag {
|
||||
|
|
|
|||
|
|
@ -30,12 +30,17 @@
|
|||
function getStatCount(): number {
|
||||
return stat?.count ?? 0;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line capitalized-comments
|
||||
// const shrinkableClass =
|
||||
// eslint-disable-next-line capitalized-comments
|
||||
// isFileStat && isInvisible ? 'git-changelog-shrinkable' : '';
|
||||
</script>
|
||||
|
||||
<span
|
||||
class={isFileStat
|
||||
? 'git-changelog-stat-item-file'
|
||||
: 'git-changelog-stat-item'}
|
||||
class={`${
|
||||
isFileStat ? 'git-changelog-stat-item-file' : 'git-changelog-stat-item'
|
||||
} `}
|
||||
>
|
||||
<span
|
||||
class="{isFileStat ? 'file-icon' : 'icon'} git-changelog-stat-color"
|
||||
|
|
@ -53,4 +58,8 @@
|
|||
</span>
|
||||
|
||||
<style lang="scss">
|
||||
// Doesn't work currently. It should make the invisible stats that are used to maintain the table structure shrink when space gets tight. Additionally, the diff-file-stats in DiffStats.svelte still enforces a gap.
|
||||
.git-changelog-shrinkable {
|
||||
min-width: 0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -7,21 +7,38 @@ import type { DiffFile } from '../types.ts';
|
|||
|
||||
import { getNewLeaf } from '../utils.ts';
|
||||
|
||||
export function changelogFileClick(
|
||||
event: MouseEvent,
|
||||
file: DiffFile,
|
||||
plugin: GitChangelogPlugin,
|
||||
aReference?: string,
|
||||
bReference?: string
|
||||
): void {
|
||||
event.stopPropagation();
|
||||
if (file.textDiffStats && aReference && bReference) {
|
||||
export function changelogFileClick({
|
||||
aReference,
|
||||
bReference,
|
||||
event,
|
||||
file,
|
||||
plugin
|
||||
}: {
|
||||
aReference: string;
|
||||
bReference: string;
|
||||
event: MouseEvent;
|
||||
file: DiffFile;
|
||||
plugin: GitChangelogPlugin;
|
||||
}): void {
|
||||
if (canOpenInDiffView({ aReference, bReference, file })) {
|
||||
// Show the diff that compares that version to the version from the previous day or if some other interval were specified
|
||||
|
||||
showDiff(event, file, plugin, aReference, bReference);
|
||||
}
|
||||
}
|
||||
|
||||
export function canOpenInDiffView({
|
||||
aReference,
|
||||
bReference,
|
||||
file
|
||||
}: {
|
||||
aReference?: string;
|
||||
bReference?: string;
|
||||
file: DiffFile;
|
||||
}): boolean {
|
||||
return !!(file.textDiffStats && aReference && bReference);
|
||||
}
|
||||
|
||||
export function getActiveGitFileFromView(
|
||||
activeFileView: MarkdownView | null,
|
||||
plugin: GitChangelogPlugin
|
||||
|
|
@ -64,11 +81,10 @@ export function openFile({
|
|||
relativeVaultPath
|
||||
}: {
|
||||
event: MouseEvent;
|
||||
file: DiffFile;
|
||||
file?: DiffFile;
|
||||
plugin: GitChangelogPlugin;
|
||||
relativeVaultPath: string;
|
||||
}): void {
|
||||
event.stopPropagation();
|
||||
const obsidianFile =
|
||||
plugin.app.vault.getAbstractFileByPath(relativeVaultPath);
|
||||
|
||||
|
|
@ -78,16 +94,9 @@ export function openFile({
|
|||
.catch((error) => {
|
||||
plugin.displayError(error);
|
||||
});
|
||||
} else if (relativeVaultPath === undefined) {
|
||||
if (file.fromPathGitRelative) {
|
||||
plugin.displayNotice(
|
||||
"Can't open this version of the file because it doesn't exist in the vault anymore."
|
||||
);
|
||||
} else {
|
||||
plugin.displayNotice('This is the initial version. No diff to show.');
|
||||
}
|
||||
} else if (obsidianFile === undefined) {
|
||||
plugin.displayNotice(`Can't open ${file.pathGitRelative}.`);
|
||||
const fileNameToShow = file?.pathGitRelative ?? relativeVaultPath;
|
||||
plugin.displayNotice(`Can't open ${fileNameToShow}.`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,14 +4,24 @@
|
|||
justify-content: center;
|
||||
}
|
||||
|
||||
.git-changelog-disabled {
|
||||
.git-changelog-faint {
|
||||
opacity: 0.5;
|
||||
// color: var(--text-faint);
|
||||
}
|
||||
|
||||
.git-changelog-disabled {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.git-changelog-warning {
|
||||
border-bottom: 1px solid var(--text-warning);
|
||||
}
|
||||
|
||||
.git-changelog-align-file {
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
}
|
||||
// Status colors
|
||||
.git-changelog-stat-color {
|
||||
opacity: var(--git-changelog-opacity);
|
||||
|
|
@ -130,23 +140,39 @@
|
|||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.git-changelog-changelog-date {
|
||||
@extend .git-changelog-one-line;
|
||||
flex: 0 1 auto;
|
||||
min-width: min-content;
|
||||
margin-right: var(--size-4-2);
|
||||
.git-changelog-file-name-container {
|
||||
display: flex;
|
||||
min-width: 54px;
|
||||
margin-right: var(--size-2-3);
|
||||
gap: var(--size-4-1);
|
||||
|
||||
.open-file-icon {
|
||||
padding: 0 4px;
|
||||
height: 16px;
|
||||
min-width: min-content;
|
||||
}
|
||||
}
|
||||
|
||||
.git-changelog-file-status-letter {
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
margin-right: 0;
|
||||
width: 0.9em;
|
||||
margin-right: var(--size-4-1);
|
||||
// width: 0.9em;
|
||||
flex-shrink: 2;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.git-changelog-renamed-and-moved {
|
||||
// text-overflow: clip;
|
||||
display: flex;
|
||||
margin-left: auto;
|
||||
min-width: min-content;
|
||||
// overflow: hidden;
|
||||
// white-space: nowrap;
|
||||
gap: var(--size-2-2);
|
||||
}
|
||||
|
||||
/* Sticky view header and padding fixes */
|
||||
.workspace-leaf-content {
|
||||
&[data-type='vault-changelog-view'] .view-content,
|
||||
|
|
|
|||
Loading…
Reference in a new issue