@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.
- package/lib/_chunks-cjs/editor-provider.cjs +2 -2
- package/lib/_chunks-cjs/editor-provider.cjs.map +1 -1
- package/lib/_chunks-es/editor-provider.js +2 -2
- package/lib/_chunks-es/editor-provider.js.map +1 -1
- package/lib/behaviors/index.d.cts +6 -6
- package/lib/behaviors/index.d.ts +6 -6
- package/lib/index.d.cts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/plugins/index.d.cts +1 -1
- package/lib/plugins/index.d.ts +1 -1
- package/lib/selectors/index.d.cts +1 -1
- package/lib/selectors/index.d.ts +1 -1
- package/lib/utils/index.d.cts +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/package.json +11 -11
- package/src/behaviors/behavior.perform-event.ts +5 -2
- package/src/behaviors/behavior.types.event.ts +1 -1
|
@@ -151,7 +151,7 @@ declare type AbstractBehaviorEvent =
|
|
|
151
151
|
}
|
|
152
152
|
| {
|
|
153
153
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'insert.blocks'>
|
|
154
|
-
blocks: Array<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
12254
|
+
blocks: Array<BlockWithOptionalKey>
|
|
12255
12255
|
placement: InsertPlacement
|
|
12256
12256
|
}
|
|
12257
12257
|
| {
|
package/lib/behaviors/index.d.ts
CHANGED
|
@@ -151,7 +151,7 @@ declare type AbstractBehaviorEvent =
|
|
|
151
151
|
}
|
|
152
152
|
| {
|
|
153
153
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'insert.blocks'>
|
|
154
|
-
blocks: Array<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
12254
|
+
blocks: Array<BlockWithOptionalKey>
|
|
12255
12255
|
placement: InsertPlacement
|
|
12256
12256
|
}
|
|
12257
12257
|
| {
|
package/lib/index.d.cts
CHANGED
package/lib/index.d.ts
CHANGED
package/lib/plugins/index.d.cts
CHANGED
package/lib/plugins/index.d.ts
CHANGED
package/lib/selectors/index.d.ts
CHANGED
package/lib/utils/index.d.cts
CHANGED
package/lib/utils/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@portabletext/editor",
|
|
3
|
-
"version": "1.47.
|
|
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/
|
|
83
|
-
"@portabletext/
|
|
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.
|
|
90
|
-
"@sanity/types": "^3.86.
|
|
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.
|
|
101
|
-
"@vitest/browser": "^3.1.
|
|
102
|
-
"@vitest/coverage-istanbul": "^3.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.
|
|
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.
|
|
119
|
-
"@sanity/types": "^3.86.
|
|
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
|
-
? '
|
|
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(
|
|
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) ||
|