@portabletext/editor 1.1.4 → 1.1.6

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 (38) hide show
  1. package/README.md +4 -0
  2. package/lib/index.d.mts +631 -30
  3. package/lib/index.d.ts +631 -30
  4. package/lib/index.esm.js +303 -200
  5. package/lib/index.esm.js.map +1 -1
  6. package/lib/index.js +295 -192
  7. package/lib/index.js.map +1 -1
  8. package/lib/index.mjs +303 -200
  9. package/lib/index.mjs.map +1 -1
  10. package/package.json +30 -25
  11. package/src/editor/Editable.tsx +11 -11
  12. package/src/editor/PortableTextEditor.tsx +37 -32
  13. package/src/editor/__tests__/self-solving.test.tsx +1 -1
  14. package/src/editor/behavior/behavior.actions.ts +39 -0
  15. package/src/editor/behavior/behavior.core.ts +37 -0
  16. package/src/editor/behavior/behavior.types.ts +106 -0
  17. package/src/editor/behavior/behavior.utils.ts +34 -0
  18. package/src/editor/components/SlateContainer.tsx +2 -13
  19. package/src/editor/components/Synchronizer.tsx +0 -3
  20. package/src/editor/editor-machine.ts +120 -3
  21. package/src/editor/hooks/useSyncValue.ts +3 -5
  22. package/src/editor/key-generator.ts +6 -0
  23. package/src/editor/plugins/createWithEditableAPI.ts +8 -5
  24. package/src/editor/plugins/createWithHotKeys.ts +1 -32
  25. package/src/editor/plugins/createWithInsertBreak.ts +6 -2
  26. package/src/editor/plugins/createWithInsertData.ts +7 -4
  27. package/src/editor/plugins/createWithObjectKeys.ts +12 -5
  28. package/src/editor/plugins/createWithPatches.ts +0 -1
  29. package/src/editor/plugins/createWithPortableTextMarkModel.ts +85 -114
  30. package/src/editor/plugins/createWithSchemaTypes.ts +3 -4
  31. package/src/editor/plugins/createWithUtils.ts +5 -4
  32. package/src/editor/plugins/index.ts +5 -13
  33. package/src/index.ts +11 -2
  34. package/src/types/options.ts +0 -1
  35. package/src/utils/__tests__/operationToPatches.test.ts +0 -2
  36. package/src/utils/__tests__/patchToOperations.test.ts +1 -2
  37. package/src/utils/sibling-utils.ts +55 -0
  38. package/src/editor/hooks/usePortableTextEditorKeyGenerator.ts +0 -27
package/README.md CHANGED
@@ -11,3 +11,7 @@
11
11
 
12
12
  > [!NOTE]
13
13
  > We are currently working hard on the general release of this component. Docs and refined APIs are coming.
14
+
15
+ ## End-User Experience
16
+
17
+ In order to provide a robust and consistent end-user experience, the editor is backed by an elaborate E2E test suite generated from a [human-readable Gherkin spec](/packages/editor/gherkin-spec/).