@remarkablejames/editor 0.0.3 → 0.0.4
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/lib/{ActionMenuButton-D5HLfRzv.js → ActionMenuButton-BUtJUsfO.js} +1 -1
- package/lib/{ActionMenuButton-DN6VHLkp.cjs → ActionMenuButton-M55VtCZ5.cjs} +1 -1
- package/lib/Attachment.cjs +2 -2
- package/lib/Attachment.js +165 -130
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.js +1 -1
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +1 -1
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +1 -1
- package/lib/Callout.cjs +1 -1
- package/lib/Callout.js +3 -3
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +1 -1
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +1 -1
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.js +2 -2
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +1 -1
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +2 -2
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +1 -1
- package/lib/{Drawer-BN0lYcnJ.cjs → Drawer-CdQBnwUs.cjs} +1 -1
- package/lib/{Drawer-B9l1SoRJ.js → Drawer-mlmJ2nCT.js} +2 -2
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +2 -2
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +3 -3
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +1 -1
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.js +1 -1
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +1 -1
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +4 -4
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +4 -4
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +4 -4
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +2 -2
- package/lib/History.cjs +1 -1
- package/lib/History.js +1 -1
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +1 -1
- package/lib/{Iframe-CXFk3GEq.cjs → Iframe-B_a_AoZc.cjs} +1 -1
- package/lib/{Iframe-MjeJ2OOI.js → Iframe-CYgR99Ny.js} +1 -1
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +1 -1
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +1 -1
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +3 -3
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.js +2 -2
- package/lib/{Indent-BPX9XRos.cjs → Indent-BAcoFdaq.cjs} +1 -1
- package/lib/{Indent-CgwDItIf.js → Indent-BMz2ILRl.js} +1 -1
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +1 -1
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +1 -1
- package/lib/{Katex-CZ4g3vA9.js → Katex-DOlb4iTP.js} +3 -3
- package/lib/{Katex-DIgsR_dS.cjs → Katex-bIhj82VV.cjs} +1 -1
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +1 -1
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +3 -3
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +1 -1
- package/lib/{LinkEditBlock-B2bU0Mcr.cjs → LinkEditBlock-Cqs5RxjV.cjs} +1 -1
- package/lib/{LinkEditBlock-CaDV3Vq5.js → LinkEditBlock-xnokk4G7.js} +3 -3
- package/lib/{Mermaid-EhYj_ICn.js → Mermaid-Bs3pIGc6.js} +2 -2
- package/lib/{Mermaid-B9h7XKFo.cjs → Mermaid-DiOdgQv1.cjs} +1 -1
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.js +1 -1
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +2 -2
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +1 -1
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +3 -3
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +3 -3
- package/lib/SlashCommandNodeView-CLimjqhb.cjs +1 -0
- package/lib/{SlashCommandNodeView-CY3peX5x.js → SlashCommandNodeView-CYcf7mVz.js} +78 -88
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +1 -1
- package/lib/{Table-Bw7rLue7.js → Table-bz1Wcojf.js} +3 -3
- package/lib/{Table-DLrtX6T7.cjs → Table-dlXTKKwJ.cjs} +1 -1
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +1 -1
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +2 -2
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +2 -2
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +1 -1
- package/lib/{Twitter-pM0y5Z-L.js → Twitter-CNTXzgt0.js} +3 -3
- package/lib/{Twitter-Ck6vGefg.cjs → Twitter-DhEnGg6P.cjs} +1 -1
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +1 -1
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +2 -2
- package/lib/bubble.cjs +1 -1
- package/lib/bubble.js +16 -16
- package/lib/{dropdown-menu-nX-u8e2w.js → dropdown-menu-BuSlU2uN.js} +1 -1
- package/lib/{dropdown-menu-DwR8tTs9.cjs → dropdown-menu-CfWNst4v.cjs} +1 -1
- package/lib/extensions/Attachment/Attachment.d.ts +22 -2
- package/lib/{index-_WrFM-Fk.js → index-8B00E8e4.js} +303 -302
- package/lib/index-BrxL7y9p.cjs +1 -0
- package/lib/{index-Dib4cXXf.cjs → index-Bt9LiArC.cjs} +2 -2
- package/lib/{index-4Q5IhypJ.js → index-DZfkCNKr.js} +15 -9
- package/lib/index.cjs +1 -1
- package/lib/index.js +1 -1
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.js +1 -1
- package/lib/locales/en.d.ts +189 -188
- package/lib/locales/fi.d.ts +189 -188
- package/lib/locales/hu.d.ts +189 -188
- package/lib/locales/index.d.ts +1134 -1128
- package/lib/locales/pt-br.d.ts +189 -188
- package/lib/locales/vi.d.ts +189 -188
- package/lib/locales/zh-cn.d.ts +189 -188
- package/lib/{popover-BY7j9SiD.cjs → popover-51mwx3UY.cjs} +1 -1
- package/lib/{popover-CSvY4C-l.js → popover-DMPRgXD3.js} +1 -1
- package/lib/{select-Bu-5iIA9.cjs → select-B7v1Scb-.cjs} +1 -1
- package/lib/{select-BelNLNvT.js → select-BxFDMaZi.js} +1 -1
- package/lib/{separator-Br5kcIJa.js → separator-CpqX9KQC.js} +3 -3
- package/lib/{separator-Cp9Lg3HU.cjs → separator-kB9YUfeO.cjs} +1 -1
- package/lib/style.css +1 -1
- package/lib/{textarea-Ceev4t42.js → textarea-C5DsgzSy.js} +1 -1
- package/lib/{textarea-DfqvYaA6.cjs → textarea-bQSzjqg3.cjs} +1 -1
- package/package.json +1 -1
- package/lib/SlashCommandNodeView-COlWSlnE.cjs +0 -1
- package/lib/index-bVGIXhRg.cjs +0 -1
package/lib/bubble.js
CHANGED
|
@@ -2,45 +2,45 @@ import { jsx as f, Fragment as I, jsxs as x } from "react/jsx-runtime";
|
|
|
2
2
|
import { a0 as Gr, d as ws, E as Ce, a1 as Jr, a2 as qr, a3 as bs, a4 as _e, a5 as Xr, Q as ti, O as xs, v as Me, F as Re, T as ei, A as Zr, u as Qr, a6 as to, a7 as eo } from "./clsx-CDyrfCnw.js";
|
|
3
3
|
import { f as ys, s as Ss, o as ks, a as vs, b as Cs, d as _s, h as Es, e as Ts, c as ni } from "./index-CsSfYR30.js";
|
|
4
4
|
import { Plugin as Ee, PluginKey as ne, NodeSelection as no, TextSelection as io, SelectionRange as so, Selection as ro } from "@tiptap/pm/state";
|
|
5
|
-
import { C as oo, T as lo } from "./Table-
|
|
5
|
+
import { C as oo, T as lo } from "./Table-bz1Wcojf.js";
|
|
6
6
|
import Ds, { useRef as Xt, useEffect as pt, useState as F, useCallback as M, useMemo as yt, Fragment as ii } from "react";
|
|
7
7
|
import { createPortal as As } from "react-dom";
|
|
8
|
-
import { w as Z, h as W, D as ln, m as cn, A as y, n as an, o as hn, L as Tt, j as jt, p as dn, B as Bt, Y as co, q as ao, E as ho, v as uo, Z as fo, t as po, _ as go, I as tt } from "./index-
|
|
9
|
-
import { S as mo, a as wo, b as bo, c as xo, d as yo } from "./select-
|
|
8
|
+
import { w as Z, h as W, D as ln, m as cn, A as y, n as an, o as hn, L as Tt, j as jt, p as dn, B as Bt, Y as co, q as ao, E as ho, v as uo, Z as fo, t as po, _ as go, I as tt } from "./index-8B00E8e4.js";
|
|
9
|
+
import { S as mo, a as wo, b as bo, c as xo, d as yo } from "./select-BxFDMaZi.js";
|
|
10
10
|
import { Callout as Ne } from "./Callout.js";
|
|
11
|
-
import { u as ie, K as Un, s as So } from "./Katex-
|
|
12
|
-
import { u as Y, n as Ye, V as Ei } from "./index-
|
|
11
|
+
import { u as ie, K as Un, s as So } from "./Katex-DOlb4iTP.js";
|
|
12
|
+
import { u as Y, n as Ye, V as Ei } from "./index-DZfkCNKr.js";
|
|
13
13
|
import { d as se } from "./delete-node-eQHsyyhR.js";
|
|
14
14
|
import { MultipleColumnNode as Ti } from "./Column.js";
|
|
15
15
|
import "./theme.js";
|
|
16
|
-
import { C as ko, s as vo, i as Co, D as vn } from "./Drawer-
|
|
16
|
+
import { C as ko, s as vo, i as Co, D as vn } from "./Drawer-mlmJ2nCT.js";
|
|
17
17
|
import { Editor as _o, makeDropdownToolbar as Eo } from "easydrawer";
|
|
18
|
-
import { S as Dt } from "./separator-
|
|
19
|
-
import { P as Is, a as Os, b as Ms } from "./popover-
|
|
18
|
+
import { S as Dt } from "./separator-CpqX9KQC.js";
|
|
19
|
+
import { P as Is, a as Os, b as Ms } from "./popover-DMPRgXD3.js";
|
|
20
20
|
import { Excalidraw as ce } from "./Excalidraw.js";
|
|
21
|
-
import { I as ae, g as To } from "./Iframe-
|
|
21
|
+
import { I as ae, g as To } from "./Iframe-CYgR99Ny.js";
|
|
22
22
|
import Do from "katex";
|
|
23
23
|
import { Pencil as Ao, Trash2 as Io, Check as Di } from "lucide-react";
|
|
24
|
-
import { T as Ai } from "./textarea-
|
|
25
|
-
import { L as Ii, a as Oo, R as Mo } from "./LinkEditBlock-
|
|
24
|
+
import { T as Ai } from "./textarea-C5DsgzSy.js";
|
|
25
|
+
import { L as Ii, a as Oo, R as Mo } from "./LinkEditBlock-xnokk4G7.js";
|
|
26
26
|
import { ImageGif as Ro } from "./ImageGif.js";
|
|
27
|
-
import { M as Rs, E as No } from "./Mermaid-
|
|
27
|
+
import { M as Rs, E as No } from "./Mermaid-Bs3pIGc6.js";
|
|
28
28
|
import { RichTextBold as Uo } from "./Bold.js";
|
|
29
29
|
import { RichTextCode as Lo } from "./Code.js";
|
|
30
30
|
import "./index-C1WCZhyA.js";
|
|
31
31
|
import { RichTextColor as Po } from "./Color.js";
|
|
32
32
|
import { RichTextHighlight as Bo } from "./Highlight.js";
|
|
33
33
|
import { RichTextItalic as Vo } from "./Italic.js";
|
|
34
|
-
import { r as Ho } from "./SlashCommandNodeView-
|
|
34
|
+
import { r as Ho } from "./SlashCommandNodeView-CYcf7mVz.js";
|
|
35
35
|
import { RichTextStrike as $o } from "./Strike.js";
|
|
36
36
|
import { RichTextAlign as Fo, TextAlign as zo } from "./TextAlign.js";
|
|
37
37
|
import { RichTextUnderline as Wo } from "./TextUnderline.js";
|
|
38
|
-
import { T as Oi, F as Ko } from "./Twitter-
|
|
38
|
+
import { T as Oi, F as Ko } from "./Twitter-CNTXzgt0.js";
|
|
39
39
|
import { DecorationSet as Mi, Decoration as jo } from "@tiptap/pm/view";
|
|
40
40
|
import { NodeRange as Yo } from "@tiptap/pm/model";
|
|
41
41
|
import { Clear as Go } from "./Clear.js";
|
|
42
|
-
import { I as Jo, a as Ri, s as Ni } from "./Indent-
|
|
43
|
-
import { D as qo, a as Xo, b as Zo, f as mt, d as Qo, g as Ui, h as Li, i as Pi, j as Bi } from "./dropdown-menu-
|
|
42
|
+
import { I as Jo, a as Ri, s as Ni } from "./Indent-BMz2ILRl.js";
|
|
43
|
+
import { D as qo, a as Xo, b as Zo, f as mt, d as Qo, g as Ui, h as Li, i as Pi, j as Bi } from "./dropdown-menu-BuSlU2uN.js";
|
|
44
44
|
function tl(e, t) {
|
|
45
45
|
const n = Math.min(e.top, t.top), i = Math.max(e.bottom, t.bottom), s = Math.min(e.left, t.left), o = Math.max(e.right, t.right) - s, l = i - n, c = s, a = n;
|
|
46
46
|
return new DOMRect(c, a, o, l);
|
|
@@ -2,7 +2,7 @@ import { jsx as c, jsxs as x } from "react/jsx-runtime";
|
|
|
2
2
|
import * as t from "@radix-ui/react-dropdown-menu";
|
|
3
3
|
import { ChevronRight as d, Check as h, Circle as l } from "lucide-react";
|
|
4
4
|
import * as s from "react";
|
|
5
|
-
import { c as o } from "./index-
|
|
5
|
+
import { c as o } from "./index-8B00E8e4.js";
|
|
6
6
|
const R = t.Root, I = t.Trigger, S = t.Portal, C = t.Sub, m = s.forwardRef(({ className: e, inset: r, children: i, ...a }, n) => /* @__PURE__ */ x(
|
|
7
7
|
t.SubTrigger,
|
|
8
8
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const c=require("react/jsx-runtime"),w=require("@radix-ui/react-dropdown-menu"),d=require("lucide-react"),g=require("react"),a=require("./index-
|
|
1
|
+
"use strict";const c=require("react/jsx-runtime"),w=require("@radix-ui/react-dropdown-menu"),d=require("lucide-react"),g=require("react"),a=require("./index-Bt9LiArC.cjs");function x(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>t[i]})}}return r.default=t,Object.freeze(r)}const e=x(w),n=x(g),y=e.Root,N=e.Trigger,D=e.Portal,M=e.Sub,h=n.forwardRef(({className:t,inset:r,children:i,...o},s)=>c.jsxs(e.SubTrigger,{ref:s,className:a.cn("richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none focus:richtext-bg-accent data-[state=open]:richtext-bg-accent",r&&"richtext-pl-8",t),...o,children:[i,c.jsx(d.ChevronRight,{className:"richtext-ml-auto richtext-size-4"})]}));h.displayName=e.SubTrigger.displayName;const l=n.forwardRef(({className:t,...r},i)=>c.jsx(e.SubContent,{"data-richtext-portal":!0,ref:i,className:a.cn("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border !richtext-border-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-lg data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",t),...r}));l.displayName=e.SubContent.displayName;const u=n.forwardRef(({className:t,sideOffset:r=4,...i},o)=>c.jsx(e.Portal,{"data-richtext-portal":!0,children:c.jsx(e.Content,{"data-richtext-portal":!0,ref:o,sideOffset:r,className:a.cn("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border !richtext-border-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",t),...i})}));u.displayName=e.Content.displayName;const p=n.forwardRef(({className:t,inset:r,...i},o)=>c.jsx(e.Item,{ref:o,className:a.cn("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",r&&"richtext-pl-8",t),...i}));p.displayName=e.Item.displayName;const m=n.forwardRef(({className:t,children:r,checked:i,...o},s)=>c.jsxs(e.CheckboxItem,{checked:i,ref:s,className:a.cn("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",t),...o,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center",children:c.jsx(e.ItemIndicator,{children:c.jsx(d.Check,{className:"richtext-size-4"})})}),r]}));m.displayName=e.CheckboxItem.displayName;const j=n.forwardRef(({className:t,children:r,...i},o)=>c.jsxs(e.RadioItem,{ref:o,className:a.cn("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",t),...i,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center",children:c.jsx(e.ItemIndicator,{children:c.jsx(d.Circle,{className:"richtext-size-2 richtext-fill-current"})})}),r]}));j.displayName=e.RadioItem.displayName;const S=n.forwardRef(({className:t,inset:r,...i},o)=>c.jsx(e.Label,{ref:o,className:a.cn("richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-font-semibold",r&&"richtext-pl-8",t),...i}));S.displayName=e.Label.displayName;const f=n.forwardRef(({className:t,...r},i)=>c.jsx(e.Separator,{className:a.cn("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",t),ref:i,...r}));f.displayName=e.Separator.displayName;function b({className:t,...r}){return c.jsx("span",{className:a.cn("richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",t),...r})}b.displayName="DropdownMenuShortcut";exports.DropdownMenu=y;exports.DropdownMenuCheckboxItem=m;exports.DropdownMenuContent=u;exports.DropdownMenuItem=p;exports.DropdownMenuPortal=D;exports.DropdownMenuSeparator=f;exports.DropdownMenuShortcut=b;exports.DropdownMenuSub=M;exports.DropdownMenuSubContent=l;exports.DropdownMenuSubTrigger=h;exports.DropdownMenuTrigger=N;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Node } from '@tiptap/core';
|
|
2
2
|
import { GeneralOptions } from '../../types';
|
|
3
|
-
declare module
|
|
3
|
+
declare module "@tiptap/core" {
|
|
4
4
|
interface Commands<ReturnType> {
|
|
5
5
|
attachment: {
|
|
6
6
|
setAttachment: (attrs?: unknown) => ReturnType;
|
|
@@ -8,8 +8,28 @@ declare module '@tiptap/core' {
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
export interface AttachmentOptions extends GeneralOptions<AttachmentOptions> {
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Called when the user picks a file. Must resolve to the UUID / primary key
|
|
13
|
+
* your backend assigned to the uploaded asset. This id is the only value
|
|
14
|
+
* stored on the node — the browser never needs to hold a URL at all.
|
|
15
|
+
*/
|
|
12
16
|
upload?: (file: File) => Promise<string>;
|
|
17
|
+
/**
|
|
18
|
+
* Called when the user clicks the download button on an attachment.
|
|
19
|
+
* Receives the node's metadata so your app can fetch a signed / authenticated
|
|
20
|
+
* download URL on demand and open it.
|
|
21
|
+
*
|
|
22
|
+
* This callback is REQUIRED for downloads to work — there is no URL stored
|
|
23
|
+
* on the node, so no automatic browser fallback is possible.
|
|
24
|
+
*/
|
|
25
|
+
onDownload?: (attrs: {
|
|
26
|
+
/** The UUID / primary key returned by your upload endpoint. */
|
|
27
|
+
id: string;
|
|
28
|
+
fileName: string;
|
|
29
|
+
fileExt: string;
|
|
30
|
+
fileType: string;
|
|
31
|
+
fileSize: number;
|
|
32
|
+
}) => void;
|
|
13
33
|
}
|
|
14
34
|
export * from './components/RichTextAttachment';
|
|
15
35
|
export declare const Attachment: Node<AttachmentOptions, any>;
|