@portabletext/editor 2.6.4 → 2.6.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.
@@ -1,5 +1,5 @@
1
1
  import { BlockOffset, BlockPath, ChildPath, EditorContext, EditorSelection, EditorSelectionPoint } from "../_chunks-dts/behavior.types.action.js";
2
- import * as _sanity_types9 from "@sanity/types";
2
+ import * as _sanity_types8 from "@sanity/types";
3
3
  import { KeyedSegment, PortableTextBlock, PortableTextTextBlock } from "@sanity/types";
4
4
  import { isSpan, isTextBlock } from "@portabletext/schema";
5
5
  /**
@@ -143,7 +143,7 @@ declare function mergeTextBlocks({
143
143
  context: Pick<EditorContext, 'keyGenerator' | 'schema'>;
144
144
  targetBlock: PortableTextTextBlock;
145
145
  incomingBlock: PortableTextTextBlock;
146
- }): PortableTextTextBlock<_sanity_types9.PortableTextObject | _sanity_types9.PortableTextSpan>;
146
+ }): PortableTextTextBlock<_sanity_types8.PortableTextObject | _sanity_types8.PortableTextSpan>;
147
147
  /**
148
148
  * @public
149
149
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portabletext/editor",
3
- "version": "2.6.4",
3
+ "version": "2.6.6",
4
4
  "description": "Portable Text Editor made in React",
5
5
  "keywords": [
6
6
  "sanity",
@@ -79,16 +79,16 @@
79
79
  "slate-dom": "^0.118.1",
80
80
  "slate-react": "0.117.4",
81
81
  "xstate": "^5.20.2",
82
- "@portabletext/block-tools": "^3.4.0",
83
82
  "@portabletext/keyboard-shortcuts": "^1.1.1",
84
83
  "@portabletext/patches": "^1.1.8",
84
+ "@portabletext/block-tools": "^3.5.0",
85
85
  "@portabletext/schema": "^1.2.0"
86
86
  },
87
87
  "devDependencies": {
88
88
  "@sanity/diff-match-patch": "^3.2.0",
89
- "@sanity/pkg-utils": "^8.0.5",
90
- "@sanity/schema": "^4.5.0",
91
- "@sanity/types": "^4.5.0",
89
+ "@sanity/pkg-utils": "^8.1.1",
90
+ "@sanity/schema": "^4.6.0",
91
+ "@sanity/types": "^4.6.0",
92
92
  "@testing-library/react": "^16.3.0",
93
93
  "@types/debug": "^4.1.12",
94
94
  "@types/lodash": "^4.17.20",
@@ -111,14 +111,14 @@
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.6",
114
+ "@portabletext/sanity-bridge": "1.1.7",
115
115
  "@portabletext/test": "^0.0.0",
116
116
  "racejar": "1.2.14"
117
117
  },
118
118
  "peerDependencies": {
119
- "@portabletext/sanity-bridge": "^1.1.6",
120
- "@sanity/schema": "^4.5.0",
121
- "@sanity/types": "^4.5.0",
119
+ "@portabletext/sanity-bridge": "^1.1.7",
120
+ "@sanity/schema": "^4.6.0",
121
+ "@sanity/types": "^4.6.0",
122
122
  "react": "^18.3 || ^19",
123
123
  "rxjs": "^7.8.2"
124
124
  },
@@ -1,4 +1,5 @@
1
1
  import {Transforms} from 'slate'
2
+ import {IS_FOCUSED, IS_READ_ONLY} from 'slate-dom'
2
3
  import {toSlateRange} from '../internal-utils/to-slate-range'
3
4
  import type {BehaviorOperationImplementation} from './behavior.operations'
4
5
 
@@ -19,4 +20,8 @@ export const selectOperationImplementation: BehaviorOperationImplementation<
19
20
  } else {
20
21
  Transforms.deselect(operation.editor)
21
22
  }
23
+
24
+ if (IS_FOCUSED.get(operation.editor) && IS_READ_ONLY.get(operation.editor)) {
25
+ IS_FOCUSED.set(operation.editor, false)
26
+ }
22
27
  }