@semiont/react-ui 0.3.1 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semiont/react-ui",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "React components and hooks for Semiont",
5
5
  "main": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.mts",
@@ -73,11 +73,11 @@ export function ReferenceEntry({
73
73
  : '';
74
74
 
75
75
  const handleUnlink = () => {
76
- if (source) {
76
+ if (source && resolvedResourceUri) {
77
77
  eventBus.get('bind:update-body').next({
78
78
  annotationId: annotationId(reference.id),
79
79
  resourceId: resourceId(source),
80
- operations: [{ op: 'remove' }],
80
+ operations: [{ op: 'remove', item: { type: 'SpecificResource', source: resolvedResourceUri } }],
81
81
  });
82
82
  }
83
83
  };
@@ -322,7 +322,7 @@ describe('ReferenceEntry', () => {
322
322
  expect(unlinkHandler).toHaveBeenCalledWith({
323
323
  annotationId: 'ref-1',
324
324
  resourceId: 'resource-1',
325
- operations: [{ op: 'remove' }],
325
+ operations: [{ op: 'remove', item: { type: 'SpecificResource', source: 'linked-doc' } }],
326
326
  });
327
327
 
328
328
  subscription.unsubscribe();