@researai/deepscientist 1.5.15 → 1.5.17
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 +385 -104
- package/bin/ds.js +1241 -110
- package/docs/en/00_QUICK_START.md +100 -19
- package/docs/en/01_SETTINGS_REFERENCE.md +34 -1
- package/docs/en/02_START_RESEARCH_GUIDE.md +7 -0
- package/docs/en/05_TUI_GUIDE.md +6 -0
- package/docs/en/06_RUNTIME_AND_CANVAS.md +4 -3
- package/docs/en/09_DOCTOR.md +25 -8
- package/docs/en/14_PROMPT_SKILLS_AND_MCP_GUIDE.md +63 -13
- package/docs/en/15_CODEX_PROVIDER_SETUP.md +37 -11
- package/docs/en/19_EXTERNAL_CONTROLLER_GUIDE.md +226 -0
- package/docs/en/19_LOCAL_BROWSER_AUTH.md +70 -0
- package/docs/en/20_WORKSPACE_MODES_GUIDE.md +250 -0
- package/docs/en/21_LOCAL_MODEL_BACKENDS_GUIDE.md +283 -0
- package/docs/en/91_DEVELOPMENT.md +237 -0
- package/docs/en/README.md +24 -2
- package/docs/zh/00_QUICK_START.md +89 -19
- package/docs/zh/01_SETTINGS_REFERENCE.md +34 -1
- package/docs/zh/02_START_RESEARCH_GUIDE.md +7 -0
- package/docs/zh/05_TUI_GUIDE.md +6 -0
- package/docs/zh/09_DOCTOR.md +26 -9
- package/docs/zh/14_PROMPT_SKILLS_AND_MCP_GUIDE.md +63 -13
- package/docs/zh/15_CODEX_PROVIDER_SETUP.md +37 -11
- package/docs/zh/19_EXTERNAL_CONTROLLER_GUIDE.md +226 -0
- package/docs/zh/19_LOCAL_BROWSER_AUTH.md +68 -0
- package/docs/zh/20_WORKSPACE_MODES_GUIDE.md +251 -0
- package/docs/zh/21_LOCAL_MODEL_BACKENDS_GUIDE.md +281 -0
- package/docs/zh/README.md +24 -2
- package/install.sh +46 -4
- package/package.json +2 -1
- package/pyproject.toml +1 -1
- package/src/deepscientist/__init__.py +1 -1
- package/src/deepscientist/acp/envelope.py +6 -0
- package/src/deepscientist/artifact/service.py +647 -22
- package/src/deepscientist/bash_exec/service.py +234 -9
- package/src/deepscientist/bridges/connectors.py +8 -2
- package/src/deepscientist/cli.py +115 -19
- package/src/deepscientist/codex_cli_compat.py +367 -22
- package/src/deepscientist/config/models.py +2 -1
- package/src/deepscientist/config/service.py +183 -13
- package/src/deepscientist/daemon/api/handlers.py +255 -31
- package/src/deepscientist/daemon/api/router.py +9 -0
- package/src/deepscientist/daemon/app.py +1146 -105
- package/src/deepscientist/diagnostics/__init__.py +6 -0
- package/src/deepscientist/diagnostics/runner_failures.py +130 -0
- package/src/deepscientist/doctor.py +207 -3
- package/src/deepscientist/gitops/__init__.py +10 -1
- package/src/deepscientist/gitops/diff.py +129 -0
- package/src/deepscientist/gitops/service.py +4 -1
- package/src/deepscientist/mcp/server.py +39 -0
- package/src/deepscientist/prompts/builder.py +275 -34
- package/src/deepscientist/quest/layout.py +15 -2
- package/src/deepscientist/quest/service.py +707 -55
- package/src/deepscientist/quest/stage_views.py +6 -1
- package/src/deepscientist/runners/codex.py +143 -43
- package/src/deepscientist/shared.py +19 -0
- package/src/deepscientist/skills/__init__.py +2 -2
- package/src/deepscientist/skills/installer.py +196 -5
- package/src/deepscientist/skills/registry.py +66 -0
- package/src/prompts/connectors/qq.md +18 -8
- package/src/prompts/connectors/weixin.md +16 -6
- package/src/prompts/contracts/shared_interaction.md +14 -2
- package/src/prompts/system.md +23 -5
- package/src/prompts/system_copilot.md +56 -0
- package/src/skills/analysis-campaign/SKILL.md +1 -0
- package/src/skills/baseline/SKILL.md +8 -0
- package/src/skills/decision/SKILL.md +8 -0
- package/src/skills/experiment/SKILL.md +8 -0
- package/src/skills/figure-polish/SKILL.md +1 -0
- package/src/skills/finalize/SKILL.md +1 -0
- package/src/skills/idea/SKILL.md +1 -0
- package/src/skills/intake-audit/SKILL.md +8 -0
- package/src/skills/mentor/SKILL.md +217 -0
- package/src/skills/mentor/references/correction-rules.md +210 -0
- package/src/skills/mentor/references/knowledge-profile.md +91 -0
- package/src/skills/mentor/references/persona-profile.md +138 -0
- package/src/skills/mentor/references/taste-profile.md +128 -0
- package/src/skills/mentor/references/thought-style-profile.md +138 -0
- package/src/skills/mentor/references/work-profile.md +289 -0
- package/src/skills/mentor/references/workflow-profile.md +240 -0
- package/src/skills/optimize/SKILL.md +1 -0
- package/src/skills/rebuttal/SKILL.md +1 -0
- package/src/skills/review/SKILL.md +1 -0
- package/src/skills/scout/SKILL.md +8 -0
- package/src/skills/write/SKILL.md +1 -0
- package/src/tui/dist/app/AppContainer.js +19 -11
- package/src/tui/dist/index.js +4 -1
- package/src/tui/dist/lib/api.js +33 -3
- package/src/tui/package.json +1 -1
- package/src/ui/dist/assets/AiManusChatView-Bv-Z8YpU.js +204 -0
- package/src/ui/dist/assets/AnalysisPlugin-BCKAfjba.js +1 -0
- package/src/ui/dist/assets/CliPlugin-BCKcpc35.js +109 -0
- package/src/ui/dist/assets/CodeEditorPlugin-DbOfSJ8K.js +2 -0
- package/src/ui/dist/assets/CodeViewerPlugin-CbaFRrUU.js +270 -0
- package/src/ui/dist/assets/DocViewerPlugin-DAjLVeQD.js +7 -0
- package/src/ui/dist/assets/GitCommitViewerPlugin-CIUqbUDO.js +1 -0
- package/src/ui/dist/assets/GitDiffViewerPlugin-CQACjoAA.js +6 -0
- package/src/ui/dist/assets/GitSnapshotViewer-0r4nLPke.js +30 -0
- package/src/ui/dist/assets/ImageViewerPlugin-nBOmI2v_.js +26 -0
- package/src/ui/dist/assets/LabCopilotPanel-BHxOxF4z.js +14 -0
- package/src/ui/dist/assets/LabPlugin-BKoZGs95.js +22 -0
- package/src/ui/dist/assets/LatexPlugin-ZwtV8pIp.js +25 -0
- package/src/ui/dist/assets/MarkdownViewerPlugin-DKqVfKyW.js +128 -0
- package/src/ui/dist/assets/MarketplacePlugin-BwxStZ9D.js +13 -0
- package/src/ui/dist/assets/NotebookEditor-BEQhaQbt.js +81 -0
- package/src/ui/dist/assets/{NotebookEditor-CccQYZjX.css → NotebookEditor-BHH8rdGj.css} +1 -1
- package/src/ui/dist/assets/NotebookEditor-BOr3x3Ej.css +1 -0
- package/src/ui/dist/assets/NotebookEditor-DB9N_T9q.js +361 -0
- package/src/ui/dist/assets/PdfLoader-Cy5jtWrr.css +1 -0
- package/src/ui/dist/assets/PdfLoader-eWBONbQP.js +16 -0
- package/src/ui/dist/assets/PdfMarkdownPlugin-D22YOZL3.js +1 -0
- package/src/ui/dist/assets/PdfViewerPlugin-c-RK9DLM.js +17 -0
- package/src/ui/dist/assets/PdfViewerPlugin-nwwE-fjJ.css +1 -0
- package/src/ui/dist/assets/SearchPlugin-CxF9ytAx.js +16 -0
- package/src/ui/dist/assets/SearchPlugin-DA4en4hK.css +1 -0
- package/src/ui/dist/assets/TextViewerPlugin-C5xqeeUH.js +54 -0
- package/src/ui/dist/assets/VNCViewer-BoLGLnHz.js +11 -0
- package/src/ui/dist/assets/bot-DREQOxzP.js +6 -0
- package/src/ui/dist/assets/browser-CTB2jwNe.js +8 -0
- package/src/ui/dist/assets/chevron-up-C9Qpx4DE.js +6 -0
- package/src/ui/dist/assets/code-WlFHE7z_.js +6 -0
- package/src/ui/dist/assets/file-content-BZMz3RYp.js +1 -0
- package/src/ui/dist/assets/file-diff-panel-CQhw0jS2.js +1 -0
- package/src/ui/dist/assets/file-jump-queue-DA-SdG__.js +1 -0
- package/src/ui/dist/assets/file-socket-CfQPKQKj.js +1 -0
- package/src/ui/dist/assets/git-commit-horizontal-DxZ8DCZh.js +6 -0
- package/src/ui/dist/assets/image-Bgl4VIyx.js +6 -0
- package/src/ui/dist/assets/index-BpV6lusQ.css +33 -0
- package/src/ui/dist/assets/index-CBNVuWcP.js +2496 -0
- package/src/ui/dist/assets/index-CwNu1aH4.js +11 -0
- package/src/ui/dist/assets/index-DrUnlf6K.js +1 -0
- package/src/ui/dist/assets/index-NW-h8VzN.js +1 -0
- package/src/ui/dist/assets/monaco-CiHMMNH_.js +1 -0
- package/src/ui/dist/assets/pdf-effect-queue-J8OnM0jE.js +6 -0
- package/src/ui/dist/assets/plugin-monaco-C8UgLomw.js +19 -0
- package/src/ui/dist/assets/plugin-notebook-HbW2K-1c.js +169 -0
- package/src/ui/dist/assets/plugin-pdf-CR8hgQBV.js +357 -0
- package/src/ui/dist/assets/plugin-terminal-MXFIPun8.js +227 -0
- package/src/ui/dist/assets/popover-CLc0pPP8.js +1 -0
- package/src/ui/dist/assets/project-sync-C9IdzdZW.js +1 -0
- package/src/ui/dist/assets/select-Cs2PmzwL.js +11 -0
- package/src/ui/dist/assets/sigma-ClKcHAXm.js +6 -0
- package/src/ui/dist/assets/trash-DwpbFr3w.js +11 -0
- package/src/ui/dist/assets/useCliAccess-NQ8m0Let.js +1 -0
- package/src/ui/dist/assets/useFileDiffOverlay-FuhcnKiw.js +1 -0
- package/src/ui/dist/assets/wrap-text-BC-Hltpd.js +11 -0
- package/src/ui/dist/assets/zoom-out-E_gaeAxL.js +11 -0
- package/src/ui/dist/index.html +5 -2
- package/src/ui/dist/assets/AiManusChatView-DDjbFnbt.js +0 -26597
- package/src/ui/dist/assets/AnalysisPlugin-Yb5IdmaU.js +0 -123
- package/src/ui/dist/assets/CliPlugin-e64sreyu.js +0 -31037
- package/src/ui/dist/assets/CodeEditorPlugin-C4D2TIkU.js +0 -427
- package/src/ui/dist/assets/CodeViewerPlugin-BVoNZIvC.js +0 -905
- package/src/ui/dist/assets/DocViewerPlugin-CLChbllo.js +0 -278
- package/src/ui/dist/assets/GitDiffViewerPlugin-C4xeFyFQ.js +0 -2661
- package/src/ui/dist/assets/ImageViewerPlugin-OiMUAcLi.js +0 -500
- package/src/ui/dist/assets/LabCopilotPanel-BjD2ThQF.js +0 -4104
- package/src/ui/dist/assets/LabPlugin-DQPg-NrB.js +0 -2677
- package/src/ui/dist/assets/LatexPlugin-CI05XAV9.js +0 -1792
- package/src/ui/dist/assets/MarkdownViewerPlugin-DpeBLYZf.js +0 -308
- package/src/ui/dist/assets/MarketplacePlugin-DolE58Q2.js +0 -413
- package/src/ui/dist/assets/NotebookEditor-7Qm2rSWD.js +0 -4214
- package/src/ui/dist/assets/NotebookEditor-C1kWaxKi.js +0 -84873
- package/src/ui/dist/assets/NotebookEditor-C3VQ7ylN.css +0 -1405
- package/src/ui/dist/assets/PdfLoader-BfOHw8Zw.js +0 -25468
- package/src/ui/dist/assets/PdfLoader-C-Y707R3.css +0 -49
- package/src/ui/dist/assets/PdfMarkdownPlugin-BulDREv1.js +0 -409
- package/src/ui/dist/assets/PdfViewerPlugin-C-daaOaL.js +0 -3095
- package/src/ui/dist/assets/PdfViewerPlugin-DQ11QcSf.css +0 -3627
- package/src/ui/dist/assets/SearchPlugin-CjpaiJ3A.js +0 -741
- package/src/ui/dist/assets/SearchPlugin-DDMrGDkh.css +0 -379
- package/src/ui/dist/assets/TextViewerPlugin-BxIyqPQC.js +0 -472
- package/src/ui/dist/assets/VNCViewer-HAg9mF7M.js +0 -18821
- package/src/ui/dist/assets/awareness-C0NPR2Dj.js +0 -292
- package/src/ui/dist/assets/bot-0DYntytV.js +0 -21
- package/src/ui/dist/assets/browser-BAcuE0Xj.js +0 -2895
- package/src/ui/dist/assets/code-B20Slj_w.js +0 -17
- package/src/ui/dist/assets/file-content-DT24KFma.js +0 -377
- package/src/ui/dist/assets/file-diff-panel-DK13YPql.js +0 -92
- package/src/ui/dist/assets/file-jump-queue-r5XKgJEV.js +0 -16
- package/src/ui/dist/assets/file-socket-B4T2o4nR.js +0 -58
- package/src/ui/dist/assets/function-B5QZkkHC.js +0 -1895
- package/src/ui/dist/assets/image-DSeR_sDS.js +0 -18
- package/src/ui/dist/assets/index-BrFje2Uk.js +0 -120
- package/src/ui/dist/assets/index-BwRJaoTl.js +0 -25
- package/src/ui/dist/assets/index-D_E4281X.js +0 -221322
- package/src/ui/dist/assets/index-DnYB3xb1.js +0 -159
- package/src/ui/dist/assets/index-G7AcWcMu.css +0 -12594
- package/src/ui/dist/assets/monaco-LExaAN3Y.js +0 -623
- package/src/ui/dist/assets/pdf-effect-queue-BJk5okWJ.js +0 -47
- package/src/ui/dist/assets/pdf_viewer-e0g1is2C.js +0 -8206
- package/src/ui/dist/assets/popover-D3Gg_FoV.js +0 -476
- package/src/ui/dist/assets/project-sync-C_ygLlVU.js +0 -297
- package/src/ui/dist/assets/select-CpAK6uWm.js +0 -1690
- package/src/ui/dist/assets/sigma-DEccaSgk.js +0 -22
- package/src/ui/dist/assets/square-check-big-uUfyVsbD.js +0 -17
- package/src/ui/dist/assets/trash-CXvwwSe8.js +0 -32
- package/src/ui/dist/assets/useCliAccess-Bnop4mgR.js +0 -957
- package/src/ui/dist/assets/useFileDiffOverlay-B8eUAX0I.js +0 -53
- package/src/ui/dist/assets/wrap-text-9vbOBpkW.js +0 -35
- package/src/ui/dist/assets/yjs-DncrqiZ8.js +0 -11243
- package/src/ui/dist/assets/zoom-out-BgVMmOW4.js +0 -34
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CBNVuWcP.js","assets/plugin-monaco-C8UgLomw.js","assets/plugin-terminal-MXFIPun8.js","assets/plugin-notebook-HbW2K-1c.js","assets/index-BpV6lusQ.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{u as E,a as F,a8 as I,c as $,j as e,L as T,C as L,a9 as R,h as P,E as H,b as k,d as O,e as W,M as A,_ as V}from"./index-CBNVuWcP.js";import{r as n,R as G}from"./plugin-monaco-C8UgLomw.js";import{C as q}from"./code-WlFHE7z_.js";import"./plugin-notebook-HbW2K-1c.js";import"./plugin-terminal-MXFIPun8.js";function B(t){return t?/\.mdx$/i.test(t.trim()):!1}function K(t){if(!t.startsWith("---"))return t;const i=t.match(/^---\s*\n[\s\S]*?\n---\s*\n?/);return i?t.slice(i[0].length):t}function U(t,i={}){if(!i.isMdx)return t;const l=K(t).split(/\r?\n/),r=[];let a=!1,c=!1;for(const s of l){const o=s.trim();if(/^(```|~~~)/.test(o)){a=!a,c=!0,r.push(s);continue}if(a){r.push(s);continue}if(!c){if(!o||/^(import|export)\s/.test(o)||/^\{\/\*.*\*\/\}$/.test(o))continue;c=!0}/^\{\/\*.*\*\/\}$/.test(o)||r.push(s)}return r.join(`
|
|
3
|
+
`)}const z=`# DeepScientist Markdown Viewer
|
|
4
|
+
|
|
5
|
+
Welcome to the **Markdown Viewer** plugin. This viewer supports [GitHub Flavored Markdown](https://github.github.com/gfm/) with additional features.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
### Text Formatting
|
|
10
|
+
|
|
11
|
+
- **Bold text** using \`**bold**\`
|
|
12
|
+
- *Italic text* using \`*italic*\`
|
|
13
|
+
- ***Bold and italic*** using \`***combined***\`
|
|
14
|
+
- ~~Strikethrough~~ using \`~~text~~\`
|
|
15
|
+
- \`Inline code\` using backticks
|
|
16
|
+
|
|
17
|
+
### Code Blocks
|
|
18
|
+
|
|
19
|
+
\`\`\`typescript
|
|
20
|
+
interface Document {
|
|
21
|
+
id: string;
|
|
22
|
+
title: string;
|
|
23
|
+
content: string;
|
|
24
|
+
tags: string[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async function fetchDocument(id: string): Promise<Document> {
|
|
28
|
+
const response = await fetch(\`/api/documents/\${id}\`);
|
|
29
|
+
return response.json();
|
|
30
|
+
}
|
|
31
|
+
\`\`\`
|
|
32
|
+
|
|
33
|
+
### Math Support
|
|
34
|
+
|
|
35
|
+
Inline math: $E = mc^2$
|
|
36
|
+
|
|
37
|
+
Display math:
|
|
38
|
+
|
|
39
|
+
$$
|
|
40
|
+
\\int_{-\\infty}^{\\infty} e^{-x^2} dx = \\sqrt{\\pi}
|
|
41
|
+
$$
|
|
42
|
+
|
|
43
|
+
### Tables (GFM)
|
|
44
|
+
|
|
45
|
+
| Feature | Status | Priority |
|
|
46
|
+
|---------|--------|----------|
|
|
47
|
+
| Markdown rendering | Done | High |
|
|
48
|
+
| Code highlighting | Done | High |
|
|
49
|
+
| Math formulas | Done | Medium |
|
|
50
|
+
| Export to PDF | Planned | Low |
|
|
51
|
+
|
|
52
|
+
### Task Lists (GFM)
|
|
53
|
+
|
|
54
|
+
- [x] Implement markdown parser
|
|
55
|
+
- [x] Add code highlighting
|
|
56
|
+
- [ ] Add export functionality
|
|
57
|
+
- [ ] Implement search
|
|
58
|
+
|
|
59
|
+
### Blockquotes
|
|
60
|
+
|
|
61
|
+
> This is a blockquote.
|
|
62
|
+
> It can span multiple lines.
|
|
63
|
+
>
|
|
64
|
+
> Use it for citations or important notes.
|
|
65
|
+
|
|
66
|
+
### Images
|
|
67
|
+
|
|
68
|
+
Images are loaded lazily for better performance:
|
|
69
|
+
|
|
70
|
+

|
|
71
|
+
|
|
72
|
+
### Links
|
|
73
|
+
|
|
74
|
+
- [Visit our website](https://example.com)
|
|
75
|
+
- [GitHub Repository](https://github.com/example/deepscientist)
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Getting Started
|
|
80
|
+
|
|
81
|
+
1. Open a markdown file
|
|
82
|
+
2. The viewer will render it automatically
|
|
83
|
+
3. Use the toolbar to toggle between rendered and source view
|
|
84
|
+
4. Copy the source using the copy button
|
|
85
|
+
|
|
86
|
+
Happy writing! :rocket:
|
|
87
|
+
`,Q=`# DeepScientist Markdown 查看器
|
|
88
|
+
|
|
89
|
+
欢迎使用 **Markdown 查看器** 插件。该查看器支持 [GitHub Flavored Markdown](https://github.github.com/gfm/) 及更多增强能力。
|
|
90
|
+
|
|
91
|
+
## 功能特性
|
|
92
|
+
|
|
93
|
+
### 文本格式
|
|
94
|
+
|
|
95
|
+
- 使用 \`**粗体**\` 显示 **粗体**
|
|
96
|
+
- 使用 \`*斜体*\` 显示 *斜体*
|
|
97
|
+
- 使用 \`***加粗斜体***\` 显示 ***加粗斜体***
|
|
98
|
+
- 使用 \`~~删除线~~\` 显示 ~~删除线~~
|
|
99
|
+
- 使用反引号显示 \`行内代码\`
|
|
100
|
+
|
|
101
|
+
### 数学公式
|
|
102
|
+
|
|
103
|
+
行内公式:$E = mc^2$
|
|
104
|
+
|
|
105
|
+
块级公式:
|
|
106
|
+
|
|
107
|
+
$$
|
|
108
|
+
\\int_{-\\infty}^{\\infty} e^{-x^2} dx = \\sqrt{\\pi}
|
|
109
|
+
$$
|
|
110
|
+
|
|
111
|
+
### 表格
|
|
112
|
+
|
|
113
|
+
| 功能 | 状态 | 优先级 |
|
|
114
|
+
|------|------|--------|
|
|
115
|
+
| Markdown 渲染 | 已完成 | 高 |
|
|
116
|
+
| 代码高亮 | 已完成 | 高 |
|
|
117
|
+
| 数学公式 | 已完成 | 中 |
|
|
118
|
+
| 导出 PDF | 规划中 | 低 |
|
|
119
|
+
|
|
120
|
+
### 开始使用
|
|
121
|
+
|
|
122
|
+
1. 打开一个 Markdown 文件
|
|
123
|
+
2. 查看器会自动完成渲染
|
|
124
|
+
3. 使用顶部工具栏在渲染视图和源码视图之间切换
|
|
125
|
+
4. 使用复制按钮复制源内容
|
|
126
|
+
|
|
127
|
+
祝你写作顺利!:rocket:
|
|
128
|
+
`;function te({context:t,tabId:i,setDirty:y,setTitle:l}){const{t:r,language:a}=E("markdown_viewer"),c=F(f=>f.updateTabState),[s,o]=n.useState(""),[j,x]=n.useState(!0),[h,g]=n.useState(null),[M,w]=n.useState(!1),[d,b]=n.useState("rendered"),u=t.resourceName||t.resourcePath||"Untitled.md",m=B(u),v=U(s,{isMdx:m}),N=G.useMemo(()=>I(t.resourceId),[t.resourceId]);n.useEffect(()=>{l(u)},[u,l]),n.useEffect(()=>{c(i,{contentKind:m?"mdx":"markdown",documentMode:d,isReadOnly:!0})},[m,i,c,d]),n.useEffect(()=>{(async()=>{x(!0),g(null);try{if(!t.resourceId){o(a==="zh-CN"?Q:z),x(!1);return}const{getFileContent:p}=await V(async()=>{const{getFileContent:S}=await import("./index-CBNVuWcP.js").then(_=>_.em);return{getFileContent:S}},__vite__mapDeps([0,1,2,3,4])),D=await p(t.resourceId);o(D)}catch(p){g(p instanceof Error?p.message:r("load_failed"))}finally{x(!1)}})()},[t.resourceId,a,r]);const C=n.useCallback(async()=>{await $(s)&&(w(!0),setTimeout(()=>w(!1),2e3))},[s]);return j?e.jsx("div",{className:"flex items-center justify-center h-full bg-background",children:e.jsxs("div",{className:"flex flex-col items-center gap-3 text-muted-foreground",children:[e.jsx(T,{className:"w-8 h-8 animate-spin"}),e.jsx("span",{children:r("loading")})]})}):h?e.jsx("div",{className:"flex items-center justify-center h-full bg-background",children:e.jsxs("div",{className:"flex flex-col items-center gap-3 text-destructive",children:[e.jsx(L,{className:"w-8 h-8"}),e.jsx("span",{children:h}),e.jsx("button",{className:"px-4 py-2 text-sm bg-destructive/10 hover:bg-destructive/20 rounded-lg transition-colors",onClick:()=>window.location.reload(),children:r("retry")})]})}):e.jsxs("div",{className:"flex flex-col h-full bg-background text-foreground",children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:R}}),e.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-border bg-muted/30",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(P,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm text-foreground",children:u}),e.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted text-muted-foreground",children:m?"MDX":"Markdown"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs("div",{className:"flex items-center border border-border rounded-md mr-2",children:[e.jsx("button",{onClick:()=>b("rendered"),className:k("p-2 rounded-l-md transition-colors",d==="rendered"?"bg-primary text-primary-foreground":"hover:bg-accent text-muted-foreground"),title:r("rendered_view"),children:e.jsx(H,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>b("source"),className:k("p-2 rounded-r-md transition-colors",d==="source"?"bg-primary text-primary-foreground":"hover:bg-accent text-muted-foreground"),title:r("source_view"),children:e.jsx(q,{className:"w-4 h-4"})})]}),e.jsx("button",{onClick:C,className:"p-2 rounded hover:bg-accent transition-colors text-muted-foreground hover:text-foreground",title:r("copy_source"),children:M?e.jsx(O,{className:"w-4 h-4 text-green-500"}):e.jsx(W,{className:"w-4 h-4"})})]})]}),e.jsx("div",{className:"flex-1 overflow-auto",children:d==="rendered"?e.jsx("div",{className:"max-w-4xl mx-auto p-8",children:e.jsx(A,{content:v,questContext:N})}):e.jsx("pre",{className:"p-4 font-mono text-sm whitespace-pre-wrap",children:s})})]})}export{te as default};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{y as F,ac as O,m as R,ad as D,f as m,s as o,j as t,k as S,O as A,ae as C,af as V,ag as _,ah as E,h as w,ai as X,b as P}from"./index-CBNVuWcP.js";import{r as f}from"./plugin-monaco-C8UgLomw.js";import{S as W}from"./sigma-ClKcHAXm.js";import{I as q}from"./image-Bgl4VIyx.js";import"./plugin-notebook-HbW2K-1c.js";import"./plugin-terminal-MXFIPun8.js";/**
|
|
2
|
+
* @license lucide-react v0.511.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const B=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],M=F("code-xml",B);/**
|
|
7
|
+
* @license lucide-react v0.511.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const $=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],z=F("scroll-text",$);function G(d){const a=d.customData?.projectId;return typeof a=="string"?a:null}function U(d,a){const r=d.trim();return!r||r.includes(".")?r:`${r}${a}`}function K(d){const a=U(d,".md"),p=`# ${a.replace(/\.md$/i,"")}
|
|
12
|
+
|
|
13
|
+
`;return new File([p],a,{type:"text/markdown"})}function T(d){const a=new Date().toISOString().slice(0,10),r=Math.random().toString(36).slice(2,6);return`${d}-${a}-${r}`}const H=[{id:o.SEARCH,title:"Search",description:"Find files by name or path.",icon:S,badge:"tool",requiresProject:!0},{id:"@ds/plugin-analysis",title:"Analysis",description:"Reusable prompts and analysis recipes.",icon:A,badge:"tool",requiresProject:!0},{id:o.CLI,title:"CLI",description:"Remote CLI sessions and agent tooling.",icon:C,badge:"tool",requiresProject:!0},{id:o.SETTINGS,title:"Settings",description:"Quest-focused settings and workspace preferences.",icon:V,badge:"system"},{id:"@ds/plugin-marketplace",title:"Plugin Marketplace",description:"Browse and organize installed plugins.",icon:_,badge:"system"}],Q=[{id:o.NOTEBOOK,title:"Notebook",description:"Create a new markdown notebook file.",icon:E,badge:"authoring",requiresProject:!0,openLabel:"New"},{id:o.LATEX,title:"LaTeX",description:"Create a new LaTeX project folder.",icon:W,badge:"authoring",requiresProject:!0,openLabel:"New"}],Y=[{id:o.PDF_VIEWER,title:"PDF Viewer",description:"View and annotate PDFs with highlights.",icon:w,badge:"pdf",openMode:"disabled",openLabel:"Auto",disabledReason:"Opens when you select a PDF file."},{id:o.PDF_MARKDOWN,title:"PDF Markdown",description:"Read MinerU Markdown output from PDFs.",icon:X,badge:"pdf",openMode:"disabled",openLabel:"Auto",disabledReason:"Opens after selecting a PDF and switching to Markdown view."}],Z=[{id:o.CODE_EDITOR,title:"Code Editor",description:"Monaco editor with autosave.",icon:M,badge:"viewer",openMode:"disabled",openLabel:"Auto",disabledReason:"Opens when you select a code file."},{id:o.CODE_VIEWER,title:"Code Viewer",description:"Read-only viewer with syntax highlighting.",icon:M,badge:"viewer",openMode:"disabled",openLabel:"Auto",disabledReason:"Opens when you select a supported code file."},{id:o.MARKDOWN_VIEWER,title:"Markdown Viewer",description:"Render Markdown with GFM + math.",icon:z,badge:"viewer",openMode:"disabled",openLabel:"Auto",disabledReason:"Opens when you select a Markdown file."},{id:o.TEXT_VIEWER,title:"Text Viewer",description:"Plain text viewer with search tools.",icon:w,badge:"viewer",openMode:"disabled",openLabel:"Auto",disabledReason:"Opens when you select a text file."},{id:o.IMAGE_VIEWER,title:"Image Viewer",description:"Zoom, pan, and inspect images.",icon:q,badge:"viewer",openMode:"disabled",openLabel:"Auto",disabledReason:"Opens when you select an image file."},{id:"@ds/plugin-doc-viewer",title:"Document Viewer",description:"Preview Word, Excel, and PowerPoint files.",icon:w,badge:"viewer",openMode:"disabled",openLabel:"Auto",disabledReason:"Opens when you select a document file."}],J=[{id:"panel:arxiv",title:"ArXiv Import",description:"Import papers from arXiv into your workspace.",icon:E,badge:"integration",openMode:"disabled",openLabel:"Use sidebar",disabledReason:"Use the ArXiv panel in the left sidebar."}],ee=[{id:"workspace-tools",title:"Workspace tools",subtitle:"Openable as tabs",plugins:H},{id:"authoring",title:"Authoring",subtitle:"Notes and documents",plugins:Q},{id:"pdf-tools",title:"PDF workflow",subtitle:"View, extract, and publish",plugins:Y},{id:"file-viewers",title:"Viewers & editors",subtitle:"Auto-picked based on file type",plugins:Z},{id:"integrations",title:"Integrations",subtitle:"External sources",plugins:J}];function re({context:d,setTitle:a}){f.useEffect(()=>a("Plugin Marketplace"),[a]);const r=O(),p=R(e=>e.openTab),{openFileInTab:j}=D(),y=m(e=>e.projectId),N=m(e=>e.loadFiles),k=m(e=>e.upload),v=m(e=>e.createLatexProject),x=m(e=>e.highlightFile),s=G(d),h=f.useCallback(async()=>s?(y!==s&&await N(s),!0):!1,[N,s,y]),L=f.useCallback(async e=>{if(e.openMode==="disabled"||e.requiresProject&&!s)return;if(e.id===o.SETTINGS){r("/settings");return}if(e.id===o.NOTEBOOK){try{if(!await h()||!s)return;const c=T("Notebook"),n=K(c),b=await k(null,[n]),u=b.find(g=>g.type==="file")||b[0];u&&(x(u.id),await j(u,{customData:{projectId:s}}))}catch(l){console.error("[MarketplacePlugin] Failed to create notebook file:",l)}return}if(e.id===o.LATEX){try{if(!await h()||!s)return;const c=T("LaTeX"),n=await v(null,c);x(n.id),p({pluginId:e.id,context:{type:"custom",resourceId:n.id,resourceName:n.name,customData:{projectId:s,latexFolderId:n.id,mainFileId:n.latex?.mainFileId??null}},title:n.name})}catch(l){console.error("[MarketplacePlugin] Failed to create LaTeX project:",l)}return}const i={type:e.contextType??"custom",resourceName:e.resourceName??e.title,resourcePath:e.resourcePath,mimeType:e.mimeType,customData:s?{projectId:s,...e.customData??{}}:e.customData};p({pluginId:e.id,context:i,title:e.tabTitle??e.resourceName??e.title})},[v,h,x,j,p,s,k,r]);return t.jsx("div",{className:"h-full",children:t.jsxs("div",{className:"max-w-5xl",children:[t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Plugin Marketplace"}),t.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Browse built-in plugins and jump straight in. File-based viewers open automatically when you select a file."})]}),t.jsx("div",{className:"hidden sm:flex items-center gap-2 text-xs text-muted-foreground",children:t.jsx("span",{className:"px-2 py-1 rounded-full border border-border bg-muted/30",children:"Built-in"})})]}),ee.map(e=>t.jsxs("div",{className:"mt-8",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground",children:e.title}),e.subtitle?t.jsx("div",{className:"text-xs text-muted-foreground",children:e.subtitle}):null]}),t.jsx("div",{className:"mt-3 grid grid-cols-1 md:grid-cols-2 gap-4",children:e.plugins.map(i=>{const l=i.icon,c=i.id==="@ds/plugin-marketplace",n=i.requiresProject&&!s,b=i.openMode!=="disabled"||n,u=c||n,g=c?"You're here":n?"Requires project":i.openLabel??"Open",I=n?"Open a project to use this plugin.":i.disabledReason;return t.jsxs("div",{className:P("rounded-2xl border border-border bg-card/90 backdrop-blur p-5","shadow-sm hover:shadow-md transition-shadow"),children:[t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[t.jsx("span",{className:"inline-flex h-10 w-10 items-center justify-center rounded-xl bg-muted text-foreground",children:t.jsx(l,{className:"h-5 w-5"})}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-sm font-semibold text-foreground",children:i.title}),t.jsx("div",{className:"mt-0.5 text-xs text-muted-foreground",children:i.description}),t.jsx("div",{className:"mt-2 text-[11px] font-mono text-muted-foreground truncate",children:i.id})]})]}),t.jsx("span",{className:"shrink-0 px-2 py-1 rounded-full border border-border bg-muted/30 text-[10px] text-muted-foreground",children:i.badge??"built-in"})]}),t.jsxs("div",{className:"mt-4",children:[b?t.jsx("button",{type:"button",onClick:()=>void L(i),disabled:u,className:P("inline-flex items-center justify-center px-3 py-1.5 rounded-xl text-sm","border border-border bg-background hover:bg-accent/40 transition-colors text-foreground",u&&"opacity-50 cursor-not-allowed"),children:g}):t.jsx("span",{className:"inline-flex items-center px-3 py-1.5 rounded-xl text-xs border border-border bg-muted/30 text-muted-foreground",children:i.openLabel??"Auto"}),I?t.jsx("div",{className:"mt-2 text-[11px] text-muted-foreground",children:I}):null]})]},i.id)})})]},e.id)),t.jsx("div",{className:"mt-8 text-xs text-muted-foreground",children:"Want external plugins? That's next: sandboxing, permissions, and a loader that can fetch + verify bundles."})]})})}export{re as default};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import{y as j,j as e,J as B,l as Be,d as re,b as Y,bu as rt,c3 as at,c4 as U,c5 as it,c6 as lt,u as fe,n as ct,Y as me,L as Fe,e as dt,C as ut,f as mt,a8 as ft,c7 as pt,c8 as ht,c9 as Ce,Z as Ae}from"./index-CBNVuWcP.js";import{r as a}from"./plugin-monaco-C8UgLomw.js";import{m as gt,l as xt,w as se,P as Pe,g as W,s as oe,q as bt,u as ce,r as Ee,d as vt,J as de,U as kt,I as yt,T as wt,B as jt,O as Nt,S as Tt,K as Ct,G as Me,c as At,i as Et}from"./NotebookEditor-DB9N_T9q.js";import{D as Mt,e as It,a as Ie,m as Rt,u as D,f as St,C as zt}from"./plugin-notebook-HbW2K-1c.js";import{P as Dt}from"./project-sync-C9IdzdZW.js";import{S as He}from"./index-CwNu1aH4.js";import{C as pe}from"./code-WlFHE7z_.js";import{I as Lt}from"./image-Bgl4VIyx.js";import{P as he,a as ge,b as xe}from"./popover-CLc0pPP8.js";import{T as _t,A as Bt}from"./trash-DwpbFr3w.js";import{S as Ft}from"./sigma-ClKcHAXm.js";import{u as Pt}from"./useFileDiffOverlay-FuhcnKiw.js";import{F as Ht}from"./file-diff-panel-CQhw0jS2.js";/**
|
|
2
|
+
* @license lucide-react v0.511.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const Ut=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],Ot=j("bold",Ut);/**
|
|
7
|
+
* @license lucide-react v0.511.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const Vt=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]],be=j("heading-1",Vt);/**
|
|
12
|
+
* @license lucide-react v0.511.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const qt=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]],Ue=j("heading-2",qt);/**
|
|
17
|
+
* @license lucide-react v0.511.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const $t=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]],Oe=j("heading-3",$t);/**
|
|
22
|
+
* @license lucide-react v0.511.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const Yt=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],Kt=j("italic",Yt);/**
|
|
27
|
+
* @license lucide-react v0.511.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const Gt=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],Ve=j("list-ordered",Gt);/**
|
|
32
|
+
* @license lucide-react v0.511.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const Qt=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],qe=j("list",Qt);/**
|
|
37
|
+
* @license lucide-react v0.511.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const Wt=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M9 10h6",key:"9gxzsh"}]],Jt=j("message-square-plus",Wt);/**
|
|
42
|
+
* @license lucide-react v0.511.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const Xt=[["path",{d:"M5 12h14",key:"1ays0h"}]],Re=j("minus",Xt);/**
|
|
47
|
+
* @license lucide-react v0.511.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/const Zt=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],eo=j("strikethrough",Zt);/**
|
|
52
|
+
* @license lucide-react v0.511.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const to=[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]],oo=j("table-2",to);/**
|
|
57
|
+
* @license lucide-react v0.511.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const no=[["path",{d:"M17 6H3",key:"16j9eg"}],["path",{d:"M21 12H8",key:"scolzb"}],["path",{d:"M21 18H8",key:"1wfozv"}],["path",{d:"M3 12v6",key:"fv4c87"}]],$e=j("text-quote",no);/**
|
|
62
|
+
* @license lucide-react v0.511.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const so=[["path",{d:"M15 18H3",key:"olowqp"}],["path",{d:"M17 6H3",key:"16j9eg"}],["path",{d:"M21 12H3",key:"2avoz0"}]],Ye=j("text",so);/**
|
|
67
|
+
* @license lucide-react v0.511.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const ro=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]],ao=j("twitter",ro);/**
|
|
72
|
+
* @license lucide-react v0.511.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const io=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],lo=j("underline",io);/**
|
|
77
|
+
* @license lucide-react v0.511.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const co=[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]],uo=j("youtube",co),mo=new Set([".md",".markdown",".mdx"]),fo=new Set(["text/markdown","text/x-markdown"]);function po(o){if(!o)return null;const n=o.lastIndexOf(".");return n<0?null:o.slice(n).toLowerCase()}function ho(o,n){if(n&&fo.has(n))return!0;const t=po(o);return t?mo.has(t):!1}function go(o){const n=o.customData?.docKind;if(n==="markdown"||n==="notebook")return n;if(o.type==="notebook")return"notebook";const t=o.customData,l=typeof o.mimeType=="string"?o.mimeType:typeof t?.mimeType=="string"?t.mimeType:typeof t?.fileMeta?.mimeType=="string"?t.fileMeta.mimeType:void 0;return ho(o.resourceName,l)?"markdown":"notebook"}const ue="ds-remote";async function xo(o){const{projectId:n,notebookId:t,readonly:l=!1,onStatus:d,onReset:r}=o,u=new Dt(n,{authMode:"user",docKind:"notebook"}),p=new Mt;let y=!1,x=null,M=null,g=[];const w=h=>{d&&(d(h),h==="saved"&&(M!=null&&window.clearTimeout(M),M=window.setTimeout(()=>d("idle"),1500)))},ve=()=>{x!=null&&window.clearTimeout(x),x=window.setTimeout(()=>void f(),250)},f=async()=>{if(y||l||g.length===0)return;const h=g;g=[];try{w("saving");const v=h.length===1?h[0]:Rt(h);await u.pushDocUpdate(t,v),w("saved")}catch(v){console.error("[NovelYjsProvider] Failed to push update:",v),w("error")}};await u.connect();const T=await u.loadDoc(t,It(p));T?.missing&&Ie(p,T.missing,ue);const K=u.onDocUpdate(h=>{h.docId===t&&Ie(p,h.update,ue)}),I=u.onDocReset(h=>{h.docId===t&&r?.({timestamp:h.timestamp,reason:h.reason,actorUserId:h.actorUserId??null})}),E=(h,v)=>{v!==ue&&(l||(g.push(h),ve()))};return p.on("update",E),{ydoc:p,dispose:()=>{y=!0,x!=null&&window.clearTimeout(x),M!=null&&window.clearTimeout(M),p.off("update",E),K?.(),I?.(),u.disconnect()}}}function bo(o){return[{title:"Send Feedback",description:"Let us know how we can improve.",icon:e.jsx(Jt,{size:18}),command:({editor:n,range:t})=>{n.chain().focus().deleteRange(t).run(),window.open("/feedback","_blank")}},{title:"Text",description:"Just start typing with plain text.",searchTerms:["p","paragraph"],icon:e.jsx(Ye,{size:18}),command:({editor:n,range:t})=>{n.chain().focus().deleteRange(t).toggleNode("paragraph","paragraph").run()}},{title:"To-do List",description:"Track tasks with a to-do list.",searchTerms:["todo","task","list","check","checkbox"],icon:e.jsx(He,{size:18}),command:({editor:n,range:t})=>{n.chain().focus().deleteRange(t).toggleTaskList().run()}},{title:"Heading 1",description:"Big section heading.",searchTerms:["title","big","large"],icon:e.jsx(be,{size:18}),command:({editor:n,range:t})=>{n.chain().focus().deleteRange(t).setNode("heading",{level:1}).run()}},{title:"Heading 2",description:"Medium section heading.",searchTerms:["subtitle","medium"],icon:e.jsx(Ue,{size:18}),command:({editor:n,range:t})=>{n.chain().focus().deleteRange(t).setNode("heading",{level:2}).run()}},{title:"Heading 3",description:"Small section heading.",searchTerms:["subtitle","small"],icon:e.jsx(Oe,{size:18}),command:({editor:n,range:t})=>{n.chain().focus().deleteRange(t).setNode("heading",{level:3}).run()}},{title:"Bullet List",description:"Create a simple bullet list.",searchTerms:["unordered","point"],icon:e.jsx(qe,{size:18}),command:({editor:n,range:t})=>{n.chain().focus().deleteRange(t).toggleBulletList().run()}},{title:"Numbered List",description:"Create a list with numbering.",searchTerms:["ordered"],icon:e.jsx(Ve,{size:18}),command:({editor:n,range:t})=>{n.chain().focus().deleteRange(t).toggleOrderedList().run()}},{title:"Quote",description:"Capture a quote.",searchTerms:["blockquote"],icon:e.jsx($e,{size:18}),command:({editor:n,range:t})=>n.chain().focus().deleteRange(t).toggleNode("paragraph","paragraph").toggleBlockquote().run()},{title:"Code",description:"Capture a code snippet.",searchTerms:["codeblock"],icon:e.jsx(pe,{size:18}),command:({editor:n,range:t})=>n.chain().focus().deleteRange(t).toggleCodeBlock().run()},{title:"Table",description:"Insert a table with rows and columns.",searchTerms:["table","grid","spreadsheet","data"],icon:e.jsx(oo,{size:18}),command:({editor:n,range:t})=>{n.chain().focus().deleteRange(t).insertTable({rows:3,cols:3,withHeaderRow:!0}).run()}},{title:"Image",description:"Upload an image from your computer.",searchTerms:["photo","picture","media"],icon:e.jsx(Lt,{size:18}),command:({editor:n,range:t})=>{n.chain().focus().deleteRange(t).run();const l=document.createElement("input");l.type="file",l.accept="image/*",l.onchange=async()=>{if(l.files?.length){const d=l.files[0];await o(d,n)}},l.click()}},{title:"Youtube",description:"Embed a Youtube video.",searchTerms:["video","youtube","embed"],icon:e.jsx(uo,{size:18}),command:({editor:n,range:t})=>{const l=prompt("Please enter Youtube Video Link");if(!l)return;new RegExp(/^((?:https?:)?\/\/)?((?:www|m)\.)?((?:youtube\.com|youtu.be))(\/(?:[\w\-]+\?v=|embed\/|v\/)?)([\w\-]+)(\S+)?$/).test(l)?n.chain().focus().deleteRange(t).setYoutubeVideo({src:l}).run():alert("Please enter a correct Youtube Video Link")}},{title:"Twitter",description:"Embed a Tweet.",searchTerms:["twitter","embed"],icon:e.jsx(ao,{size:18}),command:({editor:n,range:t})=>{const l=prompt("Please enter Twitter Link");if(!l)return;new RegExp(/^https?:\/\/(www\.)?x\.com\/([a-zA-Z0-9_]{1,15})(\/status\/(\d+))?(\/\S*)?$/).test(l)?n.chain().focus().deleteRange(t).setTweet({src:l}).run():alert("Please enter a correct Twitter Link")}}]}function vo(o){return gt.configure({suggestion:{items:()=>o,render:xt}})}const Se=[{name:"Text",icon:Ye,command:o=>o.chain().focus().clearNodes().run(),isActive:o=>o.isActive("paragraph")&&!o.isActive("bulletList")&&!o.isActive("orderedList")},{name:"Heading 1",icon:be,command:o=>o.chain().focus().clearNodes().toggleHeading({level:1}).run(),isActive:o=>o.isActive("heading",{level:1})},{name:"Heading 2",icon:Ue,command:o=>o.chain().focus().clearNodes().toggleHeading({level:2}).run(),isActive:o=>o.isActive("heading",{level:2})},{name:"Heading 3",icon:Oe,command:o=>o.chain().focus().clearNodes().toggleHeading({level:3}).run(),isActive:o=>o.isActive("heading",{level:3})},{name:"To-do List",icon:He,command:o=>o.chain().focus().clearNodes().toggleTaskList().run(),isActive:o=>o.isActive("taskItem")},{name:"Bullet List",icon:qe,command:o=>o.chain().focus().clearNodes().toggleBulletList().run(),isActive:o=>o.isActive("bulletList")},{name:"Numbered List",icon:Ve,command:o=>o.chain().focus().clearNodes().toggleOrderedList().run(),isActive:o=>o.isActive("orderedList")},{name:"Quote",icon:$e,command:o=>o.chain().focus().clearNodes().toggleBlockquote().run(),isActive:o=>o.isActive("blockquote")},{name:"Code",icon:pe,command:o=>o.chain().focus().clearNodes().toggleCodeBlock().run(),isActive:o=>o.isActive("codeBlock")}],ko=({open:o,onOpenChange:n})=>{const{editor:t}=D();if(!t)return null;const l=Se.filter(d=>d.isActive(t)).pop()??{name:"Multiple"};return e.jsxs(he,{open:o,onOpenChange:n,children:[e.jsx(ge,{asChild:!0,children:e.jsxs(B,{size:"sm",variant:"ghost",className:"gap-2 rounded-none border-none hover:bg-accent focus:ring-0",children:[e.jsx("span",{className:"whitespace-nowrap text-sm",children:l.name}),e.jsx(Be,{className:"h-4 w-4"})]})}),e.jsx(xe,{sideOffset:5,align:"start",className:"w-48 p-1",children:Se.map(d=>e.jsxs(se,{onSelect:r=>{d.command(r),n(!1)},className:"flex cursor-pointer items-center justify-between rounded-sm px-2 py-1 text-sm hover:bg-accent",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("div",{className:"rounded-sm border p-1",children:e.jsx(d.icon,{className:"h-3 w-3"})}),e.jsx("span",{children:d.name})]}),l.name===d.name&&e.jsx(re,{className:"h-4 w-4"})]},d.name))})]})},yo=()=>{const{editor:o}=D();if(!o)return null;const n=[{name:"bold",isActive:t=>t.isActive("bold"),command:t=>t.chain().focus().toggleBold().run(),icon:Ot},{name:"italic",isActive:t=>t.isActive("italic"),command:t=>t.chain().focus().toggleItalic().run(),icon:Kt},{name:"underline",isActive:t=>t.isActive("underline"),command:t=>t.chain().focus().toggleUnderline().run(),icon:lo},{name:"strike",isActive:t=>t.isActive("strike"),command:t=>t.chain().focus().toggleStrike().run(),icon:eo},{name:"code",isActive:t=>t.isActive("code"),command:t=>t.chain().focus().toggleCode().run(),icon:pe}];return e.jsx("div",{className:"flex",children:n.map(t=>e.jsx(se,{onSelect:l=>{t.command(l)},children:e.jsx(B,{size:"sm",className:"rounded-none",variant:"ghost",type:"button",children:e.jsx(t.icon,{className:Y("h-4 w-4",{"text-blue-500":t.isActive(o)})})})},t.name))})};function wo(o){try{return new URL(o),!0}catch{return!1}}function jo(o){if(wo(o))return o;try{if(o.includes(".")&&!o.includes(" "))return new URL(`https://${o}`).toString()}catch{return null}return null}const No=({open:o,onOpenChange:n})=>{const t=a.useRef(null),{editor:l}=D();return a.useEffect(()=>{o&&t.current?.focus()},[o]),l?e.jsxs(he,{open:o,onOpenChange:n,children:[e.jsx(ge,{asChild:!0,children:e.jsxs(B,{size:"sm",variant:"ghost",className:"gap-2 rounded-none border-none",children:[e.jsx("p",{className:"text-base",children:"↗"}),e.jsx("p",{className:Y("underline decoration-stone-400 underline-offset-4",{"text-blue-500":l.isActive("link")}),children:"Link"})]})}),e.jsx(xe,{align:"start",className:"w-60 p-0",sideOffset:10,children:e.jsxs("form",{onSubmit:d=>{const r=d.currentTarget;d.preventDefault();const u=r[0],p=jo(u.value);p&&(l.chain().focus().setLink({href:p}).run(),n(!1))},className:"flex p-1",children:[e.jsx("input",{ref:t,type:"text",placeholder:"Paste a link",className:"flex-1 bg-background p-1 text-sm outline-none",defaultValue:l.getAttributes("link").href||""}),l.getAttributes("link").href?e.jsx(B,{size:"icon",variant:"outline",type:"button",className:"flex h-8 items-center rounded-sm p-1 text-red-600 transition-all hover:bg-red-100 dark:hover:bg-red-800",onClick:()=>{l.chain().focus().unsetLink().run(),t.current&&(t.current.value=""),n(!1)},children:e.jsx(_t,{className:"h-4 w-4"})}):e.jsx(B,{size:"icon",type:"submit",className:"h-8",children:e.jsx(re,{className:"h-4 w-4"})})]})})]}):null},ze=[{name:"Default",color:"var(--novel-black)"},{name:"Purple",color:"#9333EA"},{name:"Red",color:"#E00000"},{name:"Yellow",color:"#EAB308"},{name:"Blue",color:"#2563EB"},{name:"Green",color:"#008A00"},{name:"Orange",color:"#FFA500"},{name:"Pink",color:"#BA4081"},{name:"Gray",color:"#A8A29E"}],De=[{name:"Default",color:"var(--novel-highlight-default)"},{name:"Purple",color:"var(--novel-highlight-purple)"},{name:"Red",color:"var(--novel-highlight-red)"},{name:"Yellow",color:"var(--novel-highlight-yellow)"},{name:"Blue",color:"var(--novel-highlight-blue)"},{name:"Green",color:"var(--novel-highlight-green)"},{name:"Orange",color:"var(--novel-highlight-orange)"},{name:"Pink",color:"var(--novel-highlight-pink)"},{name:"Gray",color:"var(--novel-highlight-gray)"}],To=({open:o,onOpenChange:n})=>{const{editor:t}=D();if(!t)return null;const l=ze.find(({color:r})=>t.isActive("textStyle",{color:r})),d=De.find(({color:r})=>t.isActive("highlight",{color:r}));return e.jsxs(he,{open:o,onOpenChange:n,children:[e.jsx(ge,{asChild:!0,children:e.jsxs(B,{size:"sm",className:"gap-2 rounded-none",variant:"ghost",children:[e.jsx("span",{className:"rounded-sm px-1",style:{color:l?.color,backgroundColor:d?.color},children:"A"}),e.jsx(Be,{className:"h-4 w-4"})]})}),e.jsxs(xe,{sideOffset:5,className:"my-1 flex max-h-80 w-48 flex-col overflow-hidden overflow-y-auto rounded border p-1 shadow-xl",align:"start",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"my-1 px-2 text-sm font-semibold text-muted-foreground",children:"Color"}),ze.map(({name:r,color:u})=>e.jsx(se,{onSelect:()=>{t.commands.unsetColor(),r!=="Default"&&t.chain().focus().setColor(u||"").run(),n(!1)},className:"flex cursor-pointer items-center justify-between px-2 py-1 text-sm hover:bg-accent",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"rounded-sm border px-2 py-px font-medium",style:{color:u},children:"A"}),e.jsx("span",{children:r})]})},r))]}),e.jsxs("div",{children:[e.jsx("div",{className:"my-1 px-2 text-sm font-semibold text-muted-foreground",children:"Background"}),De.map(({name:r,color:u})=>e.jsxs(se,{onSelect:()=>{t.commands.unsetHighlight(),r!=="Default"&&t.chain().focus().setHighlight({color:u}).run(),n(!1)},className:"flex cursor-pointer items-center justify-between px-2 py-1 text-sm hover:bg-accent",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"rounded-sm border px-2 py-px font-medium",style:{backgroundColor:u},children:"A"}),e.jsx("span",{children:r})]}),t.isActive("highlight",{color:u})&&e.jsx(re,{className:"h-4 w-4"})]},r))]})]})]})},Co=()=>{const{editor:o}=D();return o?e.jsx(B,{variant:"ghost",size:"sm",className:"rounded-none w-12",onClick:()=>{if(o.isActive("math"))o.chain().focus().unsetLatex().run();else{const{from:n,to:t}=o.state.selection,l=o.state.doc.textBetween(n,t);if(!l)return;o.chain().focus().setLatex({latex:l}).run()}},children:e.jsx(Ft,{className:Y("size-4",{"text-blue-500":o.isActive("math")}),strokeWidth:2.3})}):null},Ao="notebook-table-bubble-menu",_=({label:o,onClick:n,disabled:t,icon:l,tone:d="default"})=>e.jsx(B,{type:"button",size:"icon",variant:"ghost",disabled:t,onClick:n,title:o,className:Y("h-8 w-8",d==="destructive"&&"text-destructive hover:text-destructive"),children:e.jsx(l,{className:"h-4 w-4"})}),Ke=({className:o})=>{const{editor:n}=D();if(!n)return null;const t=n.can();return e.jsxs("div",{className:Y("flex flex-wrap items-center gap-1 rounded-md border border-muted bg-background p-1 shadow-md",o),children:[e.jsx(_,{label:"Add column before",icon:rt,onClick:()=>n.chain().focus().addColumnBefore().run(),disabled:!t.addColumnBefore()}),e.jsx(_,{label:"Add column after",icon:at,onClick:()=>n.chain().focus().addColumnAfter().run(),disabled:!t.addColumnAfter()}),e.jsx(U,{orientation:"vertical",className:"h-5"}),e.jsx(_,{label:"Add row above",icon:it,onClick:()=>n.chain().focus().addRowBefore().run(),disabled:!t.addRowBefore()}),e.jsx(_,{label:"Add row below",icon:Bt,onClick:()=>n.chain().focus().addRowAfter().run(),disabled:!t.addRowAfter()}),e.jsx(U,{orientation:"vertical",className:"h-5"}),e.jsx(_,{label:"Toggle header row",icon:be,onClick:()=>n.chain().focus().toggleHeaderRow().run(),disabled:!t.toggleHeaderRow()}),e.jsx(U,{orientation:"vertical",className:"h-5"}),e.jsx(_,{label:"Delete column",icon:Re,onClick:()=>n.chain().focus().deleteColumn().run(),disabled:!t.deleteColumn()}),e.jsx(_,{label:"Delete row",icon:Re,onClick:()=>n.chain().focus().deleteRow().run(),disabled:!t.deleteRow()}),e.jsx(_,{label:"Delete table",icon:lt,onClick:()=>n.chain().focus().deleteTable().run(),disabled:!t.deleteTable(),tone:"destructive"})]})};function Eo(o){const{$from:n}=o.state.selection,t=St(n,d=>d.type.name==="table");if(!t)return null;const l=o.view.nodeDOM(t.pos);return l instanceof HTMLElement?l:null}const Mo=({className:o})=>{const{editor:n}=D();return!n||n.isDestroyed?null:e.jsx(Pe,{pluginKey:Ao,shouldShow:({editor:t})=>t.isEditable&&t.isActive("table"),tippyOptions:{placement:"bottom",moveTransition:"transform 0.15s ease-out"},children:e.jsx(Ke,{className:o})})},Io=({className:o})=>{const{editor:n}=D(),[t,l]=a.useState(null),d=a.useCallback(()=>{if(!n||n.isDestroyed||!n.isEditable){l(null);return}if(!n.isActive("table")){l(null);return}const u=Eo(n);if(!u){l(null);return}const p=n.view.dom.parentElement||n.view.dom,y=p.getBoundingClientRect(),x=u.getBoundingClientRect(),M=x.top-y.top+p.scrollTop-12,g=x.left-y.left+p.scrollLeft;l({top:M,left:g,width:x.width})},[n]),r=a.useMemo(()=>{let u=0;return()=>{u||(u=window.requestAnimationFrame(()=>{u=0,d()}))}},[d]);return a.useEffect(()=>{if(!n||n.isDestroyed)return;const u=n.view.dom.parentElement||n.view.dom;return d(),n.on("selectionUpdate",r),n.on("transaction",r),n.on("focus",r),n.on("blur",r),u.addEventListener("scroll",r,{passive:!0}),window.addEventListener("resize",r),()=>{n.off("selectionUpdate",r),n.off("transaction",r),n.off("focus",r),n.off("blur",r),u.removeEventListener("scroll",r),window.removeEventListener("resize",r)}},[n,r,d]),!n||n.isDestroyed||!t?null:e.jsx("div",{className:Y("absolute z-30",o),style:{top:t.top,left:t.left,width:t.width},children:e.jsx(Ke,{className:"w-full justify-start"})})},Ro=()=>{const{editor:o}=D(),[n,t]=a.useState(!1),[l,d]=a.useState(!1),[r,u]=a.useState(!1);return o?e.jsx(Pe,{tippyOptions:{placement:"top",onHidden:()=>{t(!1),d(!1),u(!1)}},className:"flex w-fit max-w-[90vw] overflow-hidden rounded-md border border-muted bg-background shadow-xl",children:e.jsxs(a.Fragment,{children:[e.jsx(ko,{open:n,onOpenChange:t}),e.jsx(U,{orientation:"vertical"}),e.jsx(No,{open:r,onOpenChange:u}),e.jsx(U,{orientation:"vertical"}),e.jsx(Co,{}),e.jsx(U,{orientation:"vertical"}),e.jsx(yo,{}),e.jsx(U,{orientation:"vertical"}),e.jsx(To,{open:l,onOpenChange:d})]})}):null};function O({width:o,className:n=""}){return e.jsx("div",{className:`h-4 bg-muted rounded animate-pulse ${n}`,style:{width:o}})}function ne(){return e.jsxs("div",{className:"space-y-2",children:[e.jsx(O,{width:"85%"}),e.jsx(O,{width:"70%"}),e.jsx(O,{width:"90%"})]})}function Le({message:o="Loading..."}){const{t:n}=fe("notebook"),t=o==="Loading..."?n("loading"):o;return e.jsxs("div",{className:"editor-loading h-full flex flex-col bg-background",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b",children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsx("div",{className:"w-32 h-7 bg-muted rounded animate-pulse"})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 bg-muted rounded animate-pulse"}),e.jsx("div",{className:"w-8 h-8 bg-muted rounded animate-pulse"}),e.jsx("div",{className:"w-8 h-8 bg-muted rounded animate-pulse"})]})]}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsxs("div",{className:"max-w-[900px] mx-auto px-16 py-12 space-y-8",children:[e.jsx("div",{className:"h-10 bg-muted rounded animate-pulse w-2/3"}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(ne,{}),e.jsx(ne,{}),e.jsx("div",{className:"pt-4",children:e.jsx("div",{className:"h-6 bg-muted rounded animate-pulse w-1/2"})}),e.jsx(ne,{}),e.jsxs("div",{className:"bg-muted/50 rounded-md p-4 space-y-2",children:[e.jsx(O,{width:"60%",className:"h-3"}),e.jsx(O,{width:"80%",className:"h-3"}),e.jsx(O,{width:"45%",className:"h-3"}),e.jsx(O,{width:"70%",className:"h-3"})]}),e.jsx(ne,{})]})]})}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:e.jsxs("div",{className:"flex flex-col items-center gap-3 bg-background/80 px-6 py-4 rounded-lg shadow-lg backdrop-blur-sm",children:[e.jsxs("div",{className:"relative w-8 h-8",children:[e.jsx("div",{className:"absolute inset-0 border-2 border-muted rounded-full"}),e.jsx("div",{className:"absolute inset-0 border-2 border-primary border-t-transparent rounded-full animate-spin"})]}),e.jsx("span",{className:"text-sm text-muted-foreground",children:t})]})})]})}function So({status:o}){const{t:n}=fe("notebook");switch(o){case"saving":return e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(Fe,{className:"w-3 h-3 animate-spin"}),e.jsx("span",{children:n("saving")})]});case"saved":return e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-green-600",children:[e.jsx(re,{className:"w-3 h-3"}),e.jsx("span",{children:n("saved")})]});case"error":return e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-destructive",children:[e.jsx(ut,{className:"w-3 h-3"}),e.jsx("span",{children:n("save_failed")})]});default:return null}}function zo({notebookId:o,autoSaveStatus:n,getMarkdown:t,allowCopy:l=!0}){const[d,r]=a.useState(!1),{toast:u}=ct(),{t:p}=fe("notebook"),y=l&&(!!o||!!t),x=a.useCallback(async()=>{if(t){const g=await Promise.resolve(t());if(typeof g=="string")return g}return o?await me(o):""},[t,o]),M=a.useCallback(async()=>{if(y){r(!0);try{const g=await x();if(navigator?.clipboard?.writeText)await navigator.clipboard.writeText(g);else{const w=document.createElement("textarea");w.value=g,w.style.position="fixed",w.style.opacity="0",document.body.appendChild(w),w.focus(),w.select(),document.execCommand("copy"),w.remove()}u({title:p("copy_success_title"),description:p("copy_success_desc"),variant:"success"})}catch(g){console.error("[NotebookToolbar] Copy failed:",g),u({title:p("copy_failed_title"),description:p("try_again"),variant:"destructive"})}finally{r(!1)}}},[y,x,p,u]);return e.jsxs("div",{className:"notebook-toolbar flex items-center justify-between px-4 py-2 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(So,{status:n})}),e.jsx("div",{className:"flex items-center gap-1",children:y?e.jsx("button",{type:"button",className:"flex items-center gap-1.5 px-2.5 py-1.5 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-md transition-colors",onClick:M,title:p("copy"),children:d?e.jsx(Fe,{className:"w-4 h-4 animate-spin"}):e.jsx(dt,{className:"w-4 h-4"})}):null})]})}const Do={type:"doc",content:[{type:"paragraph"}]},_e="prosemirror";function Lo(o){const n=o.state.doc;if(n.childCount!==1)return!1;const t=n.firstChild;return t?t.type.name!=="paragraph"?!1:t.content.size===0&&n.textContent.trim().length===0:!0}function Jo({context:o,setDirty:n,setTitle:t,className:l,onMarkdownChange:d}){const r=o.resourceId,u=o.resourceName||"Untitled Notebook",p=typeof o.customData?.inlineMarkdown=="string"?o.customData.inlineMarkdown:null,y=p!==null,x=o.customData?.readonly===!0||y,M=mt(s=>s.projectId),g=typeof o.customData?.projectId=="string"?o.customData.projectId:M||void 0,w=o.resourcePath??void 0,f=go(o)==="markdown",T=a.useMemo(()=>f?ft(r):null,[f,r]),K=a.useRef(null),I=a.useRef(g),E=a.useRef(null),F=a.useRef(null),h=a.useRef(null),v=a.useRef(null),ke=a.useRef(null),R=a.useRef(!1),[b,ye]=a.useState(null),[V,ae]=a.useState(null),[k,ie]=a.useState(null),S=a.useRef(null),[Ge,J]=a.useState(null),[Qe,P]=a.useState(!0),[we,G]=a.useState(null),[X,N]=a.useState("idle"),[We,Je]=a.useState(0),{diffEvent:Q,clearDiff:Xe}=Pt({fileId:r??void 0,filePath:w,projectId:g}),Ze=a.useCallback(()=>b?W(b):typeof k=="string"?k:typeof S.current=="string"?S.current:"",[b,k]),q=a.useCallback(s=>f?pt(s,T):s,[f,T]),je=a.useCallback(s=>f?ht(s,T):s,[f,T]),Z=a.useCallback(async s=>{if(!b||!r||!f)return;const c=W(b),i=h.current??c;if(!(!s&&c!==i))try{const m=q(await me(r));R.current=!0,oe(b,m),h.current=m}catch(m){console.warn("[NotebookEditor] Failed to refresh markdown",m)}},[b,f,r,q]),$=r??null;ke.current!==$&&(ke.current=$,v.current=null),a.useEffect(()=>{Q?.diff&&Z(!1)},[Q,Z]),a.useEffect(()=>{if(!r||y)return;const s=c=>{const i=c.detail;i&&(i.fileId&&i.fileId!==r||!i.fileId&&i.filePath&&w&&i.filePath!==w||!i.fileId&&!i.filePath||Z(!!i.force))};return window.addEventListener("ds:file:reload",s),()=>window.removeEventListener("ds:file:reload",s)},[w,y,r,Z]);const C=a.useMemo(()=>bt({onUpload:async s=>{const c=I.current;if(!c)throw console.warn("[NotebookEditor] upload skipped: missing projectId",{fileName:s.name,fileType:s.type}),new Error("Missing project ID for upload.");if(console.debug("[NotebookEditor] upload start",{fileName:s.name,fileType:s.type,fileSize:s.size}),f&&T){const i=await Ce(c,T.baseDocumentId,s,"image");return String(Ee(i.asset_url))}return ce(c,s,"image")},validateFn:s=>{try{return I.current?Et(s,"image")?s.size>10*1024*1024?(console.warn("[NotebookEditor] validate failed: size limit",{fileName:s.name,fileSize:s.size}),!1):!0:(console.warn("[NotebookEditor] validate failed: unsupported image",{fileName:s.name,fileType:s.type}),!1):(console.warn("[NotebookEditor] validate failed: missing projectId",{fileName:s.name,fileType:s.type}),!1)}catch{return console.warn("[NotebookEditor] validate failed: unexpected error",{fileName:s.name,fileType:s.type}),!1}}}),[f,T]);a.useEffect(()=>{I.current=g},[g]);const ee=a.useCallback(async s=>{const c=I.current;if(!b||!c)return;const i=s.filter(m=>m.type.startsWith("video/"));if(i.length!==0)for(const m of i)try{console.debug("[NotebookEditor] video upload start",{fileName:m.name,fileType:m.type,fileSize:m.size});const A=await ce(c,m,"video");b.chain().focus().insertContent({type:"video",attrs:{src:A}}).run()}catch(A){console.error("[NotebookEditor] Video upload failed:",A)}},[b]);a.useEffect(()=>{t(u)},[u,t]),a.useEffect(()=>{n(X==="saving"||X==="error")},[X,n]),a.useEffect(()=>{!b||k===null||r&&v.current===r&&k.trim()&&Lo(b)&&(R.current=!0,oe(b,k),f?h.current=k:S.current=k)},[b,k,f,r]),a.useEffect(()=>{d&&f&&k!==null&&d(k)},[k,f,d]);const Ne=a.useCallback(async(s,c)=>{const i=I.current;if(i)try{console.debug("[NotebookEditor] image upload start",{fileName:s.name,fileType:s.type,fileSize:s.size});const m=f&&T?String(Ee((await Ce(i,T.baseDocumentId,s,"image")).asset_url)):await ce(i,s,"image");c.chain().focus().setImage({src:m}).run()}catch(m){console.error("[NotebookEditor] Image upload failed:",m)}},[f,T]),le=a.useMemo(()=>bo(Ne),[Ne]),Te=a.useMemo(()=>vo(le),[le]),et=a.useMemo(()=>{const s=[...vt,Te];return V&&s.unshift(zt.configure({document:V,field:_e})),s},[V,Te]);a.useEffect(()=>{if(y){G(null),P(!1),N("idle"),ie(q(p??"")),ae(null),J($),h.current=q(p??""),S.current=p??"",R.current=!1,v.current=$;return}if(!r){G("No notebook ID provided"),P(!1);return}G(null),P(!0),N("idle"),ie(null),ae(null),J(null),h.current=null,S.current=null,R.current=!1,v.current=null;let s=!1;return(async()=>{try{let i=null;try{i=await me(r)}catch(z){if(f)throw z;console.warn("[NotebookEditor] Failed to load markdown for notebook:",z)}if(s)return;const m=q(i??"");if(ie(m),S.current=i??"",f){h.current=m,v.current=r,J(r),P(!1);return}if(!g){G("No project ID provided"),P(!1);return}const A=await xo({projectId:g,notebookId:r,readonly:x,onStatus:N,onReset:()=>{setHistoryOpen(!1),setCollaboratorsOpen(!1),Je(z=>z+1)}});if(s){A.dispose();return}K.current=A,ae(A.ydoc),v.current=r,J(r),P(!1)}catch(i){if(s)return;console.error("[NotebookEditor] Initialization failed:",i),G(i instanceof Error?i.message:"Failed to initialize editor"),P(!1)}})(),()=>{s=!0,E.current&&(clearTimeout(E.current),E.current=null),F.current&&(clearTimeout(F.current),F.current=null),v.current=null,K.current?.dispose(),K.current=null,ye(null)}},[p,y,r,$,g,f,x,We,q]);const tt=a.useCallback(s=>{if(x||!f||!r||v.current!==r)return;if(R.current){R.current=!1;return}if(d){F.current&&clearTimeout(F.current);const i=r;F.current=setTimeout(()=>{v.current===i&&d(W(s))},120)}E.current&&clearTimeout(E.current),N("saving");const c=r;E.current=setTimeout(async()=>{try{if(v.current!==c)return;const i=W(s),m=je(i);if(h.current===i){N("saved"),setTimeout(()=>N("idle"),1500);return}await Ae(c,m),h.current=i,N("saved"),setTimeout(()=>N("idle"),1500)}catch(i){console.error("[NotebookEditor] Markdown save failed:",i),N("error")}},1500)},[x,f,r,d,je]),ot=a.useCallback(s=>{if(x||f||!r||v.current!==r)return;if(R.current){R.current=!1;return}E.current&&clearTimeout(E.current),N("saving");const c=r;E.current=setTimeout(async()=>{try{if(v.current!==c)return;const i=W(s);if(S.current===i){N("saved"),setTimeout(()=>N("idle"),1500);return}await Ae(c,i),S.current=i,N("saved"),setTimeout(()=>N("idle"),1500)}catch(i){console.error("[NotebookEditor] Notebook markdown save failed:",i),N("error")}},1500)},[x,f,r]),H=a.useCallback(s=>s?s.files&&s.files.length>0?!0:(s.items?Array.from(s.items):[]).some(i=>i.kind==="file"):!1,[]),te=a.useCallback(s=>{if(!s)return[];if(!H(s))return[];if(s.files&&s.files.length>0)return Array.from(s.files);const c=s.items?Array.from(s.items):[],i=[];for(const m of c)if(m.kind==="file"){const A=m.getAsFile();A&&i.push(A)}return i},[H]),nt=a.useCallback(s=>{if(b?.view.dragging||!H(s.dataTransfer))return;const c=te(s.dataTransfer);c.length&&(s.preventDefault(),s.dataTransfer.dropEffect="copy",console.debug("[NotebookEditor] dragover",{fileCount:c.length,fileTypes:c.map(i=>i.type||"unknown"),dataTypes:Array.from(s.dataTransfer.types??[]),projectId:I.current}))},[b,te,H]),st=a.useCallback(s=>{if(b?.view.dragging||!H(s.dataTransfer))return;const c=te(s.dataTransfer);if(console.debug("[NotebookEditor] container drop",{fileCount:c.length,fileTypes:c.map(m=>m.type||"unknown"),dataTypes:Array.from(s.dataTransfer.types??[]),hasUploadFn:!!C,projectId:I.current}),!c.length)return;if(s.preventDefault(),s.stopPropagation(),!b){console.warn("[NotebookEditor] container drop ignored: editor missing");return}if(c.some(m=>m.type.startsWith("video/"))&&ee(c),C){const m=de(b.view,s.nativeEvent,!1,C);console.debug("[NotebookEditor] container drop handled",{handled:m})}else console.warn("[NotebookEditor] container drop ignored: uploadFn missing")},[b,te,ee,C,H]);return we?e.jsx("div",{className:"notebook-editor-error h-full flex items-center justify-center",children:e.jsxs("div",{className:"text-center space-y-4 p-8 max-w-md",children:[e.jsx("div",{className:"text-destructive text-lg font-medium",children:"Failed to load notebook"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:we}),e.jsx("div",{className:"flex gap-2 justify-center",children:e.jsx("button",{className:"px-4 py-2 bg-primary text-primary-foreground rounded-md text-sm",onClick:()=>window.location.reload(),children:"Retry"})})]})}):Ge===$&&!Qe?!f&&!V?e.jsx(Le,{message:"Loading document..."}):e.jsxs("div",{className:`notebook-editor flex flex-col flex-1 min-h-0 ${l||""}`,children:[e.jsx(zo,{notebookId:!y&&r?r:"",autoSaveStatus:X,getMarkdown:Ze}),e.jsx("div",{className:"flex-1 min-h-0 overflow-hidden flex justify-center px-4 py-4 bg-muted/10",children:e.jsx("div",{className:"relative h-full w-[min(62.5vw,100%)] max-w-[70rem]",children:e.jsxs("div",{className:"notebook-editor-container relative h-full overflow-hidden rounded-2xl border border-border bg-background shadow-soft-card","data-notebook-id":r,onDragOver:nt,onDrop:st,children:[Q?.diff?e.jsx(Ht,{diff:Q.diff,changeType:Q.changeType,title:"AI change",subtitle:u,onClose:Xe,className:"absolute right-4 top-4 z-20 w-[min(420px,46vw)]"}):null,e.jsx(kt,{children:e.jsxs(yt,{extensions:et,className:"notebook-doc-editor relative h-full w-full overflow-y-auto",editorProps:{handleDOMEvents:{keydown:(s,c)=>At(c)},handlePaste:(s,c)=>{const i=Array.from(c.clipboardData?.files??[]);return i.some(A=>A.type.startsWith("video/"))?(c.preventDefault(),ee(i),C&&Me(s,c,C),!0):C?Me(s,c,C):!1},handleDrop:(s,c,i,m)=>{if(!H(c.dataTransfer))return!1;if(m)return console.debug("[NotebookEditor] drop ignored: internal move",{moved:m,projectId:I.current}),!1;const z=Array.from(c.dataTransfer?.files??[]);if(console.debug("[NotebookEditor] drop",{moved:m,fileCount:z.length,fileTypes:z.map(L=>L.type||"unknown"),dataTypes:Array.from(c.dataTransfer?.types??[]),hasUploadFn:!!C,projectId:I.current}),z.some(L=>L.type.startsWith("video/"))){if(c.preventDefault(),ee(z),C){const L=de(s,c,m,C);console.debug("[NotebookEditor] drop handled (video+image)",{handled:L})}return!0}if(C){const L=de(s,c,m,C);return console.debug("[NotebookEditor] drop handled (image)",{handled:L}),L}return console.warn("[NotebookEditor] drop ignored: uploadFn missing"),!1},attributes:{class:"prose prose-lg dark:prose-invert prose-headings:font-title font-default focus:outline-none max-w-full"}},onCreate:({editor:s})=>{if(ye(s),f&&k!==null&&(R.current=!0,oe(s,k),h.current=k),!f&&V){const c=V.getXmlFragment(_e);c.length===0&&k!==null?(R.current=!0,oe(s,k),S.current=k):c.length===0&&!x&&s.commands.setContent(Do)}x&&s.setEditable(!1)},onUpdate:({editor:s})=>{tt(s),ot(s)},slotAfter:e.jsx(Ct,{}),children:[e.jsxs(wt,{className:"z-50 h-auto max-h-[330px] overflow-y-auto rounded-md border border-muted bg-background px-1 py-2 text-foreground shadow-md transition-all",children:[e.jsx(jt,{className:"px-2 text-muted-foreground",children:"No results"}),e.jsx(Nt,{children:le.map(s=>e.jsxs(Tt,{value:s.title,onCommand:c=>s.command?.(c),className:"flex w-full items-center space-x-2 rounded-md px-2 py-1 text-left text-sm hover:bg-accent aria-selected:bg-accent",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-md border border-muted bg-background text-foreground",children:s.icon}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:s.title}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s.description})]})]},s.title))})]}),e.jsx(Io,{}),e.jsx(Mo,{}),e.jsx(Ro,{})]})})]})})})]}):e.jsx(Le,{message:"Initializing editor..."})}export{Le as E,Jo as N,zo as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}
|
|
1
|
+
.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._verified_lvyh0_1{margin-left:.125rem;max-width:20px;max-height:20px;height:1.25em;fill:currentColor;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:text-bottom}._root_98iqw_1{width:100%;min-width:250px;max-width:550px;overflow:hidden;color:var(--tweet-font-color);font-family:var(--tweet-font-family);font-weight:400;box-sizing:border-box;border:var(--tweet-border);border-radius:12px;margin:var(--tweet-container-margin);background-color:var(--tweet-bg-color);transition-property:background-color,box-shadow;transition-duration:.2s}._root_98iqw_1:hover{background-color:var(--tweet-bg-color-hover)}._article_98iqw_21{position:relative;box-sizing:inherit;padding:.75rem 1rem}.react-tweet-theme{--tweet-container-margin: 1.5rem 0;--tweet-header-font-size: .9375rem;--tweet-header-line-height: 1.25rem;--tweet-body-font-size: 1.25rem;--tweet-body-font-weight: 400;--tweet-body-line-height: 1.5rem;--tweet-body-margin: 0;--tweet-quoted-container-margin: .75rem 0;--tweet-quoted-body-font-size: .938rem;--tweet-quoted-body-font-weight: 400;--tweet-quoted-body-line-height: 1.25rem;--tweet-quoted-body-margin: .25rem 0 .75rem 0;--tweet-info-font-size: .9375rem;--tweet-info-line-height: 1.25rem;--tweet-actions-font-size: .875rem;--tweet-actions-line-height: 1rem;--tweet-actions-font-weight: 700;--tweet-actions-icon-size: 1.25em;--tweet-actions-icon-wrapper-size: calc( var(--tweet-actions-icon-size) + .75em );--tweet-replies-font-size: .875rem;--tweet-replies-line-height: 1rem;--tweet-replies-font-weight: 700}:where(.react-tweet-theme) *{margin:0;padding:0;box-sizing:border-box}:is([data-theme=light],.light) :where(.react-tweet-theme),:where(.react-tweet-theme){--tweet-skeleton-gradient: linear-gradient( 270deg, #fafafa, #eaeaea, #eaeaea, #fafafa );--tweet-border: 1px solid rgb(207, 217, 222);--tweet-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--tweet-font-color: rgb(15, 20, 25);--tweet-font-color-secondary: rgb(83, 100, 113);--tweet-bg-color: #fff;--tweet-bg-color-hover: rgb(247, 249, 249);--tweet-quoted-bg-color-hover: rgba(0, 0, 0, .03);--tweet-color-blue-primary: rgb(29, 155, 240);--tweet-color-blue-primary-hover: rgb(26, 140, 216);--tweet-color-blue-secondary: rgb(0, 111, 214);--tweet-color-blue-secondary-hover: rgba(0, 111, 214, .1);--tweet-color-red-primary: rgb(249, 24, 128);--tweet-color-red-primary-hover: rgba(249, 24, 128, .1);--tweet-color-green-primary: rgb(0, 186, 124);--tweet-color-green-primary-hover: rgba(0, 186, 124, .1);--tweet-twitter-icon-color: var(--tweet-font-color);--tweet-verified-old-color: rgb(130, 154, 171);--tweet-verified-blue-color: var(--tweet-color-blue-primary)}:is([data-theme=dark],.dark) :where(.react-tweet-theme){--tweet-skeleton-gradient: linear-gradient( 270deg, #15202b, rgb(30, 39, 50), rgb(30, 39, 50), rgb(21, 32, 43) );--tweet-border: 1px solid rgb(66, 83, 100);--tweet-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--tweet-font-color: rgb(247, 249, 249);--tweet-font-color-secondary: rgb(139, 152, 165);--tweet-bg-color: rgb(21, 32, 43);--tweet-bg-color-hover: rgb(30, 39, 50);--tweet-quoted-bg-color-hover: rgba(255, 255, 255, .03);--tweet-color-blue-primary: rgb(29, 155, 240);--tweet-color-blue-primary-hover: rgb(26, 140, 216);--tweet-color-blue-secondary: rgb(107, 201, 251);--tweet-color-blue-secondary-hover: rgba(107, 201, 251, .1);--tweet-color-red-primary: rgb(249, 24, 128);--tweet-color-red-primary-hover: rgba(249, 24, 128, .1);--tweet-color-green-primary: rgb(0, 186, 124);--tweet-color-green-primary-hover: rgba(0, 186, 124, .1);--tweet-twitter-icon-color: var(--tweet-font-color);--tweet-verified-old-color: rgb(130, 154, 171);--tweet-verified-blue-color: #fff}@media (prefers-color-scheme: dark){:where(.react-tweet-theme){--tweet-skeleton-gradient: linear-gradient( 270deg, #15202b, rgb(30, 39, 50), rgb(30, 39, 50), rgb(21, 32, 43) );--tweet-border: 1px solid rgb(66, 83, 100);--tweet-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--tweet-font-color: rgb(247, 249, 249);--tweet-font-color-secondary: rgb(139, 152, 165);--tweet-bg-color: rgb(21, 32, 43);--tweet-bg-color-hover: rgb(30, 39, 50);--tweet-color-blue-primary: rgb(29, 155, 240);--tweet-color-blue-primary-hover: rgb(26, 140, 216);--tweet-color-blue-secondary: rgb(107, 201, 251);--tweet-color-blue-secondary-hover: rgba(107, 201, 251, .1);--tweet-color-red-primary: rgb(249, 24, 128);--tweet-color-red-primary-hover: rgba(249, 24, 128, .1);--tweet-color-green-primary: rgb(0, 186, 124);--tweet-color-green-primary-hover: rgba(0, 186, 124, .1);--tweet-twitter-icon-color: var(--tweet-font-color);--tweet-verified-old-color: rgb(130, 154, 171);--tweet-verified-blue-color: #fff}}._verifiedOld_lcna5_1{color:var(--tweet-verified-old-color)}._verifiedBlue_lcna5_4{color:var(--tweet-verified-blue-color)}._verifiedGovernment_lcna5_7{color:#829aab}._label_36ucz_1{display:flex;height:1.0625em;width:1.0625em;max-width:17px;max-height:17px;margin-left:4px;margin-right:2px;border:var(--tweet-border);border-radius:2px}._label_36ucz_1>img{width:100%;height:100%}._header_nqq4j_1{display:flex;padding-bottom:.75rem;line-height:var(--tweet-header-line-height);font-size:var(--tweet-header-font-size);white-space:nowrap;overflow-wrap:break-word;overflow:hidden}._avatar_nqq4j_11{position:relative;height:48px;width:48px}._avatarOverflow_nqq4j_16{height:100%;width:100%;position:absolute;overflow:hidden;border-radius:9999px}._avatarSquare_nqq4j_23{border-radius:4px}._avatarShadow_nqq4j_26{height:100%;width:100%;transition-property:background-color;transition-duration:.2s;box-shadow:#00000008 0 0 2px inset}._avatarShadow_nqq4j_26:hover{background-color:#1a1a1a26}._author_nqq4j_37{max-width:calc(100% - 84px);display:flex;flex-direction:column;justify-content:center;margin:0 .5rem}._authorLink_nqq4j_44{text-decoration:none;color:inherit;display:flex;align-items:center}._authorLink_nqq4j_44:hover{text-decoration-line:underline}._authorVerified_nqq4j_53{display:inline-flex}._authorLinkText_nqq4j_56{font-weight:700;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}._authorMeta_nqq4j_63,._authorFollow_nqq4j_66{display:flex}._username_nqq4j_69{color:var(--tweet-font-color-secondary);text-decoration:none;text-overflow:ellipsis}._follow_nqq4j_74{color:var(--tweet-color-blue-secondary);text-decoration:none;font-weight:700}._follow_nqq4j_74:hover{text-decoration-line:underline}._separator_nqq4j_82{padding:0 .25rem}._brand_nqq4j_86{margin-inline-start:auto}._twitterIcon_nqq4j_90{width:23.75px;height:23.75px;color:var(--tweet-twitter-icon-color);fill:currentColor;-webkit-user-select:none;-moz-user-select:none;user-select:none}._root_1ec15_1{text-decoration:none;color:var(--tweet-font-color-secondary);font-size:.9375rem;line-height:1.25rem;margin-bottom:.25rem;overflow-wrap:break-word;white-space:pre-wrap}._root_1ec15_1:hover{text-decoration-thickness:1px;text-decoration-line:underline}._root_eihfa_1{font-weight:inherit;color:var(--tweet-color-blue-secondary);text-decoration:none;cursor:pointer}._root_eihfa_1:hover{text-decoration-thickness:1px;text-decoration-line:underline}._root_1xq52_1{font-size:var(--tweet-body-font-size);font-weight:var(--tweet-body-font-weight);line-height:var(--tweet-body-line-height);margin:var(--tweet-body-margin);overflow-wrap:break-word;white-space:pre-wrap}._root_g9tkv_1{margin-top:.75rem;overflow:hidden;position:relative}._rounded_g9tkv_6{border:var(--tweet-border);border-radius:12px}._mediaWrapper_g9tkv_10{display:grid;grid-auto-rows:1fr;gap:2px;height:100%;width:100%}._grid2Columns_g9tkv_17{grid-template-columns:repeat(2,1fr)}._grid3_g9tkv_20>a:first-child{grid-row:span 2}._grid2x2_g9tkv_23{grid-template-rows:repeat(2,1fr)}._mediaContainer_g9tkv_26{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}._mediaLink_g9tkv_34{text-decoration:none;outline-style:none}._skeleton_g9tkv_38{padding-bottom:56.25%;width:100%;display:block}._image_g9tkv_43{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;margin:0;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center}._anchor_fp31d_1{display:flex;align-items:center;color:#fff;padding:0 1rem;border:1px solid transparent;border-radius:9999px;font-weight:700;transition:background-color .2s;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;outline-style:none;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}._videoButton_fp31d_17{position:relative;height:67px;width:67px;display:flex;align-items:center;justify-content:center;background-color:var(--tweet-color-blue-primary);transition-property:background-color;transition-duration:.2s;border:4px solid #fff;border-radius:9999px;cursor:pointer}._videoButton_fp31d_17:hover,._videoButton_fp31d_17:focus-visible{background-color:var(--tweet-color-blue-primary-hover)}._videoButtonIcon_fp31d_35{margin-left:3px;width:calc(50% + 4px);height:calc(50% + 4px);max-width:100%;color:#fff;fill:currentColor;-webkit-user-select:none;-moz-user-select:none;user-select:none}._watchOnTwitter_fp31d_44{position:absolute;top:12px;right:8px}._watchOnTwitter_fp31d_44>a{min-width:2rem;min-height:2rem;font-size:.875rem;line-height:1rem;backdrop-filter:blur(4px);background-color:#0f1419bf}._watchOnTwitter_fp31d_44>a:hover{background-color:#272c30bf}._viewReplies_fp31d_60{position:relative;min-height:2rem;background-color:var(--tweet-color-blue-primary);border-color:var(--tweet-color-blue-primary);font-size:.9375rem;line-height:1.25rem}._viewReplies_fp31d_60:hover{background-color:var(--tweet-color-blue-primary-hover)}._root_i24yn_1{color:inherit;text-decoration:none;font-size:var(--tweet-info-font-size);line-height:var(--tweet-info-line-height)}._root_i24yn_1:hover{text-decoration-thickness:1px;text-decoration-line:underline}._info_19qcj_1{display:flex;align-items:center;color:var(--tweet-font-color-secondary);margin-top:.125rem;overflow-wrap:break-word;white-space:nowrap;text-overflow:ellipsis}._infoLink_19qcj_10{color:inherit;text-decoration:none;height:var(--tweet-actions-icon-wrapper-size);width:var(--tweet-actions-icon-wrapper-size);font:inherit;margin-left:auto;display:flex;justify-content:center;align-items:center;margin-right:-4px;border-radius:9999px;transition-property:background-color;transition-duration:.2s}._infoLink_19qcj_10:hover{background-color:var(--tweet-color-blue-secondary-hover)}._infoIcon_19qcj_30{color:inherit;fill:currentColor;height:var(--tweet-actions-icon-size);-webkit-user-select:none;-moz-user-select:none;user-select:none}._infoLink_19qcj_10:hover>._infoIcon_19qcj_30{color:var(--tweet-color-blue-secondary)}._actions_n2anf_1{display:flex;align-items:center;color:var(--tweet-font-color-secondary);padding-top:.25rem;margin-top:.25rem;border-top:var(--tweet-border);overflow-wrap:break-word;white-space:nowrap;text-overflow:ellipsis}._like_n2anf_13,._reply_n2anf_14,._copy_n2anf_15{text-decoration:none;color:inherit;display:flex;align-items:center;margin-right:1.25rem}._like_n2anf_13:hover,._reply_n2anf_14:hover,._copy_n2anf_15:hover{background-color:#0000}._like_n2anf_13:hover>._likeIconWrapper_n2anf_27{background-color:var(--tweet-color-red-primary-hover)}._like_n2anf_13:hover>._likeCount_n2anf_30{color:var(--tweet-color-red-primary);text-decoration-line:underline}._likeIconWrapper_n2anf_27,._replyIconWrapper_n2anf_35,._copyIconWrapper_n2anf_36{width:var(--tweet-actions-icon-wrapper-size);height:var(--tweet-actions-icon-wrapper-size);display:flex;justify-content:center;align-items:center;margin-left:-.25rem;border-radius:9999px}._likeIcon_n2anf_27,._replyIcon_n2anf_35,._copyIcon_n2anf_36{height:var(--tweet-actions-icon-size);fill:currentColor;-webkit-user-select:none;-moz-user-select:none;user-select:none}._likeIcon_n2anf_27{color:var(--tweet-color-red-primary)}._likeCount_n2anf_30,._replyText_n2anf_56,._copyText_n2anf_57{font-size:var(--tweet-actions-font-size);font-weight:var(--tweet-actions-font-weight);line-height:var(--tweet-actions-line-height);margin-left:.25rem}._reply_n2anf_14:hover>._replyIconWrapper_n2anf_35{background-color:var(--tweet-color-blue-secondary-hover)}._reply_n2anf_14:hover>._replyText_n2anf_56{color:var(--tweet-color-blue-secondary);text-decoration-line:underline}._replyIcon_n2anf_35{color:var(--tweet-color-blue-primary)}._copy_n2anf_15{font:inherit;background:none;border:none;cursor:pointer}._copy_n2anf_15:hover>._copyIconWrapper_n2anf_36{background-color:var(--tweet-color-green-primary-hover)}._copy_n2anf_15:hover ._copyIcon_n2anf_36{color:var(--tweet-color-green-primary)}._copy_n2anf_15:hover>._copyText_n2anf_57{color:var(--tweet-color-green-primary);text-decoration-line:underline}._replies_1cutb_1{padding:.25rem 0}._link_1cutb_4{text-decoration:none;color:var(--tweet-color-blue-secondary);display:flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;-webkit-user-select:none;-moz-user-select:none;user-select:none;outline-style:none;transition-property:background-color;transition-duration:.2s;padding:0 1rem;border:var(--tweet-border);border-radius:9999px}._link_1cutb_4:hover{background-color:var(--tweet-color-blue-secondary-hover)}._text_1cutb_23{font-weight:var(--tweet-replies-font-weight);font-size:var(--tweet-replies-font-size);line-height:var(--tweet-replies-line-height);overflow-wrap:break-word;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}._root_q5799_1{width:100%;overflow:hidden;border:var(--tweet-border);border-radius:12px;margin:var(--tweet-quoted-container-margin);transition-property:background-color,box-shadow;transition-duration:.2s;cursor:pointer}._root_q5799_1:hover{background-color:var(--tweet-quoted-bg-color-hover)}._article_q5799_16{position:relative;box-sizing:inherit}._header_f00ab_1{display:flex;padding:.75rem .75rem 0;line-height:var(--tweet-header-line-height);font-size:var(--tweet-header-font-size);white-space:nowrap;overflow-wrap:break-word;overflow:hidden}._avatar_f00ab_11{position:relative;height:20px;width:20px}._avatarOverflow_f00ab_16{height:100%;width:100%;position:absolute;overflow:hidden;border-radius:9999px}._avatarSquare_f00ab_23{border-radius:4px}._author_f00ab_27{display:flex;margin:0 .5rem;align-items:center}._authorText_f00ab_33{font-weight:700;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}._username_f00ab_40{color:var(--tweet-font-color-secondary);text-decoration:none;text-overflow:ellipsis;margin-left:.125rem}._root_175ot_1{font-size:var(--tweet-quoted-body-font-size);font-weight:var(--tweet-quoted-body-font-weight);line-height:var(--tweet-quoted-body-line-height);margin:var(--tweet-quoted-body-margin);overflow-wrap:break-word;white-space:pre-wrap;padding:0 .75rem}._root_16yxa_1{display:flex;flex-direction:column;align-items:center;padding-bottom:.75rem}._root_16yxa_1>h3{font-size:1.25rem;margin-bottom:.5rem}._skeleton_oi7hr_1{display:block;width:100%;border-radius:5px;background-image:var(--tweet-skeleton-gradient);background-size:400% 100%;animation:_loading_oi7hr_1 8s ease-in-out infinite}@media (prefers-reduced-motion: reduce){._skeleton_oi7hr_1{animation:none;background-position:200% 0}}@keyframes _loading_oi7hr_1{0%{background-position:200% 0}to{background-position:-200% 0}}._root_17qqv_1{pointer-events:none;padding-bottom:.25rem}:root{--novel-black: hsl(0, 0%, 0%);--novel-white: hsl(0, 0%, 100%);--novel-highlight-default: #ffffff;--novel-highlight-purple: #f6f3f8;--novel-highlight-red: #fdebeb;--novel-highlight-yellow: #fbf4a2;--novel-highlight-blue: #c1ecf9;--novel-highlight-green: #acf79f;--novel-highlight-orange: #faebdd;--novel-highlight-pink: #faf1f5;--novel-highlight-gray: #f1f1ef;--novel-stone-100: #f5f5f4;--novel-stone-200: #e5e7eb;--novel-stone-800: #1f2937}.dark{--novel-black: hsl(0, 0%, 100%);--novel-white: hsl(0, 0%, 0%);--novel-highlight-default: transparent;--novel-highlight-purple: #3f2c4d;--novel-highlight-red: #4d2c2c;--novel-highlight-yellow: #4d4a2c;--novel-highlight-blue: #2c3d4d;--novel-highlight-green: #2c4d3a;--novel-highlight-orange: #4d3d2c;--novel-highlight-pink: #4d2c3d;--novel-highlight-gray: #3d3d3d;--novel-stone-100: #3f3f46;--novel-stone-200: #374151;--novel-stone-800: #e5e7eb}.notebook-editor{position:relative;flex:1;min-height:0;width:100%;min-width:0;background:var(--ds-background, hsl(0 0% 100%));--notebook-font-scale: .8}.notebook-editor-container{flex:1;min-height:0;width:100%;min-width:0;overflow:hidden;display:flex;flex-direction:column}.notebook-editor-container .ProseMirror{padding:20pt;font-size:calc(1rem * var(--notebook-font-scale));min-height:100%}.notebook-editor .text-xs{font-size:calc(.75rem * var(--notebook-font-scale));line-height:calc(1rem * var(--notebook-font-scale))}.notebook-editor .text-sm{font-size:calc(.875rem * var(--notebook-font-scale));line-height:calc(1.25rem * var(--notebook-font-scale))}.notebook-editor .text-base{font-size:calc(1rem * var(--notebook-font-scale));line-height:calc(1.5rem * var(--notebook-font-scale))}.notebook-editor .text-lg{font-size:calc(1.125rem * var(--notebook-font-scale));line-height:calc(1.75rem * var(--notebook-font-scale))}.notebook-editor .text-xl{font-size:calc(1.25rem * var(--notebook-font-scale));line-height:calc(1.75rem * var(--notebook-font-scale))}.notebook-editor .text-2xl{font-size:calc(1.5rem * var(--notebook-font-scale));line-height:calc(2rem * var(--notebook-font-scale))}.notebook-editor .text-3xl{font-size:calc(1.875rem * var(--notebook-font-scale));line-height:calc(2.25rem * var(--notebook-font-scale))}.notebook-editor-container .notebook-doc-editor{border-radius:inherit}.notebook-editor-container .ProseMirror :is(p,h1,h2,h3,h4,h5,h6).is-editor-empty:first-child:before,.notebook-editor-container .ProseMirror :is(p,h1,h2,h3,h4,h5,h6).is-empty:before{content:attr(data-placeholder);float:left;color:hsl(var(--muted-foreground));pointer-events:none;height:0}.notebook-editor-container .ProseMirror h1.is-empty:before,.notebook-editor-container .ProseMirror h2.is-empty:before,.notebook-editor-container .ProseMirror h3.is-empty:before{color:hsl(var(--muted-foreground) / .6)}.notebook-editor-container .ProseMirror img{transition:filter .1s ease-in-out}.notebook-editor-container .ProseMirror img:hover{cursor:pointer;filter:brightness(90%)}.notebook-editor-container .ProseMirror img.ProseMirror-selectednode{outline:3px solid #5abbf7;filter:brightness(90%)}.notebook-editor-container .ProseMirror video{display:block;width:100%;max-width:100%;border-radius:.5rem;border:1px solid hsl(var(--border));background:hsl(var(--muted))}.notebook-editor-container .ProseMirror video.ProseMirror-selectednode{outline:3px solid #5abbf7}.img-placeholder{position:relative}.img-placeholder:before{content:"";box-sizing:border-box;position:absolute;top:50%;left:50%;width:36px;height:36px;border-radius:50%;border:3px solid var(--novel-stone-200);border-top-color:var(--novel-stone-800);animation:spinning .6s linear infinite}@keyframes spinning{to{transform:rotate(360deg)}}ul[data-type=taskList] li>label{margin-right:.2rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}@media screen and (max-width: 768px){ul[data-type=taskList] li>label{margin-right:.5rem}}ul[data-type=taskList] li>label input[type=checkbox]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:hsl(var(--background));margin:0;cursor:pointer;width:1.2em;height:1.2em;position:relative;top:5px;border:2px solid hsl(var(--border));margin-right:.3rem;display:grid;place-content:center;border-radius:2px}ul[data-type=taskList] li>label input[type=checkbox]:hover,ul[data-type=taskList] li>label input[type=checkbox]:active{background-color:hsl(var(--accent))}ul[data-type=taskList] li>label input[type=checkbox]:before{content:"";width:.65em;height:.65em;transform:scale(0);transition:.12s transform ease-in-out;box-shadow:inset 1em 1em;transform-origin:center;clip-path:polygon(14% 44%,0 65%,50% 100%,100% 16%,80% 0%,43% 62%)}ul[data-type=taskList] li>label input[type=checkbox]:checked{background-color:hsl(var(--primary));border-color:hsl(var(--primary))}ul[data-type=taskList] li>label input[type=checkbox]:checked:before{transform:scale(1);color:hsl(var(--primary-foreground))}ul[data-type=taskList] li[data-checked=true]>div>p{color:var(--muted-foreground);text-decoration:line-through;text-decoration-thickness:2px}.notebook-editor-container .ProseMirror code{background:hsl(var(--muted));border-radius:.25rem;padding:.125rem .375rem;font-family:var(--font-mono),ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.875em}.notebook-editor-container .ProseMirror blockquote{border-left:4px solid hsl(var(--primary));padding-left:1rem;margin-left:0;font-style:italic}.notebook-editor-container .ProseMirror hr{border:none;border-top:1px solid hsl(var(--border));margin:2rem 0}.notebook-editor-container .ProseMirror .math-node{display:inline-block;padding:.125rem .25rem;border-radius:.25rem;cursor:pointer;transition:background-color .15s ease}.notebook-editor-container .ProseMirror .math-node:hover{background-color:hsl(var(--accent))}.notebook-editor-container .ProseMirror .math-node.ProseMirror-selectednode{background-color:hsl(var(--accent));outline:2px solid hsl(var(--primary))}.notebook-editor-container .ProseMirror ul,.notebook-editor-container .ProseMirror ol{padding-left:1.5rem}.notebook-editor-container .ProseMirror ul{list-style-type:disc}.notebook-editor-container .ProseMirror ol{list-style-type:decimal}.notebook-editor-container .ProseMirror li{margin:.25rem 0}.notebook-editor-container .ProseMirror a{color:hsl(var(--primary));text-decoration:underline;text-underline-offset:2px}.notebook-editor-container .ProseMirror a:hover{color:hsl(var(--primary) / .8)}.notebook-editor-container .ProseMirror ::-moz-selection{background:hsl(var(--primary) / .2)}.notebook-editor-container .ProseMirror ::selection{background:hsl(var(--primary) / .2)}.drag-handle{position:fixed;opacity:1;transition:opacity ease-in .2s;border-radius:.25rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' style='fill: rgba(0, 0, 0, 0.5)'%3E%3Cpath d='M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z'%3E%3C/path%3E%3C/svg%3E");background-size:calc(.5em + .375rem) calc(.5em + .375rem);background-repeat:no-repeat;background-position:center;width:1.2rem;height:1.5rem;z-index:50;cursor:grab}.drag-handle:hover{background-color:var(--novel-stone-100);transition:background-color .2s}.drag-handle:active{background-color:var(--novel-stone-200);transition:background-color .2s;cursor:grabbing}.drag-handle.hide{opacity:0;pointer-events:none}.dark .drag-handle{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' style='fill: rgba(255, 255, 255, 0.5)'%3E%3Cpath d='M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z'%3E%3C/path%3E%3C/svg%3E")}@media screen and (max-width: 600px){.drag-handle{display:none;pointer-events:none}}.ProseMirror:not(.dragging) .ProseMirror-selectednode{outline:none!important;background-color:var(--novel-highlight-blue);transition:background-color .2s;box-shadow:none}.tippy-box,.tippy-box[data-state=visible],.tippy-box[data-state=hidden]{max-width:400px!important;background:transparent!important;background-color:transparent!important;border:none!important;border-width:0!important;box-shadow:none!important;outline:none!important;color:inherit!important}.tippy-box[data-theme~=novel],.tippy-box[data-theme~=light],.tippy-box[data-theme~=dark]{background:transparent!important;background-color:transparent!important;border:none!important;border-width:0!important}.tippy-content{padding:0!important;background:transparent!important;background-color:transparent!important;color:inherit!important}.tippy-arrow{display:none!important}.notebook-editor-container [cmdk-root]{background:hsl(var(--background));border:1px solid hsl(var(--muted));border-radius:.375rem;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;color:hsl(var(--foreground))}.notebook-editor-container [cmdk-item] svg{color:currentColor}.notebook-editor-container [data-novel-command]{border:1px solid hsl(var(--muted))!important}.notebook-editor-container .prose{max-width:none}.notebook-editor-container .ProseMirror:focus{outline:none}.notebook-editor-container .collaboration-cursor__caret{border-left:1px solid;border-right:1px solid;margin-left:-1px;margin-right:-1px;pointer-events:none;position:relative;word-break:normal}.notebook-editor-container .collaboration-cursor__label{border-radius:3px 3px 3px 0;color:#fff;font-size:12px;font-style:normal;font-weight:600;left:-1px;line-height:normal;padding:.1rem .3rem;position:absolute;top:-1.4em;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.notebook-editor-container .ProseMirror pre{background:#0d0d0d;border-radius:.5rem;color:#fff;font-family:var(--font-mono),ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;padding:.75rem 1rem}.notebook-editor-container .ProseMirror pre code{background:none;color:inherit;font-size:.8rem;padding:0}.hljs-comment,.hljs-quote{color:#616161}.hljs-variable,.hljs-template-variable,.hljs-attribute,.hljs-tag,.hljs-name,.hljs-regexp,.hljs-link,.hljs-selector-id,.hljs-selector-class{color:#f98181}.hljs-number,.hljs-meta,.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-type,.hljs-params{color:#fbbc88}.hljs-string,.hljs-symbol,.hljs-bullet{color:#b9f18d}.hljs-title,.hljs-section{color:#faf594}.hljs-keyword,.hljs-selector-tag{color:#70cff8}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}span[style]>strong{color:inherit}mark[style]>strong{color:inherit}iframe{border:8px solid #ffd00027;border-radius:4px;min-width:200px;min-height:200px;display:block;outline:0px solid transparent}div[data-youtube-video]>iframe{cursor:move;aspect-ratio:16 / 9;width:100%}.ProseMirror-selectednode iframe{transition:outline .15s;outline:6px solid #fbbf24}@media only screen and (max-width: 480px){div[data-youtube-video]>iframe{max-height:50px}}@media only screen and (max-width: 720px){div[data-youtube-video]>iframe{max-height:100px}}.notebook-editor-container .ProseMirror .tableWrapper{overflow-x:auto;margin:1rem 0}.notebook-editor-container .ProseMirror table{width:100%;border-collapse:collapse;border:1px solid hsl(var(--border));border-radius:.375rem;background:hsl(var(--background));table-layout:fixed}.notebook-editor-container .ProseMirror th,.notebook-editor-container .ProseMirror td{padding:.5rem .75rem;border-right:1px solid hsl(var(--border));border-bottom:1px solid hsl(var(--border));vertical-align:top;min-width:120px}.notebook-editor-container .ProseMirror th:last-child,.notebook-editor-container .ProseMirror td:last-child{border-right:none}.notebook-editor-container .ProseMirror tr:last-child td{border-bottom:none}.notebook-editor-container .ProseMirror th{font-weight:600;text-align:left;background-color:hsl(var(--muted))}.notebook-editor-container .ProseMirror tbody tr:nth-child(2n) td{background-color:hsl(var(--muted) / .4)}.notebook-editor-container .ProseMirror td>p,.notebook-editor-container .ProseMirror th>p{margin:0}.notebook-editor-container .ProseMirror td.selectedCell,.notebook-editor-container .ProseMirror th.selectedCell{background-color:hsl(var(--primary) / .1)}.notebook-editor-container .ProseMirror td.selectedCell:after,.notebook-editor-container .ProseMirror th.selectedCell:after{content:"";position:absolute;inset:0;border:2px solid hsl(var(--primary));pointer-events:none}.notebook-editor-container .ProseMirror .column-resize-handle{position:absolute;right:-2px;top:0;bottom:0;width:4px;background-color:hsl(var(--primary));pointer-events:none;z-index:10}.notebook-editor-container .ProseMirror.resize-cursor{cursor:col-resize}.notebook-editor-container .ProseMirror table.ProseMirror-selectednode{outline:2px solid hsl(var(--primary));outline-offset:2px}.dark .notebook-editor-container .ProseMirror th{background-color:hsl(var(--muted) / .8)}
|