@sciflow/editor-start 0.0.1-beta2 → 0.0.2

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.
Files changed (44) hide show
  1. package/README.md +49 -2
  2. package/THIRD_PARTY_LICENSES +9 -0
  3. package/bin/extract-translations.mjs +54 -0
  4. package/dist/bundle/sciflow-editor.css +1 -1
  5. package/dist/bundle/sciflow-editor.js +9821 -16643
  6. package/dist/index.d.ts +7 -2
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +6 -3
  9. package/dist/lib/citation-source-adapter.d.ts +1 -1
  10. package/dist/lib/citation-source-adapter.d.ts.map +1 -1
  11. package/dist/lib/citation-source-adapter.js +1 -1
  12. package/dist/lib/drag-preview.d.ts.map +1 -1
  13. package/dist/lib/drag-preview.js +9 -2
  14. package/dist/lib/editor-element.d.ts +14 -3
  15. package/dist/lib/editor-element.d.ts.map +1 -1
  16. package/dist/lib/editor-element.js +25 -1
  17. package/dist/lib/format-bar.d.ts +19 -2
  18. package/dist/lib/format-bar.d.ts.map +1 -1
  19. package/dist/lib/format-bar.js +303 -59
  20. package/dist/lib/ghost-cursor.d.ts +10 -0
  21. package/dist/lib/ghost-cursor.d.ts.map +1 -0
  22. package/dist/lib/ghost-cursor.js +59 -0
  23. package/dist/lib/icons-generated.d.ts +14 -0
  24. package/dist/lib/icons-generated.d.ts.map +1 -0
  25. package/dist/lib/icons-generated.js +60 -0
  26. package/dist/lib/outline.d.ts +8 -5
  27. package/dist/lib/outline.d.ts.map +1 -1
  28. package/dist/lib/outline.js +80 -35
  29. package/dist/lib/reference-list.d.ts +10 -2
  30. package/dist/lib/reference-list.d.ts.map +1 -1
  31. package/dist/lib/reference-list.js +45 -9
  32. package/dist/lib/selection-editor.d.ts +16 -0
  33. package/dist/lib/selection-editor.d.ts.map +1 -1
  34. package/dist/lib/selection-editor.js +291 -148
  35. package/dist/lib/selection-ui-renderer.d.ts +1 -0
  36. package/dist/lib/selection-ui-renderer.d.ts.map +1 -1
  37. package/dist/lib/selection-ui-renderer.js +3 -3
  38. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  39. package/package.json +21 -16
  40. package/dist/demo/demo.js +0 -56
  41. package/dist/demo/index.html +0 -169
  42. package/dist/lib/citation-drop.d.ts +0 -25
  43. package/dist/lib/citation-drop.d.ts.map +0 -1
  44. package/dist/lib/citation-drop.js +0 -53
package/README.md CHANGED
@@ -117,12 +117,46 @@ refList.highlight(['ref-1', 'ref-2']); // optional highlighted ids
117
117
  ```
118
118
 
119
119
  Properties and behaviours:
120
- - `references`: array of objects with fields like `id`, `rawCitation`/`raw_citation`, `author`, `title`, `issued`, etc.
120
+ - `references`: array of objects with fields like `id`, `rawReference`/`raw_reference`, `author`, `title`, `issued`, etc.
121
121
  - `highlightedIds`: string array; can also call `highlight(ids)` to update them.
122
- - `id` and `rawCitation` are required. `rawCitation` can be any formatted bibliography string (including hand-written).
122
+ - `id` and `rawReference` are required. `rawReference` can be any formatted bibliography string (including hand-written).
123
123
  - `mimeType` should be set for anything besides CSL JSON; default is `application/vnd.citationstyles.csl+json`. Use `application/vnd.openalex+json` for OpenAlex or your own type for custom payloads.
124
124
  - Dragging an item sets `application/json`, `application/x-sciflow-reference`, and `text/plain` payloads for integrations.
125
125
 
126
+ ### Citation query helpers
127
+
128
+ Re-exported from `@sciflow/editor-core` for convenience:
129
+
130
+ ```ts
131
+ import { getCitedReferenceIds, validateDocumentResources } from '@sciflow/editor-start';
132
+ ```
133
+
134
+ - **`getCitedReferenceIds(doc, from?, to?)`** — extract cited reference IDs from the document (or a range within it). Useful for highlighting references that match the current selection.
135
+ - **`validateDocumentResources(doc, files, references)`** — validate that all figure sources and citation references in the document JSON exist in the snapshot. Returns `MissingResource[]`.
136
+
137
+ See the [`@sciflow/editor-core` README](../core/README.md) for details.
138
+
139
+ ### Translation extraction
140
+
141
+ Extract all built-in translation keys and their English defaults to create a template for a new language:
142
+
143
+ ```bash
144
+ npx @sciflow/editor-start extract-translations > en.json # JSON
145
+ npx @sciflow/editor-start extract-translations --csv > en.csv # CSV
146
+ ```
147
+
148
+ Translate the values in the output file, then register at runtime:
149
+
150
+ ```js
151
+ import { registerTranslations, setLocale } from '@sciflow/editor-start';
152
+ import fr from './fr.json' with { type: 'json' };
153
+
154
+ registerTranslations('fr', fr);
155
+ setLocale('fr');
156
+ ```
157
+
158
+ See the [Localization guide](https://docs.sciflow.org/user-guide/customization/localization/) for details.
159
+
126
160
  ### Math (equations)
127
161
 
128
162
  When the **math** feature is enabled (it is included in the default feature list), users can insert and edit TeX equations. Equations are rendered as SVG in the editor using MathJax 4.
@@ -135,6 +169,19 @@ When the **math** feature is enabled (it is included in the default feature list
135
169
 
136
170
  The format bar shows an **Insert equation** button when the math feature is active.
137
171
 
172
+ ### Format bar coverage (v1)
173
+
174
+ The format bar exposes the most common authoring commands. Some schema-level marks and node types are intentionally **not** surfaced in v1:
175
+
176
+ | Type | Schema name | Reason |
177
+ |------|-------------|--------|
178
+ | Mark | `code` (inline code) | Planned for v2. Users can paste code or apply it programmatically. |
179
+ | Node | `code_block` | Planned for v2. No insert button yet. |
180
+ | Node | `horizontal_rule` | Planned for v2. No insert button yet. |
181
+ | Node | `image` (inline) | Inline images are in the schema but only figure-level images have UI. |
182
+ | Mark | `bdi` | Bidirectional isolate — niche; may be exposed when RTL support is prioritised. |
183
+ | Mark | `tags` | Semantic classification mark managed by the host application, not end users. |
184
+
138
185
  ### Footnotes
139
186
 
140
187
  The **footnote** feature is also included in the default feature list.
@@ -0,0 +1,9 @@
1
+ Material Symbols (Rounded, weight 400)
2
+ =======================================
3
+ Copyright Google LLC
4
+ Licensed under the Apache License, Version 2.0
5
+
6
+ Icons sourced from @material-symbols/svg-400
7
+ https://github.com/google/material-design-icons
8
+
9
+ Full license text: https://www.apache.org/licenses/LICENSE-2.0
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Extract all built-in translation keys and their English defaults.
5
+ *
6
+ * Usage:
7
+ * npx @sciflow/editor-start extract-translations # JSON (default)
8
+ * npx @sciflow/editor-start extract-translations --json # JSON
9
+ * npx @sciflow/editor-start extract-translations --csv # CSV
10
+ *
11
+ * The output is a template you can translate and then feed to
12
+ * `registerTranslations(locale, dictionary)` at runtime.
13
+ *
14
+ * See: https://docs.sciflow.org/user-guide/customization/localization/
15
+ */
16
+
17
+ // Import from @sciflow/editor-core directly (no CSS/Lit dependencies)
18
+ // so the script runs in plain Node without a bundler.
19
+ import { defaultTranslations } from '@sciflow/editor-core';
20
+
21
+ const args = process.argv.slice(2);
22
+
23
+ if (args.includes('--help') || args.includes('-h')) {
24
+ console.log(`Usage: sciflow-extract-translations [--json | --csv]
25
+
26
+ Extract all built-in translation keys and their English defaults.
27
+
28
+ Options:
29
+ --json Output as JSON (default)
30
+ --csv Output as CSV (key, english)
31
+ --help Show this help message
32
+
33
+ The output serves as a template for translating the editor into a new
34
+ language. Fill in the values and register them at runtime:
35
+
36
+ import { registerTranslations, setLocale } from '@sciflow/editor-start';
37
+ import translations from './my-locale.json' with { type: 'json' };
38
+
39
+ registerTranslations('fr', translations);
40
+ setLocale('fr');`);
41
+ process.exit(0);
42
+ }
43
+
44
+ const format = args.includes('--csv') ? 'csv' : 'json';
45
+
46
+ if (format === 'csv') {
47
+ console.log('key,english');
48
+ for (const [key, value] of Object.entries(defaultTranslations)) {
49
+ const escaped = String(value).replace(/"/g, '""');
50
+ console.log(`"${key}","${escaped}"`);
51
+ }
52
+ } else {
53
+ console.log(JSON.stringify(defaultTranslations, null, 2));
54
+ }
@@ -1 +1 @@
1
- :host{display:block;color-scheme:light dark;font-family:var(--sciflow-editor-font-family, system-ui, sans-serif);color:var(--sciflow-editor-color, #0f172a);--sciflow-editor-background: #ffffff;--sciflow-editor-border: rgba(15, 23, 42, .14);--sciflow-editor-border-active: #2563eb;--sciflow-editor-focus-ring: rgba(37, 99, 235, .25);--sciflow-editor-citation-bg: rgba(15, 23, 42, .05);--sciflow-editor-citation-color: inherit;--sciflow-editor-selectednode: rgba(148, 163, 184, .6);--sciflow-editor-footnote-bg: rgba(15, 23, 42, .04)}.editor{border:1px solid var(--sciflow-editor-border);border-radius:0;padding:12px;min-height:200px;box-sizing:border-box;background:var(--sciflow-editor-background, #fff)}.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{position:relative;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;font-weight:lighter;outline:none;min-height:inherit;padding:calc(.75rem + 1.5em) 4rem .5rem 3.5rem;color:inherit;font-size:1rem;counter-reset:sciflow-footnote}.ProseMirror{line-height:1.6}.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{width:100%;border-collapse:collapse;border-spacing:0;margin:1rem 0}.ProseMirror th,.ProseMirror td{padding:.5rem .75rem;border:1px solid color-mix(in srgb,currentColor 18%,transparent);vertical-align:top;box-sizing:border-box;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{position:absolute;right:-2px;top:0;bottom:0;width:4px;z-index:20;background-color:#adf;pointer-events:none}.ProseMirror.resize-cursor{cursor:ew-resize;cursor:col-resize}.ProseMirror .selectedCell:after{z-index:2;position:absolute;content:"";inset:0;background:#c8c8ff66;pointer-events:none}.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);padding:.1rem .35rem;border-radius:4px}.ProseMirror a[data-type=xref]{background:var(--sciflow-editor-citation-bg);color:var(--sciflow-editor-citation-color);padding:.1rem .35rem;border-radius:4px;text-decoration:none}.ProseMirror a[data-type=xref]:hover{text-decoration:underline}.ProseMirror img{max-width:40vw}.ProseMirror h1:before{content:"#";opacity:.5;font-size:.8rem;position:absolute;left:-2.5rem;top:60%;transform:translateY(-50%);padding-right:.5rem}.ProseMirror h1{font-size:1.33em;padding-top:.35em;font-weight:400}.ProseMirror h2{font-size:1.22em}.ProseMirror h2:before{content:"##";opacity:.5;font-size:.8rem;padding-right:.5rem;position:absolute;left:-2.5rem;top:50%;transform:translateY(-50%)}.ProseMirror h3:before{content:"###";opacity:.5;font-size:.8rem;padding-right:.5rem;position:absolute;left:-2.5rem;top:50%;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:transparent}.ProseMirror-hideselection *::-moz-selection{background:transparent}.ProseMirror-hideselection{caret-color:transparent}.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{outline:none;box-shadow:0 0 0 2px var(--sciflow-editor-border-active, #2563eb)}span[data-type=footnote].ProseMirror-selectednode{outline:none;box-shadow:none}span[data-type=footnote].ProseMirror-selectednode .sciflow-footnote-body{border-color:var(--sciflow-editor-border-active, #2563eb)}a[data-type=xref].ProseMirror-selectednode{outline:none;box-shadow:0 0 0 2px var(--sciflow-editor-selectednode, var(--sciflow-editor-border-active, #2563eb))}li.ProseMirror-selectednode{outline:none}li.ProseMirror-selectednode:after{content:"";position:absolute;inset:-2px -2px -2px -32px;border:2px solid var(--sciflow-editor-selectednode, var(--sciflow-editor-border-active, #2563eb));pointer-events:none}img.ProseMirror-separator{display:inline!important;border:none!important;margin:0!important}@media(prefers-color-scheme:dark){:host{color:var(--sciflow-editor-color, #e2e8f0);--sciflow-editor-background: #0f172a;--sciflow-editor-border: rgba(148, 163, 184, .35);--sciflow-editor-border-active: #3b82f6;--sciflow-editor-focus-ring: rgba(59, 130, 246, .35);--sciflow-editor-citation-bg: rgba(148, 163, 184, .2);--sciflow-editor-citation-color: #e2e8f0;--sciflow-editor-footnote-bg: rgba(148, 163, 184, .12)}.ProseMirror h1,.ProseMirror h2,.ProseMirror h3,.ProseMirror h4,.ProseMirror h5,.ProseMirror h6{color:inherit}:host{--sciflow-editor-selectednode: rgba(148, 163, 184, .6)}.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{display:inline-flex;gap:6px;align-items:center;color-scheme:light dark;border:1px solid var(--sciflow-formatbar-border, rgba(15, 23, 42, .05));border-radius:6px;padding:3px;background:var(--sciflow-formatbar-background, #f8fafc);box-shadow:var(--sciflow-formatbar-shadow, none);font-family:inherit;font-size:.8rem;overflow:visible}.style-select{display:inline-flex;align-items:center;min-height:30px;border:none;border-radius:5px;background:var(--sciflow-formatbar-select-background, white);color:var(--sciflow-formatbar-select-color, #1f2937);font:inherit;padding:0 8px;cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease}.style-select:focus-visible{outline:2px solid var(--sciflow-formatbar-select-focus, rgba(37, 99, 235, .4));outline-offset:1px}.style-select:disabled{cursor:not-allowed;color:var(--sciflow-formatbar-button-disabled, rgba(15, 23, 42, .38));border-color:var(--sciflow-formatbar-select-border-disabled, rgba(15, 23, 42, .12));background:var(--sciflow-formatbar-select-background-disabled, #f1f5f9)}.history-commands{display:inline-flex;align-items:center;gap:2px;margin-left:3px;padding-left:3px;border-left:1px solid var(--sciflow-formatbar-border, rgba(15, 23, 42, .12))}button{appearance:none;border:none;background:transparent;border-radius:5px;padding:5px;font:inherit;line-height:1;cursor:pointer;color:var(--sciflow-formatbar-button-color, #1f2937);transition:background .15s ease,color .15s ease;display:inline-flex;align-items:center;justify-content:center;min-width:30px;min-height:30px}button:hover:not(:disabled),button:focus-visible:not(:disabled){background:var(--sciflow-formatbar-button-hover, rgba(37, 99, 235, .12));outline:none}button:disabled{cursor:not-allowed;color:var(--sciflow-formatbar-button-disabled, rgba(15, 23, 42, .38))}button.active{background:var(--sciflow-formatbar-button-active-background, rgba(37, 99, 235, .12));color:var(--sciflow-formatbar-button-active, #1d4ed8)}button[data-tooltip]{position:relative;z-index:0}button[data-tooltip]:hover,button[data-tooltip]:focus-visible{z-index:1}button[data-tooltip]:after{content:attr(data-tooltip);position:absolute;top:calc(100% + 6px);left:50%;transform:translate(-50%);background:#0f172ae6;color:#fff;padding:5px 6px;border-radius:5px;font-size:11px;line-height:1.2;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s ease;z-index:10}button[data-tooltip]:hover:after,button[data-tooltip]:focus-visible:after{opacity:1}.material-symbols-rounded{font-family:Material Symbols Rounded;font-variation-settings:"FILL" var(--sciflow-formatbar-button-fill, 0),"wght" var(--sciflow-formatbar-button-weight, 400),"GRAD" 0,"opsz" 20;font-size:18px;line-height:1}.command-rows{display:flex;flex-direction:column;gap:2px;align-items:center}.command-row{display:flex;flex-wrap:wrap;gap:2px;align-items:center}.command-row--primary{width:100%;justify-content:flex-start}@keyframes format-bar-row-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.table-commands{display:inline-flex;flex-wrap:wrap;gap:2px;align-items:center}.table-commands.table-tools-expanded{animation:format-bar-row-in .22s ease-out}.table-commands--with-separator{margin-left:3px;padding-left:3px;border-left:1px solid var(--sciflow-formatbar-border, rgba(15, 23, 42, .12))}.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: rgba(148, 163, 184, .3);--sciflow-formatbar-background: rgba(15, 23, 42, .65);--sciflow-formatbar-shadow: none;--sciflow-formatbar-select-background: rgba(30, 41, 59, .8);--sciflow-formatbar-select-color: #e2e8f0;--sciflow-formatbar-button-color: #e2e8f0;--sciflow-formatbar-button-hover: rgba(59, 130, 246, .25);--sciflow-formatbar-button-active-background: rgba(96, 165, 250, .2);--sciflow-formatbar-button-active: #93c5fd;--sciflow-formatbar-button-disabled: rgba(148, 163, 184, .45);--sciflow-formatbar-select-background-disabled: rgba(30, 41, 59, .6)}}:host{display:block;color:inherit;font:inherit}:host([hidden]){display:none}.outline-list{list-style:none;padding:0;margin:0;display:grid;gap:.6rem}.outline-item{padding:.35rem .5rem .35rem .75rem;border-left:2px solid rgba(37,99,235,.18);border-radius:8px;display:grid;gap:.15rem;transition:background .16s ease,border-color .16s ease,color .16s ease}.outline-item[role=button]{cursor:pointer}.outline-item[role=button]:hover{background:color-mix(in srgb,rgba(37,99,235,.12) 60%,transparent);border-left-color:#2563eb73}.outline-item:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.outline-item--active{background:color-mix(in srgb,rgba(37,99,235,.14) 70%,transparent);border-left-color:#2563ebbf}.outline-text{font-weight:600;color:color-mix(in srgb,canvastext 85%,#0f172a 10%)}.outline-meta{font-size:.78rem;color:color-mix(in srgb,canvastext 60%,#0f172a 15%);display:inline-flex;align-items:center;gap:.35rem;flex-wrap:wrap}.outline-id{background:#2563eb14;color:inherit;border-radius:4px;padding:.12em .4em;font-size:.9em}.outline-item.level-2{padding-left:1.5rem;border-left-style:dotted}.outline-item.level-3{padding-left:2.25rem;border-left-style:dotted;border-left-color:#2563eb1f}.outline-placeholder{color:color-mix(in srgb,canvastext 60%,#0f172a 10%);padding-left:.25rem}.outline-drag{font-size:.7rem;opacity:.6;text-transform:uppercase;-webkit-user-select:none;user-select:none}.outline-item[draggable=true]{cursor:grab}.outline-item[draggable=true]:active{cursor:grabbing}.outline-item--figure{border-left-color:#22c55e4d}:host{display:block;color-scheme:light dark;font-family:inherit}.reference-list{list-style:none;margin:0;padding:0;display:grid;gap:.6rem}.reference-item{display:grid;grid-template-columns:1fr auto;gap:.35rem;padding:.65rem .75rem;border:1px dashed color-mix(in srgb,canvastext 8%,transparent);border-radius:12px;background:color-mix(in srgb,canvas 96%,white 6%);box-shadow:0 6px 14px #0f172a0f;transition:transform .12s ease,box-shadow .12s ease,border-color .16s ease,background .16s ease;cursor:grab}.reference-item:active{cursor:grabbing}.reference-item:hover{transform:translateY(-1px);border-color:color-mix(in srgb,canvastext 16%,transparent);box-shadow:0 10px 24px #0f172a14}.reference-text{line-height:1.2;color:color-mix(in srgb,canvastext 90%,transparent);font-size:.8rem}.reference-meta{display:inline-flex;align-items:center;gap:.35rem}.reference-id{font-size:.8em;background:color-mix(in srgb,#2563eb 12%,transparent);border:1px solid color-mix(in srgb,#2563eb 18%,transparent);border-radius:999px;padding:.12em .55em;color:color-mix(in srgb,canvastext 80%,transparent);letter-spacing:.01em}.reference-drag{font-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);border-radius:8px;padding:.2em .5em}.reference-highlight{border-color:color-mix(in srgb,#2563eb 45%,transparent);background:color-mix(in srgb,#eff6ff 70%,canvas 30%);box-shadow:0 10px 26px #2563eb26}.reference-empty{color:color-mix(in srgb,canvastext 70%,transparent);font-style:italic;border:1px dashed color-mix(in srgb,canvastext 14%,transparent);border-radius:10px;padding:.75rem;text-align:center}@media(prefers-color-scheme:dark){.reference-item{background:color-mix(in srgb,canvas 85%,#0f172a 20%);border-color:color-mix(in srgb,canvastext 22%,transparent);box-shadow:none}.reference-item:hover{border-color:color-mix(in srgb,canvastext 32%,transparent);box-shadow:0 8px 18px #0000004d}.reference-highlight{background:color-mix(in srgb,#1d4ed8 35%,canvas 65%)}.reference-id{background:color-mix(in srgb,#1d4ed8 22%,transparent);border-color:color-mix(in srgb,#1d4ed8 32%,transparent);color:color-mix(in srgb,canvastext 86%,transparent)}.reference-drag{background:color-mix(in srgb,canvas 75%,transparent);border-color:color-mix(in srgb,canvastext 24%,transparent)}}:host{display:block;color-scheme:light dark}.selection-editor-container{display:grid;gap:.75rem}.selection-editor-placeholder{margin:0;font-size:.85rem;color:color-mix(in srgb,canvastext 60%,transparent);font-style:italic}.selection-editor-field{display:grid;gap:.3rem}.selection-editor-controls{display:flex;justify-content:flex-end;align-items:center;gap:.5rem}.selection-editor-label{font-size:.8rem;font-weight:600;color:color-mix(in srgb,canvastext 75%,transparent);text-transform:uppercase;letter-spacing:.03em}.selection-editor-value{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:.85rem;background:#2563eb14;border-radius:4px;padding:.2rem .45rem;display:inline-block}.selection-editor-input{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:.85rem;background:color-mix(in srgb,canvas 98%,white 2%);border:1px solid rgba(15,23,42,.16);border-radius:6px;padding:.4rem .6rem;max-width:calc(100% - .5rem);width:auto;min-width:0;color:color-mix(in srgb,canvastext 90%,transparent);transition:border-color .16s ease,background .16s ease}.selection-editor-input:focus{outline:none;border-color:#2563eb;background:color-mix(in srgb,canvas 99%,white 1%)}.selection-editor-input:has(.ProseMirror){border-width:2px;border-color:light-dark(#2563eb,#3b82f6)}.selection-editor-input::placeholder{color:color-mix(in srgb,canvastext 50%,transparent);font-style:italic}.selection-editor-attrs{display:grid;gap:.6rem}.selection-editor-details{margin-top:.5rem;border:none}.selection-editor-details-summary{font-size:.8rem;font-weight:500;color:color-mix(in srgb,canvastext 65%,transparent);cursor:pointer;list-style:none;-webkit-user-select:none;user-select:none}.selection-editor-details-summary::-webkit-details-marker{display:none}.selection-editor-details-summary:before{content:"▸ ";display:inline-block;margin-right:.25rem;transition:transform .15s ease}.selection-editor-details[open] .selection-editor-details-summary:before{transform:rotate(90deg)}.selection-editor-details-body{display:grid;gap:.6rem;margin-top:.6rem;padding-left:.25rem}.selection-editor-attr-field{display:grid;gap:.3rem}.selection-editor-attr-label{font-size:.75rem;font-weight:500;color:color-mix(in srgb,canvastext 70%,transparent);font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}.citation-source-adapter-root{display:flex;flex-direction:column;gap:.75rem}.citation-source-item{display:flex;flex-direction:column;gap:.75rem;padding:.75rem .85rem;margin-bottom:.5rem;background:color-mix(in srgb,canvas 96%,white 4%);border:1px solid rgba(15,23,42,.12);border-radius:6px}.citation-source-item:last-of-type{margin-bottom:0}.citation-source-details{margin-top:.25rem;border:none}.citation-source-details-summary{font-size:.8rem;font-weight:500;color:color-mix(in srgb,canvastext 65%,transparent);cursor:pointer;list-style:none;-webkit-user-select:none;user-select:none}.citation-source-details-summary::-webkit-details-marker{display:none}.citation-source-details-summary:before{content:"▸ ";display:inline-block;margin-right:.25rem;transition:transform .15s ease}.citation-source-details[open] .citation-source-details-summary:before{transform:rotate(90deg)}.citation-source-details-body{display:flex;flex-direction:column;gap:.75rem;margin-top:.6rem;padding-left:.25rem}.citation-source-field{display:flex;flex-direction:column;gap:.35rem;min-width:0}.citation-source-field--checkbox{flex-direction:row;align-items:center;gap:.5rem}.citation-source-field--checkbox .selection-editor-attr-label{flex:0 0 auto}.citation-source-field .selection-editor-attr-label{font-size:.8rem;white-space:nowrap;overflow:visible}.citation-source-field .selection-editor-input{width:100%;min-height:2.25rem;padding:.45rem .65rem;font-size:.9rem;box-sizing:border-box}.citation-source-field--checkbox .selection-editor-input{width:auto;min-height:auto;margin:0;flex-shrink:0}.citation-source-field input[type=checkbox]{width:1.125rem;height:1.125rem;margin:0;cursor:pointer}.citation-source-add,.citation-source-remove{font-size:.7rem;padding:.2rem .4rem;border-radius:4px;border:1px solid rgba(15,23,42,.2);background:color-mix(in srgb,canvas 95%,white 5%);cursor:pointer;margin-top:.15rem}.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{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:.85rem;background:color-mix(in srgb,canvas 98%,white 2%);border:1px solid rgba(15,23,42,.16);border-radius:6px;padding:.4rem .6rem;width:100%;min-height:5rem;resize:vertical;color:color-mix(in srgb,canvastext 90%,transparent);box-sizing:border-box}.selection-editor-textarea:focus{outline:none;border-color:#2563eb}.selection-editor-math-preview{min-height:2.5rem;padding:.5rem;background:color-mix(in srgb,canvas 96%,white 4%);border:1px solid rgba(15,23,42,.12);border-radius:6px;overflow:auto}.selection-editor-math-preview:empty:before{content:"Preview updates as you type";font-style:italic;color:color-mix(in srgb,canvastext 50%,transparent)}.selection-editor-math-error{margin:.35rem 0 0;font-size:.8rem;color:#b91c1c;font-family:ui-monospace,monospace}.selection-editor-math-warnings{margin:.35rem 0 0;font-size:.8rem;color:color-mix(in srgb,canvastext 65%,transparent)}.selection-editor-math-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}.selection-editor-button{font-size:.85rem;padding:.4rem .75rem;border-radius:6px;border:1px solid rgba(15,23,42,.2);background:color-mix(in srgb,canvas 95%,white 5%);cursor:pointer;color:inherit}.selection-editor-button--secondary{font-size:.75rem;padding:.25rem .55rem}.selection-editor-button:hover{background:color-mix(in srgb,canvas 90%,white 10%)}.selection-editor-button--primary{background:#2563eb;border-color:#2563eb;color:#fff}.selection-editor-button--primary:hover{background:#1d4ed8}.selection-editor-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;margin-top:.25rem}.selection-editor-hint,.selection-editor-math-hint{font-size:.75rem;color:color-mix(in srgb,canvastext 55%,transparent)}.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{width:100%;box-sizing:border-box}.selection-editor-citation .selection-editor-field{gap:.4rem}.selection-editor-citation-pm{min-height:2.75rem}.selection-editor-citation-pm .ProseMirror{min-height:2.25rem;padding:.5rem .7rem;font-size:.9rem;outline:none}.selection-editor-citation-pm .ProseMirror p{margin:0}.selection-editor-citation-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}.selection-editor-citation-hint{font-size:.75rem;color:color-mix(in srgb,canvastext 55%,transparent)}@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{border-color:#94a3b859;background:color-mix(in srgb,canvas 90%,black 10%)}.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))}.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}}