@overmap-ai/core 1.0.44-tiptap.6 → 1.0.44-tiptap.8

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.
@@ -4119,6 +4119,10 @@ class AttachmentService extends BaseApiService {
4119
4119
  ...fileProps
4120
4120
  }
4121
4121
  });
4122
+ promise.catch((error2) => {
4123
+ this.client.store.dispatch(removeIssueAttachment(offlineAttachment.offline_id));
4124
+ throw error2;
4125
+ });
4122
4126
  return [offlineAttachment, promise];
4123
4127
  }
4124
4128
  async addComponentAttachment(attachmentPayload) {
@@ -4149,6 +4153,10 @@ class AttachmentService extends BaseApiService {
4149
4153
  ...fileProps
4150
4154
  }
4151
4155
  });
4156
+ promise.catch((error2) => {
4157
+ this.client.store.dispatch(removeComponentAttachment(offlineAttachment.offline_id));
4158
+ throw error2;
4159
+ });
4152
4160
  return [offlineAttachment, promise];
4153
4161
  }
4154
4162
  async addComponentTypeAttachment(attachmentPayload) {
@@ -4168,7 +4176,7 @@ class AttachmentService extends BaseApiService {
4168
4176
  const promise = this.enqueueRequest({
4169
4177
  description: "Create attachment",
4170
4178
  method: HttpMethod.POST,
4171
- url: `/component_types/${component_type_id}/attach/`,
4179
+ url: `/components/types/${component_type_id}/attach/`,
4172
4180
  blocks: [offline_id, component_type_id],
4173
4181
  blockers: [file_sha1],
4174
4182
  payload: {
@@ -4179,6 +4187,10 @@ class AttachmentService extends BaseApiService {
4179
4187
  ...fileProps
4180
4188
  }
4181
4189
  });
4190
+ promise.catch((error2) => {
4191
+ this.client.store.dispatch(removeComponentTypeAttachment(offlineAttachment.offline_id));
4192
+ throw error2;
4193
+ });
4182
4194
  return [offlineAttachment, promise];
4183
4195
  }
4184
4196
  /** the outer Promise is needed to await the hashing of each file, which is required before offline use. If wanting to
@@ -12548,7 +12560,7 @@ const ImageCard = memo((props) => {
12548
12560
  gap: "0",
12549
12561
  ...rest,
12550
12562
  children: [
12551
- !file && /* @__PURE__ */ jsx(Flex, { width: "100%", height: "100%", align: "center", justify: "center", position: "absolute", children: /* @__PURE__ */ jsx(Spinner, {}) }),
12563
+ !file && !error2 && /* @__PURE__ */ jsx(Flex, { width: "100%", height: "100%", align: "center", justify: "center", position: "absolute", children: /* @__PURE__ */ jsx(Spinner, {}) }),
12552
12564
  /* @__PURE__ */ jsx(Inset, { className: styles$4.ImageInset, ref: imageInsetRef, clip: "padding-box", side: "y", pb: "0", children: file && !error2 && /* @__PURE__ */ jsx("img", { className: styles$4.Image, src: URL.createObjectURL(file), alt: alt ?? file.name }) }),
12553
12565
  /* @__PURE__ */ jsx(
12554
12566
  OvermapItem,