@portabletext/editor 1.50.2 → 1.50.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.
- package/lib/behaviors/index.d.cts +1 -0
- package/lib/behaviors/index.d.ts +1 -0
- package/lib/index.cjs +577 -286
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +15 -2
- package/lib/index.d.ts +15 -2
- package/lib/index.js +584 -292
- package/lib/index.js.map +1 -1
- package/lib/plugins/index.d.cts +7 -0
- package/lib/plugins/index.d.ts +7 -0
- package/lib/selectors/index.d.cts +1 -0
- package/lib/selectors/index.d.ts +1 -0
- package/lib/utils/index.d.cts +1 -0
- package/lib/utils/index.d.ts +1 -0
- package/package.json +14 -13
- package/src/editor/PortableTextEditor.tsx +22 -22
- package/src/editor/create-slate-editor.tsx +9 -1
- package/src/editor/editor-selector.ts +1 -5
- package/src/editor/editor-snapshot.ts +1 -3
- package/src/editor/plugins/createWithPatches.ts +37 -75
- package/src/editor/plugins/slate-plugin.update-value.ts +30 -0
- package/src/editor/plugins/with-plugins.ts +8 -4
- package/src/editor/relay-machine.ts +9 -0
- package/src/internal-utils/apply-operation-to-portable-text.test.ts +175 -0
- package/src/internal-utils/apply-operation-to-portable-text.ts +435 -0
- package/src/internal-utils/create-placeholder-block.ts +20 -0
- package/src/internal-utils/{__tests__/operationToPatches.test.ts → operation-to-patches.test.ts} +44 -39
- package/src/internal-utils/operation-to-patches.ts +467 -0
- package/src/internal-utils/portable-text-node.ts +209 -0
- package/src/types/editor.ts +8 -2
- package/src/internal-utils/__tests__/patchToOperations.test.ts +0 -312
- package/src/internal-utils/operationToPatches.ts +0 -489
- package/src/internal-utils/slate-children-to-blocks.ts +0 -49
|
@@ -2670,6 +2670,7 @@ declare interface PortableTextSlateEditor extends ReactEditor {
|
|
|
2670
2670
|
isTextBlock: (value: unknown) => value is PortableTextTextBlock
|
|
2671
2671
|
isTextSpan: (value: unknown) => value is PortableTextSpan
|
|
2672
2672
|
isListBlock: (value: unknown) => value is PortableTextListBlock
|
|
2673
|
+
value: Array<PortableTextBlock>
|
|
2673
2674
|
/**
|
|
2674
2675
|
* Use hotkeys
|
|
2675
2676
|
*/
|
package/lib/behaviors/index.d.ts
CHANGED
|
@@ -2670,6 +2670,7 @@ declare interface PortableTextSlateEditor extends ReactEditor {
|
|
|
2670
2670
|
isTextBlock: (value: unknown) => value is PortableTextTextBlock
|
|
2671
2671
|
isTextSpan: (value: unknown) => value is PortableTextSpan
|
|
2672
2672
|
isListBlock: (value: unknown) => value is PortableTextListBlock
|
|
2673
|
+
value: Array<PortableTextBlock>
|
|
2673
2674
|
/**
|
|
2674
2675
|
* Use hotkeys
|
|
2675
2676
|
*/
|