@pixerate/editor-react 0.208.0 → 0.209.1
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/useLinkFocus.d.cts +36 -0
- package/dist/hooks/useLinkFocus.d.ts +36 -0
- package/dist/image-editor/index.cjs +1 -1
- package/dist/image-editor/index.js +2 -2
- package/dist/index.cjs +828 -795
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +101 -69
- 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,36 @@
|
|
|
1
|
+
import { type FocusEvent, type KeyboardEvent } from "react";
|
|
2
|
+
import { type LinkFocusModel, type LinkFocusOptions, type LinkFocusState } from "@pixerate/editor/tools";
|
|
3
|
+
export interface UseLinkFocusOptions extends Partial<LinkFocusOptions> {
|
|
4
|
+
/** Use an existing model instead of creating one from `marks` and `links`. */
|
|
5
|
+
model?: LinkFocusModel;
|
|
6
|
+
}
|
|
7
|
+
/** Handlers for one mark's element: hover and keyboard focus put its key in focus. */
|
|
8
|
+
export interface LinkFocusMarkProps {
|
|
9
|
+
onPointerEnter: () => void;
|
|
10
|
+
onFocus: () => void;
|
|
11
|
+
"data-link-focus": string;
|
|
12
|
+
}
|
|
13
|
+
/** Handlers for the picture's container: arrow keys, Home, End, Escape, and clearing on leave. */
|
|
14
|
+
export interface LinkFocusRootProps {
|
|
15
|
+
onKeyDown: (event: KeyboardEvent) => void;
|
|
16
|
+
onPointerLeave: () => void;
|
|
17
|
+
onBlur: (event: FocusEvent) => void;
|
|
18
|
+
}
|
|
19
|
+
export interface UseLinkFocusResult {
|
|
20
|
+
model: LinkFocusModel;
|
|
21
|
+
state: LinkFocusState;
|
|
22
|
+
/** Spread on a mark's element (the key it focuses: an item or a tag). */
|
|
23
|
+
markProps(key: string): LinkFocusMarkProps;
|
|
24
|
+
/** Spread on the picture's container. */
|
|
25
|
+
rootProps: LinkFocusRootProps;
|
|
26
|
+
/** Opacity for the mark at `index`: 1 when lit, the model's `dim` otherwise. */
|
|
27
|
+
opacity(index: number): number;
|
|
28
|
+
/** The focused key and its links, for a live region. */
|
|
29
|
+
description: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Focus across linked marks (#812): creates (or adopts) a `createLinkFocus` model and re-renders on
|
|
33
|
+
* its changes. Hovering or focusing a mark lights it and everything linked to it; arrow keys walk
|
|
34
|
+
* the keys, Escape clears, and leaving the picture (pointer or focus) clears too.
|
|
35
|
+
*/
|
|
36
|
+
export declare function useLinkFocus(options: UseLinkFocusOptions): UseLinkFocusResult;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type FocusEvent, type KeyboardEvent } from "react";
|
|
2
|
+
import { type LinkFocusModel, type LinkFocusOptions, type LinkFocusState } from "@pixerate/editor/tools";
|
|
3
|
+
export interface UseLinkFocusOptions extends Partial<LinkFocusOptions> {
|
|
4
|
+
/** Use an existing model instead of creating one from `marks` and `links`. */
|
|
5
|
+
model?: LinkFocusModel;
|
|
6
|
+
}
|
|
7
|
+
/** Handlers for one mark's element: hover and keyboard focus put its key in focus. */
|
|
8
|
+
export interface LinkFocusMarkProps {
|
|
9
|
+
onPointerEnter: () => void;
|
|
10
|
+
onFocus: () => void;
|
|
11
|
+
"data-link-focus": string;
|
|
12
|
+
}
|
|
13
|
+
/** Handlers for the picture's container: arrow keys, Home, End, Escape, and clearing on leave. */
|
|
14
|
+
export interface LinkFocusRootProps {
|
|
15
|
+
onKeyDown: (event: KeyboardEvent) => void;
|
|
16
|
+
onPointerLeave: () => void;
|
|
17
|
+
onBlur: (event: FocusEvent) => void;
|
|
18
|
+
}
|
|
19
|
+
export interface UseLinkFocusResult {
|
|
20
|
+
model: LinkFocusModel;
|
|
21
|
+
state: LinkFocusState;
|
|
22
|
+
/** Spread on a mark's element (the key it focuses: an item or a tag). */
|
|
23
|
+
markProps(key: string): LinkFocusMarkProps;
|
|
24
|
+
/** Spread on the picture's container. */
|
|
25
|
+
rootProps: LinkFocusRootProps;
|
|
26
|
+
/** Opacity for the mark at `index`: 1 when lit, the model's `dim` otherwise. */
|
|
27
|
+
opacity(index: number): number;
|
|
28
|
+
/** The focused key and its links, for a live region. */
|
|
29
|
+
description: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Focus across linked marks (#812): creates (or adopts) a `createLinkFocus` model and re-renders on
|
|
33
|
+
* its changes. Hovering or focusing a mark lights it and everything linked to it; arrow keys walk
|
|
34
|
+
* the keys, Escape clears, and leaving the picture (pointer or focus) clears too.
|
|
35
|
+
*/
|
|
36
|
+
export declare function useLinkFocus(options: UseLinkFocusOptions): UseLinkFocusResult;
|
|
@@ -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";
|