* [Major] Introduce a new `Ref` and `Path` type
This introduces a new `Ref` and `Path` type, which try to be as lightweight and rigorous as possible. More description in the PR
* [Minor] Updated Syntax
* [Minor] Updated Type
* [Minor] Renamed file
* [Minor] Updated type
* [Minor] Updated Syntax
* [Major] Rename css classes for wiki links
Previously all the parts of a wiki link were tagged with `sb-wiki-link-page`. This didn't make a whole lot of sense. Also the tag `sb-wiki-link` was could never render, because of the way `HighlightStyle` works. Now every part of a wiki link will be tagged with `sb-wiki-link` (i.e. the link, the alias, the dimensions). Invalid and missing links will be styled separately in a later commit.
* [Minor] Adjust to new API
* [Minor] Small changes
* [Minor] Function and file renames
* [Major] Syscall adjusments
Change behavior of `getCurrentPath` to actually return what's now considered a `Path`. `getCurrentPage(Meta)` now also correctly returns for documents. We could consider a rename to get rid of the `page` association
* [Major] Rework `Client`
Mostly minor adjustments for the new API. Some major changes in `navigateWithinPage` and some unecessary checks removed now
* [Major] Errors on navigate
This now throws an error when the user tries to navigate to a link that is invalid
* [Major] Minor adjustments and remove some old bulk
This does the typicall adjustments to the new API. A thing to consider is that invalid links aren't indexed. Also removed old code about template and query stuff. And reused a regex instead of copy pasting it.
* [Minor] Cleanup editor ui
* [Minor] Adjust to new API
* [Minor] Adjust to new API and reduce ugly regex
* [Minor] New API
* [Minor] Rework link cm plugin
* [Major] Rework wiki links
A lot of code cleanup, reworked for new APIs and also introduces "invalid links"
* [Minor] Part of the editor ui rework
* [Major] Adjust to new API
This also removes the `looksLikePathWithExtension` check. I don't think it was necessary.
* [Minor] PArt of editor ui rewrite
* [Minor] Adjust to new API
* [Major] Adjust renderer to new API
Invalid links now link to `#`
* [Major] Rewrite navigator
This still needs major rework, currently in a "got it working" state
* [Minor] Adjust file name
* [Minor] Mistake during rebase
* [Minor] Navigate to end of header
* [Minor] Remove `tweakEditorDOM` and use proper CM extensions
* [Major] Heavily clean up the navigation code
* [Minor] Make `PageNavigator` closable again
* [Minor] Small fixes to reduce errors bubbling up
* [Minor] Show error message if navigate fails
* [Major] Remove legacy `navigate({ kind = ` syntax
This removes the old navigation syntax. It's still supported but the user will be warned then using it. I also added some validation to editor.navigate for user provided refs.
* [Minor] Make notifications errors
* [Minor] Don't fail if header isn't found
* [Minor] Typo
* [Major] Remove cleanPageRef
* [Minor] Small bug
* [Minor] Align behavior between render and editor
* [Major] Remove `PageRef`. Pretty sure it's obsolete
* [Major] Remove pos from header as it's an invalid ref
* [Minor] Align with original behavior
* [Minor] Get tests working again
* [Minor] check that indexPage is valid
* [Major] Rewrite `resolve.ts` file
* [Minor] More tests, more fixes
* [Minor] Don't just append .md this is weird
* [Minor] More edge cases
* [Minor] Version bumping hono somehow fixes the `/` case
* [Minor] Smaller TODOs
* [Major] We can be a littler looser on the restrictions
* [Major] Change header indexing, to index with pos
* [Minor] More fixes for headers
* [Minor] Rename for clarity
* [Minor] Change more regexes to named groups
* [Major] Inline content rewrite
* [Minor] Fix TODO
* [Minor] Bump index version
* [Major] New Space Primitive to check paths
* [Minor] Fix #1214
* [Minor] Fix #1169
* [Minor] Remove TODO
This check is probably not needed anymore. Unsure. May look into it later
* [Minor] small bug
* [Minor] Not a good rebase without me needing to fix it afterwards
* [Minor] Improve fallback for file upload
* [Minor] Some fixes on the for resolving
* [Minor] Removed doubled test case
* [Minor] Resolve #860
* [Minor] Turn flash notification into an error
* [Minor] Change handling of `.` paths
* [Minor] Show empty URL for index page
* [Minor] Push correct ref to history
* [Major] Capture mini editor events in capture phase
This fixes the issue were when pressing arrowup or arrowdown changed the cursor position inside the editor
* [Major] Add prefix to `FilterList`
This now fixes issues were if you had a prefixed page you con't properly search for it, because the search considered the prefix as part of the name
* [Minor] A little rigor for empty headers
* [Major] Fix #1404
* [Minor] `parseInt` returns `NaN` handle that
* [Minor] Use `fileName`
* [Minor] Fix comment
* [Minor] Fixes
* [Major] disallow `foo.png.md` and `/../`, etc. cases
* [Major] Change name of conflicted pages
* [Minor] Remove unecessary check
* [Minor] Remove some split code
* [Minor] Allow deletion of invalid files
* [Minor] Bug in the regex
* [Minor] Give some possibility of fixing incorrect names
* [Minor] Tiny bug with header completion
* [Major] Docs
* [Minor] Ignore errors for navigation inside of a page
This could be a problem when SB e.g. cached a scrollTop for a page, which, because e.g. the file is now deleted, doesn't exist anymore and thus CM throws an error, when trying to navigate
* Update conflicted copy regex in Maintenance.md
---------
Co-authored-by: Zef Hemel <zef@zef.me>
427 lines
8.4 KiB
SCSS
427 lines
8.4 KiB
SCSS
#sb-root {
|
|
font-family: var(--ui-font);
|
|
background-color: var(--root-background-color);
|
|
color: var(--root-color);
|
|
}
|
|
|
|
.cm-cursor,
|
|
.cm-dropCursor {
|
|
border-left: 1.2px solid var(--editor-caret-color) !important;
|
|
}
|
|
|
|
#sb-top {
|
|
color: var(--top-color);
|
|
background-color: var(--top-background-color);
|
|
border-bottom: var(--top-border-color) 1px solid;
|
|
}
|
|
|
|
#sb-top.sb-sync-error {
|
|
color: var(--top-sync-error-color);
|
|
background-color: var(--top-sync-error-background-color);
|
|
}
|
|
|
|
.sb-saved {
|
|
color: var(--top-saved-color);
|
|
}
|
|
|
|
.sb-unsaved {
|
|
color: var(--top-unsaved-color);
|
|
}
|
|
|
|
.sb-loading {
|
|
color: var(--top-loading-color);
|
|
}
|
|
|
|
#sb-main {
|
|
.sb-panel:last-child {
|
|
border-left: 1px solid var(--panel-border-color);
|
|
}
|
|
|
|
.sb-panel:first-child {
|
|
border-right: 1px solid var(--panel-border-color);
|
|
}
|
|
|
|
.sb-panel {
|
|
background-color: var(--panel-background-color);
|
|
}
|
|
}
|
|
|
|
.sb-bhs {
|
|
border-top: 1px solid var(--bhs-border-color);
|
|
background-color: var(--bhs-background-color);
|
|
}
|
|
|
|
.sb-notifications {
|
|
font-family: var(--editor-font);
|
|
}
|
|
|
|
.sb-notifications > div {
|
|
border: var(--notifications-border-color) 1px solid;
|
|
}
|
|
|
|
.sb-notification-info {
|
|
background-color: var(--notification-info-background-color);
|
|
}
|
|
|
|
.sb-notification-error {
|
|
background-color: var(--notification-error-background-color);
|
|
}
|
|
|
|
.sb-actions button {
|
|
width: 28px;
|
|
height: 28px;
|
|
border: 0;
|
|
margin: 2px;
|
|
margin-top: 6px;
|
|
padding: 5px;
|
|
background-color: var(--action-button-background-color);
|
|
color: var(--action-button-color);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.sb-actions button.sb-enabled {
|
|
background-color: var(--top-border-color);
|
|
border-radius: 5px;
|
|
}
|
|
|
|
.sb-actions button:hover {
|
|
color: var(--action-button-hover-color);
|
|
}
|
|
|
|
.sb-button,
|
|
.sb-button-primary {
|
|
--color: var(--button-color);
|
|
--background-color: var(--button-background-color);
|
|
--hover-background-color: var(--button-hover-background-color);
|
|
--border-color: var(--button-border-color);
|
|
|
|
&.sb-button-primary {
|
|
--color: var(--primary-button-color);
|
|
--background-color: var(--primary-button-background-color);
|
|
--hover-background-color: var(--primary-button-hover-background-color);
|
|
--border-color: var(--primary-button-border-color);
|
|
}
|
|
|
|
background-color: var(--background-color);
|
|
color: var(--color);
|
|
|
|
box-shadow: 0 0 0.2em rgba(0, 0, 0, 0.05);
|
|
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 0.5em;
|
|
padding: 0.2em 0.5em;
|
|
font-size: 0.9em;
|
|
|
|
&:hover {
|
|
background-color: var(--hover-background-color);
|
|
}
|
|
|
|
&:focus {
|
|
outline: 2px solid var(--color);
|
|
outline-offset: -3px;
|
|
}
|
|
}
|
|
|
|
/* Modal boxes */
|
|
.sb-modal-box {
|
|
color: var(--modal-color);
|
|
background-color: var(--modal-background-color);
|
|
border: var(--modal-border-color) 1px solid;
|
|
box-shadow: rgba(0, 0, 0, 0.35) 0px 20px 20px;
|
|
|
|
.cm-scroller {
|
|
font-family: var(--ui-font);
|
|
}
|
|
|
|
.sb-header {
|
|
border-bottom: 1px var(--modal-border-color) solid;
|
|
|
|
label {
|
|
color: var(--modal-header-label-color);
|
|
}
|
|
|
|
.sb-mini-editor {
|
|
font-family: var(--ui-font);
|
|
}
|
|
}
|
|
|
|
.sb-help-text {
|
|
background-color: var(--modal-help-background-color);
|
|
border-bottom: 1px var(--modal-border-color) solid;
|
|
color: var(--modal-help-color);
|
|
}
|
|
|
|
.sb-result-list {
|
|
.sb-hint:not(.sb-hint-inactive) {
|
|
color: var(--modal-hint-color);
|
|
background-color: var(--modal-hint-background-color);
|
|
}
|
|
|
|
.sb-hint.sb-hint-inactive {
|
|
color: var(--modal-hint-inactive-color);
|
|
background-color: var(--modal-hint-inactive-background-color);
|
|
}
|
|
|
|
.sb-description {
|
|
color: var(--modal-description-color);
|
|
}
|
|
|
|
.sb-selected-option {
|
|
background-color: var(--modal-selected-option-background-color);
|
|
color: var(--modal-selected-option-color);
|
|
|
|
.sb-description {
|
|
color: var(--modal-selected-option-description-color);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Editor */
|
|
|
|
#sb-editor {
|
|
.cm-content {
|
|
font-family: var(--editor-font);
|
|
}
|
|
|
|
.cm-selectionBackground {
|
|
background-color: var(--editor-selection-background-color);
|
|
}
|
|
|
|
.cm-panels-bottom {
|
|
color: var(--editor-panels-bottom-color);
|
|
background-color: var(--editor-panels-bottom-background-color);
|
|
border-top: var(--editor-panels-bottom-border-color) 1px solid;
|
|
}
|
|
|
|
.cm-editor .cm-tooltip-autocomplete {
|
|
background-color: var(--root-background-color);
|
|
color: var(--modal-color);
|
|
|
|
li .cm-completionDetail {
|
|
color: var(--editor-completion-detail-color);
|
|
}
|
|
|
|
li[aria-selected] .cm-completionDetail {
|
|
color: var(--editor-completion-detail-selected-color);
|
|
}
|
|
}
|
|
|
|
.cm-list-bullet::after {
|
|
color: var(--editor-list-bullet-color);
|
|
}
|
|
|
|
.sb-line-h1,
|
|
.sb-line-h2,
|
|
.sb-line-h3,
|
|
.sb-line-h4,
|
|
.sb-line-h5,
|
|
.sb-line-h6 {
|
|
// background-color: rgba(0, 30, 77, 0.5);
|
|
color: var(--editor-heading-color);
|
|
}
|
|
|
|
.sb-line-h1 .sb-meta,
|
|
.sb-line-h2 .sb-meta,
|
|
.sb-line-h3 .sb-meta,
|
|
.sb-line-h4 .sb-meta,
|
|
.sb-line-h5 .sb-meta,
|
|
.sb-line-h6 .sb-meta {
|
|
color: var(--editor-heading-meta-color);
|
|
}
|
|
}
|
|
|
|
.sb-hashtag,
|
|
.hashtag {
|
|
color: var(--editor-hashtag-color);
|
|
background-color: var(--editor-hashtag-background-color);
|
|
border: 1px solid var(--editor-hashtag-border-color);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.sb-line-hr {
|
|
border-top: var(--editor-ruler-color) solid 1px;
|
|
}
|
|
|
|
.sb-naked-url {
|
|
color: var(--editor-naked-url-color);
|
|
}
|
|
|
|
/* Color list items when the cursor is on it */
|
|
.sb-li-cursor .sb-meta {
|
|
color: var(--editor-line-meta-color);
|
|
}
|
|
|
|
thead tr {
|
|
background-color: var(--editor-table-head-background-color);
|
|
color: var(--editor-table-head-color);
|
|
}
|
|
|
|
tbody tr:nth-of-type(even) {
|
|
background-color: var(--editor-table-even-background-color);
|
|
}
|
|
|
|
.sb-line-blockquote {
|
|
background-color: var(--editor-blockquote-background-color);
|
|
color: var(--editor-blockquote-color);
|
|
border-left: 1px solid var(--editor-blockquote-border-color);
|
|
}
|
|
|
|
.sb-line-code {
|
|
background-color: var(--editor-code-background-color);
|
|
}
|
|
|
|
.sb-struct {
|
|
color: var(--editor-struct-color);
|
|
}
|
|
|
|
.sb-code {
|
|
background-color: var(--editor-code-background-color);
|
|
}
|
|
|
|
.sb-line-fenced-code .sb-code {
|
|
color: var(--editor-code-color);
|
|
}
|
|
|
|
.sb-directive-mark {
|
|
color: var(--editor-directive-mark-color);
|
|
font-weight: bold;
|
|
}
|
|
|
|
.sb-directive {
|
|
color: var(--editor-directive-color);
|
|
font-weight: bold;
|
|
}
|
|
|
|
.sb-highlight {
|
|
background-color: var(--editor-highlight-background-color);
|
|
}
|
|
|
|
.sb-line-fenced-code {
|
|
background-color: var(--editor-code-background-color);
|
|
}
|
|
|
|
.sb-line-fenced-code .sb-comment {
|
|
color: var(--editor-code-comment-color);
|
|
}
|
|
|
|
.sb-variableName {
|
|
color: var(--editor-code-variable-color);
|
|
}
|
|
|
|
.sb-typeName {
|
|
color: var(--editor-code-typename-color);
|
|
}
|
|
|
|
.sb-string,
|
|
.sb-string2 {
|
|
color: var(--editor-code-string-color);
|
|
}
|
|
|
|
.sb-number {
|
|
color: var(--editor-code-number-color);
|
|
}
|
|
|
|
.sb-operator {
|
|
color: var(--editor-code-operator-color);
|
|
}
|
|
|
|
.sb-meta {
|
|
color: var(--editor-meta-color);
|
|
}
|
|
|
|
// Admonitions
|
|
|
|
.sb-admonition {
|
|
border-left-color: var(--admonition-color);
|
|
}
|
|
|
|
.sb-admonition-title {
|
|
background-color: color-mix(
|
|
in srgb,
|
|
var(--admonition-color),
|
|
transparent 90%
|
|
);
|
|
}
|
|
|
|
.sb-admonition-type::before {
|
|
background-color: var(--admonition-color);
|
|
}
|
|
|
|
// Frontmatter
|
|
|
|
.sb-frontmatter {
|
|
background-color: var(--editor-frontmatter-background-color);
|
|
color: var(--editor-frontmatter-color);
|
|
}
|
|
|
|
.sb-frontmatter-marker {
|
|
color: var(--editor-frontmatter-marker-color);
|
|
}
|
|
|
|
.sb-emphasis {
|
|
font-style: italic;
|
|
}
|
|
|
|
.sb-strong {
|
|
font-weight: 900;
|
|
}
|
|
|
|
.sb-sub {
|
|
vertical-align: sub;
|
|
font-size: smaller;
|
|
}
|
|
|
|
.sb-sup {
|
|
vertical-align: super;
|
|
font-size: smaller;
|
|
}
|
|
|
|
.sb-line-code-outside .sb-code-info {
|
|
color: var(--editor-code-info-color);
|
|
}
|
|
|
|
a,
|
|
.sb-link:not(.sb-meta, .sb-url) {
|
|
color: var(--editor-link-color);
|
|
}
|
|
|
|
.sb-link.sb-url {
|
|
color: var(--editor-link-meta-color);
|
|
}
|
|
|
|
.sb-url:not(.sb-link) {
|
|
color: var(--editor-link-url-color);
|
|
}
|
|
|
|
.sb-atom {
|
|
color: var(--editor-code-atom-color);
|
|
}
|
|
|
|
.sb-wiki-link {
|
|
color: var(--editor-wiki-link-page-color);
|
|
background-color: var(--editor-wiki-link-page-background-color);
|
|
}
|
|
|
|
a.sb-wiki-link-missing,
|
|
.sb-wiki-link-missing > .sb-wiki-link {
|
|
color: var(--editor-wiki-link-page-missing-color);
|
|
}
|
|
|
|
a.sb-wiki-link-invalid,
|
|
.sb-wiki-link-invalid > .sb-wiki-link {
|
|
color: var(--editor-wiki-link-page-invalid-color);
|
|
}
|
|
|
|
.sb-task-mark {
|
|
color: var(--editor-task-marker-color);
|
|
}
|
|
|
|
.sb-task-state {
|
|
color: var(--editor-task-state-color);
|
|
}
|
|
|
|
.sb-line-comment {
|
|
background-color: var(--editor-code-comment-color); // rgba(255, 255, 0, 0.5);
|
|
}
|