@freecallai/pro 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/README.md +23 -17
  2. package/dist/FkpKnowledgeTypePicker.vue_vue_type_script_setup_true_lang-xR8ZhhdJ.js +187 -0
  3. package/dist/FkpRichText.vue_vue_type_script_setup_true_lang-CaHRIHab.js +4864 -0
  4. package/dist/KnowledgeArea-_rsydhnt.js +1438 -0
  5. package/dist/{ToolForm-CWpUIVTl.js → ToolForm-Czg67cDT.js} +1 -1
  6. package/dist/{choice-DDg5gNtS.js → choice-Bt2xhoN_.js} +1 -1
  7. package/dist/edition-info/index.js +4 -0
  8. package/dist/filters/index.js +7 -0
  9. package/dist/guard-B7U3S4F1.js +1163 -0
  10. package/dist/{index-D8bcFtWR.js → index-9NM1SHoR.js} +1 -1
  11. package/dist/index-B4-2_sJI.js +10 -0
  12. package/dist/{index-DOEijEGU.js → index-BBv72oZe.js} +10 -10
  13. package/dist/index-BF6MRSMb.js +6 -0
  14. package/dist/index-BQrYBmwR.js +5 -0
  15. package/dist/index-CS2xQQ8W.js +168 -0
  16. package/dist/index-D0bJAQSN.js +327 -0
  17. package/dist/index-D9yqpH_4.js +57 -0
  18. package/dist/index-DCmHHi07.js +71 -0
  19. package/dist/index-DYeJRJY1.js +6 -0
  20. package/dist/{index-CJlAseSN.js → index-DnaEbb6l.js} +1 -1
  21. package/dist/{index-DSgEWJGP.js → index-Dy2Gy3bL.js} +1 -1
  22. package/dist/index-lNhA3N9x.js +379 -0
  23. package/dist/{index-5a9mHHzg.js → index-sjDmbR5o.js} +1 -1
  24. package/dist/index-trxE5T0w.js +6 -0
  25. package/dist/index-uCVrA6xK.js +5 -0
  26. package/dist/index.js +36 -11
  27. package/dist/inline-KPGqYMIR.js +19 -0
  28. package/dist/knowledge-CupkY2rK.js +6 -0
  29. package/dist/{knowledge-DnYGicjn.js → knowledge-DzwXQR-q.js} +1 -1
  30. package/dist/knowledge-type-picker/index.js +5 -0
  31. package/dist/media-extensions-DhRlLKYM.js +321 -0
  32. package/dist/{media-migration-CGOFwdYm.js → media-migration-CbMT2wS0.js} +1 -1
  33. package/dist/{media-upload-Dx45yv6a.js → media-upload-P9WeUHHr.js} +1 -1
  34. package/dist/navigation/index.js +4 -0
  35. package/dist/operations-D8pn-_iW.js +20 -0
  36. package/dist/{question-DGC6JHy5.js → question-C7akkjHn.js} +1 -1
  37. package/dist/{question-D1--acV8.js → question-DXZ8R-34.js} +1 -1
  38. package/dist/rich-text/index.js +57 -53
  39. package/dist/rich-text/legacy-converter/index.js +1271 -340
  40. package/dist/style.css +1 -1
  41. package/dist/switcher/index.js +4 -0
  42. package/dist/types/edition-info/FkpEditionInfo.vue.d.ts +5 -0
  43. package/dist/types/edition-info/index.d.ts +2 -0
  44. package/dist/types/edition-info/types.d.ts +5 -0
  45. package/dist/types/filters/FkpFilter.vue.d.ts +20 -0
  46. package/dist/types/filters/FkpFilterDateRange.vue.d.ts +13 -0
  47. package/dist/types/filters/FkpFilterPeriod.vue.d.ts +17 -0
  48. package/dist/types/filters/FkpSearchableMultiSelect.vue.d.ts +44 -0
  49. package/dist/types/filters/index.d.ts +5 -0
  50. package/dist/types/filters/selection.d.ts +5 -0
  51. package/dist/types/filters/types.d.ts +30 -0
  52. package/dist/types/index.d.ts +7 -1
  53. package/dist/types/knowledge-type-picker/index.d.ts +3 -0
  54. package/dist/types/navigation/FkpNavigation.vue.d.ts +51 -0
  55. package/dist/types/navigation/index.d.ts +2 -0
  56. package/dist/types/navigation/types.d.ts +15 -0
  57. package/dist/types/rich-text/FkpRichText.vue.d.ts +31 -7
  58. package/dist/types/rich-text/__demo__/conversion-fixtures.d.ts +2 -2
  59. package/dist/types/rich-text/__demo__/reasoning-template-examples.d.ts +11 -0
  60. package/dist/types/rich-text/config/descriptor.d.ts +25 -2
  61. package/dist/types/rich-text/config/resolve.d.ts +2 -0
  62. package/dist/types/rich-text/index.d.ts +3 -1
  63. package/dist/types/rich-text/legacy-converter/agent-prompt-preview.d.ts +2 -0
  64. package/dist/types/rich-text/legacy-converter/business-attribute.d.ts +12 -0
  65. package/dist/types/rich-text/legacy-converter/index.d.ts +8 -0
  66. package/dist/types/rich-text/legacy-converter/tool-contract.d.ts +1 -0
  67. package/dist/types/rich-text/model/guard.d.ts +2 -1
  68. package/dist/types/rich-text/model/node-contract.d.ts +3 -5
  69. package/dist/types/rich-text/model/node-identity.d.ts +7 -1
  70. package/dist/types/rich-text/model/question-text.d.ts +2 -4
  71. package/dist/types/rich-text/plugins/attribute/token.d.ts +9 -0
  72. package/dist/types/rich-text/plugins/operations.d.ts +9 -0
  73. package/dist/types/rich-text/plugins/reasoningTemplate/defaults.d.ts +14 -0
  74. package/dist/types/rich-text/plugins/reasoningTemplate/examples.d.ts +9 -0
  75. package/dist/types/rich-text/plugins/separator/token.d.ts +2 -0
  76. package/dist/types/rich-text/plugins/tableKnowledge/descriptor.d.ts +2 -0
  77. package/dist/types/rich-text/plugins/tableKnowledge/index.d.ts +2 -0
  78. package/dist/types/rich-text/plugins/tableKnowledge/token.d.ts +9 -0
  79. package/dist/types/rich-text/plugins/ticket/protocol.d.ts +8 -0
  80. package/dist/types/rich-text/plugins/ticket/token.d.ts +9 -0
  81. package/dist/types/rich-text/plugins/todo/token.d.ts +3 -0
  82. package/dist/types/rich-text/plugins/token-catalog.d.ts +46 -0
  83. package/dist/types/rich-text/plugins/token-definition.d.ts +24 -0
  84. package/dist/types/rich-text/plugins/tool/presentation.d.ts +2 -1
  85. package/dist/types/rich-text/plugins/tool/protocol.d.ts +5 -0
  86. package/dist/types/rich-text/plugins/tool/rules.d.ts +35 -0
  87. package/dist/types/rich-text/plugins/tool/token.d.ts +2 -0
  88. package/dist/types/rich-text/plugins/variable/token.d.ts +2 -0
  89. package/dist/types/rich-text/public/types.d.ts +73 -6
  90. package/dist/types/rich-text/runtime/action-ports.d.ts +6 -1
  91. package/dist/types/rich-text/runtime/file-drop-guard.d.ts +2 -0
  92. package/dist/types/rich-text/runtime/knowledge-clipboard.d.ts +16 -0
  93. package/dist/types/rich-text/runtime/media-policy.d.ts +15 -0
  94. package/dist/types/rich-text/runtime/media-target.d.ts +3 -0
  95. package/dist/types/rich-text/runtime/media-upload-session.d.ts +5 -1
  96. package/dist/types/rich-text/runtime/media-upload-slots.d.ts +4 -0
  97. package/dist/types/rich-text/runtime/schema-plan.d.ts +1 -0
  98. package/dist/types/rich-text/types.d.ts +3 -40
  99. package/dist/types/rich-text/ui/FkpKnowledgeTypePicker.vue.d.ts +38 -0
  100. package/dist/types/rich-text/ui/KnowledgeArea.vue.d.ts +12 -1
  101. package/dist/types/rich-text/ui/knowledge-type-picker-types.d.ts +14 -0
  102. package/dist/types/rich-text/ui/token-renderer.d.ts +5 -0
  103. package/dist/types/switcher/FkpSwitcher.vue.d.ts +52 -0
  104. package/dist/types/switcher/index.d.ts +2 -0
  105. package/dist/types/switcher/types.d.ts +7 -0
  106. package/package.json +26 -6
  107. package/dist/FkpRichText.vue_vue_type_script_setup_true_lang-DnknqQTh.js +0 -4115
  108. package/dist/KnowledgeArea-OPR7smbt.js +0 -923
  109. package/dist/guard-BCatAeT4.js +0 -749
  110. package/dist/index-BsQLwz91.js +0 -5
  111. package/dist/index-CzpY61Qj.js +0 -6
  112. package/dist/index-DxxX09iY.js +0 -6
  113. package/dist/index-nnvfy5q0.js +0 -31
  114. package/dist/index-urNonkMH.js +0 -6
  115. package/dist/index-xAjlBylT.js +0 -5
  116. package/dist/inline-TT_dl8Y3.js +0 -17
  117. package/dist/knowledge-BZCmalF_.js +0 -6
  118. package/dist/media-extensions-ZoxmhIhH.js +0 -276
  119. package/dist/operations-JgnjGx3H.js +0 -19
package/dist/index.js CHANGED
@@ -1,16 +1,41 @@
1
- import { _ as o } from "./FkpRichText.vue_vue_type_script_setup_true_lang-DnknqQTh.js";
2
- import { e as t, r as n } from "./FkpRichText.vue_vue_type_script_setup_true_lang-DnknqQTh.js";
3
- import { s as p, a as c } from "./guard-BCatAeT4.js";
4
- const a = {
1
+ import { _ as t } from "./FkpRichText.vue_vue_type_script_setup_true_lang-CaHRIHab.js";
2
+ import { r as g } from "./FkpRichText.vue_vue_type_script_setup_true_lang-CaHRIHab.js";
3
+ import { _ as i } from "./FkpKnowledgeTypePicker.vue_vue_type_script_setup_true_lang-xR8ZhhdJ.js";
4
+ import { e as h } from "./FkpKnowledgeTypePicker.vue_vue_type_script_setup_true_lang-xR8ZhhdJ.js";
5
+ import { s as u, a as w } from "./guard-B7U3S4F1.js";
6
+ import { F as a } from "./index-lNhA3N9x.js";
7
+ import { _ as v, a as y, b as E, c as M } from "./index-lNhA3N9x.js";
8
+ import { N as s } from "./index-D0bJAQSN.js";
9
+ import { _ as P } from "./index-D0bJAQSN.js";
10
+ import { S as n } from "./index-CS2xQQ8W.js";
11
+ import { _ as z } from "./index-CS2xQQ8W.js";
12
+ import { E as p } from "./index-DCmHHi07.js";
13
+ import { _ as Q } from "./index-DCmHHi07.js";
14
+ const x = {
5
15
  install(e) {
6
- e.component("FkpRichText", o);
16
+ for (const [o, r] of Object.entries({
17
+ ...a,
18
+ ...s,
19
+ ...n,
20
+ ...p
21
+ }))
22
+ e.component(o, r);
23
+ e.component("FkpRichText", t), e.component("FkpKnowledgeTypePicker", i);
7
24
  }
8
25
  };
9
26
  export {
10
- o as FkpRichText,
11
- a as default,
12
- t as emptyScene,
13
- n as resolveSceneConfig,
14
- p as serializeQuestionForModel,
15
- c as serializeQuestionTagsForModel
27
+ Q as FkpEditionInfo,
28
+ v as FkpFilter,
29
+ y as FkpFilterDateRange,
30
+ E as FkpFilterPeriod,
31
+ i as FkpKnowledgeTypePicker,
32
+ P as FkpNavigation,
33
+ t as FkpRichText,
34
+ M as FkpSearchableMultiSelect,
35
+ z as FkpSwitcher,
36
+ x as default,
37
+ h as emptyScene,
38
+ g as resolveSceneConfig,
39
+ u as serializeQuestionForModel,
40
+ w as serializeQuestionTagsForModel
16
41
  };
@@ -0,0 +1,19 @@
1
+ import { g as s } from "./guard-B7U3S4F1.js";
2
+ const t = {
3
+ execute(a, o) {
4
+ const e = s(a);
5
+ return o.option ? [
6
+ {
7
+ kind: "insertOwnToken",
8
+ capabilityId: a,
9
+ key: o.option.id,
10
+ label: o.option.label,
11
+ ...e != null && e.requiresInsertToken && o.option.token ? { token: o.option.token } : {},
12
+ ...e != null && e.allowsParams && o.option.params ? { params: o.option.params } : {}
13
+ }
14
+ ] : [];
15
+ }
16
+ };
17
+ export {
18
+ t as m
19
+ };
@@ -0,0 +1,6 @@
1
+ import { b as o } from "./operations-D8pn-_iW.js";
2
+ import { c as e } from "./choice-Bt2xhoN_.js";
3
+ const a = o("todo", "knowledgeInline", e);
4
+ export {
5
+ a as default
6
+ };
@@ -1,4 +1,4 @@
1
- import { b as l } from "./operations-JgnjGx3H.js";
1
+ import { b as l } from "./operations-D8pn-_iW.js";
2
2
  const o = {
3
3
  execute(e) {
4
4
  return e === "originalReply" ? [{ kind: "insertOwnBlock", capabilityId: e, block: e }] : [];
@@ -0,0 +1,5 @@
1
+ import { _ as o, _ as p } from "../FkpKnowledgeTypePicker.vue_vue_type_script_setup_true_lang-xR8ZhhdJ.js";
2
+ export {
3
+ o as FkpKnowledgeTypePicker,
4
+ p as default
5
+ };
@@ -0,0 +1,321 @@
1
+ import { Node as S, mergeAttributes as D } from "@tiptap/core";
2
+ import { nodeViewProps as L, NodeViewWrapper as T, VueNodeViewRenderer as q } from "@tiptap/vue-3";
3
+ import { defineComponent as F, ref as C, watch as $, onMounted as H, onBeforeUnmount as P, openBlock as i, createBlock as p, unref as s, normalizeClass as B, withCtx as l, createElementVNode as z, createElementBlock as f, createVNode as u, createTextVNode as k, toDisplayString as E, createCommentVNode as n, withModifiers as N, Fragment as U } from "vue";
4
+ import { Button as c, ImagePreview as O, Modal as R } from "@freecallai/ui";
5
+ import { closeHistory as W } from "@tiptap/pm/history";
6
+ import b from "@freecallai/icons";
7
+ import { IconDragDotVertical as j, IconDelete as G } from "@freecallai/ui/es/icon/index.js";
8
+ const J = { class: "fk-media-surface" }, K = {
9
+ key: 0,
10
+ class: "fk-media-failed"
11
+ }, Q = ["draggable", "src", "alt"], X = ["draggable", "src", "poster", "controls"], Y = {
12
+ key: 4,
13
+ class: "fk-media-actions"
14
+ }, Z = {
15
+ key: 0,
16
+ "data-drag-handle": "",
17
+ class: "fk-media-handle",
18
+ title: "拖动调整位置"
19
+ }, h = {
20
+ key: 5,
21
+ class: "fk-upload-state"
22
+ }, x = { class: "fk-media-caption" }, _ = {
23
+ key: 1,
24
+ class: "fk-error"
25
+ }, ee = ["src"], te = /* @__PURE__ */ F({
26
+ __name: "MediaView",
27
+ props: L,
28
+ setup(r) {
29
+ const a = r, o = a.extension.options.sceneStyle === !0, d = C(!1), g = C(!1), y = C(null), v = C(a.editor.isEditable);
30
+ function M(t) {
31
+ const { detail: e } = t;
32
+ (e == null ? void 0 : e.id) === a.node.attrs.id && a.node.attrs.status === "uploading" && typeof e.percent == "number" && Number.isFinite(e.percent) && (y.value = e.percent);
33
+ }
34
+ const w = () => {
35
+ v.value = a.editor.isEditable;
36
+ };
37
+ a.editor.on("update", w), a.editor.on("transaction", w);
38
+ function V() {
39
+ a.editor.isEditable && (a.editor.view.dispatch(W(a.editor.state.tr)), a.deleteNode());
40
+ }
41
+ function A() {
42
+ a.editor.view.dom.dispatchEvent(
43
+ new CustomEvent("fkp-media-retry", {
44
+ bubbles: !0,
45
+ detail: { id: a.node.attrs.id }
46
+ })
47
+ );
48
+ }
49
+ function I() {
50
+ !o || g.value || !["image", "video"].includes(a.node.attrs.kind) || a.node.attrs.status !== "ready" || (d.value = !0);
51
+ }
52
+ return $(
53
+ () => a.node.attrs.src,
54
+ () => {
55
+ g.value = !1;
56
+ }
57
+ ), $(
58
+ () => a.node.attrs.status,
59
+ (t) => {
60
+ t !== "uploading" && (y.value = null);
61
+ }
62
+ ), H(() => {
63
+ a.editor.view.dom.addEventListener("fkp-media-progress", M);
64
+ }), P(() => {
65
+ a.editor.view.dom.removeEventListener("fkp-media-progress", M), a.editor.off("update", w), a.editor.off("transaction", w);
66
+ }), (t, e) => (i(), p(s(T), {
67
+ class: B(["fk-media", {
68
+ "is-selected": t.selected,
69
+ "is-scene-media": o,
70
+ "is-video": t.node.attrs.kind === "video",
71
+ "is-error": t.node.attrs.status === "error"
72
+ }]),
73
+ "data-media-id": t.node.attrs.id,
74
+ "data-drag-handle": o && v.value ? "" : void 0,
75
+ contenteditable: "false",
76
+ onClick: I
77
+ }, {
78
+ default: l(() => [
79
+ z("div", J, [
80
+ g.value ? (i(), f("div", K, [
81
+ u(s(b), {
82
+ name: "fail",
83
+ size: 24
84
+ }),
85
+ e[7] || (e[7] = k("媒体无法加载"))
86
+ ])) : t.node.attrs.kind === "image" ? (i(), f("img", {
87
+ key: 1,
88
+ draggable: o ? !1 : void 0,
89
+ src: t.node.attrs.src,
90
+ alt: t.node.attrs.name,
91
+ onError: e[0] || (e[0] = (m) => g.value = !0),
92
+ onDblclick: e[1] || (e[1] = (m) => d.value = !0)
93
+ }, null, 40, Q)) : (i(), f("video", {
94
+ key: 2,
95
+ draggable: o ? !1 : void 0,
96
+ src: t.node.attrs.src,
97
+ poster: t.node.attrs.poster || void 0,
98
+ controls: !o,
99
+ muted: o,
100
+ playsinline: "",
101
+ preload: "metadata",
102
+ onError: e[2] || (e[2] = (m) => g.value = !0)
103
+ }, null, 40, X)),
104
+ o && !g.value && t.node.attrs.status === "ready" && ["image", "video"].includes(t.node.attrs.kind) ? (i(), p(s(c), {
105
+ key: 3,
106
+ class: B(["fk-media-play", { "is-image-preview": t.node.attrs.kind === "image" }]),
107
+ type: "text",
108
+ "aria-label": t.node.attrs.kind === "image" ? "查看大图" : "播放视频",
109
+ style: { "pointer-events": "none" },
110
+ onClick: e[3] || (e[3] = (m) => d.value = !0)
111
+ }, {
112
+ default: l(() => [
113
+ u(s(b), {
114
+ name: "visible",
115
+ size: 14
116
+ }),
117
+ k(E(t.node.attrs.kind === "image" ? "点击查看大图" : "点击播放视频"), 1)
118
+ ]),
119
+ _: 1
120
+ }, 8, ["class", "aria-label"])) : n("", !0),
121
+ o ? n("", !0) : (i(), f("div", Y, [
122
+ v.value ? (i(), f("span", Z, [
123
+ u(s(j), { size: 15 })
124
+ ])) : n("", !0),
125
+ u(s(c), {
126
+ type: "text",
127
+ size: "mini",
128
+ title: "预览媒体",
129
+ "aria-label": "预览媒体",
130
+ onClick: e[4] || (e[4] = (m) => d.value = !0)
131
+ }, {
132
+ default: l(() => [
133
+ u(s(b), {
134
+ name: "open",
135
+ size: 15
136
+ })
137
+ ]),
138
+ _: 1
139
+ }),
140
+ v.value && t.node.attrs.status === "error" ? (i(), p(s(c), {
141
+ key: 1,
142
+ type: "text",
143
+ size: "mini",
144
+ title: "重试上传",
145
+ "aria-label": "重试上传",
146
+ onClick: A
147
+ }, {
148
+ default: l(() => e[8] || (e[8] = [
149
+ k("重试")
150
+ ])),
151
+ _: 1
152
+ })) : n("", !0),
153
+ v.value ? (i(), p(s(c), {
154
+ key: 2,
155
+ type: "text",
156
+ size: "mini",
157
+ title: "删除媒体",
158
+ "aria-label": "删除媒体",
159
+ onClick: V
160
+ }, {
161
+ default: l(() => [
162
+ u(s(G), { size: 15 })
163
+ ]),
164
+ _: 1
165
+ })) : n("", !0)
166
+ ])),
167
+ t.node.attrs.status === "uploading" ? (i(), f("div", h, [
168
+ u(s(b), {
169
+ name: "sync",
170
+ size: 17,
171
+ class: "fk-spin"
172
+ }),
173
+ k("正在上传" + E(y.value === null ? "…" : ` ${y.value}%`), 1),
174
+ o && v.value ? (i(), p(s(c), {
175
+ key: 0,
176
+ class: "fk-media-status-action",
177
+ type: "text",
178
+ size: "mini",
179
+ "aria-label": "取消上传",
180
+ onClick: N(V, ["stop"])
181
+ }, {
182
+ default: l(() => e[9] || (e[9] = [
183
+ k("取消上传")
184
+ ])),
185
+ _: 1
186
+ })) : n("", !0)
187
+ ])) : n("", !0)
188
+ ]),
189
+ z("div", x, [
190
+ t.node.attrs.kind === "video" ? (i(), p(s(b), {
191
+ key: 0,
192
+ name: "video2",
193
+ size: 12
194
+ })) : n("", !0),
195
+ z("span", null, E(t.node.attrs.name), 1),
196
+ t.node.attrs.status === "error" ? (i(), f("span", _, E(t.node.attrs.error), 1)) : n("", !0),
197
+ o && v.value && t.node.attrs.status === "error" ? (i(), f(U, { key: 2 }, [
198
+ u(s(c), {
199
+ class: "fk-media-status-action",
200
+ type: "text",
201
+ size: "mini",
202
+ "aria-label": "重试上传",
203
+ onClick: N(A, ["stop"])
204
+ }, {
205
+ default: l(() => e[10] || (e[10] = [
206
+ k("重试")
207
+ ])),
208
+ _: 1
209
+ }),
210
+ u(s(c), {
211
+ class: "fk-media-status-action",
212
+ type: "text",
213
+ size: "mini",
214
+ "aria-label": "移除失败媒体",
215
+ onClick: N(V, ["stop"])
216
+ }, {
217
+ default: l(() => e[11] || (e[11] = [
218
+ k("移除")
219
+ ])),
220
+ _: 1
221
+ })
222
+ ], 64)) : n("", !0)
223
+ ]),
224
+ t.node.attrs.kind === "image" ? (i(), p(s(O), {
225
+ key: 0,
226
+ visible: d.value,
227
+ "onUpdate:visible": e[5] || (e[5] = (m) => d.value = m),
228
+ src: t.node.attrs.src,
229
+ "mask-closable": !0
230
+ }, null, 8, ["visible", "src"])) : (i(), p(s(R), {
231
+ key: 1,
232
+ visible: d.value,
233
+ "onUpdate:visible": e[6] || (e[6] = (m) => d.value = m),
234
+ title: t.node.attrs.name,
235
+ footer: !1,
236
+ width: "min(960px, 90vw)",
237
+ "unmount-on-close": ""
238
+ }, {
239
+ default: l(() => [
240
+ z("video", {
241
+ class: "fk-video-preview",
242
+ src: t.node.attrs.src,
243
+ controls: "",
244
+ autoplay: ""
245
+ }, null, 8, ee)
246
+ ]),
247
+ _: 1
248
+ }, 8, ["visible", "title"]))
249
+ ]),
250
+ _: 1
251
+ }, 8, ["class", "data-media-id", "data-drag-handle"]));
252
+ }
253
+ }), le = S.create({
254
+ name: "mediaBlock",
255
+ group: "block",
256
+ atom: !0,
257
+ draggable: !0,
258
+ selectable: !0,
259
+ addOptions() {
260
+ return { sceneStyle: !1 };
261
+ },
262
+ addAttributes() {
263
+ return {
264
+ id: { default: "" },
265
+ nodeVersion: { default: 0 },
266
+ assetId: { default: null },
267
+ src: { default: "" },
268
+ kind: { default: "image" },
269
+ name: { default: "" },
270
+ poster: { default: null },
271
+ status: { default: "ready" },
272
+ error: { default: "" }
273
+ };
274
+ },
275
+ parseHTML() {
276
+ return [
277
+ {
278
+ tag: "figure[data-media-block]",
279
+ getAttrs: (r) => {
280
+ var a, o, d;
281
+ return {
282
+ id: r.getAttribute("data-id"),
283
+ kind: r.getAttribute("data-kind"),
284
+ src: (a = r.querySelector("img,video")) == null ? void 0 : a.getAttribute("src"),
285
+ name: (o = r.querySelector("figcaption")) == null ? void 0 : o.textContent,
286
+ assetId: r.getAttribute("data-asset-id"),
287
+ poster: (d = r.querySelector("video")) == null ? void 0 : d.getAttribute("poster"),
288
+ status: "ready"
289
+ };
290
+ }
291
+ }
292
+ ];
293
+ },
294
+ renderHTML({ node: r, HTMLAttributes: a }) {
295
+ return [
296
+ "figure",
297
+ D(a, {
298
+ "data-media-block": "",
299
+ "data-fkp-node": "media-block",
300
+ "data-id": r.attrs.id,
301
+ "data-kind": r.attrs.kind,
302
+ "data-asset-id": r.attrs.assetId,
303
+ "data-name": r.attrs.name
304
+ }),
305
+ r.attrs.kind === "video" ? [
306
+ "video",
307
+ { src: r.attrs.src, controls: "", poster: r.attrs.poster }
308
+ ] : ["img", { src: r.attrs.src, alt: r.attrs.name }],
309
+ ["figcaption", {}, r.attrs.name]
310
+ ];
311
+ },
312
+ renderText({ node: r }) {
313
+ return `[${r.attrs.kind === "video" ? "视频" : "图片"}:${r.attrs.name}]`;
314
+ },
315
+ addNodeView() {
316
+ return q(te);
317
+ }
318
+ });
319
+ export {
320
+ le as MediaBlock
321
+ };
@@ -1,4 +1,4 @@
1
- import { f as m, e as A } from "./guard-BCatAeT4.js";
1
+ import { f as m, i as A } from "./guard-B7U3S4F1.js";
2
2
  function b(i) {
3
3
  let s = 2166136261;
4
4
  for (let a = 0; a < i.length; a++)
@@ -1,4 +1,4 @@
1
- import { p as l, f as c } from "./FkpRichText.vue_vue_type_script_setup_true_lang-DnknqQTh.js";
1
+ import { p as l, i as c } from "./FkpRichText.vue_vue_type_script_setup_true_lang-CaHRIHab.js";
2
2
  function u(o) {
3
3
  return {
4
4
  id: o,
@@ -0,0 +1,4 @@
1
+ import { _ as i } from "../index-D0bJAQSN.js";
2
+ export {
3
+ i as FkpNavigation
4
+ };
@@ -0,0 +1,20 @@
1
+ function s(a, t, e) {
2
+ return {
3
+ id: a,
4
+ slot: t,
5
+ apiVersion: 1,
6
+ dataVersion: 1,
7
+ actions: {
8
+ [`${a}.${t}.apply`]: {
9
+ execute: async (r, n) => ({
10
+ ok: !0,
11
+ data: e.execute(a, r, n.scene)
12
+ })
13
+ }
14
+ },
15
+ ...e.validateInsert ? { validateInsert: e.validateInsert } : {}
16
+ };
17
+ }
18
+ export {
19
+ s as b
20
+ };
@@ -1,4 +1,4 @@
1
- import { b as t } from "./operations-JgnjGx3H.js";
1
+ import { b as t } from "./operations-D8pn-_iW.js";
2
2
  import { s as o } from "./selection-state-D47jhx0U.js";
3
3
  const a = t("todo", "questionAction", o);
4
4
  export {
@@ -1,4 +1,4 @@
1
- import { b as o } from "./operations-JgnjGx3H.js";
1
+ import { b as o } from "./operations-D8pn-_iW.js";
2
2
  import { m as i } from "./state-KfOqha3d.js";
3
3
  const e = o(
4
4
  "originalReply",