@portabletext/editor 7.10.19 → 7.11.0
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/README.md +3 -0
- package/lib/{behavior.types.action-CYtiRDck.d.ts → behavior.types.action-DXkAaEGS.d.ts} +167 -95
- package/lib/behavior.types.action-DXkAaEGS.d.ts.map +1 -0
- package/lib/{behavior.types.behavior-B_77VtQR.js → behavior.types.behavior-BxSLb73I.js} +5 -5
- package/lib/behavior.types.behavior-BxSLb73I.js.map +1 -0
- package/lib/behaviors/index.d.ts +1 -1
- package/lib/behaviors/index.js +1 -1
- package/lib/{get-container-BeXYKpoi.js → get-container-D1nM_ww9.js} +14 -14
- package/lib/get-container-D1nM_ww9.js.map +1 -0
- package/lib/{get-parent-51Kzgaf9.js → get-parent-Ci5241qs.js} +3 -3
- package/lib/get-parent-Ci5241qs.js.map +1 -0
- package/lib/{get-path-sub-schema--2I4NJbG.js → get-path-sub-schema-CZd9VcVM.js} +10 -10
- package/lib/get-path-sub-schema-CZd9VcVM.js.map +1 -0
- package/lib/index.d.ts +2 -2
- package/lib/index.js +13 -12
- package/lib/index.js.map +1 -1
- package/lib/plugins/index.d.ts +4 -4
- package/lib/plugins/index.js +3 -3
- package/lib/plugins/index.js.map +1 -1
- package/lib/{selector.is-at-the-start-of-block-gJIMWRpU.js → selector.is-at-the-start-of-block-D0boZbDu.js} +4 -4
- package/lib/selector.is-at-the-start-of-block-D0boZbDu.js.map +1 -0
- package/lib/selectors/index.d.ts +6 -6
- package/lib/selectors/index.js +6 -6
- package/lib/selectors/index.js.map +1 -1
- package/lib/traversal/index.d.ts +31 -31
- package/lib/traversal/index.js +4 -4
- package/lib/traversal/index.js.map +1 -1
- package/lib/{util.is-equal-selections-BF4WJtz5.js → util.is-equal-selections-N1hxVUbE.js} +2 -2
- package/lib/{util.is-equal-selections-BF4WJtz5.js.map → util.is-equal-selections-N1hxVUbE.js.map} +1 -1
- package/lib/{util.slice-blocks-DQnr9X2s.js → util.slice-blocks-B2fZcNok.js} +2 -2
- package/lib/{util.slice-blocks-DQnr9X2s.js.map → util.slice-blocks-B2fZcNok.js.map} +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +3 -3
- package/package.json +3 -3
- package/lib/behavior.types.action-CYtiRDck.d.ts.map +0 -1
- package/lib/behavior.types.behavior-B_77VtQR.js.map +0 -1
- package/lib/get-container-BeXYKpoi.js.map +0 -1
- package/lib/get-parent-51Kzgaf9.js.map +0 -1
- package/lib/get-path-sub-schema--2I4NJbG.js.map +0 -1
- package/lib/selector.is-at-the-start-of-block-gJIMWRpU.js.map +0 -1
package/README.md
CHANGED
|
@@ -156,6 +156,9 @@ Include the `App` component in your application and run it. You should see an ou
|
|
|
156
156
|
|
|
157
157
|
### Create render functions for schema elements
|
|
158
158
|
|
|
159
|
+
> [!WARNING]
|
|
160
|
+
> The block-level render props (`renderStyle`, `renderBlock`, `renderListItem`, `renderChild`) are deprecated and will be removed in future major versions in favor of node registrations (`defineTextBlock`, `defineBlockObject`, `defineInlineObject`, `defineSpan`). See the [migration guide](https://www.portabletext.org/editor/guides/migrate-render-props/). The span-level props (`renderDecorator`, `renderAnnotation`, `renderPlaceholder`) are not deprecated.
|
|
161
|
+
|
|
159
162
|
At this point the PTE only has a schema, but it doesn't know how to render anything. Fix that by creating render functions for each property in the schema.
|
|
160
163
|
|
|
161
164
|
Start by creating a render function for styles.
|