@pixerate/editor-react 0.89.0 → 0.90.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.
@@ -1010,6 +1010,7 @@ import {
1010
1010
  VECTOR_FILTER_MENU,
1011
1011
  VECTOR_STROKE_ALIGN_LABELS,
1012
1012
  getVectorAppearancePanel,
1013
+ randomVectorBrushstrokeSeed,
1013
1014
  vectorBrushstrokeBrushes
1014
1015
  } from "@pixerate/editor/vector";
1015
1016
  import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
@@ -1049,6 +1050,19 @@ function VectorAppearancePanel({ controller, className }) {
1049
1050
  onBlur: end
1050
1051
  }
1051
1052
  ),
1053
+ /* @__PURE__ */ jsxs4("label", { className: "flex items-center gap-0.5 text-[11px]", title: "Brush character: seeded jitter and paper grain", children: [
1054
+ /* @__PURE__ */ jsx4(
1055
+ "input",
1056
+ {
1057
+ type: "checkbox",
1058
+ "aria-label": `${name} grain`,
1059
+ "data-vector-brushstroke-grain": "",
1060
+ checked: l.brushstroke.grain,
1061
+ onChange: (e) => controller.setBrushstroke(l.index, e.target.checked ? { paper: {}, ...l.brushstroke.seed === void 0 ? { seed: randomVectorBrushstrokeSeed() } : {} } : { paper: null }, { ids })
1062
+ }
1063
+ ),
1064
+ "Grain"
1065
+ ] }),
1052
1066
  /* @__PURE__ */ jsx4("button", { type: "button", className: buttonClass2, title: "Remove", "aria-label": `Remove ${name}`, onClick: () => controller.removePaintLayer("stroke", l.index, { ids }), children: "\xD7" })
1053
1067
  ] }) }, `${l.kind}-${l.index}`);
1054
1068
  if (l.unknownKind)
@@ -1147,7 +1161,7 @@ function VectorAppearancePanel({ controller, className }) {
1147
1161
  children: "+"
1148
1162
  }
1149
1163
  ),
1150
- kind === "stroke" && /* @__PURE__ */ jsx4("button", { type: "button", className: buttonClass2, title: "Add a brushstroke (a natural-media brush along the path)", "aria-label": "Add brushstroke", "data-vector-add-brushstroke": "", disabled: !ids.length, onClick: () => controller.addBrushstroke({ brushId: vectorBrushstrokeBrushes()[0].id }, { ids }), children: "\u270E+" })
1164
+ kind === "stroke" && /* @__PURE__ */ jsx4("button", { type: "button", className: buttonClass2, title: "Add a brushstroke (a natural-media brush along the path)", "aria-label": "Add brushstroke", "data-vector-add-brushstroke": "", disabled: !ids.length, onClick: () => controller.addBrushstroke({ brushId: vectorBrushstrokeBrushes()[0].id, seed: randomVectorBrushstrokeSeed() }, { ids }), children: "\u270E+" })
1151
1165
  ] }),
1152
1166
  [...layers].reverse().map((l) => layerRow(l, layers.length))
1153
1167
  ] });