@pixerate/editor-react 0.159.0 → 0.160.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.
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import type { LoadingNodeViewMount, LoadingNodeViewState } from '@pixerate/editor';
3
+ export interface LoadingIndicatorProps {
4
+ /** What the editor's `loadingNode` passes (see `LoadingNodeViewState`). */
5
+ state: LoadingNodeViewState;
6
+ }
7
+ /**
8
+ * The `nodeView` for the core `loadingNode`, drawing `component` inside each placeholder in its
9
+ * own React root: `LoadingNode.configure({ nodeView: createReactLoadingNodeView(MyLoader) })`.
10
+ * The placeholder keeps `role="status"` and its `aria-label`, so the component can be decorative.
11
+ * Works with any TipTap editor (it does not need `EditorContent`); app context does not reach it.
12
+ */
13
+ export declare function createReactLoadingNodeView(component: React.ComponentType<LoadingIndicatorProps>): LoadingNodeViewMount;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import type { LoadingNodeViewMount, LoadingNodeViewState } from '@pixerate/editor';
3
+ export interface LoadingIndicatorProps {
4
+ /** What the editor's `loadingNode` passes (see `LoadingNodeViewState`). */
5
+ state: LoadingNodeViewState;
6
+ }
7
+ /**
8
+ * The `nodeView` for the core `loadingNode`, drawing `component` inside each placeholder in its
9
+ * own React root: `LoadingNode.configure({ nodeView: createReactLoadingNodeView(MyLoader) })`.
10
+ * The placeholder keeps `role="status"` and its `aria-label`, so the component can be decorative.
11
+ * Works with any TipTap editor (it does not need `EditorContent`); app context does not reach it.
12
+ */
13
+ export declare function createReactLoadingNodeView(component: React.ComponentType<LoadingIndicatorProps>): LoadingNodeViewMount;
@@ -0,0 +1 @@
1
+ export * from './LoadingIndicator.cjs';
@@ -0,0 +1 @@
1
+ export * from './LoadingIndicator.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor-react",
3
- "version": "0.159.0",
3
+ "version": "0.160.0",
4
4
  "description": "React bindings and prompt/rich-text components for @pixerate/editor",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -254,7 +254,7 @@
254
254
  "dependencies": {},
255
255
  "peerDependencies": {
256
256
  "@dagrejs/dagre": "^1.1.8",
257
- "@pixerate/editor": ">=0.235.0 <1.0.0-0",
257
+ "@pixerate/editor": ">=0.237.0 <1.0.0-0",
258
258
  "@tiptap/core": "^2.27.3",
259
259
  "@tiptap/extension-bubble-menu": "^2.27.3",
260
260
  "@tiptap/extension-placeholder": "^2.27.3",
@@ -305,7 +305,7 @@
305
305
  "tsup": "^9.0.0",
306
306
  "typescript": "^5.7.3",
307
307
  "vitest": "^5.0.5",
308
- "@pixerate/editor": "0.235.0"
308
+ "@pixerate/editor": "0.237.0"
309
309
  },
310
310
  "scripts": {
311
311
  "build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",