@pixerate/editor-react 0.209.0 → 0.210.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/dist/animation-editor/index.cjs +1 -1
- package/dist/animation-editor/index.js +1 -1
- package/dist/canvas/index.cjs +1 -1
- package/dist/canvas/index.js +1 -1
- package/dist/{chunk-MK3YNIBU.js → chunk-BKFMPODE.js} +1 -1
- package/dist/{chunk-WTW6HRFI.js → chunk-EXHL4EKM.js} +1 -1
- package/dist/effects/index.cjs +1 -1
- package/dist/effects/index.js +1 -1
- package/dist/hooks/useTextProposals.d.cts +47 -0
- package/dist/hooks/useTextProposals.d.ts +47 -0
- package/dist/image-editor/index.cjs +1 -1
- package/dist/image-editor/index.js +2 -2
- package/dist/index.cjs +839 -769
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +152 -81
- package/dist/paint-editor/index.cjs +1 -1
- package/dist/paint-editor/index.js +1 -1
- package/dist/vector/index.cjs +1 -1
- package/dist/vector/index.js +1 -1
- package/dist/video-editor/index.cjs +1 -1
- package/dist/video-editor/index.js +1 -1
- package/package.json +3 -3
|
@@ -1074,7 +1074,7 @@ function useEffectDescription(provider, effect) {
|
|
|
1074
1074
|
var import_react12 = require("react");
|
|
1075
1075
|
var import_effects = require("@pixerate/editor/effects");
|
|
1076
1076
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1077
|
-
var LABELS = { motion: "Motion", camera: "Camera", timing: "Timing" };
|
|
1077
|
+
var LABELS = { motion: "Motion", camera: "Camera", timing: "Timing", "text-treatment": "Text treatment" };
|
|
1078
1078
|
function EffectThumbnail({ provider, effect, width = 96, height = 54, className = "" }) {
|
|
1079
1079
|
const ref = (0, import_react12.useRef)(null);
|
|
1080
1080
|
const [failed, setFailed] = (0, import_react12.useState)(effect.kind in LABELS);
|
package/dist/canvas/index.cjs
CHANGED
|
@@ -2035,7 +2035,7 @@ function useEffectDescription(provider, effect) {
|
|
|
2035
2035
|
var import_react22 = require("react");
|
|
2036
2036
|
var import_effects = require("@pixerate/editor/effects");
|
|
2037
2037
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
2038
|
-
var LABELS = { motion: "Motion", camera: "Camera", timing: "Timing" };
|
|
2038
|
+
var LABELS = { motion: "Motion", camera: "Camera", timing: "Timing", "text-treatment": "Text treatment" };
|
|
2039
2039
|
function EffectThumbnail({ provider, effect, width = 96, height = 54, className = "" }) {
|
|
2040
2040
|
const ref = (0, import_react22.useRef)(null);
|
|
2041
2041
|
const [failed, setFailed] = (0, import_react22.useState)(effect.kind in LABELS);
|
package/dist/canvas/index.js
CHANGED
|
@@ -34,7 +34,7 @@ function useEffectDescription(provider, effect) {
|
|
|
34
34
|
import { useEffect as useEffect2, useRef, useState as useState2 } from "react";
|
|
35
35
|
import { renderEffectThumbnail } from "@pixerate/editor/effects";
|
|
36
36
|
import { jsx } from "react/jsx-runtime";
|
|
37
|
-
var LABELS = { motion: "Motion", camera: "Camera", timing: "Timing" };
|
|
37
|
+
var LABELS = { motion: "Motion", camera: "Camera", timing: "Timing", "text-treatment": "Text treatment" };
|
|
38
38
|
function EffectThumbnail({ provider, effect, width = 96, height = 54, className = "" }) {
|
|
39
39
|
const ref = useRef(null);
|
|
40
40
|
const [failed, setFailed] = useState2(effect.kind in LABELS);
|
package/dist/effects/index.cjs
CHANGED
|
@@ -71,7 +71,7 @@ function useEffectDescription(provider, effect) {
|
|
|
71
71
|
var import_react2 = require("react");
|
|
72
72
|
var import_effects = require("@pixerate/editor/effects");
|
|
73
73
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
74
|
-
var LABELS = { motion: "Motion", camera: "Camera", timing: "Timing" };
|
|
74
|
+
var LABELS = { motion: "Motion", camera: "Camera", timing: "Timing", "text-treatment": "Text treatment" };
|
|
75
75
|
function EffectThumbnail({ provider, effect, width = 96, height = 54, className = "" }) {
|
|
76
76
|
const ref = (0, import_react2.useRef)(null);
|
|
77
77
|
const [failed, setFailed] = (0, import_react2.useState)(effect.kind in LABELS);
|
package/dist/effects/index.js
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type TextChange, type TextChangeFeed, type TextProposal, type TextProposals, type TextProposalsOptions, type TextSelection } from '@pixerate/editor/tools';
|
|
2
|
+
import type { HistoryCommitEvent } from '@pixerate/editor/history';
|
|
3
|
+
export interface UseTextProposalsOptions extends Pick<TextProposalsOptions, 'applyEdit' | 'origin' | 'readOnly' | 'idGenerator' | 'now'> {
|
|
4
|
+
/** The text as it is now. Proposals follow it on each render. */
|
|
5
|
+
text: string;
|
|
6
|
+
}
|
|
7
|
+
export interface TextProposalsHandle {
|
|
8
|
+
/** The framework-free store (for `createTextProposalToolProvider` and agents). */
|
|
9
|
+
readonly store: TextProposals;
|
|
10
|
+
/** Pending proposals, with their current ranges. */
|
|
11
|
+
proposals: readonly TextProposal[];
|
|
12
|
+
propose: TextProposals['propose'];
|
|
13
|
+
accept: TextProposals['accept'];
|
|
14
|
+
reject: TextProposals['reject'];
|
|
15
|
+
clear: TextProposals['clear'];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Agent-suggested replacements for a text held in React state: suggestions the person accepts
|
|
19
|
+
* (one undo step made by the proposer, through `applyEdit`) or dismisses. Proposals move as the
|
|
20
|
+
* person writes before them and are dropped when they edit the text a proposal would replace.
|
|
21
|
+
* The same API as the Svelte `createTextProposalState`. The options are read when used.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useTextProposals(options: UseTextProposalsOptions): TextProposalsHandle;
|
|
24
|
+
export interface UseTextChangeFeedOptions {
|
|
25
|
+
/** The text as it is now. */
|
|
26
|
+
text: string;
|
|
27
|
+
/** The selection, when the host has one (a caret is `from === to`). */
|
|
28
|
+
selection?: TextSelection | null;
|
|
29
|
+
/** The text's history, for each change's origin (`user` or `agent:<id>`). Pass a stable one. */
|
|
30
|
+
history?: {
|
|
31
|
+
onCommit(listener: (event: HistoryCommitEvent) => void): () => void;
|
|
32
|
+
};
|
|
33
|
+
/** How long the person must stop typing for their burst to end (ms, default 1500; 0: no bursts). Read once. */
|
|
34
|
+
burstMs?: number;
|
|
35
|
+
/** Called with each change, after the render that shows it, and when a typing burst ends. */
|
|
36
|
+
onChange?: (change: TextChange) => void;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* What changed in a text held in React state, after each render: the range, what it held and
|
|
40
|
+
* what replaced it, the selection, who made it, word and line boundaries, and when a typing
|
|
41
|
+
* burst ends. For agents that follow what the person writes. Returns the latest change and the
|
|
42
|
+
* feed. The same API as the Svelte `createTextChangeWatcher`.
|
|
43
|
+
*/
|
|
44
|
+
export declare function useTextChangeFeed(options: UseTextChangeFeedOptions): {
|
|
45
|
+
feed: TextChangeFeed;
|
|
46
|
+
last: TextChange | null;
|
|
47
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type TextChange, type TextChangeFeed, type TextProposal, type TextProposals, type TextProposalsOptions, type TextSelection } from '@pixerate/editor/tools';
|
|
2
|
+
import type { HistoryCommitEvent } from '@pixerate/editor/history';
|
|
3
|
+
export interface UseTextProposalsOptions extends Pick<TextProposalsOptions, 'applyEdit' | 'origin' | 'readOnly' | 'idGenerator' | 'now'> {
|
|
4
|
+
/** The text as it is now. Proposals follow it on each render. */
|
|
5
|
+
text: string;
|
|
6
|
+
}
|
|
7
|
+
export interface TextProposalsHandle {
|
|
8
|
+
/** The framework-free store (for `createTextProposalToolProvider` and agents). */
|
|
9
|
+
readonly store: TextProposals;
|
|
10
|
+
/** Pending proposals, with their current ranges. */
|
|
11
|
+
proposals: readonly TextProposal[];
|
|
12
|
+
propose: TextProposals['propose'];
|
|
13
|
+
accept: TextProposals['accept'];
|
|
14
|
+
reject: TextProposals['reject'];
|
|
15
|
+
clear: TextProposals['clear'];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Agent-suggested replacements for a text held in React state: suggestions the person accepts
|
|
19
|
+
* (one undo step made by the proposer, through `applyEdit`) or dismisses. Proposals move as the
|
|
20
|
+
* person writes before them and are dropped when they edit the text a proposal would replace.
|
|
21
|
+
* The same API as the Svelte `createTextProposalState`. The options are read when used.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useTextProposals(options: UseTextProposalsOptions): TextProposalsHandle;
|
|
24
|
+
export interface UseTextChangeFeedOptions {
|
|
25
|
+
/** The text as it is now. */
|
|
26
|
+
text: string;
|
|
27
|
+
/** The selection, when the host has one (a caret is `from === to`). */
|
|
28
|
+
selection?: TextSelection | null;
|
|
29
|
+
/** The text's history, for each change's origin (`user` or `agent:<id>`). Pass a stable one. */
|
|
30
|
+
history?: {
|
|
31
|
+
onCommit(listener: (event: HistoryCommitEvent) => void): () => void;
|
|
32
|
+
};
|
|
33
|
+
/** How long the person must stop typing for their burst to end (ms, default 1500; 0: no bursts). Read once. */
|
|
34
|
+
burstMs?: number;
|
|
35
|
+
/** Called with each change, after the render that shows it, and when a typing burst ends. */
|
|
36
|
+
onChange?: (change: TextChange) => void;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* What changed in a text held in React state, after each render: the range, what it held and
|
|
40
|
+
* what replaced it, the selection, who made it, word and line boundaries, and when a typing
|
|
41
|
+
* burst ends. For agents that follow what the person writes. Returns the latest change and the
|
|
42
|
+
* feed. The same API as the Svelte `createTextChangeWatcher`.
|
|
43
|
+
*/
|
|
44
|
+
export declare function useTextChangeFeed(options: UseTextChangeFeedOptions): {
|
|
45
|
+
feed: TextChangeFeed;
|
|
46
|
+
last: TextChange | null;
|
|
47
|
+
};
|
|
@@ -2718,7 +2718,7 @@ function useEffectDescription(provider, effect) {
|
|
|
2718
2718
|
var import_react16 = require("react");
|
|
2719
2719
|
var import_effects = require("@pixerate/editor/effects");
|
|
2720
2720
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2721
|
-
var LABELS = { motion: "Motion", camera: "Camera", timing: "Timing" };
|
|
2721
|
+
var LABELS = { motion: "Motion", camera: "Camera", timing: "Timing", "text-treatment": "Text treatment" };
|
|
2722
2722
|
function EffectThumbnail({ provider, effect, width = 96, height = 54, className = "" }) {
|
|
2723
2723
|
const ref = (0, import_react16.useRef)(null);
|
|
2724
2724
|
const [failed, setFailed] = (0, import_react16.useState)(effect.kind in LABELS);
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
useImageEditor,
|
|
31
31
|
useImageEffectsTools,
|
|
32
32
|
useImageHistogram
|
|
33
|
-
} from "../chunk-
|
|
33
|
+
} from "../chunk-BKFMPODE.js";
|
|
34
34
|
import {
|
|
35
35
|
ImageCheckbox,
|
|
36
36
|
ImageColor,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
LayerEffectsPanel,
|
|
41
41
|
useImageEditorControls
|
|
42
42
|
} from "../chunk-EP6C5N54.js";
|
|
43
|
-
import "../chunk-
|
|
43
|
+
import "../chunk-EXHL4EKM.js";
|
|
44
44
|
import "../chunk-5RPB4WGT.js";
|
|
45
45
|
import "../chunk-KIRIU53A.js";
|
|
46
46
|
import "../chunk-3I7FOSLF.js";
|