mirror of
https://github.com/quorafind/Obsidian-Float-Search.git
synced 2026-07-22 07:30:25 +00:00
Compare commits
16 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16fcf917a6 | ||
|
|
fd4bf87a1f | ||
|
|
1e1ee35f9d | ||
|
|
e3201d9ed6 | ||
|
|
8cb09f6345 | ||
|
|
e1b2a6e2db | ||
|
|
3896bcfc34 | ||
|
|
8953f2175d | ||
|
|
c3d9e96b19 | ||
|
|
e56db18fae | ||
|
|
aa638ee588 | ||
|
|
4bb81fa23e | ||
|
|
81fb30c532 | ||
|
|
9875f56314 | ||
|
|
ab7c600b3c | ||
|
|
9b7a38f0f2 |
7 changed files with 1016 additions and 82 deletions
|
|
@ -1,15 +1,10 @@
|
||||||
{
|
{
|
||||||
"id": "float-search",
|
"id": "float-search",
|
||||||
"name": "Floating Search",
|
"name": "Floating Search",
|
||||||
"version": "4.0.0",
|
"version": "4.3.0",
|
||||||
"minAppVersion": "0.15.0",
|
"minAppVersion": "1.2.0",
|
||||||
"description": "You can use search view in modal/leaf/popout window now.",
|
"description": "You can use search view in modal/leaf/popout window now.",
|
||||||
"author": "Boninall",
|
"author": "Boninall",
|
||||||
"authorUrl": "https://github.com/Quorafind",
|
"authorUrl": "https://github.com/Quorafind",
|
||||||
"fundingUrl": {
|
|
||||||
"Buy Me a Coffee": "https://www.buymeacoffee.com/boninall",
|
|
||||||
"爱发电": "https://afdian.net/a/boninall",
|
|
||||||
"支付宝": "https://cdn.jsdelivr.net/gh/Quorafind/.github@main/IMAGE/%E6%94%AF%E4%BB%98%E5%AE%9D%E4%BB%98%E6%AC%BE%E7%A0%81.jpg"
|
|
||||||
},
|
|
||||||
"isDesktopOnly": false
|
"isDesktopOnly": false
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "float-search",
|
"name": "float-search",
|
||||||
"version": "4.0.0",
|
"version": "4.3.0",
|
||||||
"description": "You can use search view in modal/leaf/popout window now.",
|
"description": "You can use search view in modal/leaf/popout window now.",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
"@typescript-eslint/parser": "5.29.0",
|
"@typescript-eslint/parser": "5.29.0",
|
||||||
"builtin-modules": "3.3.0",
|
"builtin-modules": "3.3.0",
|
||||||
"esbuild": "0.14.47",
|
"esbuild": "0.14.47",
|
||||||
"obsidian": "^1.7.2",
|
"obsidian": "^1.12.3",
|
||||||
"tslib": "2.4.0",
|
"tslib": "2.4.0",
|
||||||
"typescript": "4.7.4"
|
"typescript": "4.7.4"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ importers:
|
||||||
specifier: 0.14.47
|
specifier: 0.14.47
|
||||||
version: 0.14.47
|
version: 0.14.47
|
||||||
obsidian:
|
obsidian:
|
||||||
specifier: ^1.7.2
|
specifier: ^1.12.3
|
||||||
version: 1.7.2(@codemirror/state@6.2.1)(@codemirror/view@6.18.1)
|
version: 1.12.3(@codemirror/state@6.2.1)(@codemirror/view@6.18.1)
|
||||||
tslib:
|
tslib:
|
||||||
specifier: 2.4.0
|
specifier: 2.4.0
|
||||||
version: 2.4.0
|
version: 2.4.0
|
||||||
|
|
@ -486,7 +486,7 @@ packages:
|
||||||
|
|
||||||
glob@7.2.3:
|
glob@7.2.3:
|
||||||
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
|
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
|
||||||
deprecated: Glob versions prior to v9 are no longer supported
|
deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
|
||||||
|
|
||||||
globals@13.24.0:
|
globals@13.24.0:
|
||||||
resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==}
|
resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==}
|
||||||
|
|
@ -602,11 +602,11 @@ packages:
|
||||||
natural-compare@1.4.0:
|
natural-compare@1.4.0:
|
||||||
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
|
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
|
||||||
|
|
||||||
obsidian@1.7.2:
|
obsidian@1.12.3:
|
||||||
resolution: {integrity: sha512-k9hN9brdknJC+afKr5FQzDRuEFGDKbDjfCazJwpgibwCAoZNYHYV8p/s3mM8I6AsnKrPKNXf8xGuMZ4enWelZQ==}
|
resolution: {integrity: sha512-HxWqe763dOqzXjnNiHmAJTRERN8KILBSqxDSEqbeSr7W8R8Jxezzbca+nz1LiiqXnMpM8lV2jzAezw3CZ4xNUw==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@codemirror/state': ^6.0.0
|
'@codemirror/state': 6.5.0
|
||||||
'@codemirror/view': ^6.0.0
|
'@codemirror/view': 6.38.6
|
||||||
|
|
||||||
once@1.4.0:
|
once@1.4.0:
|
||||||
resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
|
resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
|
||||||
|
|
@ -1316,7 +1316,7 @@ snapshots:
|
||||||
|
|
||||||
natural-compare@1.4.0: {}
|
natural-compare@1.4.0: {}
|
||||||
|
|
||||||
obsidian@1.7.2(@codemirror/state@6.2.1)(@codemirror/view@6.18.1):
|
obsidian@1.12.3(@codemirror/state@6.2.1)(@codemirror/view@6.18.1):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@codemirror/state': 6.2.1
|
'@codemirror/state': 6.2.1
|
||||||
'@codemirror/view': 6.18.1
|
'@codemirror/view': 6.18.1
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -86,7 +86,7 @@ export class EmbeddedView extends nosuper(HoverPopover) {
|
||||||
document: Document = this.targetEl?.ownerDocument ?? window.activeDocument ?? window.document;
|
document: Document = this.targetEl?.ownerDocument ?? window.activeDocument ?? window.document;
|
||||||
|
|
||||||
id = genId(8);
|
id = genId(8);
|
||||||
bounce?: NodeJS.Timeout;
|
bounce?: number;
|
||||||
boundOnZoomOut: () => void;
|
boundOnZoomOut: () => void;
|
||||||
|
|
||||||
originalPath: string; // these are kept to avoid adopting targets w/a different link
|
originalPath: string; // these are kept to avoid adopting targets w/a different link
|
||||||
|
|
@ -221,7 +221,7 @@ export class EmbeddedView extends nosuper(HoverPopover) {
|
||||||
if (this.shouldShow()) {
|
if (this.shouldShow()) {
|
||||||
if (this.state === PopoverState.Hiding) {
|
if (this.state === PopoverState.Hiding) {
|
||||||
this.state = PopoverState.Shown;
|
this.state = PopoverState.Shown;
|
||||||
clearTimeout(this.timer);
|
window.clearTimeout(this.timer);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.state === PopoverState.Showing) {
|
if (this.state === PopoverState.Showing) {
|
||||||
|
|
@ -391,7 +391,7 @@ export class EmbeddedView extends nosuper(HoverPopover) {
|
||||||
// A timer might be pending to call show() for the first time, make sure
|
// A timer might be pending to call show() for the first time, make sure
|
||||||
// it doesn't bring us back up after we close
|
// it doesn't bring us back up after we close
|
||||||
if (this.timer) {
|
if (this.timer) {
|
||||||
clearTimeout(this.timer);
|
window.clearTimeout(this.timer);
|
||||||
this.timer = 0;
|
this.timer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
82
styles.css
82
styles.css
|
|
@ -9,6 +9,7 @@ If your plugin does not need CSS, delete this file.
|
||||||
.float-search-modal {
|
.float-search-modal {
|
||||||
width: 700px;
|
width: 700px;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
transition: width 0.15s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.float-search-modal.float-search-width {
|
.float-search-modal.float-search-width {
|
||||||
|
|
@ -147,3 +148,84 @@ body:not(.show-file-path) .search-result-file-title .search-result-file-path {
|
||||||
.fs-leaf-view .workspace-split {
|
.fs-leaf-view .workspace-split {
|
||||||
background-color: var(--background-primary);
|
background-color: var(--background-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── CMDK Modal ── */
|
||||||
|
.prompt.float-search-cmdk {
|
||||||
|
width: 700px;
|
||||||
|
max-width: 90vw;
|
||||||
|
transition: width 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prompt.float-search-cmdk.float-search-cmdk-expanded {
|
||||||
|
width: 1100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.float-search-cmdk-body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
height: 50vh;
|
||||||
|
max-height: 600px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.float-search-cmdk-body .prompt-results {
|
||||||
|
max-height: none;
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.float-search-cmdk-expanded .float-search-cmdk-body .prompt-results {
|
||||||
|
flex: 0 0 40%;
|
||||||
|
border-right: 1px solid var(--background-modifier-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.float-search-cmdk-preview {
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.float-search-cmdk-preview .view-header {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.float-search-cmdk-preview .view-content {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.float-search-cmdk-preview .fs-block {
|
||||||
|
height: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.float-search-cmdk-preview .fs-content {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.float-search-cmdk-preview .fs-content .workspace-split.mod-vertical {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.float-search-cmdk-preview .workspace-leaf-resize-handle {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-container.float-search-cmdk-container.mod-dim {
|
||||||
|
z-index: 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Quick Create item ── */
|
||||||
|
.float-search-cmdk-create-item {
|
||||||
|
border-top: 1px solid var(--background-modifier-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.float-search-cmdk-create-item .suggestion-title {
|
||||||
|
color: var(--text-accent);
|
||||||
|
font-weight: var(--font-semibold);
|
||||||
|
}
|
||||||
|
|
||||||
|
.float-search-cmdk-create-item .suggestion-flair {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: var(--text-accent);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,9 @@
|
||||||
"3.4.10": "0.15.0",
|
"3.4.10": "0.15.0",
|
||||||
"3.5.0": "0.15.0",
|
"3.5.0": "0.15.0",
|
||||||
"3.5.1": "0.15.0",
|
"3.5.1": "0.15.0",
|
||||||
"4.0.0": "0.15.0"
|
"4.0.0": "0.15.0",
|
||||||
|
"4.1.0": "0.15.0",
|
||||||
|
"4.1.1": "0.15.0",
|
||||||
|
"4.2.0": "1.2.0",
|
||||||
|
"4.3.0": "1.2.0"
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue