@portabletext/editor 1.26.3 → 1.28.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 (66) hide show
  1. package/README.md +5 -5
  2. package/lib/_chunks-cjs/behavior.markdown.cjs +327 -0
  3. package/lib/_chunks-cjs/behavior.markdown.cjs.map +1 -0
  4. package/lib/_chunks-cjs/plugin.event-listener.cjs +6827 -0
  5. package/lib/_chunks-cjs/plugin.event-listener.cjs.map +1 -0
  6. package/lib/_chunks-cjs/selector.is-at-the-start-of-block.cjs +88 -88
  7. package/lib/_chunks-cjs/selector.is-at-the-start-of-block.cjs.map +1 -1
  8. package/lib/_chunks-es/behavior.markdown.js +332 -0
  9. package/lib/_chunks-es/behavior.markdown.js.map +1 -0
  10. package/lib/_chunks-es/plugin.event-listener.js +6851 -0
  11. package/lib/_chunks-es/plugin.event-listener.js.map +1 -0
  12. package/lib/_chunks-es/selector.is-at-the-start-of-block.js +88 -88
  13. package/lib/_chunks-es/selector.is-at-the-start-of-block.js.map +1 -1
  14. package/lib/behaviors/index.cjs +2 -325
  15. package/lib/behaviors/index.cjs.map +1 -1
  16. package/lib/behaviors/index.d.cts +1 -1
  17. package/lib/behaviors/index.d.ts +1 -1
  18. package/lib/behaviors/index.js +2 -326
  19. package/lib/behaviors/index.js.map +1 -1
  20. package/lib/index.cjs +261 -6782
  21. package/lib/index.cjs.map +1 -1
  22. package/lib/index.d.cts +3509 -2161
  23. package/lib/index.d.ts +3509 -2161
  24. package/lib/index.js +223 -6761
  25. package/lib/index.js.map +1 -1
  26. package/lib/plugins/index.cjs +29 -0
  27. package/lib/plugins/index.cjs.map +1 -0
  28. package/lib/plugins/index.d.cts +19411 -0
  29. package/lib/plugins/index.d.ts +19411 -0
  30. package/lib/plugins/index.js +29 -0
  31. package/lib/plugins/index.js.map +1 -0
  32. package/lib/selectors/index.cjs +15 -3
  33. package/lib/selectors/index.cjs.map +1 -1
  34. package/lib/selectors/index.d.cts +19 -1
  35. package/lib/selectors/index.d.ts +19 -1
  36. package/lib/selectors/index.js +17 -4
  37. package/lib/selectors/index.js.map +1 -1
  38. package/package.json +14 -8
  39. package/src/behavior-actions/behavior.action.insert-break.ts +93 -83
  40. package/src/editor/Editable.tsx +6 -6
  41. package/src/editor/PortableTextEditor.tsx +288 -1
  42. package/src/editor/__tests__/PortableTextEditor.test.tsx +0 -1
  43. package/src/editor/components/DefaultObject.tsx +21 -0
  44. package/src/editor/components/Element.tsx +5 -5
  45. package/src/editor/components/Leaf.tsx +1 -6
  46. package/src/editor/components/Synchronizer.tsx +16 -1
  47. package/src/editor/create-editor.ts +8 -48
  48. package/src/editor/editor-machine.ts +118 -131
  49. package/src/editor/plugins/create-with-event-listeners.ts +19 -38
  50. package/src/editor/plugins/createWithPatches.ts +1 -1
  51. package/src/editor/plugins/createWithPortableTextSelections.ts +2 -2
  52. package/src/editor/sync-machine.ts +3 -5
  53. package/src/index.ts +5 -11
  54. package/src/plugins/_exports/index.ts +1 -0
  55. package/src/plugins/index.ts +3 -0
  56. package/src/plugins/plugin.editor-ref.tsx +17 -0
  57. package/src/{editor/editor-event-listener.tsx → plugins/plugin.event-listener.tsx} +7 -6
  58. package/src/plugins/plugin.markdown.tsx +70 -0
  59. package/src/selectors/index.ts +4 -2
  60. package/src/selectors/selector.get-active-annotations.test.ts +122 -0
  61. package/src/selectors/selector.get-active-annotations.ts +30 -0
  62. package/src/selectors/selector.get-selection.ts +8 -0
  63. package/src/selectors/selector.get-value.ts +11 -0
  64. package/src/type-utils.ts +12 -2
  65. package/src/editor/nodes/DefaultAnnotation.tsx +0 -20
  66. package/src/editor/nodes/DefaultObject.tsx +0 -18

There are too many changes on this page to be displayed.


The amount of changes on this page would crash your brower.

You can still verify the content by downloading the package file manually.