@pixerate/editor-react 0.205.0 → 0.206.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.
@@ -2124,6 +2124,7 @@ var PaintLayersPanel = ({ controller, className }) => {
2124
2124
  const [error, attempt] = useAttempt();
2125
2125
  const [renaming, setRenaming] = (0, import_react17.useState)(null);
2126
2126
  const layers = controller.listLayers().filter((l) => !l.temporary);
2127
+ const scheme = new Map(controller.getState().colorSchemeView.layers.map((v) => [v.layerId, v]));
2127
2128
  const active = layers.find((l) => l.active) ?? null;
2128
2129
  const light = active?.type === "pixel" ? controller.lightOf(active.id) : null;
2129
2130
  const move = (delta) => {
@@ -2190,6 +2191,7 @@ var PaintLayersPanel = ({ controller, className }) => {
2190
2191
  ] }),
2191
2192
  l.name
2192
2193
  ] }),
2194
+ scheme.get(l.id)?.view === "kept" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { "aria-label": "Keeps its colours", "data-testid": "paint-layer-scheme-kept", title: scheme.get(l.id).reason, children: "\u25D0" }) : scheme.get(l.id)?.state === "building" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { "aria-label": "Updating for the colour scheme", "data-testid": "paint-layer-scheme-building", title: "Repainting this layer's light / dark paint for the colour scheme", children: "\u27F3" }) : null,
2193
2195
  l.locks.pixels || l.locks.all ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { title: "Locked", children: "\u{1F512}" }) : null
2194
2196
  ]
2195
2197
  },
@@ -1417,6 +1417,7 @@ var PaintLayersPanel = ({ controller, className }) => {
1417
1417
  const [error, attempt] = useAttempt();
1418
1418
  const [renaming, setRenaming] = useState7(null);
1419
1419
  const layers = controller.listLayers().filter((l) => !l.temporary);
1420
+ const scheme = new Map(controller.getState().colorSchemeView.layers.map((v) => [v.layerId, v]));
1420
1421
  const active = layers.find((l) => l.active) ?? null;
1421
1422
  const light = active?.type === "pixel" ? controller.lightOf(active.id) : null;
1422
1423
  const move = (delta) => {
@@ -1483,6 +1484,7 @@ var PaintLayersPanel = ({ controller, className }) => {
1483
1484
  ] }),
1484
1485
  l.name
1485
1486
  ] }),
1487
+ scheme.get(l.id)?.view === "kept" ? /* @__PURE__ */ jsx12("span", { "aria-label": "Keeps its colours", "data-testid": "paint-layer-scheme-kept", title: scheme.get(l.id).reason, children: "\u25D0" }) : scheme.get(l.id)?.state === "building" ? /* @__PURE__ */ jsx12("span", { "aria-label": "Updating for the colour scheme", "data-testid": "paint-layer-scheme-building", title: "Repainting this layer's light / dark paint for the colour scheme", children: "\u27F3" }) : null,
1486
1488
  l.locks.pixels || l.locks.all ? /* @__PURE__ */ jsx12("span", { title: "Locked", children: "\u{1F512}" }) : null
1487
1489
  ]
1488
1490
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor-react",
3
- "version": "0.205.0",
3
+ "version": "0.206.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.312.0 <1.0.0-0",
286
+ "@pixerate/editor": ">=0.316.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.312.0"
337
+ "@pixerate/editor": "0.316.0"
338
338
  },
339
339
  "scripts": {
340
340
  "build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",