@portabletext/editor 2.6.0 → 2.6.2

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.
@@ -1,5 +1,5 @@
1
1
  import { BlockOffset, BlockPath, ChildPath, EditorContext, EditorSelection, EditorSelectionPoint } from "../_chunks-dts/behavior.types.action.cjs";
2
- import * as _sanity_types9 from "@sanity/types";
2
+ import * as _sanity_types8 from "@sanity/types";
3
3
  import { KeyedSegment, PortableTextBlock, PortableTextChild, PortableTextSpan, PortableTextTextBlock } from "@sanity/types";
4
4
  /**
5
5
  * @public
@@ -150,7 +150,7 @@ declare function mergeTextBlocks({
150
150
  context: Pick<EditorContext, 'keyGenerator' | 'schema'>;
151
151
  targetBlock: PortableTextTextBlock;
152
152
  incomingBlock: PortableTextTextBlock;
153
- }): PortableTextTextBlock<_sanity_types9.PortableTextObject | _sanity_types9.PortableTextSpan>;
153
+ }): PortableTextTextBlock<_sanity_types8.PortableTextObject | _sanity_types8.PortableTextSpan>;
154
154
  /**
155
155
  * @public
156
156
  */
@@ -1,5 +1,5 @@
1
1
  import { BlockOffset, BlockPath, ChildPath, EditorContext, EditorSelection, EditorSelectionPoint } from "../_chunks-dts/behavior.types.action.js";
2
- import * as _sanity_types8 from "@sanity/types";
2
+ import * as _sanity_types9 from "@sanity/types";
3
3
  import { KeyedSegment, PortableTextBlock, PortableTextChild, PortableTextSpan, PortableTextTextBlock } from "@sanity/types";
4
4
  /**
5
5
  * @public
@@ -150,7 +150,7 @@ declare function mergeTextBlocks({
150
150
  context: Pick<EditorContext, 'keyGenerator' | 'schema'>;
151
151
  targetBlock: PortableTextTextBlock;
152
152
  incomingBlock: PortableTextTextBlock;
153
- }): PortableTextTextBlock<_sanity_types8.PortableTextObject | _sanity_types8.PortableTextSpan>;
153
+ }): PortableTextTextBlock<_sanity_types9.PortableTextObject | _sanity_types9.PortableTextSpan>;
154
154
  /**
155
155
  * @public
156
156
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portabletext/editor",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
4
4
  "description": "Portable Text Editor made in React",
5
5
  "keywords": [
6
6
  "sanity",
@@ -79,7 +79,7 @@
79
79
  "slate-dom": "^0.117.4",
80
80
  "slate-react": "0.117.4",
81
81
  "xstate": "^5.20.2",
82
- "@portabletext/block-tools": "^3.3.2",
82
+ "@portabletext/block-tools": "^3.3.3",
83
83
  "@portabletext/keyboard-shortcuts": "^1.1.1",
84
84
  "@portabletext/patches": "^1.1.8",
85
85
  "@portabletext/schema": "^1.1.0"
@@ -111,11 +111,11 @@
111
111
  "vite": "^7.1.3",
112
112
  "vitest": "^3.2.4",
113
113
  "vitest-browser-react": "^1.0.1",
114
- "@portabletext/sanity-bridge": "1.1.4",
114
+ "@portabletext/sanity-bridge": "1.1.5",
115
115
  "racejar": "1.2.14"
116
116
  },
117
117
  "peerDependencies": {
118
- "@portabletext/sanity-bridge": "^1.1.4",
118
+ "@portabletext/sanity-bridge": "^1.1.5",
119
119
  "@sanity/schema": "^4.5.0",
120
120
  "@sanity/types": "^4.5.0",
121
121
  "react": "^18.3 || ^19",
@@ -61,6 +61,7 @@ export type PortableTextEditableProps = Omit<
61
61
  TextareaHTMLAttributes<HTMLDivElement>,
62
62
  'onPaste' | 'onCopy' | 'onBeforeInput'
63
63
  > & {
64
+ ref?: React.RefObject<HTMLDivElement>
64
65
  hotkeys?: HotkeyOptions
65
66
  onBeforeInput?: (event: InputEvent) => void
66
67
  onPaste?: OnPasteFn