@portabletext/editor 3.3.9 → 3.3.11
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-dts/index.d.ts +31 -2082
- package/lib/behaviors/index.d.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/plugins/index.d.ts +1 -1
- package/lib/selectors/index.d.ts +2 -1
- package/lib/utils/index.d.ts +10 -8
- package/package.json +6 -6
package/lib/behaviors/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as defineBehavior, Y as BehaviorGuard, a as forward, c as CustomBehaviorEvent, d as SyntheticBehaviorEvent, i as execute, l as InsertPlacement, n as BehaviorActionSet, o as raise, q as Behavior, r as effect, s as BehaviorEvent, t as BehaviorAction, u as NativeBehaviorEvent } from "../_chunks-dts/index.js";
|
|
2
2
|
export { Behavior, BehaviorAction, BehaviorActionSet, BehaviorEvent, BehaviorGuard, CustomBehaviorEvent, InsertPlacement, NativeBehaviorEvent, SyntheticBehaviorEvent, defineBehavior, effect, execute, forward, raise };
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as BlockAnnotationRenderProps, $t as EditorEmittedEvent, A as PortableTextTextBlock, At as ReadyChange, B as EditorSelector, Bt as ScrollSelectionIntoViewFunction, C as ListDefinition, Ct as OnPasteResultOrPromise, D as PortableTextChild, Dt as PortableTextMemberSchemaTypes, E as PortableTextBlock, Et as PatchObservable, F as BlockOffset, Ft as RenderDecoratorFunction, G as EditorConfig, Gt as AnnotationPath, H as EditorProvider, Ht as UndoChange, I as useEditor, It as RenderEditableFunction, Jt as PortableTextEditable, K as EditorEvent, Kt as BlockPath, L as defaultKeyGenerator, Lt as RenderListItemFunction, M as StyleDefinition, Mt as RenderAnnotationFunction, N as StyleSchemaType, Nt as RenderBlockFunction, O as PortableTextObject, Ot as RangeDecoration, P as defineSchema, Pt as RenderChildFunction, Q as AddedAnnotationPaths, Qt as PortableTextEditorProps, R as usePortableTextEditorSelection, Rt as RenderPlaceholderFunction, S as InlineObjectSchemaType, St as OnPasteResult, T as Patch, Tt as PatchChange, U as EditorProviderProps, Ut as UnsetChange, V as useEditorSelector, Vt as SelectionChange, W as Editor, Wt as ValueChange, X as EditorContext, Xt as HotkeyOptions, Yt as PortableTextEditableProps, Z as EditorSnapshot, Zt as PortableTextEditor, _ as BlockObjectSchemaType, _t as LoadingChange, at as BlurChange, b as FieldDefinition, bt as OnCopyFn, ct as EditableAPIDeleteOptions, dt as EditorSelection, en as MutationEvent, et as BlockChildRenderProps, f as PatchesEvent, ft as EditorSelectionPoint, g as BlockObjectDefinition, gt as InvalidValueResolution, h as BaseDefinition, ht as InvalidValue, it as BlockStyleRenderProps, j as SchemaDefinition, jt as RedoChange, k as PortableTextSpan, kt as RangeDecorationOnMovedDetails, lt as EditorChange, m as AnnotationSchemaType, mt as FocusChange, nt as BlockListItemRenderProps, ot as ConnectionChange, p as AnnotationDefinition, pt as ErrorChange, qt as ChildPath, rt as BlockRenderProps, st as EditableAPI, tn as EditorSchema, tt as BlockDecoratorRenderProps, ut as EditorChanges, v as DecoratorDefinition, vt as MutationChange, w as ListSchemaType, wt as PasteData, x as InlineObjectDefinition, xt as OnPasteFn, y as DecoratorSchemaType, yt as OnBeforeInputFn, z as usePortableTextEditor, zt as RenderStyleFunction } from "./_chunks-dts/index.js";
|
|
2
2
|
export { AddedAnnotationPaths, AnnotationDefinition, AnnotationPath, AnnotationSchemaType, BaseDefinition, BlockAnnotationRenderProps, BlockChildRenderProps, BlockDecoratorRenderProps, BlockListItemRenderProps, BlockObjectDefinition, BlockObjectSchemaType, BlockOffset, BlockPath, BlockRenderProps, BlockStyleRenderProps, BlurChange, ChildPath, ConnectionChange, DecoratorDefinition, DecoratorSchemaType, EditableAPI, EditableAPIDeleteOptions, Editor, EditorChange, EditorChanges, EditorConfig, EditorContext, EditorEmittedEvent, EditorEvent, EditorProvider, EditorProviderProps, EditorSchema, EditorSelection, EditorSelectionPoint, EditorSelector, EditorSnapshot, ErrorChange, FieldDefinition, FocusChange, HotkeyOptions, InlineObjectDefinition, InlineObjectSchemaType, InvalidValue, InvalidValueResolution, ListDefinition, ListSchemaType, LoadingChange, MutationChange, MutationEvent, OnBeforeInputFn, OnCopyFn, OnPasteFn, OnPasteResult, OnPasteResultOrPromise, PasteData, Patch, PatchChange, PatchObservable, PatchesEvent, PortableTextBlock, PortableTextChild, PortableTextEditable, PortableTextEditableProps, PortableTextEditor, PortableTextEditorProps, PortableTextMemberSchemaTypes, PortableTextObject, PortableTextSpan, PortableTextTextBlock, RangeDecoration, RangeDecorationOnMovedDetails, ReadyChange, RedoChange, RenderAnnotationFunction, RenderBlockFunction, RenderChildFunction, RenderDecoratorFunction, RenderEditableFunction, RenderListItemFunction, RenderPlaceholderFunction, RenderStyleFunction, SchemaDefinition, ScrollSelectionIntoViewFunction, SelectionChange, StyleDefinition, StyleSchemaType, UndoChange, UnsetChange, ValueChange, defineSchema, defaultKeyGenerator as keyGenerator, useEditor, useEditorSelector, usePortableTextEditor, usePortableTextEditorSelection };
|
package/lib/plugins/index.d.ts
CHANGED
package/lib/selectors/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as EditorSelector, F as BlockOffset, Kt as BlockPath, dt as EditorSelection, ft as EditorSelectionPoint, qt as ChildPath } from "../_chunks-dts/index.js";
|
|
2
|
+
import { KeyedSegment, PortableTextBlock, PortableTextListBlock, PortableTextObject, PortableTextSpan, PortableTextTextBlock } from "@sanity/types";
|
|
2
3
|
/**
|
|
3
4
|
* @public
|
|
4
5
|
*/
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as BlockOffset, Kt as BlockPath, X as EditorContext, dt as EditorSelection, ft as EditorSelectionPoint, qt as ChildPath } from "../_chunks-dts/index.js";
|
|
2
|
+
import * as _sanity_types7 from "@sanity/types";
|
|
3
|
+
import { KeyedSegment, PortableTextBlock, PortableTextTextBlock } from "@sanity/types";
|
|
2
4
|
import { isSpan, isTextBlock } from "@portabletext/schema";
|
|
3
5
|
/**
|
|
4
6
|
* @public
|
|
@@ -109,7 +111,7 @@ declare function getSelectionStartPoint<TEditorSelection extends NonNullable<Edi
|
|
|
109
111
|
/**
|
|
110
112
|
* @public
|
|
111
113
|
*/
|
|
112
|
-
declare function getTextBlockText(block: PortableTextTextBlock
|
|
114
|
+
declare function getTextBlockText(block: PortableTextTextBlock): string;
|
|
113
115
|
/**
|
|
114
116
|
* @public
|
|
115
117
|
*/
|
|
@@ -139,9 +141,9 @@ declare function mergeTextBlocks({
|
|
|
139
141
|
incomingBlock
|
|
140
142
|
}: {
|
|
141
143
|
context: Pick<EditorContext, 'keyGenerator' | 'schema'>;
|
|
142
|
-
targetBlock: PortableTextTextBlock
|
|
143
|
-
incomingBlock: PortableTextTextBlock
|
|
144
|
-
}): PortableTextTextBlock
|
|
144
|
+
targetBlock: PortableTextTextBlock;
|
|
145
|
+
incomingBlock: PortableTextTextBlock;
|
|
146
|
+
}): PortableTextTextBlock<_sanity_types7.PortableTextObject | _sanity_types7.PortableTextSpan>;
|
|
145
147
|
/**
|
|
146
148
|
* @public
|
|
147
149
|
*/
|
|
@@ -177,10 +179,10 @@ declare function splitTextBlock({
|
|
|
177
179
|
point
|
|
178
180
|
}: {
|
|
179
181
|
context: Pick<EditorContext, 'schema'>;
|
|
180
|
-
block: PortableTextTextBlock
|
|
182
|
+
block: PortableTextTextBlock;
|
|
181
183
|
point: EditorSelectionPoint;
|
|
182
184
|
}): {
|
|
183
|
-
before: PortableTextTextBlock
|
|
184
|
-
after: PortableTextTextBlock
|
|
185
|
+
before: PortableTextTextBlock;
|
|
186
|
+
after: PortableTextTextBlock;
|
|
185
187
|
} | undefined;
|
|
186
188
|
export { blockOffsetToBlockSelectionPoint, blockOffsetToSelectionPoint, blockOffsetToSpanSelectionPoint, blockOffsetsToSelection, childSelectionPointToBlockOffset, getBlockEndPoint, getBlockStartPoint, getSelectionEndPoint, getSelectionStartPoint, getTextBlockText, isEmptyTextBlock, isEqualSelectionPoints, isEqualSelections, isKeyedSegment, isSelectionCollapsed, isSpan, isTextBlock, mergeTextBlocks, reverseSelection, selectionPointToBlockOffset, sliceBlocks, spanSelectionPointToBlockOffset, splitTextBlock };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@portabletext/editor",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.11",
|
|
4
4
|
"description": "Portable Text Editor made in React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@portabletext/to-html": "^5.0.0",
|
|
65
65
|
"@sanity/schema": "^4.20.3",
|
|
66
|
+
"@sanity/types": "^4.20.3",
|
|
66
67
|
"@xstate/react": "^6.0.0",
|
|
67
68
|
"debug": "^4.4.3",
|
|
68
69
|
"react-compiler-runtime": "^1.0.0",
|
|
@@ -70,16 +71,15 @@
|
|
|
70
71
|
"slate-dom": "^0.119.0",
|
|
71
72
|
"slate-react": "^0.120.0",
|
|
72
73
|
"xstate": "^5.24.0",
|
|
73
|
-
"@portabletext/markdown": "^1.0.5",
|
|
74
74
|
"@portabletext/block-tools": "^4.1.10",
|
|
75
75
|
"@portabletext/keyboard-shortcuts": "^2.1.1",
|
|
76
|
-
"@portabletext/
|
|
77
|
-
"@portabletext/patches": "^2.0.2"
|
|
76
|
+
"@portabletext/markdown": "^1.0.6",
|
|
77
|
+
"@portabletext/patches": "^2.0.2",
|
|
78
|
+
"@portabletext/schema": "^2.0.1"
|
|
78
79
|
},
|
|
79
80
|
"devDependencies": {
|
|
80
81
|
"@sanity/diff-match-patch": "^3.2.0",
|
|
81
82
|
"@sanity/pkg-utils": "^10.1.2",
|
|
82
|
-
"@sanity/types": "^4.20.3",
|
|
83
83
|
"@types/debug": "^4.1.12",
|
|
84
84
|
"@types/node": "^20",
|
|
85
85
|
"@types/react": "^19.2.7",
|
|
@@ -101,8 +101,8 @@
|
|
|
101
101
|
"vite": "^7.1.12",
|
|
102
102
|
"vitest": "^4.0.14",
|
|
103
103
|
"vitest-browser-react": "^2.0.2",
|
|
104
|
-
"@portabletext/test": "^1.0.2",
|
|
105
104
|
"@portabletext/sanity-bridge": "1.2.13",
|
|
105
|
+
"@portabletext/test": "^1.0.2",
|
|
106
106
|
"racejar": "2.0.1"
|
|
107
107
|
},
|
|
108
108
|
"peerDependencies": {
|