@pixerate/editor-react 0.116.0 → 0.117.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.
@@ -1533,9 +1533,9 @@ var LayerEffectsPanel = ({ controller, layerId, heading = true, className }) =>
1533
1533
  ] }, c.key);
1534
1534
  }
1535
1535
  };
1536
- return /* @__PURE__ */ jsxs7("div", { className: `flex flex-col gap-1.5 text-xs text-foreground ${className ?? ""}`, "data-testid": "layer-effects", "aria-label": "Layer effects", role: "group", children: [
1536
+ return /* @__PURE__ */ jsxs7("div", { className: `flex flex-col gap-1.5 text-xs text-foreground ${className ?? ""}`, "data-testid": "layer-effects", "aria-label": "Layer style", role: "group", children: [
1537
1537
  /* @__PURE__ */ jsxs7("div", { className: "flex flex-wrap items-center gap-2", children: [
1538
- /* @__PURE__ */ jsx7("span", { className: "font-semibold text-foreground", children: heading ? "fx Effects" : "Styles" }),
1538
+ /* @__PURE__ */ jsx7("span", { className: "font-semibold text-foreground", children: heading ? "Layer Style" : "Styles" }),
1539
1539
  /* @__PURE__ */ jsxs7("label", { className: "flex items-center gap-1 text-foreground", children: [
1540
1540
  /* @__PURE__ */ jsx7(ImageCheckbox, { label: "Effects on", checked: model.enabled, disabled: model.readOnly, onChange: (on) => attempt(() => controller.setLayerEffectsEnabled(id, on)) }),
1541
1541
  "On"
@@ -1564,9 +1564,9 @@ var LayerEffectsPanel = ({ controller, layerId, heading = true, className }) =>
1564
1564
  heading && /* @__PURE__ */ jsx7(
1565
1565
  ImageSelect,
1566
1566
  {
1567
- label: "Add effect",
1567
+ label: "Add style",
1568
1568
  value: "",
1569
- placeholder: "Add effect\u2026",
1569
+ placeholder: "Add style\u2026",
1570
1570
  disabled: model.readOnly,
1571
1571
  options: LAYER_EFFECT_MENU.map((m) => ({ value: m.kind, label: m.label })),
1572
1572
  onChange: (v) => {
@@ -2047,7 +2047,7 @@ var LayersPanel = ({ controller, thumbnailSize = 32, psd = true, psdFileName = "
2047
2047
 
2048
2048
  // src/image-editor/ImageProviderEffectsPanel.tsx
2049
2049
  import { useEffect as useEffect7, useRef as useRef6, useState as useState8 } from "react";
2050
- import { EFFECT_LAYER_USES, LAYER_EFFECT_MENU as LAYER_EFFECT_MENU2, effectLayerTiming, findLayer, layerEffectsPanel as layerEffectsPanel2 } from "@pixerate/editor/image-editor";
2050
+ import { EFFECT_LAYER_USES, effectLayerTiming, findLayer } from "@pixerate/editor/image-editor";
2051
2051
 
2052
2052
  // src/image-editor/controls/parameterControls.tsx
2053
2053
  import { matchParameterOptionValue } from "@pixerate/editor/parameters";
@@ -2153,19 +2153,9 @@ function ImageProviderEffectsPanel({ controller, className = "", components }) {
2153
2153
  };
2154
2154
  const filters = layer?.type === "smart" ? (layer.smartFilters?.filters ?? []).filter((f) => f.kind === "effect") : [];
2155
2155
  const generator = layer?.type === "pixel" ? layer.generator : void 0;
2156
- const canFilter = !!layer && layer.type !== "adjustment" && layer.type !== "annotation";
2157
- const styles = layerEffectsPanel2(layer);
2156
+ const canFilter = !!provider && !!layer && layer.type !== "adjustment" && layer.type !== "annotation";
2158
2157
  const { description } = useEffectDescription(provider, generator?.effect);
2159
2158
  const timing = generator ? effectLayerTiming(generator, description) : null;
2160
- const addOptions = [
2161
- ...provider && canFilter ? [{ value: "filter", label: "Filter\u2026" }] : [],
2162
- ...styles.available && !styles.readOnly ? LAYER_EFFECT_MENU2.map((m) => ({ value: `style:${m.kind}`, label: m.label })) : []
2163
- ];
2164
- const add = (value) => {
2165
- if (!value || !layer) return;
2166
- if (value === "filter") setBrowse(browse === "filter" ? null : "filter");
2167
- else run(() => controller.addLayerEffect(layer.id, value.slice("style:".length)));
2168
- };
2169
2159
  const scrub = useRef6({ next: null, busy: false, gesture: null });
2170
2160
  const scrubTo = (layerId, time) => {
2171
2161
  const s = scrub.current;
@@ -2276,8 +2266,8 @@ function ImageProviderEffectsPanel({ controller, className = "", components }) {
2276
2266
  )
2277
2267
  ] }),
2278
2268
  layer && canFilter && /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-1", "data-effect-part": "applied", children: [
2279
- /* @__PURE__ */ jsx11("span", { className: "flex-1 font-semibold uppercase tracking-wider text-[11px] text-foreground", children: generator ? "On this layer" : "Effects" }),
2280
- addOptions.length > 0 && /* @__PURE__ */ jsx11(ImageSelect, { label: "Add effect", value: "", placeholder: "Add\u2026", options: addOptions, onChange: add })
2269
+ /* @__PURE__ */ jsx11("span", { className: "flex-1 font-semibold uppercase tracking-wider text-[11px] text-foreground", children: "Filters" }),
2270
+ /* @__PURE__ */ jsx11("button", { type: "button", className: imageOutlineButtonClass, "aria-pressed": browse === "filter", onClick: () => setBrowse(browse === "filter" ? null : "filter"), children: "Add filter\u2026" })
2281
2271
  ] }),
2282
2272
  browse === "filter" && layer && /* @__PURE__ */ jsx11(EffectsBrowser, { provider, uses: ["filter"], title: "Filters", onPick: (e) => (setBrowse(null), run(() => controller.applyEffectFilter(layer.id, e.id))) }),
2283
2273
  filters.length > 0 && layer && /* @__PURE__ */ jsx11("ol", { className: "space-y-1", "data-effect-part": "filters", "aria-label": "Filters", children: filters.map((f) => {
@@ -2331,8 +2321,7 @@ function ImageProviderEffectsPanel({ controller, className = "", components }) {
2331
2321
  ] })
2332
2322
  ] }, f.id);
2333
2323
  }) }),
2334
- layer && styles.available && styles.rows.length > 0 && /* @__PURE__ */ jsx11(LayerEffectsPanel, { controller, layerId: layer.id, heading: false }),
2335
- layer && canFilter && !generator && filters.length === 0 && styles.rows.length === 0 && /* @__PURE__ */ jsx11("p", { className: "text-[11px] text-muted-foreground", children: "No effects yet. Add a filter, or a style such as a drop shadow. New effect layers are added from the layers panel." }),
2324
+ layer && canFilter && !generator && filters.length === 0 && /* @__PURE__ */ jsx11("p", { className: "text-[11px] text-muted-foreground", children: "No filters yet. A filter changes the layer's pixels and stays editable. Layer styles such as a drop shadow are in the layer's properties; new effect layers are added from the layers panel." }),
2336
2325
  !layer && /* @__PURE__ */ jsx11("p", { className: "text-[11px] text-muted-foreground", children: "Select a layer to apply effects to it." }),
2337
2326
  message && /* @__PURE__ */ jsx11("p", { role: "alert", className: "text-[11px] text-destructive", children: message })
2338
2327
  ] });
@@ -8,10 +8,11 @@ export interface ImageProviderEffectsPanelProps {
8
8
  components?: ParameterComponents;
9
9
  }
10
10
  /**
11
- * Effects for the active layer, in one place. An effect layer first: its effect (change it or
11
+ * Provider effects for the active layer. An effect layer first: its effect (change it or
12
12
  * rasterize it), a still frame or an animation for an effect that moves, and its controls. Then
13
- * what is applied to any layer: provider filters (smart filters; applying one converts a pixel
14
- * layer to a smart object in the same undo step) and layer styles, added from one menu. New
15
- * effect layers come from the layers panel. Without a provider it says why nothing can be added.
13
+ * the provider filters applied to the layer (smart filters; applying one converts a pixel layer to
14
+ * a smart object in the same undo step). Layer styles (drop shadow, stroke…) are not here: they
15
+ * are part of the layer's properties (`LayerEffectsPanel`). New effect layers come from the layers
16
+ * panel. Without a provider it says why nothing can be added.
16
17
  */
17
18
  export declare function ImageProviderEffectsPanel({ controller, className, components }: ImageProviderEffectsPanelProps): React.JSX.Element;
@@ -8,10 +8,11 @@ export interface ImageProviderEffectsPanelProps {
8
8
  components?: ParameterComponents;
9
9
  }
10
10
  /**
11
- * Effects for the active layer, in one place. An effect layer first: its effect (change it or
11
+ * Provider effects for the active layer. An effect layer first: its effect (change it or
12
12
  * rasterize it), a still frame or an animation for an effect that moves, and its controls. Then
13
- * what is applied to any layer: provider filters (smart filters; applying one converts a pixel
14
- * layer to a smart object in the same undo step) and layer styles, added from one menu. New
15
- * effect layers come from the layers panel. Without a provider it says why nothing can be added.
13
+ * the provider filters applied to the layer (smart filters; applying one converts a pixel layer to
14
+ * a smart object in the same undo step). Layer styles (drop shadow, stroke…) are not here: they
15
+ * are part of the layer's properties (`LayerEffectsPanel`). New effect layers come from the layers
16
+ * panel. Without a provider it says why nothing can be added.
16
17
  */
17
18
  export declare function ImageProviderEffectsPanel({ controller, className, components }: ImageProviderEffectsPanelProps): React.JSX.Element;
@@ -5,14 +5,14 @@ export interface LayerEffectsPanelProps {
5
5
  /** The layer whose effects to show (default: the active layer). */
6
6
  layerId?: string | null;
7
7
  /**
8
- * Show the "fx Effects" title and the "Add effect" menu (default true). Without them (inside a
8
+ * Show the "Layer Style" title and the "Add style" menu (default true). Without them (inside a
9
9
  * panel that adds styles from its own menu) the master switch and Scale stay.
10
10
  */
11
11
  heading?: boolean;
12
12
  className?: string;
13
13
  }
14
14
  /**
15
- * A layer's effects (Photoshop's layer styles): the master switch, Scale Effects, an "Add effect"
15
+ * A layer's effects (Photoshop's layer styles): the master switch, Scale Effects, an "Add style"
16
16
  * menu, and each effect with its enabled toggle, remove button and, when expanded, its settings.
17
17
  * Every change is one undo step (a slider drag is one step too).
18
18
  */
@@ -5,14 +5,14 @@ export interface LayerEffectsPanelProps {
5
5
  /** The layer whose effects to show (default: the active layer). */
6
6
  layerId?: string | null;
7
7
  /**
8
- * Show the "fx Effects" title and the "Add effect" menu (default true). Without them (inside a
8
+ * Show the "Layer Style" title and the "Add style" menu (default true). Without them (inside a
9
9
  * panel that adds styles from its own menu) the master switch and Scale stay.
10
10
  */
11
11
  heading?: boolean;
12
12
  className?: string;
13
13
  }
14
14
  /**
15
- * A layer's effects (Photoshop's layer styles): the master switch, Scale Effects, an "Add effect"
15
+ * A layer's effects (Photoshop's layer styles): the master switch, Scale Effects, an "Add style"
16
16
  * menu, and each effect with its enabled toggle, remove button and, when expanded, its settings.
17
17
  * Every change is one undo step (a slider drag is one step too).
18
18
  */
@@ -1618,9 +1618,9 @@ var LayerEffectsPanel = ({ controller, layerId, heading = true, className }) =>
1618
1618
  ] }, c.key);
1619
1619
  }
1620
1620
  };
1621
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: `flex flex-col gap-1.5 text-xs text-foreground ${className ?? ""}`, "data-testid": "layer-effects", "aria-label": "Layer effects", role: "group", children: [
1621
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: `flex flex-col gap-1.5 text-xs text-foreground ${className ?? ""}`, "data-testid": "layer-effects", "aria-label": "Layer style", role: "group", children: [
1622
1622
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
1623
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "font-semibold text-foreground", children: heading ? "fx Effects" : "Styles" }),
1623
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "font-semibold text-foreground", children: heading ? "Layer Style" : "Styles" }),
1624
1624
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "flex items-center gap-1 text-foreground", children: [
1625
1625
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ImageCheckbox, { label: "Effects on", checked: model.enabled, disabled: model.readOnly, onChange: (on) => attempt(() => controller.setLayerEffectsEnabled(id, on)) }),
1626
1626
  "On"
@@ -1649,9 +1649,9 @@ var LayerEffectsPanel = ({ controller, layerId, heading = true, className }) =>
1649
1649
  heading && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1650
1650
  ImageSelect,
1651
1651
  {
1652
- label: "Add effect",
1652
+ label: "Add style",
1653
1653
  value: "",
1654
- placeholder: "Add effect\u2026",
1654
+ placeholder: "Add style\u2026",
1655
1655
  disabled: model.readOnly,
1656
1656
  options: import_image_editor7.LAYER_EFFECT_MENU.map((m) => ({ value: m.kind, label: m.label })),
1657
1657
  onChange: (v) => {
@@ -3989,19 +3989,9 @@ function ImageProviderEffectsPanel({ controller, className = "", components }) {
3989
3989
  };
3990
3990
  const filters = layer?.type === "smart" ? (layer.smartFilters?.filters ?? []).filter((f) => f.kind === "effect") : [];
3991
3991
  const generator = layer?.type === "pixel" ? layer.generator : void 0;
3992
- const canFilter = !!layer && layer.type !== "adjustment" && layer.type !== "annotation";
3993
- const styles = (0, import_image_editor9.layerEffectsPanel)(layer);
3992
+ const canFilter = !!provider && !!layer && layer.type !== "adjustment" && layer.type !== "annotation";
3994
3993
  const { description } = useEffectDescription(provider, generator?.effect);
3995
3994
  const timing = generator ? (0, import_image_editor9.effectLayerTiming)(generator, description) : null;
3996
- const addOptions = [
3997
- ...provider && canFilter ? [{ value: "filter", label: "Filter\u2026" }] : [],
3998
- ...styles.available && !styles.readOnly ? import_image_editor9.LAYER_EFFECT_MENU.map((m) => ({ value: `style:${m.kind}`, label: m.label })) : []
3999
- ];
4000
- const add = (value) => {
4001
- if (!value || !layer) return;
4002
- if (value === "filter") setBrowse(browse === "filter" ? null : "filter");
4003
- else run(() => controller.addLayerEffect(layer.id, value.slice("style:".length)));
4004
- };
4005
3995
  const scrub = (0, import_react21.useRef)({ next: null, busy: false, gesture: null });
4006
3996
  const scrubTo = (layerId, time) => {
4007
3997
  const s = scrub.current;
@@ -4112,8 +4102,8 @@ function ImageProviderEffectsPanel({ controller, className = "", components }) {
4112
4102
  )
4113
4103
  ] }),
4114
4104
  layer && canFilter && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-1", "data-effect-part": "applied", children: [
4115
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "flex-1 font-semibold uppercase tracking-wider text-[11px] text-foreground", children: generator ? "On this layer" : "Effects" }),
4116
- addOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ImageSelect, { label: "Add effect", value: "", placeholder: "Add\u2026", options: addOptions, onChange: add })
4105
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "flex-1 font-semibold uppercase tracking-wider text-[11px] text-foreground", children: "Filters" }),
4106
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", className: imageOutlineButtonClass, "aria-pressed": browse === "filter", onClick: () => setBrowse(browse === "filter" ? null : "filter"), children: "Add filter\u2026" })
4117
4107
  ] }),
4118
4108
  browse === "filter" && layer && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(EffectsBrowser, { provider, uses: ["filter"], title: "Filters", onPick: (e) => (setBrowse(null), run(() => controller.applyEffectFilter(layer.id, e.id))) }),
4119
4109
  filters.length > 0 && layer && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("ol", { className: "space-y-1", "data-effect-part": "filters", "aria-label": "Filters", children: filters.map((f) => {
@@ -4167,8 +4157,7 @@ function ImageProviderEffectsPanel({ controller, className = "", components }) {
4167
4157
  ] })
4168
4158
  ] }, f.id);
4169
4159
  }) }),
4170
- layer && styles.available && styles.rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(LayerEffectsPanel, { controller, layerId: layer.id, heading: false }),
4171
- layer && canFilter && !generator && filters.length === 0 && styles.rows.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-[11px] text-muted-foreground", children: "No effects yet. Add a filter, or a style such as a drop shadow. New effect layers are added from the layers panel." }),
4160
+ layer && canFilter && !generator && filters.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-[11px] text-muted-foreground", children: "No filters yet. A filter changes the layer's pixels and stays editable. Layer styles such as a drop shadow are in the layer's properties; new effect layers are added from the layers panel." }),
4172
4161
  !layer && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-[11px] text-muted-foreground", children: "Select a layer to apply effects to it." }),
4173
4162
  message && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { role: "alert", className: "text-[11px] text-destructive", children: message })
4174
4163
  ] });
@@ -26,7 +26,7 @@ import {
26
26
  useImageEditorControls,
27
27
  useImageEffectsTools,
28
28
  useImageHistogram
29
- } from "../chunk-ZQ54FEXL.js";
29
+ } from "../chunk-K7GU7BS7.js";
30
30
  import "../chunk-AJCWF6SN.js";
31
31
  import "../chunk-6BWTJ3EE.js";
32
32
  import "../chunk-5RPB4WGT.js";
package/dist/index.cjs CHANGED
@@ -5332,9 +5332,9 @@ var LayerEffectsPanel = ({ controller, layerId, heading = true, className }) =>
5332
5332
  ] }, c.key);
5333
5333
  }
5334
5334
  };
5335
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: `flex flex-col gap-1.5 text-xs text-foreground ${className ?? ""}`, "data-testid": "layer-effects", "aria-label": "Layer effects", role: "group", children: [
5335
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: `flex flex-col gap-1.5 text-xs text-foreground ${className ?? ""}`, "data-testid": "layer-effects", "aria-label": "Layer style", role: "group", children: [
5336
5336
  /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
5337
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "font-semibold text-foreground", children: heading ? "fx Effects" : "Styles" }),
5337
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "font-semibold text-foreground", children: heading ? "Layer Style" : "Styles" }),
5338
5338
  /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex items-center gap-1 text-foreground", children: [
5339
5339
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ImageCheckbox, { label: "Effects on", checked: model.enabled, disabled: model.readOnly, onChange: (on) => attempt(() => controller.setLayerEffectsEnabled(id, on)) }),
5340
5340
  "On"
@@ -5363,9 +5363,9 @@ var LayerEffectsPanel = ({ controller, layerId, heading = true, className }) =>
5363
5363
  heading && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
5364
5364
  ImageSelect,
5365
5365
  {
5366
- label: "Add effect",
5366
+ label: "Add style",
5367
5367
  value: "",
5368
- placeholder: "Add effect\u2026",
5368
+ placeholder: "Add style\u2026",
5369
5369
  disabled: model.readOnly,
5370
5370
  options: import_image_editor7.LAYER_EFFECT_MENU.map((m) => ({ value: m.kind, label: m.label })),
5371
5371
  onChange: (v) => {
@@ -7703,19 +7703,9 @@ function ImageProviderEffectsPanel({ controller, className = "", components }) {
7703
7703
  };
7704
7704
  const filters = layer?.type === "smart" ? (layer.smartFilters?.filters ?? []).filter((f) => f.kind === "effect") : [];
7705
7705
  const generator = layer?.type === "pixel" ? layer.generator : void 0;
7706
- const canFilter = !!layer && layer.type !== "adjustment" && layer.type !== "annotation";
7707
- const styles = (0, import_image_editor9.layerEffectsPanel)(layer);
7706
+ const canFilter = !!provider && !!layer && layer.type !== "adjustment" && layer.type !== "annotation";
7708
7707
  const { description } = useEffectDescription(provider, generator?.effect);
7709
7708
  const timing = generator ? (0, import_image_editor9.effectLayerTiming)(generator, description) : null;
7710
- const addOptions = [
7711
- ...provider && canFilter ? [{ value: "filter", label: "Filter\u2026" }] : [],
7712
- ...styles.available && !styles.readOnly ? import_image_editor9.LAYER_EFFECT_MENU.map((m) => ({ value: `style:${m.kind}`, label: m.label })) : []
7713
- ];
7714
- const add = (value) => {
7715
- if (!value || !layer) return;
7716
- if (value === "filter") setBrowse(browse === "filter" ? null : "filter");
7717
- else run(() => controller.addLayerEffect(layer.id, value.slice("style:".length)));
7718
- };
7719
7709
  const scrub = (0, import_react57.useRef)({ next: null, busy: false, gesture: null });
7720
7710
  const scrubTo = (layerId, time) => {
7721
7711
  const s = scrub.current;
@@ -7826,8 +7816,8 @@ function ImageProviderEffectsPanel({ controller, className = "", components }) {
7826
7816
  )
7827
7817
  ] }),
7828
7818
  layer && canFilter && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-1", "data-effect-part": "applied", children: [
7829
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "flex-1 font-semibold uppercase tracking-wider text-[11px] text-foreground", children: generator ? "On this layer" : "Effects" }),
7830
- addOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ImageSelect, { label: "Add effect", value: "", placeholder: "Add\u2026", options: addOptions, onChange: add })
7819
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "flex-1 font-semibold uppercase tracking-wider text-[11px] text-foreground", children: "Filters" }),
7820
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("button", { type: "button", className: imageOutlineButtonClass, "aria-pressed": browse === "filter", onClick: () => setBrowse(browse === "filter" ? null : "filter"), children: "Add filter\u2026" })
7831
7821
  ] }),
7832
7822
  browse === "filter" && layer && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(EffectsBrowser, { provider, uses: ["filter"], title: "Filters", onPick: (e) => (setBrowse(null), run(() => controller.applyEffectFilter(layer.id, e.id))) }),
7833
7823
  filters.length > 0 && layer && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("ol", { className: "space-y-1", "data-effect-part": "filters", "aria-label": "Filters", children: filters.map((f) => {
@@ -7881,8 +7871,7 @@ function ImageProviderEffectsPanel({ controller, className = "", components }) {
7881
7871
  ] })
7882
7872
  ] }, f.id);
7883
7873
  }) }),
7884
- layer && styles.available && styles.rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(LayerEffectsPanel, { controller, layerId: layer.id, heading: false }),
7885
- layer && canFilter && !generator && filters.length === 0 && styles.rows.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-[11px] text-muted-foreground", children: "No effects yet. Add a filter, or a style such as a drop shadow. New effect layers are added from the layers panel." }),
7874
+ layer && canFilter && !generator && filters.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-[11px] text-muted-foreground", children: "No filters yet. A filter changes the layer's pixels and stays editable. Layer styles such as a drop shadow are in the layer's properties; new effect layers are added from the layers panel." }),
7886
7875
  !layer && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-[11px] text-muted-foreground", children: "Select a layer to apply effects to it." }),
7887
7876
  message2 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { role: "alert", className: "text-[11px] text-destructive", children: message2 })
7888
7877
  ] });
package/dist/index.js CHANGED
@@ -50,7 +50,7 @@ import {
50
50
  useImageEditorControls,
51
51
  useImageEffectsTools,
52
52
  useImageHistogram
53
- } from "./chunk-ZQ54FEXL.js";
53
+ } from "./chunk-K7GU7BS7.js";
54
54
  import "./chunk-AJCWF6SN.js";
55
55
  import "./chunk-6BWTJ3EE.js";
56
56
  import "./chunk-5RPB4WGT.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor-react",
3
- "version": "0.116.0",
3
+ "version": "0.117.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.176.0 <1.0.0-0",
257
+ "@pixerate/editor": ">=0.178.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.176.0"
308
+ "@pixerate/editor": "0.178.0"
309
309
  },
310
310
  "scripts": {
311
311
  "build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",