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