@edifice.io/react 2.5.5-develop-b2school.20251218140627 → 2.5.5-develop-b2school.20251222095106

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.
@@ -31,7 +31,7 @@ const AttachmentRenderer = (props) => {
31
31
  }, "data-drag-handle": !0, children: [
32
32
  /* @__PURE__ */ jsx("p", { className: "m-12 mt-0", children: t("tiptap.attachments.bloc") }),
33
33
  /* @__PURE__ */ jsx(Grid, { children: attachmentArrayAttrs == null ? void 0 : attachmentArrayAttrs.map((attachment, index) => /* @__PURE__ */ jsx(Grid.Col, { sm: "6", children: /* @__PURE__ */ jsx(Attachment, { name: attachment.name, options: /* @__PURE__ */ jsxs(Fragment, { children: [
34
- /* @__PURE__ */ jsx("a", { href: attachment.href, download: !0, children: /* @__PURE__ */ jsx(IconButton, { "aria-label": t("tiptap.attachments.download"), color: "tertiary", type: "button", icon: /* @__PURE__ */ jsx(SvgIconDownload, {}), variant: "ghost" }) }),
34
+ /* @__PURE__ */ jsx("a", { href: attachment.href, "data-content-type": attachment.dataContentType, download: !0, children: /* @__PURE__ */ jsx(IconButton, { "aria-label": t("tiptap.attachments.download"), color: "tertiary", type: "button", icon: /* @__PURE__ */ jsx(SvgIconDownload, {}), variant: "ghost" }) }),
35
35
  editable && /* @__PURE__ */ jsx(IconButton, { "aria-label": t("tiptap.attachments.delete"), color: "danger", type: "button", icon: /* @__PURE__ */ jsx(SvgIconDelete, {}), variant: "ghost", onClick: () => handleDelete(index, attachment.documentId) })
36
36
  ] }) }) }, index)) })
37
37
  ] }) });
@@ -5,6 +5,7 @@ const useMediaLibraryEditor = (editor) => {
5
5
  const {
6
6
  remove
7
7
  } = useWorkspaceFile(), appendResult = useCallback((type, result) => {
8
+ var _a;
8
9
  if (!(!type || !editor))
9
10
  switch (type) {
10
11
  case "image": {
@@ -48,7 +49,7 @@ const useMediaLibraryEditor = (editor) => {
48
49
  let innerHtml = "";
49
50
  for (let i = 0; i < result.length; i++) {
50
51
  const link = result[i];
51
- innerHtml += `<a href="/workspace/${link.public ? "pub/" : ""}document/${link._id}">${link.name}
52
+ innerHtml += `<a href="/workspace/${link.public ? "pub/" : ""}document/${link._id}" data-content-type="${(_a = link.metadata) == null ? void 0 : _a["content-type"]}">${link.name}
52
53
  </a>`;
53
54
  }
54
55
  const richContent = `<div class="attachments">
@@ -80,7 +81,7 @@ const useMediaLibraryEditor = (editor) => {
80
81
  };
81
82
  if (Array.isArray(resourceTabResult.resources))
82
83
  resourceTabResult.resources.forEach((link) => {
83
- var _a;
84
+ var _a2;
84
85
  editor.state.selection.empty && insertAndSelectText(link.name), editor == null || editor.commands.setLink({
85
86
  href: link.path,
86
87
  target: resourceTabResult.target ?? null
@@ -89,7 +90,7 @@ const useMediaLibraryEditor = (editor) => {
89
90
  editor.commands.setTextSelection({
90
91
  from: newPosition,
91
92
  to: newPosition
92
- }), resourceTabResult != null && resourceTabResult.resources && ((_a = resourceTabResult == null ? void 0 : resourceTabResult.resources) == null ? void 0 : _a.length) > 1 && editor.commands.enter();
93
+ }), resourceTabResult != null && resourceTabResult.resources && ((_a2 = resourceTabResult == null ? void 0 : resourceTabResult.resources) == null ? void 0 : _a2.length) > 1 && editor.commands.enter();
93
94
  });
94
95
  else {
95
96
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.5.5-develop-b2school.20251218140627",
3
+ "version": "2.5.5-develop-b2school.20251222095106",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -133,9 +133,9 @@
133
133
  "react-slugify": "^3.0.3",
134
134
  "swiper": "^10.1.0",
135
135
  "ua-parser-js": "^1.0.36",
136
- "@edifice.io/bootstrap": "2.5.5-develop-b2school.20251218140627",
137
- "@edifice.io/utilities": "2.5.5-develop-b2school.20251218140627",
138
- "@edifice.io/tiptap-extensions": "2.5.5-develop-b2school.20251218140627"
136
+ "@edifice.io/bootstrap": "2.5.5-develop-b2school.20251222095106",
137
+ "@edifice.io/tiptap-extensions": "2.5.5-develop-b2school.20251222095106",
138
+ "@edifice.io/utilities": "2.5.5-develop-b2school.20251222095106"
139
139
  },
140
140
  "devDependencies": {
141
141
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -166,8 +166,8 @@
166
166
  "vite": "^5.4.11",
167
167
  "vite-plugin-dts": "^4.1.0",
168
168
  "vite-tsconfig-paths": "^5.0.1",
169
- "@edifice.io/client": "2.5.5-develop-b2school.20251218140627",
170
- "@edifice.io/config": "2.5.5-develop-b2school.20251218140627"
169
+ "@edifice.io/client": "2.5.5-develop-b2school.20251222095106",
170
+ "@edifice.io/config": "2.5.5-develop-b2school.20251222095106"
171
171
  },
172
172
  "peerDependencies": {
173
173
  "@react-spring/web": "^9.7.5",