@portabletext/editor 1.47.13 → 1.47.14

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.
@@ -151,7 +151,7 @@ declare type AbstractBehaviorEvent =
151
151
  }
152
152
  | {
153
153
  type: StrictExtract_2<SyntheticBehaviorEventType, 'insert.blocks'>
154
- blocks: Array<PortableTextBlock>
154
+ blocks: Array<BlockWithOptionalKey_2>
155
155
  placement: InsertPlacement_2
156
156
  }
157
157
  | {
@@ -2033,7 +2033,7 @@ export declare const coreBehaviors: Behavior_2<
2033
2033
  | 'style.toggle',
2034
2034
  'insert.blocks'
2035
2035
  >
2036
- blocks: Array<PortableTextBlock>
2036
+ blocks: Array<BlockWithOptionalKey>
2037
2037
  placement: InsertPlacement
2038
2038
  }
2039
2039
  | {
@@ -4577,7 +4577,7 @@ export declare function createCodeEditorBehaviors(
4577
4577
  | 'style.toggle',
4578
4578
  'insert.blocks'
4579
4579
  >
4580
- blocks: Array<PortableTextBlock>
4580
+ blocks: Array<BlockWithOptionalKey>
4581
4581
  placement: InsertPlacement
4582
4582
  }
4583
4583
  | {
@@ -7121,7 +7121,7 @@ export declare function createEmojiPickerBehaviors<TEmojiMatch>(
7121
7121
  | 'style.toggle',
7122
7122
  'insert.blocks'
7123
7123
  >
7124
- blocks: Array<PortableTextBlock>
7124
+ blocks: Array<BlockWithOptionalKey>
7125
7125
  placement: InsertPlacement
7126
7126
  }
7127
7127
  | {
@@ -9665,7 +9665,7 @@ export declare function createLinkBehaviors(
9665
9665
  | 'style.toggle',
9666
9666
  'insert.blocks'
9667
9667
  >
9668
- blocks: Array<PortableTextBlock>
9668
+ blocks: Array<BlockWithOptionalKey>
9669
9669
  placement: InsertPlacement
9670
9670
  }
9671
9671
  | {
@@ -12251,7 +12251,7 @@ export declare function createMarkdownBehaviors(
12251
12251
  | 'style.toggle',
12252
12252
  'insert.blocks'
12253
12253
  >
12254
- blocks: Array<PortableTextBlock>
12254
+ blocks: Array<BlockWithOptionalKey>
12255
12255
  placement: InsertPlacement
12256
12256
  }
12257
12257
  | {
@@ -151,7 +151,7 @@ declare type AbstractBehaviorEvent =
151
151
  }
152
152
  | {
153
153
  type: StrictExtract_2<SyntheticBehaviorEventType, 'insert.blocks'>
154
- blocks: Array<PortableTextBlock>
154
+ blocks: Array<BlockWithOptionalKey_2>
155
155
  placement: InsertPlacement_2
156
156
  }
157
157
  | {
@@ -2033,7 +2033,7 @@ export declare const coreBehaviors: Behavior_2<
2033
2033
  | 'style.toggle',
2034
2034
  'insert.blocks'
2035
2035
  >
2036
- blocks: Array<PortableTextBlock>
2036
+ blocks: Array<BlockWithOptionalKey>
2037
2037
  placement: InsertPlacement
2038
2038
  }
2039
2039
  | {
@@ -4577,7 +4577,7 @@ export declare function createCodeEditorBehaviors(
4577
4577
  | 'style.toggle',
4578
4578
  'insert.blocks'
4579
4579
  >
4580
- blocks: Array<PortableTextBlock>
4580
+ blocks: Array<BlockWithOptionalKey>
4581
4581
  placement: InsertPlacement
4582
4582
  }
4583
4583
  | {
@@ -7121,7 +7121,7 @@ export declare function createEmojiPickerBehaviors<TEmojiMatch>(
7121
7121
  | 'style.toggle',
7122
7122
  'insert.blocks'
7123
7123
  >
7124
- blocks: Array<PortableTextBlock>
7124
+ blocks: Array<BlockWithOptionalKey>
7125
7125
  placement: InsertPlacement
7126
7126
  }
7127
7127
  | {
@@ -9665,7 +9665,7 @@ export declare function createLinkBehaviors(
9665
9665
  | 'style.toggle',
9666
9666
  'insert.blocks'
9667
9667
  >
9668
- blocks: Array<PortableTextBlock>
9668
+ blocks: Array<BlockWithOptionalKey>
9669
9669
  placement: InsertPlacement
9670
9670
  }
9671
9671
  | {
@@ -12251,7 +12251,7 @@ export declare function createMarkdownBehaviors(
12251
12251
  | 'style.toggle',
12252
12252
  'insert.blocks'
12253
12253
  >
12254
- blocks: Array<PortableTextBlock>
12254
+ blocks: Array<BlockWithOptionalKey>
12255
12255
  placement: InsertPlacement
12256
12256
  }
12257
12257
  | {
package/lib/index.d.cts CHANGED
@@ -153,7 +153,7 @@ declare type AbstractBehaviorEvent =
153
153
  }
154
154
  | {
155
155
  type: StrictExtract<SyntheticBehaviorEventType, 'insert.blocks'>
156
- blocks: Array<PortableTextBlock>
156
+ blocks: Array<BlockWithOptionalKey>
157
157
  placement: InsertPlacement
158
158
  }
159
159
  | {
package/lib/index.d.ts CHANGED
@@ -153,7 +153,7 @@ declare type AbstractBehaviorEvent =
153
153
  }
154
154
  | {
155
155
  type: StrictExtract<SyntheticBehaviorEventType, 'insert.blocks'>
156
- blocks: Array<PortableTextBlock>
156
+ blocks: Array<BlockWithOptionalKey>
157
157
  placement: InsertPlacement
158
158
  }
159
159
  | {
@@ -134,7 +134,7 @@ declare type AbstractBehaviorEvent =
134
134
  }
135
135
  | {
136
136
  type: StrictExtract<SyntheticBehaviorEventType, 'insert.blocks'>
137
- blocks: Array<PortableTextBlock>
137
+ blocks: Array<BlockWithOptionalKey>
138
138
  placement: InsertPlacement
139
139
  }
140
140
  | {
@@ -134,7 +134,7 @@ declare type AbstractBehaviorEvent =
134
134
  }
135
135
  | {
136
136
  type: StrictExtract<SyntheticBehaviorEventType, 'insert.blocks'>
137
- blocks: Array<PortableTextBlock>
137
+ blocks: Array<BlockWithOptionalKey>
138
138
  placement: InsertPlacement
139
139
  }
140
140
  | {
@@ -134,7 +134,7 @@ declare type AbstractBehaviorEvent =
134
134
  }
135
135
  | {
136
136
  type: StrictExtract<SyntheticBehaviorEventType, 'insert.blocks'>
137
- blocks: Array<PortableTextBlock>
137
+ blocks: Array<BlockWithOptionalKey>
138
138
  placement: InsertPlacement
139
139
  }
140
140
  | {
@@ -134,7 +134,7 @@ declare type AbstractBehaviorEvent =
134
134
  }
135
135
  | {
136
136
  type: StrictExtract<SyntheticBehaviorEventType, 'insert.blocks'>
137
- blocks: Array<PortableTextBlock>
137
+ blocks: Array<BlockWithOptionalKey>
138
138
  placement: InsertPlacement
139
139
  }
140
140
  | {
@@ -134,7 +134,7 @@ declare type AbstractBehaviorEvent =
134
134
  }
135
135
  | {
136
136
  type: StrictExtract<SyntheticBehaviorEventType, 'insert.blocks'>
137
- blocks: Array<PortableTextBlock>
137
+ blocks: Array<BlockWithOptionalKey>
138
138
  placement: InsertPlacement
139
139
  }
140
140
  | {
@@ -134,7 +134,7 @@ declare type AbstractBehaviorEvent =
134
134
  }
135
135
  | {
136
136
  type: StrictExtract<SyntheticBehaviorEventType, 'insert.blocks'>
137
- blocks: Array<PortableTextBlock>
137
+ blocks: Array<BlockWithOptionalKey>
138
138
  placement: InsertPlacement
139
139
  }
140
140
  | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portabletext/editor",
3
- "version": "1.47.13",
3
+ "version": "1.47.14",
4
4
  "description": "Portable Text Editor made in React",
5
5
  "keywords": [
6
6
  "sanity",
@@ -79,15 +79,15 @@
79
79
  "slate-react": "0.112.1",
80
80
  "use-effect-event": "^1.0.2",
81
81
  "xstate": "^5.19.2",
82
- "@portabletext/block-tools": "1.1.20",
83
- "@portabletext/patches": "1.1.3"
82
+ "@portabletext/patches": "1.1.3",
83
+ "@portabletext/block-tools": "1.1.21"
84
84
  },
85
85
  "devDependencies": {
86
86
  "@portabletext/toolkit": "^2.0.17",
87
87
  "@sanity/diff-match-patch": "^3.2.0",
88
88
  "@sanity/pkg-utils": "^7.2.2",
89
- "@sanity/schema": "^3.86.0",
90
- "@sanity/types": "^3.86.0",
89
+ "@sanity/schema": "^3.86.1",
90
+ "@sanity/types": "^3.86.1",
91
91
  "@testing-library/jest-dom": "^6.6.3",
92
92
  "@testing-library/react": "^16.3.0",
93
93
  "@types/debug": "^4.1.12",
@@ -97,9 +97,9 @@
97
97
  "@types/react-dom": "^19.1.2",
98
98
  "@typescript-eslint/eslint-plugin": "^8.29.0",
99
99
  "@typescript-eslint/parser": "^8.29.0",
100
- "@vitejs/plugin-react": "^4.3.4",
101
- "@vitest/browser": "^3.1.1",
102
- "@vitest/coverage-istanbul": "^3.1.1",
100
+ "@vitejs/plugin-react": "^4.4.1",
101
+ "@vitest/browser": "^3.1.2",
102
+ "@vitest/coverage-istanbul": "^3.1.2",
103
103
  "babel-plugin-react-compiler": "19.0.0-beta-e993439-20250328",
104
104
  "eslint": "8.57.1",
105
105
  "eslint-plugin-react-compiler": "19.0.0-beta-e993439-20250328",
@@ -110,13 +110,13 @@
110
110
  "rxjs": "^7.8.2",
111
111
  "typescript": "5.8.3",
112
112
  "vite": "^6.2.5",
113
- "vitest": "^3.1.1",
113
+ "vitest": "^3.1.2",
114
114
  "vitest-browser-react": "^0.1.1",
115
115
  "racejar": "1.2.4"
116
116
  },
117
117
  "peerDependencies": {
118
- "@sanity/schema": "^3.86.0",
119
- "@sanity/types": "^3.86.0",
118
+ "@sanity/schema": "^3.86.1",
119
+ "@sanity/types": "^3.86.1",
120
120
  "react": "^16.9 || ^17 || ^18 || ^19",
121
121
  "rxjs": "^7.8.2"
122
122
  },
@@ -22,7 +22,7 @@ function eventCategory(event: BehaviorEvent) {
22
22
  return isNativeBehaviorEvent(event)
23
23
  ? 'native'
24
24
  : isAbstractBehaviorEvent(event)
25
- ? 'abstract'
25
+ ? 'synthetic'
26
26
  : isCustomBehaviorEvent(event)
27
27
  ? 'custom'
28
28
  : 'synthetic'
@@ -51,7 +51,10 @@ export function performEvent({
51
51
  }
52
52
  | undefined
53
53
  }) {
54
- debug(`(${eventCategory(event)})`, JSON.stringify(event, null, 2))
54
+ debug(
55
+ `(${!isNativeBehaviorEvent(event) ? `${mode}:` : ''}${eventCategory(event)})`,
56
+ JSON.stringify(event, null, 2),
57
+ )
55
58
 
56
59
  const defaultAction =
57
60
  isCustomBehaviorEvent(event) ||
@@ -320,7 +320,7 @@ type AbstractBehaviorEvent =
320
320
  }
321
321
  | {
322
322
  type: StrictExtract<SyntheticBehaviorEventType, 'insert.blocks'>
323
- blocks: Array<PortableTextBlock>
323
+ blocks: Array<BlockWithOptionalKey>
324
324
  placement: InsertPlacement
325
325
  }
326
326
  | {