@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.
@@ -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);
@@ -4,7 +4,7 @@ import {
4
4
  EffectsBrowser,
5
5
  useEffectDescription,
6
6
  useEffects
7
- } from "../chunk-WTW6HRFI.js";
7
+ } from "../chunk-EXHL4EKM.js";
8
8
  import "../chunk-5RPB4WGT.js";
9
9
  import "../chunk-KIRIU53A.js";
10
10
  import "../chunk-3I7FOSLF.js";
@@ -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);
@@ -2,7 +2,7 @@ import {
2
2
  EffectParameters,
3
3
  EffectsBrowser,
4
4
  useEffectDescription
5
- } from "../chunk-WTW6HRFI.js";
5
+ } from "../chunk-EXHL4EKM.js";
6
6
  import "../chunk-5RPB4WGT.js";
7
7
  import "../chunk-KIRIU53A.js";
8
8
  import "../chunk-3I7FOSLF.js";
@@ -31,7 +31,7 @@ import {
31
31
  EffectsBrowser,
32
32
  useEffectDescription,
33
33
  useEffects
34
- } from "./chunk-WTW6HRFI.js";
34
+ } from "./chunk-EXHL4EKM.js";
35
35
  import {
36
36
  resolveParameterComponents,
37
37
  useParameterComponents
@@ -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);
@@ -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);
@@ -7,7 +7,7 @@ import {
7
7
  useEffectAuthoring,
8
8
  useEffectDescription,
9
9
  useEffects
10
- } from "../chunk-WTW6HRFI.js";
10
+ } from "../chunk-EXHL4EKM.js";
11
11
  import "../chunk-5RPB4WGT.js";
12
12
  import "../chunk-KIRIU53A.js";
13
13
  import "../chunk-3I7FOSLF.js";
@@ -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-MK3YNIBU.js";
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-WTW6HRFI.js";
43
+ import "../chunk-EXHL4EKM.js";
44
44
  import "../chunk-5RPB4WGT.js";
45
45
  import "../chunk-KIRIU53A.js";
46
46
  import "../chunk-3I7FOSLF.js";