@portabletext/editor 1.47.15 → 1.48.0

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.
Files changed (45) hide show
  1. package/lib/_chunks-cjs/behavior.core.cjs +8 -9
  2. package/lib/_chunks-cjs/behavior.core.cjs.map +1 -1
  3. package/lib/_chunks-cjs/editor-provider.cjs +154 -110
  4. package/lib/_chunks-cjs/editor-provider.cjs.map +1 -1
  5. package/lib/_chunks-es/behavior.core.js +8 -9
  6. package/lib/_chunks-es/behavior.core.js.map +1 -1
  7. package/lib/_chunks-es/editor-provider.js +155 -111
  8. package/lib/_chunks-es/editor-provider.js.map +1 -1
  9. package/lib/behaviors/index.cjs +11 -11
  10. package/lib/behaviors/index.cjs.map +1 -1
  11. package/lib/behaviors/index.d.cts +11 -8
  12. package/lib/behaviors/index.d.ts +11 -8
  13. package/lib/behaviors/index.js +12 -12
  14. package/lib/behaviors/index.js.map +1 -1
  15. package/lib/index.cjs +4 -4
  16. package/lib/index.cjs.map +1 -1
  17. package/lib/index.d.cts +4 -3
  18. package/lib/index.d.ts +4 -3
  19. package/lib/index.js +5 -5
  20. package/lib/index.js.map +1 -1
  21. package/lib/plugins/index.cjs +7 -11
  22. package/lib/plugins/index.cjs.map +1 -1
  23. package/lib/plugins/index.d.cts +4 -3
  24. package/lib/plugins/index.d.ts +4 -3
  25. package/lib/plugins/index.js +8 -12
  26. package/lib/plugins/index.js.map +1 -1
  27. package/lib/selectors/index.d.cts +4 -3
  28. package/lib/selectors/index.d.ts +4 -3
  29. package/lib/utils/index.d.cts +4 -3
  30. package/lib/utils/index.d.ts +4 -3
  31. package/package.json +1 -1
  32. package/src/behavior-actions/behavior.actions.ts +0 -9
  33. package/src/behaviors/behavior.core.dnd.ts +1 -1
  34. package/src/behaviors/behavior.default.ts +3 -3
  35. package/src/behaviors/behavior.emoji-picker.ts +7 -9
  36. package/src/behaviors/behavior.perform-event.ts +143 -76
  37. package/src/behaviors/behavior.types.action.ts +14 -11
  38. package/src/behaviors/index.ts +1 -1
  39. package/src/editor/components/Element.tsx +3 -5
  40. package/src/editor/editor-machine.ts +1 -0
  41. package/src/editor/plugins/createWithUndoRedo.ts +8 -11
  42. package/src/editor/with-applying-behavior-actions.ts +9 -11
  43. package/src/plugins/plugin.decorator-shortcut.ts +3 -2
  44. package/src/plugins/plugin.one-line.tsx +3 -3
  45. package/src/behavior-actions/behavior.action.noop.ts +0 -5
@@ -21,7 +21,7 @@ const oneLineBehaviors = [
21
21
  */
22
22
  defineBehavior({
23
23
  on: 'insert.break',
24
- actions: [() => [{type: 'noop'}]],
24
+ actions: [],
25
25
  }),
26
26
  /**
27
27
  * `insert.block` `before` or `after` is not allowed in a one-line editor.
@@ -30,7 +30,7 @@ const oneLineBehaviors = [
30
30
  on: 'insert.block',
31
31
  guard: ({event}) =>
32
32
  event.placement === 'before' || event.placement === 'after',
33
- actions: [() => [{type: 'noop'}]],
33
+ actions: [],
34
34
  }),
35
35
  /**
36
36
  * An ordinary `insert.block` is acceptable if it's a text block. In that
@@ -67,7 +67,7 @@ const oneLineBehaviors = [
67
67
  */
68
68
  defineBehavior({
69
69
  on: 'insert.block',
70
- actions: [() => [{type: 'noop'}]],
70
+ actions: [],
71
71
  }),
72
72
  /**
73
73
  * If multiple blocks are inserted, then the non-text blocks are filtered out
@@ -1,5 +0,0 @@
1
- import type {BehaviorActionImplementation} from './behavior.actions'
2
-
3
- export const noopActionImplementation: BehaviorActionImplementation<
4
- 'noop'
5
- > = () => {}