@sciflow/editor-start 0.0.2 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +50 -29
- package/dist/bundle/sciflow-editor.css +1 -1
- package/dist/bundle/sciflow-editor.js +4446 -3980
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/lib/default-features.d.ts +21 -0
- package/dist/lib/default-features.d.ts.map +1 -0
- package/dist/lib/default-features.js +34 -0
- package/dist/lib/editor-element.d.ts +97 -1
- package/dist/lib/editor-element.d.ts.map +1 -1
- package/dist/lib/editor-element.js +435 -25
- package/dist/lib/format-bar.d.ts +22 -0
- package/dist/lib/format-bar.d.ts.map +1 -1
- package/dist/lib/format-bar.js +37 -1
- package/dist/lib/outline.d.ts +44 -0
- package/dist/lib/outline.d.ts.map +1 -1
- package/dist/lib/outline.js +120 -6
- package/dist/lib/range-decorations.d.ts +120 -0
- package/dist/lib/range-decorations.d.ts.map +1 -0
- package/dist/lib/range-decorations.js +131 -0
- package/dist/lib/read-only.d.ts +95 -0
- package/dist/lib/read-only.d.ts.map +1 -0
- package/dist/lib/read-only.js +123 -0
- package/dist/testing/external-widget-simulator.d.ts +217 -0
- package/dist/testing/external-widget-simulator.d.ts.map +1 -0
- package/dist/testing/external-widget-simulator.js +350 -0
- package/package.json +28 -14
- package/dist/tsconfig.lib.tsbuildinfo +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) SciFlow GmbH https://www.sciflow.org/license
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -44,50 +44,72 @@ Companion elements for sidebars—`<sciflow-selection-editor>` and `<sciflow-ref
|
|
|
44
44
|
|
|
45
45
|
- Selection editor internals (selection interaction, property editing, JSON schema): `docs/selection-editor.md`
|
|
46
46
|
|
|
47
|
-
###
|
|
47
|
+
### Styling editor content (light-DOM editable)
|
|
48
|
+
|
|
49
|
+
The ProseMirror `contenteditable` (`.ProseMirror`) is mounted on a **light-DOM child** of the host element (`<div class="sf-editable-surface">`). Because it is in the regular page DOM — not inside any shadow root — you can target it with global CSS:
|
|
50
|
+
|
|
51
|
+
```css
|
|
52
|
+
/* Global stylesheet — no special injection needed */
|
|
53
|
+
.sf-editable-surface .ProseMirror {
|
|
54
|
+
line-height: 1.6;
|
|
55
|
+
}
|
|
56
|
+
.sf-editable-surface .ProseMirror h1 {
|
|
57
|
+
font-family: "Merriweather", serif;
|
|
58
|
+
}
|
|
59
|
+
.sf-editable-surface .ProseMirror p {
|
|
60
|
+
max-width: 72ch;
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
This also means browser proofreading extensions (Grammarly, LanguageTool browser add-on, etc.) can discover and underline the editable surface, because they walk the page's flat document tree for `[contenteditable]` elements and never enter shadow roots.
|
|
65
|
+
|
|
66
|
+
**Decoration styles** (classes added by ProseMirror plugins) follow the same rule — use global CSS scoped to `.sf-editable-surface`:
|
|
67
|
+
|
|
68
|
+
```js
|
|
69
|
+
// No special injection — add a <style> to document.head or your stylesheet
|
|
70
|
+
const style = document.createElement('style');
|
|
71
|
+
style.textContent = `
|
|
72
|
+
.sf-editable-surface .my-annotation {
|
|
73
|
+
background: rgba(255, 200, 0, 0.3);
|
|
74
|
+
border-bottom: 2px solid orange;
|
|
75
|
+
}
|
|
76
|
+
.sf-editable-surface .my-highlight {
|
|
77
|
+
background: yellow;
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
80
|
+
document.head.appendChild(style);
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Chrome and shadow-root styles
|
|
48
84
|
|
|
49
|
-
|
|
85
|
+
All chrome (format bar, popovers, focus ring, border) remains in the shadow root. The `shadowStyles` / `setShadowStyles()` API injects CSS into the shadow root and is unchanged — use it for chrome overrides, not for `.ProseMirror` content:
|
|
50
86
|
|
|
51
87
|
```js
|
|
52
88
|
const editor = document.querySelector('sciflow-editor');
|
|
53
89
|
|
|
54
|
-
//
|
|
55
|
-
editor.shadowStyles =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
];
|
|
90
|
+
// Override the editor border (chrome — shadow root)
|
|
91
|
+
editor.shadowStyles = `
|
|
92
|
+
:host { --sciflow-editor-border: #4f46e5; }
|
|
93
|
+
`;
|
|
59
94
|
|
|
60
|
-
//
|
|
95
|
+
// Or apply immediately (recommended for dynamic updates)
|
|
61
96
|
editor.setShadowStyles(`
|
|
62
|
-
|
|
63
|
-
.ProseMirror a { color: rebeccapurple; }
|
|
97
|
+
:host { --sciflow-editor-border: #4f46e5; }
|
|
64
98
|
`);
|
|
65
99
|
```
|
|
66
100
|
|
|
67
|
-
**Dynamic
|
|
101
|
+
**Dynamic injection** is supported for both paths. For decoration styles the recommended approach is a `<style>` in `document.head` (shown above); for shadow-chrome overrides use `setShadowStyles()`:
|
|
68
102
|
|
|
69
103
|
```js
|
|
70
|
-
//
|
|
71
|
-
editor.doc = { doc: myDocument, files: [], references: [] };
|
|
72
|
-
|
|
73
|
-
// Later: add styles for decorations dynamically
|
|
74
|
-
editor.setShadowStyles([`
|
|
75
|
-
.my-annotation {
|
|
76
|
-
background: rgba(255, 200, 0, 0.3);
|
|
77
|
-
border-bottom: 2px solid orange;
|
|
78
|
-
}
|
|
79
|
-
.my-highlight {
|
|
80
|
-
background: yellow;
|
|
81
|
-
}
|
|
82
|
-
`]);
|
|
83
|
-
|
|
84
|
-
// Or append to existing styles (normalize first: shadowStyles can be string or string[])
|
|
104
|
+
// Or append to existing shadow styles
|
|
85
105
|
const current = editor.shadowStyles;
|
|
86
106
|
const currentStyles = Array.isArray(current) ? current : current ? [current] : [];
|
|
87
|
-
editor.setShadowStyles([...currentStyles,
|
|
107
|
+
editor.setShadowStyles([...currentStyles, `:host { --sciflow-accent: #e11d48; }`]);
|
|
88
108
|
```
|
|
89
109
|
|
|
90
|
-
Use `setShadowStyles()` when you need styles applied immediately (e.g., after adding a plugin). Property assignment applies asynchronously via Lit's lifecycle.
|
|
110
|
+
Use `setShadowStyles()` when you need shadow styles applied immediately (e.g., after adding a plugin with chrome decorations). Property assignment applies asynchronously via Lit's lifecycle.
|
|
111
|
+
|
|
112
|
+
**Migration note:** If you previously targeted `.ProseMirror` via `shadowStyles` or `setShadowStyles()`, move those rules to a global stylesheet scoped to `.sf-editable-surface .ProseMirror { … }` instead.
|
|
91
113
|
|
|
92
114
|
### Global theme
|
|
93
115
|
|
|
@@ -193,7 +215,6 @@ The **footnote** feature is also included in the default feature list.
|
|
|
193
215
|
|
|
194
216
|
- `npx nx run @sciflow/editor-start:demo` — runs `vite build --watch` to keep the ES module bundle up to date **and** serves the demo via `vite dev`. The demo always loads `dist/bundle/sciflow-editor.js`, so the behaviour matches what you ship to consumers.
|
|
195
217
|
- `npx nx bundle @sciflow/editor-start` — single build of the browser bundle (useful when packaging the demo for sharing).
|
|
196
|
-
- `./build-demo-zip.sh` — convenience script that runs the bundle build and produces `sciflow-editor-demo.zip` containing `demo/` and `dist/bundle/`.
|
|
197
218
|
|
|
198
219
|
When you need to hand the demo to someone without repository access:
|
|
199
220
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:host{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;font-family:var(--sciflow-editor-font-family,system-ui, sans-serif);color:var(--sciflow-editor-color,#0f172a);--sciflow-editor-background:#fff;--sciflow-editor-border:#0f172a24;--sciflow-editor-border-active:#2563eb;--sciflow-editor-focus-ring:#2563eb40;--sciflow-editor-citation-bg:#0f172a0d;--sciflow-editor-citation-color:inherit;--sciflow-editor-selectednode:#94a3b899;--sciflow-editor-footnote-bg:#0f172a0a;display:block}@media (prefers-color-scheme:dark){:host{--lightningcss-light: ;--lightningcss-dark:initial}}.editor{border:1px solid var(--sciflow-editor-border);box-sizing:border-box;background:var(--sciflow-editor-background,#fff);border-radius:0;min-height:200px;padding:12px}.editor:focus-within{border-color:var(--sciflow-editor-selectednode,var(--sciflow-editor-border-active));box-shadow:0 0 0 2px var(--sciflow-editor-selectednode,var(--sciflow-editor-focus-ring))}.ProseMirror{word-wrap:break-word;white-space:pre-wrap;white-space:break-spaces;-webkit-font-variant-ligatures:none;font-variant-ligatures:none;font-feature-settings:"liga" 0;min-height:inherit;color:inherit;counter-reset:sciflow-footnote;outline:none;padding:calc(.75rem + 1.5em) 4rem .5rem 3.5rem;font-size:1rem;font-weight:lighter;line-height:1.6;position:relative}.ProseMirror p{margin:0 0 .75rem}.ProseMirror h1,.ProseMirror h2,.ProseMirror h3,.ProseMirror h4,.ProseMirror h5,.ProseMirror h6{margin:1.25rem 0 .5rem;line-height:1.2;position:relative}.ProseMirror>h1:first-child,.ProseMirror>h2:first-child,.ProseMirror>h3:first-child,.ProseMirror>h4:first-child,.ProseMirror>h5:first-child,.ProseMirror>h6:first-child{margin-top:0}.ProseMirror table{border-collapse:collapse;border-spacing:0;width:100%;margin:1rem 0}.ProseMirror th,.ProseMirror td{border:1px solid color-mix(in srgb, currentColor 18%, transparent);vertical-align:top;box-sizing:border-box;padding:.5rem .75rem;position:relative}.ProseMirror .tableWrapper{overflow-x:auto}.ProseMirror td:not([data-colwidth]):not(.column-resize-dragging),.ProseMirror th:not([data-colwidth]):not(.column-resize-dragging){min-width:var(--default-cell-min-width,80px)}.ProseMirror .column-resize-handle{z-index:20;pointer-events:none;background-color:#adf;width:4px;position:absolute;top:0;bottom:0;right:-2px}.ProseMirror.resize-cursor{cursor:ew-resize;cursor:col-resize}.ProseMirror .selectedCell:after{z-index:2;content:"";pointer-events:none;background:#c8c8ff66;position:absolute;inset:0}.ProseMirror p:only-child:last-child,.ProseMirror table p{margin:0}.ProseMirror img{max-width:100%;height:auto}.ProseMirror pre{white-space:pre-wrap}.ProseMirror cite{background:var(--sciflow-editor-citation-bg);color:var(--sciflow-editor-citation-color);border-radius:4px;padding:.1rem .35rem}.ProseMirror a[data-type=xref]{background:var(--sciflow-editor-citation-bg);color:var(--sciflow-editor-citation-color);border-radius:4px;padding:.1rem .35rem;text-decoration:none}.ProseMirror a[data-type=xref]:hover{text-decoration:underline}.ProseMirror img{max-width:40vw}.ProseMirror h1:before{content:"#";opacity:.5;padding-right:.5rem;font-size:.8rem;position:absolute;top:60%;left:-2.5rem;transform:translateY(-50%)}.ProseMirror h1{padding-top:.35em;font-size:1.33em;font-weight:400}.ProseMirror h2{font-size:1.22em}.ProseMirror h2:before{content:"##";opacity:.5;padding-right:.5rem;font-size:.8rem;position:absolute;top:50%;left:-2.5rem;transform:translateY(-50%)}.ProseMirror h3:before{content:"###";opacity:.5;padding-right:.5rem;font-size:.8rem;position:absolute;top:50%;left:-2.5rem;transform:translateY(-50%)}.ProseMirror section{margin-top:2.5rem}.ProseMirror section:first-child{margin-top:.5rem}.ProseMirror h2{font-weight:400}.ProseMirror h3{font-size:1.17em;font-weight:400}.ProseMirror h4{font-size:1.11em;font-weight:400}.ProseMirror h5{font-size:1.06em;font-weight:400}.ProseMirror h6{font-size:1em;font-weight:700}.ProseMirror li{position:relative}.ProseMirror-hideselection ::selection{background:0 0}.ProseMirror-hideselection ::selection{background:0 0}.ProseMirror-hideselection{caret-color:#0000}.prosemirror-ghost-cursor{vertical-align:text-bottom;pointer-events:none;background:#2563eb;border-radius:2px;width:3px;height:1.25em;margin:0 -1px;animation:1.8s ease-in-out infinite ghost-cursor-pulse;display:inline-block;box-shadow:0 0 0 1.5px #2563eb4d}@keyframes ghost-cursor-pulse{0%,to{opacity:1}50%{opacity:.4}}.prosemirror-ghost-selection{background:#2563eb40;border-radius:2px;outline:1px solid #2563eb66}.ProseMirror [draggable][contenteditable=false]{-webkit-user-select:text;user-select:text}.ProseMirror-selectednode{outline:2px solid var(--sciflow-editor-selectednode,var(--sciflow-editor-border-active,#2563eb));outline-offset:1px}cite.ProseMirror-selectednode{box-shadow:0 0 0 2px var(--sciflow-editor-border-active,#2563eb);outline:none}span[data-type=footnote].ProseMirror-selectednode{box-shadow:none;outline:none}span[data-type=footnote].ProseMirror-selectednode .sciflow-footnote-body{border-color:var(--sciflow-editor-border-active,#2563eb)}a[data-type=xref].ProseMirror-selectednode{box-shadow:0 0 0 2px var(--sciflow-editor-selectednode,var(--sciflow-editor-border-active,#2563eb));outline:none}li.ProseMirror-selectednode{outline:none}li.ProseMirror-selectednode:after{content:"";border:2px solid var(--sciflow-editor-selectednode,var(--sciflow-editor-border-active,#2563eb));pointer-events:none;position:absolute;inset:-2px -2px -2px -32px}img.ProseMirror-separator{border:none!important;margin:0!important;display:inline!important}@media (prefers-color-scheme:dark){:host{color:var(--sciflow-editor-color,#e2e8f0);--sciflow-editor-background:#0f172a;--sciflow-editor-border:#94a3b859;--sciflow-editor-border-active:#3b82f6;--sciflow-editor-focus-ring:#3b82f659;--sciflow-editor-citation-bg:#94a3b833;--sciflow-editor-citation-color:#e2e8f0;--sciflow-editor-footnote-bg:#94a3b81f}.ProseMirror h1,.ProseMirror h2,.ProseMirror h3,.ProseMirror h4,.ProseMirror h5,.ProseMirror h6{color:inherit}:host{--sciflow-editor-selectednode:#94a3b899}.ProseMirror-selectednode{outline-color:var(--sciflow-editor-selectednode)}a[data-type=xref].ProseMirror-selectednode{box-shadow:0 0 0 2px var(--sciflow-editor-selectednode)}}:host{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;border:1px solid var(--sciflow-formatbar-border,#0f172a0d);background:var(--sciflow-formatbar-background,#f8fafc);box-shadow:var(--sciflow-formatbar-shadow,none);border-radius:6px;flex-wrap:wrap;justify-content:center;align-items:center;gap:0;padding:3px;font-family:inherit;font-size:.8rem;display:inline-flex;overflow:visible}@media (prefers-color-scheme:dark){:host{--lightningcss-light: ;--lightningcss-dark:initial}}.style-dropdown{display:inline-flex;position:relative}.style-dropdown-trigger{background:var(--sciflow-formatbar-select-background,white);min-height:30px;color:var(--sciflow-formatbar-select-color,#1f2937);font:inherit;cursor:pointer;border:none;border-radius:5px;align-items:center;gap:4px;padding:0 8px;transition:background .15s;display:inline-flex}.style-dropdown-trigger:hover{background:var(--sciflow-formatbar-button-hover,#2563eb1f)}.style-dropdown-trigger:disabled{cursor:not-allowed;color:var(--sciflow-formatbar-button-disabled,#0f172a61);background:var(--sciflow-formatbar-select-background-disabled,#f1f5f9)}.style-dropdown-trigger:focus-visible{outline:2px solid var(--sciflow-formatbar-select-focus,#2563eb66);outline-offset:1px}.dropdown-chevron{align-items:center;transition:transform .15s;display:inline-flex}.dropdown-chevron svg{width:12px;height:12px}.style-dropdown-menu{background:var(--sciflow-formatbar-select-background,white);border:1px solid var(--sciflow-formatbar-border,#0f172a1f);z-index:100;border-radius:6px;min-width:160px;padding:4px;position:absolute;top:calc(100% + 4px);left:0;overflow:hidden;box-shadow:0 4px 16px #0000001a,0 1px 4px #0000000f}.style-option{text-align:left;cursor:pointer;width:100%;color:var(--sciflow-formatbar-select-color,#1f2937);white-space:nowrap;background:0 0;border:none;border-radius:4px;justify-content:flex-start;align-items:center;gap:8px;min-width:0;min-height:0;padding:6px 10px;font-family:inherit;line-height:1.3;transition:background .1s;display:flex}.style-option-icon{flex-shrink:0;justify-content:center;align-items:center;width:16px;height:16px;display:inline-flex}.style-option:hover{background:var(--sciflow-formatbar-button-hover,#2563eb1f)}.style-option:disabled{cursor:not-allowed;color:var(--sciflow-formatbar-button-disabled,#0f172a61)}.style-option.active{background:var(--sciflow-formatbar-button-active-background,#2563eb1f);color:var(--sciflow-formatbar-button-active,#1d4ed8)}.style-option--paragraph{font-size:.8rem;font-weight:400}.style-option--h1{font-size:1.1rem;font-weight:700}.style-option--h2{font-size:.95rem;font-weight:600}.style-option--h3{font-size:.85rem;font-weight:600}.style-option--blockquote{font-size:.8rem;font-weight:400}.insert-dropdown{display:inline-flex;position:relative}.insert-dropdown-trigger{min-width:30px;min-height:30px;color:var(--sciflow-formatbar-button-color,#1f2937);font:inherit;cursor:pointer;background:0 0;border:none;border-radius:5px;align-items:center;gap:2px;padding:5px;transition:background .15s;display:inline-flex}.insert-dropdown-trigger:hover{background:var(--sciflow-formatbar-button-hover,#2563eb1f)}.insert-dropdown-trigger:focus-visible{outline:2px solid var(--sciflow-formatbar-select-focus,#2563eb66);outline-offset:1px}.insert-dropdown-menu{background:var(--sciflow-formatbar-select-background,white);border:1px solid var(--sciflow-formatbar-border,#0f172a1f);z-index:100;border-radius:6px;min-width:150px;padding:4px;position:absolute;top:calc(100% + 4px);left:0;overflow:hidden;box-shadow:0 4px 16px #0000001a,0 1px 4px #0000000f}.insert-menu-item{text-align:left;cursor:pointer;width:100%;color:var(--sciflow-formatbar-select-color,#1f2937);white-space:nowrap;background:0 0;border:none;border-radius:4px;justify-content:flex-start;align-items:center;gap:8px;min-width:0;min-height:0;padding:6px 10px;font-family:inherit;font-size:.8rem;line-height:1.3;transition:background .1s;display:flex}.insert-menu-item:hover{background:var(--sciflow-formatbar-button-hover,#2563eb1f)}.insert-menu-item:disabled{cursor:not-allowed;color:var(--sciflow-formatbar-button-disabled,#0f172a61)}.insert-menu-item .cmd-icon{width:16px;height:16px}.command-group{align-items:center;gap:1px;display:inline-flex}.command-group+.command-group{border-left:1px solid var(--sciflow-formatbar-border,#0f172a1f);margin-left:5px;padding-left:5px}button{appearance:none;font:inherit;cursor:pointer;color:var(--sciflow-formatbar-button-color,#1f2937);background:0 0;border:none;border-radius:5px;justify-content:center;align-items:center;min-width:30px;min-height:30px;padding:5px;line-height:1;transition:background .15s,color .15s;display:inline-flex}button:hover:not(:disabled),button:focus-visible:not(:disabled){background:var(--sciflow-formatbar-button-hover,#2563eb1f);outline:none}button:disabled{cursor:not-allowed;color:var(--sciflow-formatbar-button-disabled,#0f172a61)}button.active{background:var(--sciflow-formatbar-button-active-background,#2563eb1f);color:var(--sciflow-formatbar-button-active,#1d4ed8)}button[data-tooltip]{z-index:0;position:relative}button[data-tooltip]:hover,button[data-tooltip]:focus-visible{z-index:1}button[data-tooltip]:after{content:attr(data-tooltip);color:#fff;white-space:nowrap;opacity:0;pointer-events:none;z-index:10;background:#0f172ae6;border-radius:5px;padding:5px 6px;font-size:11px;line-height:1.2;transition:opacity .15s;position:absolute;top:calc(100% + 6px);left:50%;transform:translate(-50%)}button[data-tooltip]:hover:after,button[data-tooltip]:focus-visible:after{opacity:1}.cmd-icon{justify-content:center;align-items:center;width:18px;height:18px;display:inline-flex}.cmd-icon svg{width:100%;height:100%}.table-row{border-top:1px solid var(--sciflow-formatbar-border,#0f172a1f);flex-wrap:wrap;justify-content:center;align-items:center;gap:0;width:100%;margin-top:2px;padding-top:3px;animation:.22s ease-out format-bar-row-in;display:flex}.table-row-label{text-transform:uppercase;letter-spacing:.05em;color:var(--sciflow-formatbar-button-disabled,#0f172a61);border-right:1px solid var(--sciflow-formatbar-border,#0f172a1f);-webkit-user-select:none;user-select:none;margin-right:5px;padding:0 8px 0 2px;font-size:.65rem;font-weight:600;line-height:30px}.command-rows{flex-direction:column;align-items:center;gap:2px;display:flex}.command-row{flex-wrap:wrap;align-items:center;gap:2px;display:flex}.command-row--primary{justify-content:flex-start;width:100%}@keyframes format-bar-row-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.table-commands{flex-wrap:wrap;align-items:center;gap:2px;display:inline-flex}.table-commands.table-tools-expanded{animation:.22s ease-out format-bar-row-in}.table-commands--with-separator{border-left:1px solid var(--sciflow-formatbar-border,#0f172a1f);margin-left:3px;padding-left:3px}.command-rows--table-expanded .command-row--primary,.command-row--table{justify-content:center}.command-row--table{width:100%}@media (prefers-color-scheme:dark){:host{--sciflow-formatbar-border:#94a3b84d;--sciflow-formatbar-background:#0f172aa6;--sciflow-formatbar-shadow:none;--sciflow-formatbar-select-background:#1e293bcc;--sciflow-formatbar-select-color:#e2e8f0;--sciflow-formatbar-button-color:#e2e8f0;--sciflow-formatbar-button-hover:#3b82f640;--sciflow-formatbar-button-active-background:#60a5fa33;--sciflow-formatbar-button-active:#93c5fd;--sciflow-formatbar-button-disabled:#94a3b873;--sciflow-formatbar-select-background-disabled:#1e293b99}.style-dropdown-menu,.insert-dropdown-menu{box-shadow:0 4px 16px #0000004d,0 1px 4px #00000026}}:host{color:inherit;font:inherit;display:block}:host([hidden]){display:none}.outline-list{flex-direction:column;gap:.15rem;margin:0;padding:0;list-style:none;display:flex}.outline-item{border-left:2px solid #2563eb2e;border-radius:6px;grid-template-rows:auto auto;grid-template-columns:auto 1fr;gap:.1rem .4rem;padding:.25rem .5rem .25rem .6rem;transition:background .14s,border-color .14s;display:grid}.outline-item[role=button]{cursor:pointer}.outline-item[role=button]:hover{background:#2563eb10;border-left-color:#2563eb66}.outline-item:focus-visible{outline-offset:2px;outline:2px solid #2563eb}.outline-item--active{background:#2563eb16;border-left-color:#2563ebb3}.outline-level{letter-spacing:.02em;text-align:center;color:#2563eb;background:#2563eb1a;border-radius:4px;grid-area:1/1/3;align-self:start;min-width:1.6em;margin-top:.2em;padding:.15em .4em;font-size:.62rem;font-weight:700;line-height:1}.outline-item.level-2 .outline-level{color:#7c3aed;background:#7c3aed1a}.outline-item.level-3 .outline-level{color:#0891b2;background:#0891b21a}.outline-level--figure{color:#16a34a;background:#16a34a1a;min-width:2em}.outline-text{color:color-mix(in srgb, canvastext 85%, #0f172a 10%);overflow-wrap:break-word;grid-area:1/2;font-size:.875rem;font-weight:500;line-height:1.3}.outline-item:not(.level-2):not(.level-3) .outline-text{font-weight:600}.outline-item.level-2{padding-left:1.1rem}.outline-item.level-2 .outline-text{font-size:.845rem}.outline-item.level-3{padding-left:1.6rem}.outline-item.level-3 .outline-text{font-size:.82rem}.outline-meta{flex-wrap:wrap;grid-area:2/2;align-items:center;gap:.2rem;display:flex}.outline-insert-btn,.outline-drag{opacity:.45;transition:opacity .12s}.outline-item:hover .outline-insert-btn,.outline-item:hover .outline-drag,.outline-item:focus-visible .outline-insert-btn,.outline-item:focus-within .outline-insert-btn{opacity:1}.outline-id{color:color-mix(in srgb, canvastext 70%, #0f172a 10%);white-space:nowrap;text-overflow:ellipsis;background:#2563eb14;border-radius:4px;max-width:10em;padding:.1em .35em;font-size:.68rem;overflow:hidden}.outline-insert-btn{letter-spacing:.03em;color:#2563ebe6;cursor:pointer;white-space:nowrap;background:#2563eb14;border:1px solid #2563eb47;border-radius:6px;padding:.18em .5em;font-family:inherit;font-size:.65rem;font-weight:600;line-height:1;transition:background .12s,border-color .12s,opacity .12s}.outline-insert-btn:hover:not(:disabled){background:#2563eb29;border-color:#2563eb73}.outline-insert-btn:disabled{opacity:.38;cursor:default}.outline-insert-btn:focus-visible{outline-offset:2px;outline:2px solid #2563eb}.outline-drag{letter-spacing:.03em;color:color-mix(in srgb, canvastext 40%, transparent);-webkit-user-select:none;user-select:none;font-size:.62rem;font-weight:500}.outline-item[draggable=true]{cursor:grab}.outline-item[draggable=true]:active{cursor:grabbing}.outline-item--figure{border-left-color:#22c55e40}.outline-item--figure:hover{background:#22c55e0c;border-left-color:#22c55e73}.outline-placeholder{color:color-mix(in srgb, canvastext 70%, #0f172a 10%);padding-left:.25rem;font-size:.875rem}:host{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;font-family:inherit;display:block}@media (prefers-color-scheme:dark){:host{--lightningcss-light: ;--lightningcss-dark:initial}}.reference-list{gap:.6rem;margin:0;padding:0;list-style:none;display:grid}.reference-item{border:1px dashed color-mix(in srgb, canvastext 8%, transparent);cursor:grab;border-radius:12px;flex-direction:column;gap:.35rem;padding:.65rem .75rem;transition:transform .12s,border-color .16s;display:flex}.reference-item:active{cursor:grabbing}.reference-item:hover{border-color:color-mix(in srgb, canvastext 16%, transparent);transform:translateY(-1px)}.reference-text{color:color-mix(in srgb, canvastext 90%, transparent);font-size:.8rem;line-height:1.2}.reference-meta{flex-wrap:wrap;align-items:center;gap:.35rem;display:flex}.reference-id{color:color-mix(in srgb, canvastext 80%, transparent);letter-spacing:.01em;background:#2563eb1f;border:1px solid #2563eb2e;border-radius:999px;padding:.12em .55em;font-size:.8em}.reference-cite-btn{text-transform:uppercase;letter-spacing:.04em;color:#2563ebe6;cursor:pointer;background:#2563eb14;border:1px solid #2563eb47;border-radius:8px;padding:.2em .5em;font-family:inherit;font-size:.7em;line-height:1;transition:background .12s,border-color .12s}.reference-cite-btn:hover:not(:disabled){background:#2563eb29;border-color:#2563eb73}.reference-cite-btn:disabled{opacity:.38;cursor:default}.reference-drag{text-transform:uppercase;letter-spacing:.04em;color:color-mix(in srgb, canvastext 60%, transparent);background:color-mix(in srgb, canvas 92%, transparent);border:1px dashed color-mix(in srgb, canvastext 18%, transparent);opacity:.25;border-radius:8px;padding:.2em .5em;font-size:.7em;transition:opacity .12s}.reference-item:hover .reference-drag{opacity:1}.reference-highlight{border-color:#2563eb73}.reference-empty{color:color-mix(in srgb, canvastext 70%, transparent);border:1px dashed color-mix(in srgb, canvastext 14%, transparent);text-align:center;border-radius:10px;padding:.75rem;font-style:italic}@media (prefers-color-scheme:dark){.reference-item{border-color:color-mix(in srgb, canvastext 22%, transparent)}.reference-item:hover{border-color:color-mix(in srgb, canvastext 32%, transparent)}.reference-id{color:color-mix(in srgb, canvastext 86%, transparent);background:#1d4ed838;border-color:#1d4ed852}.reference-drag{background:color-mix(in srgb, canvas 75%, transparent);border-color:color-mix(in srgb, canvastext 24%, transparent)}}:host{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;display:block}@media (prefers-color-scheme:dark){:host{--lightningcss-light: ;--lightningcss-dark:initial}}.selection-editor-container{gap:.75rem;display:grid}.selection-editor-section{gap:.25rem;display:grid}.selection-editor-section-label{color:color-mix(in srgb, canvastext 45%, transparent);text-transform:uppercase;letter-spacing:.06em;font-size:.7rem;font-weight:700}.selection-editor-element-row{justify-content:space-between;align-items:baseline;gap:.5rem;display:flex}.selection-editor-type-header{color:canvastext;margin:0;font-size:.88rem;font-weight:600}.selection-editor-insert-wrapper{flex-shrink:0}.selection-editor-insert-select{border:1px solid color-mix(in srgb, canvastext 18%, transparent);background:color-mix(in srgb, canvas 95%, white 5%);color:color-mix(in srgb, canvastext 70%, transparent);cursor:pointer;appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='8' height='5' viewBox='0 0 8 5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l3 3 3-3' stroke='%23666' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-position:right .35rem center;background-repeat:no-repeat;border-radius:5px;padding:.2rem 1.2rem .2rem .4rem;font-size:.78rem}.selection-editor-insert-select:hover{background-color:color-mix(in srgb, canvas 90%, white 10%);border-color:color-mix(in srgb, canvastext 25%, transparent)}.selection-editor-attr-default{color:canvastext;font-size:.85rem}.selection-editor-placeholder{color:color-mix(in srgb, canvastext 70%, transparent);margin:0;font-size:.85rem;font-style:italic}.selection-editor-field{gap:.3rem;display:grid}.selection-editor-controls{justify-content:flex-end;align-items:center;gap:.5rem;display:flex}.selection-editor-label{color:color-mix(in srgb, canvastext 75%, transparent);text-transform:uppercase;letter-spacing:.03em;font-size:.8rem;font-weight:600}.selection-editor-value{background:#2563eb14;border-radius:4px;padding:.2rem .45rem;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:.85rem;display:inline-block}.selection-editor-input{background:color-mix(in srgb, canvas 98%, white 2%);width:auto;min-width:0;max-width:calc(100% - .5rem);color:color-mix(in srgb, canvastext 90%, transparent);border:1px solid #0f172a29;border-radius:6px;padding:.4rem .6rem;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:.85rem;transition:border-color .16s,background .16s}.selection-editor-input:focus{background:color-mix(in srgb, canvas 99%, white 1%);border-color:#2563eb;outline:none}.selection-editor-input:has(.ProseMirror){border-width:2px;border-color:var(--lightningcss-light,#2563eb)var(--lightningcss-dark,#3b82f6)}.selection-editor-input::placeholder{color:color-mix(in srgb, canvastext 50%, transparent);font-style:italic}.selection-editor-attrs{gap:.6rem;display:grid}.selection-editor-details{border:none;margin-top:.5rem}.selection-editor-details-summary{cursor:pointer;-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;list-style:none;display:flex}.selection-editor-details-summary::-webkit-details-marker{display:none}.selection-editor-details-chevron{color:color-mix(in srgb, canvastext 45%, transparent);flex-shrink:0;transition:transform .15s}.selection-editor-details[open] .selection-editor-details-chevron{transform:rotate(180deg)}.selection-editor-details-body{gap:.6rem;margin-top:.6rem;padding-left:.25rem;display:grid}.selection-editor-attr-field{gap:.3rem;display:grid}.selection-editor-attr-label{color:color-mix(in srgb, canvastext 60%, transparent);font-size:.8rem;font-weight:400}.citation-source-adapter-root{flex-direction:column;gap:.75rem;display:flex}.citation-source-item{background:color-mix(in srgb, canvas 96%, white 4%);border:1px solid #0f172a1f;border-radius:6px;flex-direction:column;gap:.75rem;margin-bottom:.5rem;padding:.75rem .85rem;display:flex}.citation-source-item:last-of-type{margin-bottom:0}.citation-source-details{border:none;margin-top:.25rem}.citation-source-details-summary{color:color-mix(in srgb, canvastext 65%, transparent);cursor:pointer;-webkit-user-select:none;user-select:none;font-size:.8rem;font-weight:500;list-style:none}.citation-source-details-summary::-webkit-details-marker{display:none}.citation-source-details-summary:before{content:"▸ ";margin-right:.25rem;transition:transform .15s;display:inline-block}.citation-source-details[open] .citation-source-details-summary:before{transform:rotate(90deg)}.citation-source-details-body{flex-direction:column;gap:.75rem;margin-top:.6rem;padding-left:.25rem;display:flex}.citation-source-field{flex-direction:column;gap:.35rem;min-width:0;display:flex}.citation-source-field--checkbox{flex-direction:row;align-items:center;gap:.5rem}.citation-source-field--checkbox .selection-editor-attr-label{flex:none}.citation-source-field .selection-editor-attr-label{white-space:nowrap;font-size:.8rem;overflow:visible}.citation-source-field .selection-editor-input{box-sizing:border-box;width:100%;min-height:2.25rem;padding:.45rem .65rem;font-size:.9rem}.citation-source-field--checkbox .selection-editor-input{flex-shrink:0;width:auto;min-height:auto;margin:0}.citation-source-field input[type=checkbox]{cursor:pointer;width:1.125rem;height:1.125rem;margin:0}.citation-source-add,.citation-source-remove{background:color-mix(in srgb, canvas 95%, white 5%);cursor:pointer;border:1px solid #0f172a33;border-radius:4px;margin-top:.15rem;padding:.2rem .4rem;font-size:.7rem}.citation-source-add:hover,.citation-source-remove:hover{background:color-mix(in srgb, canvas 90%, white 10%)}.citation-source-add{margin-top:.25rem}.selection-editor-textarea{background:color-mix(in srgb, canvas 98%, white 2%);resize:vertical;width:100%;min-height:5rem;color:color-mix(in srgb, canvastext 90%, transparent);box-sizing:border-box;border:1px solid #0f172a29;border-radius:6px;padding:.4rem .6rem;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:.85rem}.selection-editor-textarea:focus{border-color:#2563eb;outline:none}.selection-editor-math-preview{background:color-mix(in srgb, canvas 96%, white 4%);border:1px solid #0f172a1f;border-radius:6px;min-height:2.5rem;padding:.5rem;overflow:auto}.selection-editor-math-preview:empty:before{content:"Preview updates as you type";color:color-mix(in srgb, canvastext 50%, transparent);font-style:italic}.selection-editor-math-error{color:#b91c1c;margin:.35rem 0 0;font-family:ui-monospace,monospace;font-size:.8rem}.selection-editor-math-warnings{color:color-mix(in srgb, canvastext 65%, transparent);margin:.35rem 0 0;font-size:.8rem}.selection-editor-math-actions{flex-wrap:wrap;align-items:center;gap:.5rem;display:flex}.selection-editor-button{background:color-mix(in srgb, canvas 95%, white 5%);cursor:pointer;color:inherit;border:1px solid #0f172a33;border-radius:6px;padding:.4rem .75rem;font-size:.85rem}.selection-editor-button--secondary{padding:.25rem .55rem;font-size:.75rem}.selection-editor-button:hover{background:color-mix(in srgb, canvas 90%, white 10%)}.selection-editor-button--primary{color:#fff;background:#2563eb;border-color:#2563eb}.selection-editor-button--primary:hover{background:#1d4ed8}.selection-editor-actions{flex-wrap:wrap;align-items:center;gap:.5rem;margin-top:.25rem;display:flex}.selection-editor-expand-btn{color:color-mix(in srgb, canvastext 50%, transparent);cursor:pointer;text-underline-offset:2px;background:0 0;border:none;align-self:start;padding:0;font-size:.75rem;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.selection-editor-expand-btn:hover{color:color-mix(in srgb, canvastext 75%, transparent)}.selection-editor-hint,.selection-editor-math-hint{color:color-mix(in srgb, canvastext 55%, transparent);font-size:.75rem}.selection-editor-math-docs{margin:.5rem 0 0;font-size:.75rem}.selection-editor-math-docs-link{color:color-mix(in srgb, canvastext 60%, transparent);text-decoration:none}.selection-editor-math-docs-link:hover{text-decoration:underline}.selection-editor-citation .selection-editor-citation-content{box-sizing:border-box;width:100%}.selection-editor-citation .selection-editor-field{gap:.4rem}.selection-editor-citation-pm{min-height:2.75rem}.selection-editor-citation-pm .ProseMirror{outline:none;min-height:2.25rem;padding:.5rem .7rem;font-size:.9rem}.selection-editor-citation-pm .ProseMirror p{margin:0}.selection-editor-citation-actions{flex-wrap:wrap;align-items:center;gap:.5rem;display:flex}.selection-editor-citation-hint{color:color-mix(in srgb, canvastext 55%, transparent);font-size:.75rem}@media (prefers-color-scheme:dark){.selection-editor-value{background:#3b82f633}.selection-editor-input{background:color-mix(in srgb, canvas 94%, black 6%);border-color:#94a3b859}.selection-editor-input:focus{background:color-mix(in srgb, canvas 92%, black 8%)}.selection-editor-textarea{background:color-mix(in srgb, canvas 94%, black 6%);border-color:#94a3b859}.citation-source-item{background:color-mix(in srgb, canvas 94%, black 6%);border-color:#94a3b84d}.citation-source-add,.citation-source-remove,.selection-editor-button{background:color-mix(in srgb, canvas 90%, black 10%);border-color:#94a3b859}.citation-source-add:hover,.citation-source-remove:hover,.selection-editor-button:hover{background:color-mix(in srgb, canvas 85%, black 15%)}.selection-editor-math-preview{background:color-mix(in srgb, canvas 94%, black 6%);border-color:#94a3b84d}.selection-editor-math-error{color:#fca5a5}}
|
|
1
|
+
:host{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;font-family:var(--sciflow-editor-font-family,system-ui, sans-serif);color:var(--sciflow-editor-color,#0f172a);--sciflow-editor-background:#fff;--sciflow-editor-border:#0f172a24;--sciflow-editor-border-active:#2563eb;--sciflow-editor-focus-ring:#2563eb40;--sciflow-editor-citation-bg:#0f172a0d;--sciflow-editor-citation-color:inherit;--sciflow-editor-selectednode:#94a3b899;--sciflow-editor-footnote-bg:#0f172a0a;display:block}@media (prefers-color-scheme:dark){:host{--lightningcss-light: ;--lightningcss-dark:initial}}.editor{border:1px solid var(--sciflow-editor-border);box-sizing:border-box;background:var(--sciflow-editor-background,#fff);border-radius:0;min-height:200px;padding:12px}.editor:focus-within{border-color:var(--sciflow-editor-selectednode,var(--sciflow-editor-border-active));box-shadow:0 0 0 2px var(--sciflow-editor-selectednode,var(--sciflow-editor-focus-ring))}@media (prefers-color-scheme:dark){:host{color:var(--sciflow-editor-color,#e2e8f0);--sciflow-editor-background:#0f172a;--sciflow-editor-border:#94a3b859;--sciflow-editor-border-active:#3b82f6;--sciflow-editor-focus-ring:#3b82f659;--sciflow-editor-citation-bg:#94a3b833;--sciflow-editor-citation-color:#e2e8f0;--sciflow-editor-footnote-bg:#94a3b81f;--sciflow-editor-selectednode:#94a3b899}}:host{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;border:1px solid var(--sciflow-formatbar-border,#0f172a0d);background:var(--sciflow-formatbar-background,#f8fafc);box-shadow:var(--sciflow-formatbar-shadow,none);border-radius:6px;flex-wrap:wrap;justify-content:center;align-items:center;gap:0;padding:3px;font-family:inherit;font-size:.8rem;display:inline-flex;overflow:visible}@media (prefers-color-scheme:dark){:host{--lightningcss-light: ;--lightningcss-dark:initial}}.style-dropdown{display:inline-flex;position:relative}.style-dropdown-trigger{background:var(--sciflow-formatbar-select-background,white);min-height:30px;color:var(--sciflow-formatbar-select-color,#1f2937);font:inherit;cursor:pointer;border:none;border-radius:5px;align-items:center;gap:4px;padding:0 8px;transition:background .15s;display:inline-flex}.style-dropdown-trigger:hover{background:var(--sciflow-formatbar-button-hover,#2563eb1f)}.style-dropdown-trigger:disabled{cursor:not-allowed;color:var(--sciflow-formatbar-button-disabled,#0f172a61);background:var(--sciflow-formatbar-select-background-disabled,#f1f5f9)}.style-dropdown-trigger:focus-visible{outline:2px solid var(--sciflow-formatbar-select-focus,#2563eb66);outline-offset:1px}.dropdown-chevron{align-items:center;transition:transform .15s;display:inline-flex}.dropdown-chevron svg{width:12px;height:12px}.style-dropdown-menu{background:var(--sciflow-formatbar-select-background,white);border:1px solid var(--sciflow-formatbar-border,#0f172a1f);z-index:100;border-radius:6px;min-width:160px;padding:4px;position:absolute;top:calc(100% + 4px);left:0;overflow:hidden;box-shadow:0 4px 16px #0000001a,0 1px 4px #0000000f}.style-option{text-align:left;cursor:pointer;width:100%;color:var(--sciflow-formatbar-select-color,#1f2937);white-space:nowrap;background:0 0;border:none;border-radius:4px;justify-content:flex-start;align-items:center;gap:8px;min-width:0;min-height:0;padding:6px 10px;font-family:inherit;line-height:1.3;transition:background .1s;display:flex}.style-option-icon{flex-shrink:0;justify-content:center;align-items:center;width:16px;height:16px;display:inline-flex}.style-option:hover{background:var(--sciflow-formatbar-button-hover,#2563eb1f)}.style-option:disabled{cursor:not-allowed;color:var(--sciflow-formatbar-button-disabled,#0f172a61)}.style-option.active{background:var(--sciflow-formatbar-button-active-background,#2563eb1f);color:var(--sciflow-formatbar-button-active,#1d4ed8)}.style-option--paragraph{font-size:.8rem;font-weight:400}.style-option--h1{font-size:1.1rem;font-weight:700}.style-option--h2{font-size:.95rem;font-weight:600}.style-option--h3{font-size:.85rem;font-weight:600}.style-option--blockquote{font-size:.8rem;font-weight:400}.insert-dropdown{display:inline-flex;position:relative}.insert-dropdown-trigger{min-width:30px;min-height:30px;color:var(--sciflow-formatbar-button-color,#1f2937);font:inherit;cursor:pointer;background:0 0;border:none;border-radius:5px;align-items:center;gap:2px;padding:5px;transition:background .15s;display:inline-flex}.insert-dropdown-trigger:hover{background:var(--sciflow-formatbar-button-hover,#2563eb1f)}.insert-dropdown-trigger:focus-visible{outline:2px solid var(--sciflow-formatbar-select-focus,#2563eb66);outline-offset:1px}.insert-dropdown-menu{background:var(--sciflow-formatbar-select-background,white);border:1px solid var(--sciflow-formatbar-border,#0f172a1f);z-index:100;border-radius:6px;min-width:150px;padding:4px;position:absolute;top:calc(100% + 4px);left:0;overflow:hidden;box-shadow:0 4px 16px #0000001a,0 1px 4px #0000000f}.insert-menu-item{text-align:left;cursor:pointer;width:100%;color:var(--sciflow-formatbar-select-color,#1f2937);white-space:nowrap;background:0 0;border:none;border-radius:4px;justify-content:flex-start;align-items:center;gap:8px;min-width:0;min-height:0;padding:6px 10px;font-family:inherit;font-size:.8rem;line-height:1.3;transition:background .1s;display:flex}.insert-menu-item:hover{background:var(--sciflow-formatbar-button-hover,#2563eb1f)}.insert-menu-item:disabled{cursor:not-allowed;color:var(--sciflow-formatbar-button-disabled,#0f172a61)}.insert-menu-item .cmd-icon{width:16px;height:16px}.command-group{align-items:center;gap:1px;display:inline-flex}.command-group+.command-group{border-left:1px solid var(--sciflow-formatbar-border,#0f172a1f);margin-left:5px;padding-left:5px}button{appearance:none;font:inherit;cursor:pointer;color:var(--sciflow-formatbar-button-color,#1f2937);background:0 0;border:none;border-radius:5px;justify-content:center;align-items:center;min-width:30px;min-height:30px;padding:5px;line-height:1;transition:background .15s,color .15s;display:inline-flex}button:hover:not(:disabled),button:focus-visible:not(:disabled){background:var(--sciflow-formatbar-button-hover,#2563eb1f);outline:none}button:disabled{cursor:not-allowed;color:var(--sciflow-formatbar-button-disabled,#0f172a61)}button.active{background:var(--sciflow-formatbar-button-active-background,#2563eb1f);color:var(--sciflow-formatbar-button-active,#1d4ed8)}button[data-tooltip]{z-index:0;position:relative}button[data-tooltip]:hover,button[data-tooltip]:focus-visible{z-index:1}button[data-tooltip]:after{content:attr(data-tooltip);color:#fff;white-space:nowrap;opacity:0;pointer-events:none;z-index:10;background:#0f172ae6;border-radius:5px;padding:5px 6px;font-size:11px;line-height:1.2;transition:opacity .15s;position:absolute;top:calc(100% + 6px);left:50%;transform:translate(-50%)}button[data-tooltip]:hover:after,button[data-tooltip]:focus-visible:after{opacity:1}.cmd-icon{justify-content:center;align-items:center;width:18px;height:18px;display:inline-flex}.cmd-icon svg{width:100%;height:100%}.table-row{border-top:1px solid var(--sciflow-formatbar-border,#0f172a1f);flex-wrap:wrap;justify-content:center;align-items:center;gap:0;width:100%;margin-top:2px;padding-top:3px;animation:.22s ease-out format-bar-row-in;display:flex}.table-row-label{text-transform:uppercase;letter-spacing:.05em;color:var(--sciflow-formatbar-button-disabled,#0f172a61);border-right:1px solid var(--sciflow-formatbar-border,#0f172a1f);-webkit-user-select:none;user-select:none;margin-right:5px;padding:0 8px 0 2px;font-size:.65rem;font-weight:600;line-height:30px}.command-rows{flex-direction:column;align-items:center;gap:2px;display:flex}.command-row{flex-wrap:wrap;align-items:center;gap:2px;display:flex}.command-row--primary{justify-content:flex-start;width:100%}@keyframes format-bar-row-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.table-commands{flex-wrap:wrap;align-items:center;gap:2px;display:inline-flex}.table-commands.table-tools-expanded{animation:.22s ease-out format-bar-row-in}.table-commands--with-separator{border-left:1px solid var(--sciflow-formatbar-border,#0f172a1f);margin-left:3px;padding-left:3px}.command-rows--table-expanded .command-row--primary,.command-row--table{justify-content:center}.command-row--table{width:100%}@media (prefers-color-scheme:dark){:host{--sciflow-formatbar-border:#94a3b84d;--sciflow-formatbar-background:#0f172aa6;--sciflow-formatbar-shadow:none;--sciflow-formatbar-select-background:#1e293bcc;--sciflow-formatbar-select-color:#e2e8f0;--sciflow-formatbar-button-color:#e2e8f0;--sciflow-formatbar-button-hover:#3b82f640;--sciflow-formatbar-button-active-background:#60a5fa33;--sciflow-formatbar-button-active:#93c5fd;--sciflow-formatbar-button-disabled:#94a3b873;--sciflow-formatbar-select-background-disabled:#1e293b99}.style-dropdown-menu,.insert-dropdown-menu{box-shadow:0 4px 16px #0000004d,0 1px 4px #00000026}}:host{color:inherit;font:inherit;display:block}:host([hidden]){display:none}.outline-list{flex-direction:column;gap:.15rem;margin:0;padding:0;list-style:none;display:flex}.outline-item{border-left:2px solid #2563eb2e;border-radius:6px;grid-template-rows:auto auto;grid-template-columns:auto 1fr;gap:.1rem .4rem;padding:.25rem .5rem .25rem .6rem;transition:background .14s,border-color .14s;display:grid}.outline-item[role=button]{cursor:pointer}.outline-item[role=button]:hover{background:#2563eb10;border-left-color:#2563eb66}.outline-item:focus-visible{outline-offset:2px;outline:2px solid #2563eb}.outline-item--active{background:#2563eb16;border-left-color:#2563ebb3}.outline-level{font-size:var(--sciflow-outline-badge-size,.62rem);letter-spacing:.02em;text-align:center;color:#2563eb;background:#2563eb1a;border-radius:4px;grid-area:1/1/3;align-self:start;min-width:1.6em;margin-top:.2em;padding:.15em .4em;font-weight:700;line-height:1}.outline-item.level-2 .outline-level{color:#7c3aed;background:#7c3aed1a}.outline-item.level-3 .outline-level{color:#0891b2;background:#0891b21a}.outline-level--figure{color:#16a34a;background:#16a34a1a;min-width:2em}.outline-text{font-weight:500;font-size:var(--sciflow-outline-item-size,.875rem);color:color-mix(in srgb, canvastext 85%, #0f172a 10%);overflow-wrap:break-word;grid-area:1/2;line-height:1.3}.outline-item:not(.level-2):not(.level-3) .outline-text{font-weight:600}.outline-item.level-2{padding-left:1.1rem}.outline-item.level-2 .outline-text{font-size:var(--sciflow-outline-item-size,.845rem)}.outline-item.level-3{padding-left:1.6rem}.outline-item.level-3 .outline-text{font-size:var(--sciflow-outline-item-size,.82rem)}.outline-meta{flex-wrap:wrap;grid-area:2/2;align-items:center;gap:.2rem;display:flex}.outline-insert-btn,.outline-drag{opacity:.45;transition:opacity .12s}.outline-item:hover .outline-insert-btn,.outline-item:hover .outline-drag,.outline-item:focus-visible .outline-insert-btn,.outline-item:focus-within .outline-insert-btn{opacity:1}.outline-id{font-size:var(--sciflow-outline-meta-size,.68rem);color:color-mix(in srgb, canvastext 70%, #0f172a 10%);white-space:nowrap;text-overflow:ellipsis;background:#2563eb14;border-radius:4px;max-width:10em;padding:.1em .35em;overflow:hidden}.outline-insert-btn{font-size:var(--sciflow-outline-meta-size,.65rem);letter-spacing:.03em;color:#2563ebe6;cursor:pointer;white-space:nowrap;background:#2563eb14;border:1px solid #2563eb47;border-radius:6px;padding:.18em .5em;font-family:inherit;font-weight:600;line-height:1;transition:background .12s,border-color .12s,opacity .12s}.outline-insert-btn:hover:not(:disabled){background:#2563eb29;border-color:#2563eb73}.outline-insert-btn:disabled{opacity:.38;cursor:default}.outline-insert-btn:focus-visible{outline-offset:2px;outline:2px solid #2563eb}.outline-drag{font-size:var(--sciflow-outline-meta-size,.62rem);letter-spacing:.03em;color:color-mix(in srgb, canvastext 40%, transparent);-webkit-user-select:none;user-select:none;font-weight:500}.outline-item[draggable=true]{cursor:grab}.outline-item[draggable=true]:active{cursor:grabbing}.outline-item--figure{border-left-color:#22c55e40}.outline-item--figure:hover{background:#22c55e0c;border-left-color:#22c55e73}.outline-placeholder{color:color-mix(in srgb, canvastext 70%, #0f172a 10%);font-size:var(--sciflow-outline-item-size,.875rem);padding-left:.25rem}:host{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;font-family:inherit;display:block}@media (prefers-color-scheme:dark){:host{--lightningcss-light: ;--lightningcss-dark:initial}}.reference-list{gap:.6rem;margin:0;padding:0;list-style:none;display:grid}.reference-item{border:1px dashed color-mix(in srgb, canvastext 8%, transparent);cursor:grab;border-radius:12px;flex-direction:column;gap:.35rem;padding:.65rem .75rem;transition:transform .12s,border-color .16s;display:flex}.reference-item:active{cursor:grabbing}.reference-item:hover{border-color:color-mix(in srgb, canvastext 16%, transparent);transform:translateY(-1px)}.reference-text{color:color-mix(in srgb, canvastext 90%, transparent);line-height:1.2;font-size:var(--sciflow-reference-item-size,.8rem)}.reference-meta{flex-wrap:wrap;align-items:center;gap:.35rem;display:flex}.reference-id{font-size:var(--sciflow-reference-meta-size,.8em);color:color-mix(in srgb, canvastext 80%, transparent);letter-spacing:.01em;background:#2563eb1f;border:1px solid #2563eb2e;border-radius:999px;padding:.12em .55em}.reference-cite-btn{font-size:var(--sciflow-reference-meta-size,.7em);text-transform:uppercase;letter-spacing:.04em;color:#2563ebe6;cursor:pointer;background:#2563eb14;border:1px solid #2563eb47;border-radius:8px;padding:.2em .5em;font-family:inherit;line-height:1;transition:background .12s,border-color .12s}.reference-cite-btn:hover:not(:disabled){background:#2563eb29;border-color:#2563eb73}.reference-cite-btn:disabled{opacity:.38;cursor:default}.reference-drag{font-size:var(--sciflow-reference-meta-size,.7em);text-transform:uppercase;letter-spacing:.04em;color:color-mix(in srgb, canvastext 60%, transparent);background:color-mix(in srgb, canvas 92%, transparent);border:1px dashed color-mix(in srgb, canvastext 18%, transparent);opacity:.25;border-radius:8px;padding:.2em .5em;transition:opacity .12s}.reference-item:hover .reference-drag{opacity:1}.reference-highlight{border-color:#2563eb73}.reference-empty{color:color-mix(in srgb, canvastext 70%, transparent);border:1px dashed color-mix(in srgb, canvastext 14%, transparent);text-align:center;border-radius:10px;padding:.75rem;font-style:italic}@media (prefers-color-scheme:dark){.reference-item{border-color:color-mix(in srgb, canvastext 22%, transparent)}.reference-item:hover{border-color:color-mix(in srgb, canvastext 32%, transparent)}.reference-id{color:color-mix(in srgb, canvastext 86%, transparent);background:#1d4ed838;border-color:#1d4ed852}.reference-drag{background:color-mix(in srgb, canvas 75%, transparent);border-color:color-mix(in srgb, canvastext 24%, transparent)}}:host{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;display:block}@media (prefers-color-scheme:dark){:host{--lightningcss-light: ;--lightningcss-dark:initial}}.selection-editor-container{gap:.75rem;display:grid}.selection-editor-section{gap:.25rem;display:grid}.selection-editor-section-label{color:color-mix(in srgb, canvastext 45%, transparent);text-transform:uppercase;letter-spacing:.06em;font-size:.7rem;font-weight:700}.selection-editor-element-row{justify-content:space-between;align-items:baseline;gap:.5rem;display:flex}.selection-editor-type-header{color:canvastext;margin:0;font-size:.88rem;font-weight:600}.selection-editor-insert-wrapper{flex-shrink:0}.selection-editor-insert-select{border:1px solid color-mix(in srgb, canvastext 18%, transparent);background:color-mix(in srgb, canvas 95%, white 5%);color:color-mix(in srgb, canvastext 70%, transparent);cursor:pointer;appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='8' height='5' viewBox='0 0 8 5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l3 3 3-3' stroke='%23666' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-position:right .35rem center;background-repeat:no-repeat;border-radius:5px;padding:.2rem 1.2rem .2rem .4rem;font-size:.78rem}.selection-editor-insert-select:hover{background-color:color-mix(in srgb, canvas 90%, white 10%);border-color:color-mix(in srgb, canvastext 25%, transparent)}.selection-editor-attr-default{color:canvastext;font-size:.85rem}.selection-editor-placeholder{color:color-mix(in srgb, canvastext 70%, transparent);margin:0;font-size:.85rem;font-style:italic}.selection-editor-field{gap:.3rem;display:grid}.selection-editor-controls{justify-content:flex-end;align-items:center;gap:.5rem;display:flex}.selection-editor-label{color:color-mix(in srgb, canvastext 75%, transparent);text-transform:uppercase;letter-spacing:.03em;font-size:.8rem;font-weight:600}.selection-editor-value{background:#2563eb14;border-radius:4px;padding:.2rem .45rem;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:.85rem;display:inline-block}.selection-editor-input{background:color-mix(in srgb, canvas 98%, white 2%);width:auto;min-width:0;max-width:calc(100% - .5rem);color:color-mix(in srgb, canvastext 90%, transparent);border:1px solid #0f172a29;border-radius:6px;padding:.4rem .6rem;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:.85rem;transition:border-color .16s,background .16s}.selection-editor-input:focus{background:color-mix(in srgb, canvas 99%, white 1%);border-color:#2563eb;outline:none}.selection-editor-input:has(.ProseMirror){border-width:2px;border-color:var(--lightningcss-light,#2563eb)var(--lightningcss-dark,#3b82f6)}.selection-editor-input::placeholder{color:color-mix(in srgb, canvastext 50%, transparent);font-style:italic}.selection-editor-attrs{gap:.6rem;display:grid}.selection-editor-details{border:none;margin-top:.5rem}.selection-editor-details-summary{cursor:pointer;-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;list-style:none;display:flex}.selection-editor-details-summary::-webkit-details-marker{display:none}.selection-editor-details-chevron{color:color-mix(in srgb, canvastext 45%, transparent);flex-shrink:0;transition:transform .15s}.selection-editor-details[open] .selection-editor-details-chevron{transform:rotate(180deg)}.selection-editor-details-body{gap:.6rem;margin-top:.6rem;padding-left:.25rem;display:grid}.selection-editor-attr-field{gap:.3rem;display:grid}.selection-editor-attr-label{color:color-mix(in srgb, canvastext 60%, transparent);font-size:.8rem;font-weight:400}.citation-source-adapter-root{flex-direction:column;gap:.75rem;display:flex}.citation-source-item{background:color-mix(in srgb, canvas 96%, white 4%);border:1px solid #0f172a1f;border-radius:6px;flex-direction:column;gap:.75rem;margin-bottom:.5rem;padding:.75rem .85rem;display:flex}.citation-source-item:last-of-type{margin-bottom:0}.citation-source-details{border:none;margin-top:.25rem}.citation-source-details-summary{color:color-mix(in srgb, canvastext 65%, transparent);cursor:pointer;-webkit-user-select:none;user-select:none;font-size:.8rem;font-weight:500;list-style:none}.citation-source-details-summary::-webkit-details-marker{display:none}.citation-source-details-summary:before{content:"▸ ";margin-right:.25rem;transition:transform .15s;display:inline-block}.citation-source-details[open] .citation-source-details-summary:before{transform:rotate(90deg)}.citation-source-details-body{flex-direction:column;gap:.75rem;margin-top:.6rem;padding-left:.25rem;display:flex}.citation-source-field{flex-direction:column;gap:.35rem;min-width:0;display:flex}.citation-source-field--checkbox{flex-direction:row;align-items:center;gap:.5rem}.citation-source-field--checkbox .selection-editor-attr-label{flex:none}.citation-source-field .selection-editor-attr-label{white-space:nowrap;font-size:.8rem;overflow:visible}.citation-source-field .selection-editor-input{box-sizing:border-box;width:100%;min-height:2.25rem;padding:.45rem .65rem;font-size:.9rem}.citation-source-field--checkbox .selection-editor-input{flex-shrink:0;width:auto;min-height:auto;margin:0}.citation-source-field input[type=checkbox]{cursor:pointer;width:1.125rem;height:1.125rem;margin:0}.citation-source-add,.citation-source-remove{background:color-mix(in srgb, canvas 95%, white 5%);cursor:pointer;border:1px solid #0f172a33;border-radius:4px;margin-top:.15rem;padding:.2rem .4rem;font-size:.7rem}.citation-source-add:hover,.citation-source-remove:hover{background:color-mix(in srgb, canvas 90%, white 10%)}.citation-source-add{margin-top:.25rem}.selection-editor-textarea{background:color-mix(in srgb, canvas 98%, white 2%);resize:vertical;width:100%;min-height:5rem;color:color-mix(in srgb, canvastext 90%, transparent);box-sizing:border-box;border:1px solid #0f172a29;border-radius:6px;padding:.4rem .6rem;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:.85rem}.selection-editor-textarea:focus{border-color:#2563eb;outline:none}.selection-editor-math-preview{background:color-mix(in srgb, canvas 96%, white 4%);border:1px solid #0f172a1f;border-radius:6px;min-height:2.5rem;padding:.5rem;overflow:auto}.selection-editor-math-preview:empty:before{content:"Preview updates as you type";color:color-mix(in srgb, canvastext 50%, transparent);font-style:italic}.selection-editor-math-error{color:#b91c1c;margin:.35rem 0 0;font-family:ui-monospace,monospace;font-size:.8rem}.selection-editor-math-warnings{color:color-mix(in srgb, canvastext 65%, transparent);margin:.35rem 0 0;font-size:.8rem}.selection-editor-math-actions{flex-wrap:wrap;align-items:center;gap:.5rem;display:flex}.selection-editor-button{background:color-mix(in srgb, canvas 95%, white 5%);cursor:pointer;color:inherit;border:1px solid #0f172a33;border-radius:6px;padding:.4rem .75rem;font-size:.85rem}.selection-editor-button--secondary{padding:.25rem .55rem;font-size:.75rem}.selection-editor-button:hover{background:color-mix(in srgb, canvas 90%, white 10%)}.selection-editor-button--primary{color:#fff;background:#2563eb;border-color:#2563eb}.selection-editor-button--primary:hover{background:#1d4ed8}.selection-editor-actions{flex-wrap:wrap;align-items:center;gap:.5rem;margin-top:.25rem;display:flex}.selection-editor-expand-btn{color:color-mix(in srgb, canvastext 50%, transparent);cursor:pointer;text-underline-offset:2px;background:0 0;border:none;align-self:start;padding:0;font-size:.75rem;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.selection-editor-expand-btn:hover{color:color-mix(in srgb, canvastext 75%, transparent)}.selection-editor-hint,.selection-editor-math-hint{color:color-mix(in srgb, canvastext 55%, transparent);font-size:.75rem}.selection-editor-math-docs{margin:.5rem 0 0;font-size:.75rem}.selection-editor-math-docs-link{color:color-mix(in srgb, canvastext 60%, transparent);text-decoration:none}.selection-editor-math-docs-link:hover{text-decoration:underline}.selection-editor-citation .selection-editor-citation-content{box-sizing:border-box;width:100%}.selection-editor-citation .selection-editor-field{gap:.4rem}.selection-editor-citation-pm{min-height:2.75rem}.selection-editor-citation-pm .ProseMirror{outline:none;min-height:2.25rem;padding:.5rem .7rem;font-size:.9rem}.selection-editor-citation-pm .ProseMirror p{margin:0}.selection-editor-citation-actions{flex-wrap:wrap;align-items:center;gap:.5rem;display:flex}.selection-editor-citation-hint{color:color-mix(in srgb, canvastext 55%, transparent);font-size:.75rem}@media (prefers-color-scheme:dark){.selection-editor-value{background:#3b82f633}.selection-editor-input{background:color-mix(in srgb, canvas 94%, black 6%);border-color:#94a3b859}.selection-editor-input:focus{background:color-mix(in srgb, canvas 92%, black 8%)}.selection-editor-textarea{background:color-mix(in srgb, canvas 94%, black 6%);border-color:#94a3b859}.citation-source-item{background:color-mix(in srgb, canvas 94%, black 6%);border-color:#94a3b84d}.citation-source-add,.citation-source-remove,.selection-editor-button{background:color-mix(in srgb, canvas 90%, black 10%);border-color:#94a3b859}.citation-source-add:hover,.citation-source-remove:hover,.selection-editor-button:hover{background:color-mix(in srgb, canvas 85%, black 15%)}.selection-editor-math-preview{background:color-mix(in srgb, canvas 94%, black 6%);border-color:#94a3b84d}.selection-editor-math-error{color:#fca5a5}}
|