@parallelworks/tandem-web 0.191.1 → 0.192.1
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/_virtual/_virtual_i18n/en/common.js +18 -4
- package/_virtual/_virtual_i18n/es/common.js +18 -4
- package/_virtual/_virtual_i18n/ja/common.js +18 -4
- package/_virtual/_virtual_i18n/ko/common.js +18 -4
- package/_virtual/_virtual_i18n/zh/common.js +18 -4
- package/api/queries.js +13 -5
- package/components/DocProperties.js +1 -1
- package/components/Editor.js +101 -99
- package/components/HoverCards.js +121 -121
- package/components/NewPageModal.js +374 -0
- package/components/SubpageViews.js +273 -277
- package/components/docLink.js +18 -0
- package/lib/base.js +10 -1
- package/lib/calendarMonth.js +6 -0
- package/lib/listSearch.js +13 -10
- package/package.json +2 -1
- package/pages/issues.js +466 -414
- package/routes/_workspace/docs/_doc2.js +2 -2
- package/routes/_workspace2.js +357 -383
|
@@ -1875,8 +1875,7 @@ var e = {
|
|
|
1875
1875
|
sharedHint: "Everyone in the workspace sees it.",
|
|
1876
1876
|
personalHint: "Only you see it.",
|
|
1877
1877
|
shareNeedsWrite: "Sharing a view needs member access.",
|
|
1878
|
-
|
|
1879
|
-
onlyYou: "Only you see this view"
|
|
1878
|
+
more: "{count} more"
|
|
1880
1879
|
},
|
|
1881
1880
|
palette: {
|
|
1882
1881
|
label: "Command palette",
|
|
@@ -4142,14 +4141,29 @@ var e = {
|
|
|
4142
4141
|
removeView: "Remove view",
|
|
4143
4142
|
makeSeriesDoc: "Make the {series} notes for this day",
|
|
4144
4143
|
newOn: "New sub-page on {date}",
|
|
4145
|
-
emptyPage: "Empty page",
|
|
4146
|
-
fromTemplateDefault: "{template} (default)",
|
|
4147
4144
|
moreOnDay: "{count} more",
|
|
4148
4145
|
previousMonth: "Previous month",
|
|
4149
4146
|
today: "Today",
|
|
4150
4147
|
nextMonth: "Next month",
|
|
4151
4148
|
none: "No sub-pages yet.",
|
|
4152
4149
|
undated: "No date"
|
|
4150
|
+
},
|
|
4151
|
+
newPage: {
|
|
4152
|
+
title: "New page",
|
|
4153
|
+
titleLabel: "Page title",
|
|
4154
|
+
openFull: "Open as a full page",
|
|
4155
|
+
share: "Share",
|
|
4156
|
+
copyLink: "Copy link",
|
|
4157
|
+
linkCopied: "Link copied",
|
|
4158
|
+
more: "More",
|
|
4159
|
+
properties: "Properties",
|
|
4160
|
+
discussions: "Discussions",
|
|
4161
|
+
addComment: "Add a comment…",
|
|
4162
|
+
templates: "Templates",
|
|
4163
|
+
hint: "Press Enter to continue with an empty page, or pick a template (use ↑ and ↓ to select)",
|
|
4164
|
+
empty: "Empty",
|
|
4165
|
+
newTemplate: "New template",
|
|
4166
|
+
newTemplateTitle: "New template"
|
|
4153
4167
|
}
|
|
4154
4168
|
};
|
|
4155
4169
|
export { e as default };
|
|
@@ -1875,8 +1875,7 @@ var e = {
|
|
|
1875
1875
|
sharedHint: "Todos en el espacio de trabajo la ven.",
|
|
1876
1876
|
personalHint: "Solo tú la ves.",
|
|
1877
1877
|
shareNeedsWrite: "Para compartir una vista necesitas acceso de miembro.",
|
|
1878
|
-
|
|
1879
|
-
onlyYou: "Solo tú ves esta vista"
|
|
1878
|
+
more: "{count} más"
|
|
1880
1879
|
},
|
|
1881
1880
|
palette: {
|
|
1882
1881
|
label: "Paleta de comandos",
|
|
@@ -4142,14 +4141,29 @@ var e = {
|
|
|
4142
4141
|
removeView: "Quitar vista",
|
|
4143
4142
|
makeSeriesDoc: "Crear las notas de {series} de este día",
|
|
4144
4143
|
newOn: "Nueva subpágina el {date}",
|
|
4145
|
-
emptyPage: "Página vacía",
|
|
4146
|
-
fromTemplateDefault: "{template} (predeterminada)",
|
|
4147
4144
|
moreOnDay: "{count} más",
|
|
4148
4145
|
previousMonth: "Mes anterior",
|
|
4149
4146
|
today: "Hoy",
|
|
4150
4147
|
nextMonth: "Mes siguiente",
|
|
4151
4148
|
none: "Aún no hay subpáginas.",
|
|
4152
4149
|
undated: "Sin fecha"
|
|
4150
|
+
},
|
|
4151
|
+
newPage: {
|
|
4152
|
+
title: "Página nueva",
|
|
4153
|
+
titleLabel: "Título de la página",
|
|
4154
|
+
openFull: "Abrir como página completa",
|
|
4155
|
+
share: "Compartir",
|
|
4156
|
+
copyLink: "Copiar enlace",
|
|
4157
|
+
linkCopied: "Enlace copiado",
|
|
4158
|
+
more: "Más",
|
|
4159
|
+
properties: "Propiedades",
|
|
4160
|
+
discussions: "Conversaciones",
|
|
4161
|
+
addComment: "Añade un comentario…",
|
|
4162
|
+
templates: "Plantillas",
|
|
4163
|
+
hint: "Pulsa Intro para seguir con una página vacía, o elige una plantilla (usa ↑ y ↓ para seleccionar)",
|
|
4164
|
+
empty: "Vacía",
|
|
4165
|
+
newTemplate: "Nueva plantilla",
|
|
4166
|
+
newTemplateTitle: "Nueva plantilla"
|
|
4153
4167
|
}
|
|
4154
4168
|
};
|
|
4155
4169
|
export { e as default };
|
|
@@ -1875,8 +1875,7 @@ var e = {
|
|
|
1875
1875
|
sharedHint: "ワークスペースの全員に表示されます。",
|
|
1876
1876
|
personalHint: "自分だけに表示されます。",
|
|
1877
1877
|
shareNeedsWrite: "ビューを共有するにはメンバー権限が必要です。",
|
|
1878
|
-
|
|
1879
|
-
onlyYou: "このビューは自分だけに表示されます"
|
|
1878
|
+
more: "他 {count} 件"
|
|
1880
1879
|
},
|
|
1881
1880
|
palette: {
|
|
1882
1881
|
label: "コマンドパレット",
|
|
@@ -4142,14 +4141,29 @@ var e = {
|
|
|
4142
4141
|
removeView: "ビューを削除",
|
|
4143
4142
|
makeSeriesDoc: "この日の {series} のノートを作成",
|
|
4144
4143
|
newOn: "{date} の新しいサブページ",
|
|
4145
|
-
emptyPage: "空のページ",
|
|
4146
|
-
fromTemplateDefault: "{template}(既定)",
|
|
4147
4144
|
moreOnDay: "他 {count} 件",
|
|
4148
4145
|
previousMonth: "前の月",
|
|
4149
4146
|
today: "今日",
|
|
4150
4147
|
nextMonth: "次の月",
|
|
4151
4148
|
none: "サブページはまだありません。",
|
|
4152
4149
|
undated: "日付なし"
|
|
4150
|
+
},
|
|
4151
|
+
newPage: {
|
|
4152
|
+
title: "新しいページ",
|
|
4153
|
+
titleLabel: "ページのタイトル",
|
|
4154
|
+
openFull: "フルページで開く",
|
|
4155
|
+
share: "共有",
|
|
4156
|
+
copyLink: "リンクをコピー",
|
|
4157
|
+
linkCopied: "リンクをコピーしました",
|
|
4158
|
+
more: "その他",
|
|
4159
|
+
properties: "プロパティ",
|
|
4160
|
+
discussions: "ディスカッション",
|
|
4161
|
+
addComment: "コメントを追加…",
|
|
4162
|
+
templates: "テンプレート",
|
|
4163
|
+
hint: "Enter で空のページのまま続けるか、テンプレートを選択します(↑ と ↓ で選択)",
|
|
4164
|
+
empty: "空",
|
|
4165
|
+
newTemplate: "新しいテンプレート",
|
|
4166
|
+
newTemplateTitle: "新しいテンプレート"
|
|
4153
4167
|
}
|
|
4154
4168
|
};
|
|
4155
4169
|
export { e as default };
|
|
@@ -1875,8 +1875,7 @@ var e = {
|
|
|
1875
1875
|
sharedHint: "워크스페이스의 모든 사람이 볼 수 있습니다.",
|
|
1876
1876
|
personalHint: "나만 볼 수 있습니다.",
|
|
1877
1877
|
shareNeedsWrite: "보기를 공유하려면 멤버 권한이 필요합니다.",
|
|
1878
|
-
|
|
1879
|
-
onlyYou: "나만 볼 수 있는 보기입니다"
|
|
1878
|
+
more: "{count}개 더"
|
|
1880
1879
|
},
|
|
1881
1880
|
palette: {
|
|
1882
1881
|
label: "명령 팔레트",
|
|
@@ -4142,14 +4141,29 @@ var e = {
|
|
|
4142
4141
|
removeView: "보기 삭제",
|
|
4143
4142
|
makeSeriesDoc: "이 날의 {series} 노트 만들기",
|
|
4144
4143
|
newOn: "{date}에 새 하위 페이지",
|
|
4145
|
-
emptyPage: "빈 페이지",
|
|
4146
|
-
fromTemplateDefault: "{template} (기본)",
|
|
4147
4144
|
moreOnDay: "{count}개 더",
|
|
4148
4145
|
previousMonth: "이전 달",
|
|
4149
4146
|
today: "오늘",
|
|
4150
4147
|
nextMonth: "다음 달",
|
|
4151
4148
|
none: "아직 하위 페이지가 없습니다.",
|
|
4152
4149
|
undated: "날짜 없음"
|
|
4150
|
+
},
|
|
4151
|
+
newPage: {
|
|
4152
|
+
title: "새 페이지",
|
|
4153
|
+
titleLabel: "페이지 제목",
|
|
4154
|
+
openFull: "전체 페이지로 열기",
|
|
4155
|
+
share: "공유",
|
|
4156
|
+
copyLink: "링크 복사",
|
|
4157
|
+
linkCopied: "링크를 복사했습니다",
|
|
4158
|
+
more: "더 보기",
|
|
4159
|
+
properties: "속성",
|
|
4160
|
+
discussions: "토론",
|
|
4161
|
+
addComment: "댓글 추가…",
|
|
4162
|
+
templates: "템플릿",
|
|
4163
|
+
hint: "Enter를 눌러 빈 페이지로 계속하거나 템플릿을 고르세요(↑와 ↓로 선택)",
|
|
4164
|
+
empty: "비어 있음",
|
|
4165
|
+
newTemplate: "새 템플릿",
|
|
4166
|
+
newTemplateTitle: "새 템플릿"
|
|
4153
4167
|
}
|
|
4154
4168
|
};
|
|
4155
4169
|
export { e as default };
|
|
@@ -1875,8 +1875,7 @@ var e = {
|
|
|
1875
1875
|
sharedHint: "工作区中的所有人都能看到。",
|
|
1876
1876
|
personalHint: "只有您能看到。",
|
|
1877
1877
|
shareNeedsWrite: "共享视图需要成员权限。",
|
|
1878
|
-
|
|
1879
|
-
onlyYou: "只有您能看到此视图"
|
|
1878
|
+
more: "另外 {count} 个"
|
|
1880
1879
|
},
|
|
1881
1880
|
palette: {
|
|
1882
1881
|
label: "命令面板",
|
|
@@ -4142,14 +4141,29 @@ var e = {
|
|
|
4142
4141
|
removeView: "删除视图",
|
|
4143
4142
|
makeSeriesDoc: "创建这一天的 {series} 记录",
|
|
4144
4143
|
newOn: "在 {date} 新建子页面",
|
|
4145
|
-
emptyPage: "空白页面",
|
|
4146
|
-
fromTemplateDefault: "{template}(默认)",
|
|
4147
4144
|
moreOnDay: "还有 {count} 篇",
|
|
4148
4145
|
previousMonth: "上个月",
|
|
4149
4146
|
today: "今天",
|
|
4150
4147
|
nextMonth: "下个月",
|
|
4151
4148
|
none: "还没有子页面。",
|
|
4152
4149
|
undated: "无日期"
|
|
4150
|
+
},
|
|
4151
|
+
newPage: {
|
|
4152
|
+
title: "新页面",
|
|
4153
|
+
titleLabel: "页面标题",
|
|
4154
|
+
openFull: "以完整页面打开",
|
|
4155
|
+
share: "共享",
|
|
4156
|
+
copyLink: "复制链接",
|
|
4157
|
+
linkCopied: "已复制链接",
|
|
4158
|
+
more: "更多",
|
|
4159
|
+
properties: "属性",
|
|
4160
|
+
discussions: "讨论",
|
|
4161
|
+
addComment: "添加评论…",
|
|
4162
|
+
templates: "模板",
|
|
4163
|
+
hint: "按 Enter 继续使用空白页,或选择一个模板(用 ↑ 和 ↓ 选择)",
|
|
4164
|
+
empty: "空",
|
|
4165
|
+
newTemplate: "新建模板",
|
|
4166
|
+
newTemplateTitle: "新建模板"
|
|
4153
4167
|
}
|
|
4154
4168
|
};
|
|
4155
4169
|
export { e as default };
|
package/api/queries.js
CHANGED
|
@@ -699,15 +699,23 @@ var a = i({
|
|
|
699
699
|
params: s(e),
|
|
700
700
|
signal: r
|
|
701
701
|
})).favorites
|
|
702
|
-
}), me = (e) => i({
|
|
703
|
-
queryKey: [
|
|
702
|
+
}), me = (e, r) => i({
|
|
703
|
+
queryKey: r ? [
|
|
704
|
+
"workspace",
|
|
705
|
+
e,
|
|
706
|
+
"views",
|
|
707
|
+
r
|
|
708
|
+
] : [
|
|
704
709
|
"workspace",
|
|
705
710
|
e,
|
|
706
711
|
"views"
|
|
707
712
|
],
|
|
708
|
-
queryFn: async ({ signal:
|
|
709
|
-
params:
|
|
710
|
-
|
|
713
|
+
queryFn: async ({ signal: i }) => n(await t.GET("/api/v1/workspaces/{workspace}/views", {
|
|
714
|
+
params: {
|
|
715
|
+
path: { workspace: e },
|
|
716
|
+
query: r ? { team: r } : {}
|
|
717
|
+
},
|
|
718
|
+
signal: i
|
|
711
719
|
})).views
|
|
712
720
|
}), he = (e) => i({
|
|
713
721
|
queryKey: [
|
|
@@ -340,4 +340,4 @@ function N({ workspace: e, space: t, property: r, onDone: a, onRemove: o }) {
|
|
|
340
340
|
]
|
|
341
341
|
});
|
|
342
342
|
}
|
|
343
|
-
export { O as DocProperties, A as PropertyField, D as usePropertyText };
|
|
343
|
+
export { M as AddProperty, O as DocProperties, A as PropertyField, D as usePropertyText };
|
package/components/Editor.js
CHANGED
|
@@ -4,109 +4,111 @@ import { DateChip as n } from "./DateChip.js";
|
|
|
4
4
|
import { DocButton as r } from "./DocButton.js";
|
|
5
5
|
import { DocLinkPicker as i } from "./DocLinkPicker.js";
|
|
6
6
|
import { DocViewBlock as a } from "./DocViewBlock.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import V from "@tiptap/
|
|
28
|
-
import re from "
|
|
29
|
-
import H from "highlight.js/lib/languages/
|
|
30
|
-
import U from "highlight.js/lib/languages/
|
|
31
|
-
import W from "highlight.js/lib/languages/
|
|
32
|
-
import G from "highlight.js/lib/languages/
|
|
33
|
-
import K from "highlight.js/lib/languages/
|
|
34
|
-
import q from "highlight.js/lib/languages/
|
|
35
|
-
import J from "highlight.js/lib/languages/
|
|
36
|
-
import Y from "highlight.js/lib/languages/
|
|
37
|
-
import X from "highlight.js/lib/languages/
|
|
38
|
-
import ie from "highlight.js/lib/languages/
|
|
39
|
-
import ae from "highlight.js/lib/languages/
|
|
40
|
-
import oe from "highlight.js/lib/languages/
|
|
41
|
-
import se from "highlight.js/lib/languages/
|
|
42
|
-
import ce from "highlight.js/lib/languages/
|
|
43
|
-
import Z from "highlight.js/lib/languages/
|
|
44
|
-
import
|
|
7
|
+
import { DocLink as o } from "./docLink.js";
|
|
8
|
+
import { AttachmentFiles as s, AttachmentImage as c, DocLinkIcons as l, DocLinks as u, IssueMentions as d, KnowledgeTerms as f, LinkedIssues as p, PeopleMentions as m, TeamNames as h, recordingText as g } from "./editorPlugins.js";
|
|
9
|
+
import { FigmaEmbedBlock as _ } from "./Figma.js";
|
|
10
|
+
import { IssueListBlock as v } from "./IssueListBlock.js";
|
|
11
|
+
import { LinkCard as y } from "./LinkCard.js";
|
|
12
|
+
import { MentionPicker as b } from "./MentionPicker.js";
|
|
13
|
+
import { Diagrams as x, MathBlock as ee, MathInline as te } from "./mathDiagrams.js";
|
|
14
|
+
import { SlashMenu as ne } from "./SlashMenu.js";
|
|
15
|
+
import { SubPages as S } from "./SubPages.js";
|
|
16
|
+
import { MarkdownTable as C } from "./table.js";
|
|
17
|
+
import { DetailsContent as w, DetailsSummary as T, Toggle as E } from "./toggle.js";
|
|
18
|
+
import { VideoBlock as D } from "./video.js";
|
|
19
|
+
import { useEffect as O, useRef as k } from "react";
|
|
20
|
+
import { useTranslations as A } from "use-intl";
|
|
21
|
+
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
22
|
+
import { CodeBlockLowlight as P } from "@tiptap/extension-code-block-lowlight";
|
|
23
|
+
import { TaskItem as F, TaskList as I } from "@tiptap/extension-list";
|
|
24
|
+
import { TableKit as L } from "@tiptap/extension-table";
|
|
25
|
+
import { Placeholder as R } from "@tiptap/extensions";
|
|
26
|
+
import { Markdown as z } from "@tiptap/markdown";
|
|
27
|
+
import { EditorContent as B, useEditor as V } from "@tiptap/react";
|
|
28
|
+
import re from "@tiptap/starter-kit";
|
|
29
|
+
import H from "highlight.js/lib/languages/bash";
|
|
30
|
+
import U from "highlight.js/lib/languages/css";
|
|
31
|
+
import W from "highlight.js/lib/languages/diff";
|
|
32
|
+
import G from "highlight.js/lib/languages/dockerfile";
|
|
33
|
+
import K from "highlight.js/lib/languages/go";
|
|
34
|
+
import q from "highlight.js/lib/languages/ini";
|
|
35
|
+
import J from "highlight.js/lib/languages/javascript";
|
|
36
|
+
import Y from "highlight.js/lib/languages/json";
|
|
37
|
+
import X from "highlight.js/lib/languages/markdown";
|
|
38
|
+
import ie from "highlight.js/lib/languages/python";
|
|
39
|
+
import ae from "highlight.js/lib/languages/rust";
|
|
40
|
+
import oe from "highlight.js/lib/languages/shell";
|
|
41
|
+
import se from "highlight.js/lib/languages/sql";
|
|
42
|
+
import ce from "highlight.js/lib/languages/typescript";
|
|
43
|
+
import Z from "highlight.js/lib/languages/xml";
|
|
44
|
+
import le from "highlight.js/lib/languages/yaml";
|
|
45
|
+
import { createLowlight as ue } from "lowlight";
|
|
45
46
|
// src/components/Editor.tsx
|
|
46
|
-
var
|
|
47
|
-
bash:
|
|
48
|
-
css:
|
|
49
|
-
diff:
|
|
50
|
-
dockerfile:
|
|
51
|
-
go:
|
|
52
|
-
ini:
|
|
53
|
-
javascript:
|
|
54
|
-
json:
|
|
55
|
-
markdown:
|
|
56
|
-
python:
|
|
57
|
-
rust:
|
|
58
|
-
shell:
|
|
59
|
-
sql:
|
|
60
|
-
typescript:
|
|
61
|
-
xml:
|
|
62
|
-
yaml:
|
|
47
|
+
var de = ue({
|
|
48
|
+
bash: H,
|
|
49
|
+
css: U,
|
|
50
|
+
diff: W,
|
|
51
|
+
dockerfile: G,
|
|
52
|
+
go: K,
|
|
53
|
+
ini: q,
|
|
54
|
+
javascript: J,
|
|
55
|
+
json: Y,
|
|
56
|
+
markdown: X,
|
|
57
|
+
python: ie,
|
|
58
|
+
rust: ae,
|
|
59
|
+
shell: oe,
|
|
60
|
+
sql: se,
|
|
61
|
+
typescript: ce,
|
|
62
|
+
xml: Z,
|
|
63
|
+
yaml: le
|
|
63
64
|
});
|
|
64
|
-
function Q({ editable: i = !0, placeholder:
|
|
65
|
+
function Q({ editable: i = !0, placeholder: g = "", collaborative: b = !1 } = {}) {
|
|
65
66
|
return [
|
|
66
|
-
|
|
67
|
-
link:
|
|
68
|
-
openOnClick: !i,
|
|
69
|
-
autolink: !0
|
|
70
|
-
},
|
|
67
|
+
re.configure({
|
|
68
|
+
link: !1,
|
|
71
69
|
codeBlock: !1,
|
|
72
70
|
blockquote: !1,
|
|
73
|
-
...i && !
|
|
74
|
-
...
|
|
71
|
+
...i && !b ? {} : { trailingNode: !1 },
|
|
72
|
+
...b ? { undoRedo: !1 } : {}
|
|
73
|
+
}),
|
|
74
|
+
o.configure({
|
|
75
|
+
openOnClick: !i,
|
|
76
|
+
autolink: !0
|
|
75
77
|
}),
|
|
76
|
-
|
|
78
|
+
P.configure({ lowlight: de }),
|
|
77
79
|
e,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
I,
|
|
81
|
+
F.configure({ nested: !0 }),
|
|
82
|
+
E,
|
|
83
|
+
S,
|
|
80
84
|
T,
|
|
81
|
-
ne,
|
|
82
85
|
w,
|
|
83
|
-
C,
|
|
84
86
|
t,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
L.configure({ table: !1 }),
|
|
88
|
+
C.configure({
|
|
87
89
|
resizable: !1,
|
|
88
90
|
allowTableNodeSelection: !1
|
|
89
91
|
}),
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
R.configure({ placeholder: g }),
|
|
93
|
+
z,
|
|
94
|
+
f,
|
|
95
|
+
u,
|
|
93
96
|
l,
|
|
94
97
|
c,
|
|
95
98
|
s,
|
|
96
|
-
o,
|
|
97
|
-
f,
|
|
98
99
|
p,
|
|
99
100
|
m,
|
|
100
|
-
|
|
101
|
+
h,
|
|
102
|
+
d,
|
|
101
103
|
a,
|
|
102
104
|
r,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
y,
|
|
106
|
+
_,
|
|
107
|
+
D,
|
|
108
|
+
te,
|
|
106
109
|
ee,
|
|
107
110
|
x,
|
|
108
|
-
|
|
109
|
-
_,
|
|
111
|
+
v,
|
|
110
112
|
n
|
|
111
113
|
];
|
|
112
114
|
}
|
|
@@ -125,9 +127,9 @@ function $(e) {
|
|
|
125
127
|
}
|
|
126
128
|
};
|
|
127
129
|
}
|
|
128
|
-
function
|
|
129
|
-
|
|
130
|
-
let p =
|
|
130
|
+
function fe({ value: e, onChange: t, onSubmit: n, onBlur: r, onFocus: a, placeholder: o, editable: s = !0, autofocus: c = !1, className: l = "", label: u, onFiles: d, onEditor: f }) {
|
|
131
|
+
g.linkHint = A("video")("linkHint");
|
|
132
|
+
let p = k({
|
|
131
133
|
onChange: t,
|
|
132
134
|
onSubmit: n,
|
|
133
135
|
onBlur: r,
|
|
@@ -139,9 +141,9 @@ function de({ value: e, onChange: t, onSubmit: n, onBlur: r, onFocus: a, placeho
|
|
|
139
141
|
onBlur: r,
|
|
140
142
|
onFocus: a
|
|
141
143
|
};
|
|
142
|
-
let m =
|
|
144
|
+
let m = k(d);
|
|
143
145
|
m.current = d;
|
|
144
|
-
let
|
|
146
|
+
let h = V({
|
|
145
147
|
extensions: Q({
|
|
146
148
|
editable: s,
|
|
147
149
|
placeholder: o ?? ""
|
|
@@ -168,23 +170,23 @@ function de({ value: e, onChange: t, onSubmit: n, onBlur: r, onFocus: a, placeho
|
|
|
168
170
|
onBlur: ({ editor: e }) => p.current.onBlur?.(e.getMarkdown()),
|
|
169
171
|
onFocus: () => p.current.onFocus?.()
|
|
170
172
|
});
|
|
171
|
-
|
|
172
|
-
!
|
|
173
|
+
O(() => {
|
|
174
|
+
!h || h.isDestroyed || h.isFocused || h.getMarkdown() === e || h.commands.setContent(e, {
|
|
173
175
|
contentType: "markdown",
|
|
174
176
|
emitUpdate: !1
|
|
175
177
|
});
|
|
176
|
-
}, [
|
|
177
|
-
|
|
178
|
-
}, [
|
|
179
|
-
let _ =
|
|
180
|
-
return _.current = f,
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
s && /* @__PURE__ */
|
|
183
|
-
s && /* @__PURE__ */
|
|
184
|
-
editor:
|
|
178
|
+
}, [h, e]), O(() => {
|
|
179
|
+
h?.setEditable(s);
|
|
180
|
+
}, [h, s]);
|
|
181
|
+
let _ = k(f);
|
|
182
|
+
return _.current = f, O(() => (_.current?.(h), () => _.current?.(null)), [h]), /* @__PURE__ */ N(j, { children: [
|
|
183
|
+
/* @__PURE__ */ M(B, { editor: h }),
|
|
184
|
+
s && /* @__PURE__ */ M(i, { editor: h }),
|
|
185
|
+
s && /* @__PURE__ */ M(ne, {
|
|
186
|
+
editor: h,
|
|
185
187
|
onFiles: m
|
|
186
188
|
}),
|
|
187
|
-
s && /* @__PURE__ */
|
|
189
|
+
s && /* @__PURE__ */ M(b, { editor: h })
|
|
188
190
|
] });
|
|
189
191
|
}
|
|
190
|
-
export {
|
|
192
|
+
export { fe as Editor, Q as contentExtensions, $ as fileHandlers };
|