@fileverse-dev/ddoc 3.0.55-comment-fix-2 → 3.0.55-comment-fix-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/dist/index.es.js +26 -24
- package/dist/package/components/editor-utils.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -2
package/dist/index.es.js
CHANGED
|
@@ -36234,61 +36234,60 @@ const x4 = (e) => {
|
|
|
36234
36234
|
disabled: !d
|
|
36235
36235
|
},
|
|
36236
36236
|
{
|
|
36237
|
-
icon: "
|
|
36238
|
-
title: "
|
|
36237
|
+
icon: "FileText",
|
|
36238
|
+
title: "Web page (.html)",
|
|
36239
|
+
subtitle: "AO3 compatible",
|
|
36239
36240
|
onClick: async () => {
|
|
36240
36241
|
if (e) {
|
|
36241
|
-
const M = e
|
|
36242
|
+
const M = e.getJSON(), _ = x4(
|
|
36242
36243
|
M
|
|
36243
|
-
), N = await e.commands.
|
|
36244
|
+
), N = await e.commands.exportHtmlFile({
|
|
36244
36245
|
title: _ || "Untitled"
|
|
36245
36246
|
});
|
|
36246
36247
|
if (N) {
|
|
36247
36248
|
const E = N, T = document.createElement("a");
|
|
36248
|
-
T.href = E, T.download = `${_ || "Untitled"}.
|
|
36249
|
+
T.href = E, T.download = `${_ || "Untitled"}.html`, document.body.appendChild(T), T.click(), document.body.removeChild(T), URL.revokeObjectURL(E);
|
|
36249
36250
|
}
|
|
36250
36251
|
}
|
|
36251
|
-
|
|
36252
|
+
s == null || s();
|
|
36252
36253
|
},
|
|
36253
36254
|
isActive: !1
|
|
36254
36255
|
},
|
|
36255
36256
|
{
|
|
36256
36257
|
icon: "FileText",
|
|
36257
|
-
title: "
|
|
36258
|
+
title: "Plain Text (.txt)",
|
|
36258
36259
|
onClick: async () => {
|
|
36259
36260
|
if (e) {
|
|
36260
36261
|
const M = e.getJSON(), _ = x4(
|
|
36261
36262
|
M
|
|
36262
|
-
), N = await e.commands.
|
|
36263
|
-
title: _ || "Untitled"
|
|
36264
|
-
});
|
|
36263
|
+
), N = await e.commands.exportTxtFile();
|
|
36265
36264
|
if (N) {
|
|
36266
36265
|
const E = N, T = document.createElement("a");
|
|
36267
|
-
T.href = E, T.download = `${_ || "Untitled"}.
|
|
36266
|
+
T.href = E, T.download = `${_ || "Untitled"}.txt`, document.body.appendChild(T), T.click(), document.body.removeChild(T), URL.revokeObjectURL(E);
|
|
36268
36267
|
}
|
|
36269
36268
|
}
|
|
36270
|
-
|
|
36269
|
+
a == null || a();
|
|
36271
36270
|
},
|
|
36272
|
-
isActive: !1
|
|
36273
|
-
isNew: !0
|
|
36271
|
+
isActive: !1
|
|
36274
36272
|
},
|
|
36275
36273
|
{
|
|
36276
|
-
icon: "
|
|
36277
|
-
title: "
|
|
36274
|
+
icon: "FileOutput",
|
|
36275
|
+
title: "Markdown (.md)",
|
|
36278
36276
|
onClick: async () => {
|
|
36279
36277
|
if (e) {
|
|
36280
|
-
const M = e.getJSON(), _ = x4(
|
|
36278
|
+
const M = e == null ? void 0 : e.getJSON(), _ = x4(
|
|
36281
36279
|
M
|
|
36282
|
-
), N = await e.commands.
|
|
36280
|
+
), N = await e.commands.exportMarkdownFile({
|
|
36281
|
+
title: _ || "Untitled"
|
|
36282
|
+
});
|
|
36283
36283
|
if (N) {
|
|
36284
36284
|
const E = N, T = document.createElement("a");
|
|
36285
|
-
T.href = E, T.download = `${_ || "Untitled"}.
|
|
36285
|
+
T.href = E, T.download = `${_ || "Untitled"}.md`, document.body.appendChild(T), T.click(), document.body.removeChild(T), URL.revokeObjectURL(E);
|
|
36286
36286
|
}
|
|
36287
36287
|
}
|
|
36288
|
-
|
|
36288
|
+
r == null || r();
|
|
36289
36289
|
},
|
|
36290
|
-
isActive: !1
|
|
36291
|
-
isNew: !0
|
|
36290
|
+
isActive: !1
|
|
36292
36291
|
}
|
|
36293
36292
|
], L = [
|
|
36294
36293
|
{
|
|
@@ -39885,12 +39884,15 @@ const yge = {
|
|
|
39885
39884
|
d != null && d.disabled || (t(!1), d == null || d.onClick());
|
|
39886
39885
|
},
|
|
39887
39886
|
className: it(
|
|
39888
|
-
"h-8 rounded p-2 w-full text-left flex items-center justify-between transition text-body-sm",
|
|
39887
|
+
"min-h-8 rounded p-2 w-full text-left flex items-center justify-between transition text-body-sm",
|
|
39889
39888
|
d != null && d.disabled ? "opacity-50 cursor-not-allowed" : "hover:color-bg-default-hover"
|
|
39890
39889
|
),
|
|
39891
39890
|
"data-testid": `export-${((f = (h = d == null ? void 0 : d.title) == null ? void 0 : h.match(/\(\.(\w+)\)/)) == null ? void 0 : f[1]) || ((g = d == null ? void 0 : d.title) == null ? void 0 : g.toLowerCase().replace(/[^a-z]/g, "-"))}`,
|
|
39892
39891
|
children: [
|
|
39893
|
-
/* @__PURE__ */ w.
|
|
39892
|
+
/* @__PURE__ */ w.jsxs("div", { className: "flex flex-col", children: [
|
|
39893
|
+
/* @__PURE__ */ w.jsx("span", { className: "text-body-sm", children: d == null ? void 0 : d.title }),
|
|
39894
|
+
(d == null ? void 0 : d.subtitle) && /* @__PURE__ */ w.jsx("span", { className: "text-xs leading-tight color-text-secondary", children: d.subtitle })
|
|
39895
|
+
] }),
|
|
39894
39896
|
(d == null ? void 0 : d.isNew) && /* @__PURE__ */ w.jsx("p", { className: "max-h-[16px] flex items-center text-[8px] color-bg-brand text-black rounded p-1 font-semibold", children: "NEW" })
|
|
39895
39897
|
]
|
|
39896
39898
|
},
|