8f8f3bd465
* Add flag for enabling insert symbols feature * Add symbols overlay directory * Detect if :xy is inserted into editable * Allow naive updating of overlay, and special handling of ':' * First step towards better Virtual Element support * Update floating to reference range on insert text * Position SymbolsOverlay always on top or bottom * Add a data-provider to emulate API * Show correct suggestions in symbols overlay * Rename to replacementLength * Allow replacing via clicking in menu * Optionally remove inline padding of Popover * Hide Symbols overlay on blur of content editable * Add specialKey to inputHandler and generalize how arrow movement is detected - This way macOS users can use Ctrl-N to mean down, etc. * Detect special key from within SymbolsOverlay * Implement full backwards search while typing * Allow navigating symbol menu and accepting with enter * Add some entries to data-provider * Satisfy eslint * Generate symbolsTable from sources * Use other github source, allow multiple names In return, symbol must be unique * Automatically scroll in symbols dropdown * Use from npm packages rather than downloading from URL * Remove console.log * Remove print * Add pointerDown event to input-handler - so that SymbolsOverlay can reset on field click * Make tab do the same as enter * Make font a bit smaller but increase relative icon size * Satisfy type requirement of handlerlist * Revert changing default size of DropdownItems * Remove some now unused code for bootstrap dropdowns
41 lines
969 B
Svelte
41 lines
969 B
Svelte
<!--
|
|
Copyright: Ankitects Pty Ltd and contributors
|
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
-->
|
|
<script>
|
|
import { pageTheme } from "../sveltelib/theme";
|
|
</script>
|
|
|
|
<div class="popover" class:dark={$pageTheme.isDark} on:mousedown|preventDefault>
|
|
<slot />
|
|
</div>
|
|
|
|
<style lang="scss">
|
|
.popover {
|
|
border-radius: 5px;
|
|
background-color: var(--frame-bg);
|
|
min-width: 1rem;
|
|
max-width: 95vw;
|
|
|
|
/* Needs this much space for FloatingArrow to be positioned */
|
|
padding: var(--popover-padding-block, 6px) var(--popover-padding-inline, 6px);
|
|
|
|
font-size: 1rem;
|
|
color: var(--text-fg);
|
|
|
|
/* outer border */
|
|
border: 1px solid #b6b6b6;
|
|
|
|
&.dark {
|
|
border-color: #060606;
|
|
}
|
|
|
|
/* inner border */
|
|
box-shadow: inset 0 0 0 1px #eeeeee;
|
|
|
|
&.dark {
|
|
box-shadow: inset 0 0 0 1px #565656;
|
|
}
|
|
}
|
|
</style>
|