@sciflow/editor-start 0.0.1-beta
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/README.md +130 -0
- package/dist/bundle/sciflow-editor.css +1 -0
- package/dist/bundle/sciflow-editor.js +18739 -0
- package/dist/demo/demo.js +56 -0
- package/dist/demo/index.html +169 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/lib/citation-drop.d.ts +25 -0
- package/dist/lib/citation-drop.d.ts.map +1 -0
- package/dist/lib/citation-drop.js +53 -0
- package/dist/lib/citation-source-adapter.d.ts +56 -0
- package/dist/lib/citation-source-adapter.d.ts.map +1 -0
- package/dist/lib/citation-source-adapter.js +126 -0
- package/dist/lib/editor-element.d.ts +256 -0
- package/dist/lib/editor-element.d.ts.map +1 -0
- package/dist/lib/editor-element.js +681 -0
- package/dist/lib/format-bar.d.ts +98 -0
- package/dist/lib/format-bar.d.ts.map +1 -0
- package/dist/lib/format-bar.js +401 -0
- package/dist/lib/outline.d.ts +94 -0
- package/dist/lib/outline.d.ts.map +1 -0
- package/dist/lib/outline.js +491 -0
- package/dist/lib/reference-list.d.ts +58 -0
- package/dist/lib/reference-list.d.ts.map +1 -0
- package/dist/lib/reference-list.js +160 -0
- package/dist/lib/selection-editor.d.ts +94 -0
- package/dist/lib/selection-editor.d.ts.map +1 -0
- package/dist/lib/selection-editor.js +467 -0
- package/dist/lib/theme.d.ts +8 -0
- package/dist/lib/theme.d.ts.map +1 -0
- package/dist/lib/theme.js +72 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -0
- package/package.json +104 -0
package/README.md
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# @sciflow/editor-start
|
|
2
|
+
|
|
3
|
+
Lit-based wrapper around the SciFlow ProseMirror schema. It loads all the packages required to get started with a basic editor.
|
|
4
|
+
|
|
5
|
+
## Building
|
|
6
|
+
|
|
7
|
+
- `npx nx build @sciflow/editor-start` — compile TypeScript output and declaration files.
|
|
8
|
+
- `npx nx bundle @sciflow/editor-start` — run the TypeScript build and emit an ES module bundle under `dist/bundle/` for the demo and browser usage.
|
|
9
|
+
|
|
10
|
+
## Running unit tests
|
|
11
|
+
|
|
12
|
+
- `npx nx test @sciflow/editor-start`
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<sciflow-editor id="demo-editor"></sciflow-editor>
|
|
18
|
+
<sciflow-formatbar id="demo-toolbar"></sciflow-formatbar>
|
|
19
|
+
|
|
20
|
+
<script type="module">
|
|
21
|
+
import '@sciflow/editor-start';
|
|
22
|
+
|
|
23
|
+
const editor = document.querySelector('sciflow-editor');
|
|
24
|
+
const toolbar = document.querySelector('sciflow-formatbar');
|
|
25
|
+
|
|
26
|
+
if (editor && toolbar) {
|
|
27
|
+
const bindToolbar = () => {
|
|
28
|
+
toolbar.editor = editor;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
editor.addEventListener('editor-ready', bindToolbar, { once: true });
|
|
32
|
+
bindToolbar();
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Companion elements for sidebars—`<sciflow-selection-editor>` and `<sciflow-reference-list>`—are also registered by the bundle. See `demo/` for wiring examples.
|
|
38
|
+
|
|
39
|
+
`editor-change` events include `{ doc, operations, files, references }`, where `files` mirrors uploaded assets (full URLs plus optional previews) maintained by the figure feature.
|
|
40
|
+
|
|
41
|
+
### Custom shadow-root styles
|
|
42
|
+
|
|
43
|
+
Inject CSS directly into the editor's shadow root to override the built-in ProseMirror styles without touching global stylesheets. Styles can be set before or after initialization:
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
const editor = document.querySelector('sciflow-editor');
|
|
47
|
+
|
|
48
|
+
// Option 1: Set via property (works before or after initialization)
|
|
49
|
+
editor.shadowStyles = [
|
|
50
|
+
'.ProseMirror { line-height: 1.6; }',
|
|
51
|
+
'.ProseMirror h1 { font-family: "Merriweather", serif; }',
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
// Option 2: Use the imperative method (recommended for dynamic updates)
|
|
55
|
+
editor.setShadowStyles(`
|
|
56
|
+
.ProseMirror p { max-width: 72ch; }
|
|
57
|
+
.ProseMirror a { color: rebeccapurple; }
|
|
58
|
+
`);
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Dynamic style injection** (e.g., for ProseMirror decorations added via plugins):
|
|
62
|
+
|
|
63
|
+
```js
|
|
64
|
+
// Initialize editor first
|
|
65
|
+
editor.doc = { doc: myDocument, files: [], references: [] };
|
|
66
|
+
|
|
67
|
+
// Later: add styles for decorations dynamically
|
|
68
|
+
editor.setShadowStyles([`
|
|
69
|
+
.my-annotation {
|
|
70
|
+
background: rgba(255, 200, 0, 0.3);
|
|
71
|
+
border-bottom: 2px solid orange;
|
|
72
|
+
}
|
|
73
|
+
.my-highlight {
|
|
74
|
+
background: yellow;
|
|
75
|
+
}
|
|
76
|
+
`]);
|
|
77
|
+
|
|
78
|
+
// Or append to existing styles (normalize first: shadowStyles can be string or string[])
|
|
79
|
+
const current = editor.shadowStyles;
|
|
80
|
+
const currentStyles = Array.isArray(current) ? current : current ? [current] : [];
|
|
81
|
+
editor.setShadowStyles([...currentStyles, `.my-new-decoration { background: pink; }`]);
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Use `setShadowStyles()` when you need styles applied immediately (e.g., after adding a plugin). Property assignment applies asynchronously via Lit's lifecycle.
|
|
85
|
+
|
|
86
|
+
### Global theme
|
|
87
|
+
|
|
88
|
+
Apply a single theme across all SciFlow components:
|
|
89
|
+
|
|
90
|
+
```js
|
|
91
|
+
import { setSciFlowThemeStyles } from '@sciflow/editor-start';
|
|
92
|
+
|
|
93
|
+
setSciFlowThemeStyles(`
|
|
94
|
+
:host {
|
|
95
|
+
--sciflow-accent: #2563eb;
|
|
96
|
+
--sciflow-surface: #ffffff;
|
|
97
|
+
}
|
|
98
|
+
`);
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Reference list
|
|
102
|
+
|
|
103
|
+
`<sciflow-reference-list>` renders a draggable, highlightable list of references (CSL-style objects). It does not auto-bind to the editor; push data into it from your own listeners:
|
|
104
|
+
|
|
105
|
+
```js
|
|
106
|
+
const refList = document.querySelector('sciflow-reference-list');
|
|
107
|
+
|
|
108
|
+
// When your editor change event fires:
|
|
109
|
+
refList.references = snapshot.references; // array of reference objects
|
|
110
|
+
refList.highlight(['ref-1', 'ref-2']); // optional highlighted ids
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Properties and behaviours:
|
|
114
|
+
- `references`: array of objects with fields like `id`, `rawCitation`/`raw_citation`, `author`, `title`, `issued`, etc.
|
|
115
|
+
- `highlightedIds`: string array; can also call `highlight(ids)` to update them.
|
|
116
|
+
- `id` and `rawCitation` are required. `rawCitation` can be any formatted bibliography string (including hand-written).
|
|
117
|
+
- `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.
|
|
118
|
+
- Dragging an item sets `application/json`, `application/x-sciflow-reference`, and `text/plain` payloads for integrations.
|
|
119
|
+
|
|
120
|
+
## Demo
|
|
121
|
+
|
|
122
|
+
- `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.
|
|
123
|
+
- `npx nx bundle @sciflow/editor-start` — single build of the browser bundle (useful when packaging the demo for sharing).
|
|
124
|
+
- `./build-demo-zip.sh` — convenience script that runs the bundle build and produces `sciflow-editor-demo.zip` containing `demo/` and `dist/bundle/`.
|
|
125
|
+
|
|
126
|
+
When you need to hand the demo to someone without repository access:
|
|
127
|
+
|
|
128
|
+
1. Run `npx nx bundle @sciflow/editor-start` to refresh `dist/bundle/`.
|
|
129
|
+
2. Zip `packages/editor/start/demo/` together with `packages/editor/start/dist/bundle/`.
|
|
130
|
+
3. They can unpack the archive and open `demo/index.html` (or serve the folder with any static server) to explore the integration.
|
|
@@ -0,0 +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}.editor{border:1px solid var(--sciflow-editor-border);border-radius:8px;padding:12px;min-height:200px;box-sizing:border-box;background:var(--sciflow-editor-background, #fff)}.editor:focus-within{border-color:var(--sciflow-editor-border-active);box-shadow:0 0 0 2px 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:.5rem 4rem .5rem 2.5rem;color:inherit}.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}.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}.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 img{max-width:40vw}.ProseMirror h1:before{content:"h1";opacity:.5;font-size:.8rem;position:absolute;left:0;transform:translateY(50%);padding-right:.5rem}.ProseMirror h1{font-size:1.5rem;padding-top:1em;font-weight:400}.ProseMirror h2{font-size:1.3em}.ProseMirror h2:before{content:"h2";opacity:.5;font-size:.8rem;padding-right:.5rem;position:absolute;left:0;transform:translateY(50%)}.ProseMirror h3{font-size:1.15em}.ProseMirror h3:before{content:"h3";opacity:.5;font-size:.8rem;padding-right:.5rem;position:absolute;left:0;transform:translateY(50%)}.ProseMirror section{margin-top:2.5rem}.ProseMirror section:first-child{margin-top:.5rem}.ProseMirror h2{font-size:1.25rem;font-weight:400}.ProseMirror h3,.ProseMirror h4,.ProseMirror h5,.ProseMirror h6{font-weight:400;font-size:1.05rem}.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 #8cf}li.ProseMirror-selectednode{outline:none}li.ProseMirror-selectednode:after{content:"";position:absolute;inset:-2px -2px -2px -32px;border:2px solid #8cf;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}.ProseMirror h1,.ProseMirror h2,.ProseMirror h3,.ProseMirror h4,.ProseMirror h5,.ProseMirror h6{color:inherit}.ProseMirror-selectednode{outline-color:#60a5facc}}:host{display:inline-flex;gap:8px;align-items:flex-start;color-scheme:light dark;border:1px solid var(--sciflow-formatbar-border, rgba(15, 23, 42, .05));border-radius:8px;padding:4px;background:var(--sciflow-formatbar-background, #f8fafc);box-shadow:var(--sciflow-formatbar-shadow, none);font-family:inherit}.style-select{display:inline-flex;align-items:center;min-height:36px;border:none;border-radius:6px;background:var(--sciflow-formatbar-select-background, white);color:var(--sciflow-formatbar-select-color, #1f2937);font:inherit;padding:0 12px;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)}button{appearance:none;border:none;background:transparent;border-radius:6px;padding:6px;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:36px;min-height:36px}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}button[data-tooltip]:after{content:attr(data-tooltip);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);background:#0f172ae6;color:#fff;padding:6px 8px;border-radius:6px;font-size:12px;line-height:1.2;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s ease;z-index:2}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" 24;font-size:20px;line-height:1}.command-rows{display:flex;flex-direction:column;gap:4px}.command-row{display:flex;flex-wrap:wrap;gap:4px;align-items:center}.command-row.table-row{border-top:1px solid var(--sciflow-formatbar-border, rgba(15, 23, 42, .12));padding-top:4px;margin-top:2px}@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}: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-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::placeholder{color:color-mix(in srgb,canvastext 50%,transparent);font-style:italic}.selection-editor-attrs{display:grid;gap:.6rem}.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:.5rem}.citation-source-item{display:grid;grid-template-columns:minmax(9rem,1fr) minmax(9rem,1fr);gap:.35rem .75rem;padding:.5rem .6rem;margin-bottom:.5rem;background:color-mix(in srgb,canvas 96%,white 4%);border:1px solid rgba(15,23,42,.12);border-radius:6px;align-items:start}.citation-source-item:last-of-type{margin-bottom:0}.citation-source-field{display:flex;flex-direction:column;gap:.2rem;min-width:0}.citation-source-field .selection-editor-attr-label{font-size:.7rem}.citation-source-field .selection-editor-input{width:100%;padding:.25rem .4rem;font-size:.8rem;box-sizing:border-box}.citation-source-field input[type=checkbox]{width:auto;margin:0;align-self:flex-start}.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}
|