@pixerate/editor-react 0.200.0 → 0.201.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.
@@ -1178,10 +1178,12 @@ var BrushLibraryBrowser = ({ entries, activeId, onSelect, profile, thumbnail, th
1178
1178
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: `flex flex-col gap-1 ${className ?? ""}`, "data-testid": "brush-library", children: [
1179
1179
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("input", { type: "search", value: text, placeholder: "Find a brush", "aria-label": "Find a brush", onChange: (e) => setText(e.target.value), className: "rounded bg-slate-800 px-1.5 py-0.5" }),
1180
1180
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col gap-1.5", role: "listbox", "aria-label": "Brushes", children: [
1181
- groups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { role: "group", "aria-label": g.title, className: "flex flex-col gap-0.5", children: [
1182
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-[10px] uppercase tracking-wide text-slate-500", children: g.title }),
1183
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "grid grid-cols-2 gap-1", children: g.varieties.flatMap(
1184
- (v) => v.entries.map((e) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1181
+ groups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { role: "group", "aria-label": g.title, "data-group": g.id, className: `flex flex-col gap-0.5 ${g.id === "specialty" ? "mt-1 border-t border-indigo-500/40 pt-1" : ""}`, children: [
1182
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: `text-[10px] uppercase tracking-wide ${g.id === "specialty" ? "text-indigo-300" : "text-slate-500"}`, children: g.title }),
1183
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "grid grid-cols-2 gap-1", children: g.varieties.flatMap((v) => [
1184
+ // Specialty paint is listed by kind (Ferrofluid, UV-fluorescent…).
1185
+ ...g.id === "specialty" ? [/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "col-span-2 text-[10px] text-slate-400", children: v.title }, `kind-${v.variety}`)] : [],
1186
+ ...v.entries.map((e) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1185
1187
  "button",
1186
1188
  {
1187
1189
  type: "button",
@@ -1197,7 +1199,7 @@ var BrushLibraryBrowser = ({ entries, activeId, onSelect, profile, thumbnail, th
1197
1199
  },
1198
1200
  e.brush.id
1199
1201
  ))
1200
- ) })
1202
+ ]) })
1201
1203
  ] }, g.id)),
1202
1204
  !groups.length && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-slate-500", children: "No brush matches." })
1203
1205
  ] })
@@ -1310,6 +1312,7 @@ var BrushEditor = ({ brush, profile = import_brushes2.PAINT_PROFILE, onChange, p
1310
1312
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "font-medium text-slate-300", children: s.title }),
1311
1313
  s.controls.map((c) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react9.default.Fragment, { children: [
1312
1314
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(EditorControl, { control: c, onSet: set }),
1315
+ c.hint && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-[10px] leading-snug text-slate-400", "data-hint": c.path, children: c.hint }),
1313
1316
  addSource && (c.path === "tip.stamps" || c.path === "tip.grain.source") && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AddImage, { label: c.path === "tip.stamps" ? "Add image tip\u2026" : "Add grain image\u2026", onFile: (f) => addSource(f, c.path === "tip.stamps" ? "tip" : "grain") })
1314
1317
  ] }, c.path)),
1315
1318
  renderExtra?.(s.id)
@@ -15,10 +15,10 @@ import {
15
15
  import {
16
16
  BrushLibraryEditor,
17
17
  useBrushLibrary
18
- } from "../chunk-2QXGKOVK.js";
18
+ } from "../chunk-QYARM2FN.js";
19
19
  import {
20
20
  BrushLibraryBrowser
21
- } from "../chunk-GUBRH2OO.js";
21
+ } from "../chunk-IYYUBI3M.js";
22
22
 
23
23
  // src/vector/useVectorEditor.ts
24
24
  import { useEffect, useMemo, useRef, useSyncExternalStore } from "react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor-react",
3
- "version": "0.200.0",
3
+ "version": "0.201.0",
4
4
  "description": "React bindings and prompt/rich-text components for @pixerate/editor",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -283,7 +283,7 @@
283
283
  "dependencies": {},
284
284
  "peerDependencies": {
285
285
  "@dagrejs/dagre": "^1.1.8",
286
- "@pixerate/editor": ">=0.291.0 <1.0.0-0",
286
+ "@pixerate/editor": ">=0.293.0 <1.0.0-0",
287
287
  "@tiptap/core": "^2.27.3",
288
288
  "@tiptap/extension-bubble-menu": "^2.27.3",
289
289
  "@tiptap/extension-placeholder": "^2.27.3",
@@ -334,7 +334,7 @@
334
334
  "tsup": "^9.0.0",
335
335
  "typescript": "^5.7.3",
336
336
  "vitest": "^5.1.0",
337
- "@pixerate/editor": "0.291.0"
337
+ "@pixerate/editor": "0.293.0"
338
338
  },
339
339
  "scripts": {
340
340
  "build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",