@use-kona/editor 0.1.24-dnd.3 → 0.1.24-dnd.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.
@@ -104,7 +104,7 @@ class DnDPlugin {
104
104
  if (!sourceTo) return;
105
105
  const insertAt = getDropPath(editor, sourceTo, dropPosition || 'bottom');
106
106
  if (!insertAt) return;
107
- const customDropHandler = itemType && this.options.customDropHandlers?.[itemType];
107
+ const customDropHandler = itemType && options.customDropHandlers?.[itemType];
108
108
  if (customDropHandler) {
109
109
  console.log('customDropHandler.onDrop', itemType);
110
110
  customDropHandler.onDrop({
@@ -115,7 +115,7 @@ class DnDPlugin {
115
115
  return;
116
116
  }
117
117
  console.log('customDropHandler not found', itemType);
118
- this.options.customDropHandlers && console.log('valid drop handlers are', Object.keys(this.options.customDropHandlers));
118
+ options.customDropHandlers && console.log('valid drop handlers are', Object.keys(options.customDropHandlers));
119
119
  switch(itemType){
120
120
  case NativeTypes.FILE:
121
121
  options.onDropFiles(editor, item.files, insertAt);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@use-kona/editor",
3
- "version": "0.1.24-dnd.3",
3
+ "version": "0.1.24-dnd.4",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/index.ts"
@@ -167,7 +167,7 @@ export class DnDPlugin implements IPlugin {
167
167
  if (!insertAt) return;
168
168
 
169
169
  const customDropHandler =
170
- itemType && this.options.customDropHandlers?.[itemType];
170
+ itemType && options.customDropHandlers?.[itemType];
171
171
 
172
172
  if (customDropHandler) {
173
173
  console.log('customDropHandler.onDrop', itemType);
@@ -175,10 +175,10 @@ export class DnDPlugin implements IPlugin {
175
175
  return;
176
176
  } else {
177
177
  console.log('customDropHandler not found', itemType);
178
- this.options.customDropHandlers &&
178
+ options.customDropHandlers &&
179
179
  console.log(
180
180
  'valid drop handlers are',
181
- Object.keys(this.options.customDropHandlers),
181
+ Object.keys(options.customDropHandlers),
182
182
  );
183
183
  }
184
184