@pixerate/editor-react 0.165.0 → 0.166.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.
|
@@ -6,8 +6,8 @@ export interface PaperPanelProps {
|
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* The paper library by family (each a generated grain preview) and the current paper's colour,
|
|
9
|
-
* grain depth, scale, shading and contrast, the wet-media properties
|
|
10
|
-
* change one undo step; sliders commit on release); then the light for thick paint and metallic
|
|
9
|
+
* grain depth, scale, shading and contrast, the wet-media properties, metallic sheen and backlight
|
|
10
|
+
* with its colour (each change one undo step; sliders commit on release); then the light for thick paint and metallic
|
|
11
11
|
* paper (not an undo step) and Flatten relief for the active layer.
|
|
12
12
|
*/
|
|
13
13
|
export declare const PaperPanel: React.FC<PaperPanelProps>;
|
|
@@ -6,8 +6,8 @@ export interface PaperPanelProps {
|
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* The paper library by family (each a generated grain preview) and the current paper's colour,
|
|
9
|
-
* grain depth, scale, shading and contrast, the wet-media properties
|
|
10
|
-
* change one undo step; sliders commit on release); then the light for thick paint and metallic
|
|
9
|
+
* grain depth, scale, shading and contrast, the wet-media properties, metallic sheen and backlight
|
|
10
|
+
* with its colour (each change one undo step; sliders commit on release); then the light for thick paint and metallic
|
|
11
11
|
* paper (not an undo step) and Flatten relief for the active layer.
|
|
12
12
|
*/
|
|
13
13
|
export declare const PaperPanel: React.FC<PaperPanelProps>;
|
|
@@ -926,6 +926,10 @@ var PaperPanel = ({ controller, className }) => {
|
|
|
926
926
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CommitColorInput, { label: "Paper colour", value: paper.color, onCommit: (v) => attempt(() => controller.setPaper({ color: v })), className: "h-6 w-10 rounded bg-transparent" })
|
|
927
927
|
] }),
|
|
928
928
|
import_paint_editor7.PAPER_SLIDERS.map((c) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PaintSlider, { control: c, value: (0, import_paint_editor7.readPath)(paper, c.path), onCommit: (v) => attempt(() => controller.setPaper((0, import_paint_editor7.patchPath)(paper, c.path, v))) }, c.path)),
|
|
929
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "flex items-center justify-between", children: [
|
|
930
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-slate-400", children: "Backlight colour" }),
|
|
931
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CommitColorInput, { label: "Backlight colour", value: paper.backlightColor ?? import_paint_editor7.DEFAULT_BACKLIGHT_COLOR, onCommit: (v) => attempt(() => controller.setPaper({ backlightColor: v })), className: "h-6 w-10 rounded bg-transparent" })
|
|
932
|
+
] }),
|
|
929
933
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "flex items-center gap-2", children: [
|
|
930
934
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { type: "checkbox", checked: paper.tiling === "mirror", onChange: (e) => attempt(() => controller.setPaper({ tiling: e.target.checked ? "mirror" : "repeat" })) }),
|
|
931
935
|
" Mirror tiling"
|
|
@@ -767,7 +767,7 @@ var BrushPanel = ({ controller, thumbnailWidth = 112, thumbnailHeight = 32, clas
|
|
|
767
767
|
|
|
768
768
|
// src/paint-editor/PaperPanel.tsx
|
|
769
769
|
import { useMemo as useMemo4 } from "react";
|
|
770
|
-
import { LIGHT_SLIDERS, PAPER_FAMILIES, PAPER_LIBRARY, PAPER_SLIDERS, patchPath as patchPath2, readPath as readPath2, renderPaper } from "@pixerate/editor/paint-editor";
|
|
770
|
+
import { DEFAULT_BACKLIGHT_COLOR, LIGHT_SLIDERS, PAPER_FAMILIES, PAPER_LIBRARY, PAPER_SLIDERS, patchPath as patchPath2, readPath as readPath2, renderPaper } from "@pixerate/editor/paint-editor";
|
|
771
771
|
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
772
772
|
var SWATCH = { x: 0, y: 0, width: 64, height: 40 };
|
|
773
773
|
var PaperPanel = ({ controller, className }) => {
|
|
@@ -798,6 +798,10 @@ var PaperPanel = ({ controller, className }) => {
|
|
|
798
798
|
/* @__PURE__ */ jsx6(CommitColorInput, { label: "Paper colour", value: paper.color, onCommit: (v) => attempt(() => controller.setPaper({ color: v })), className: "h-6 w-10 rounded bg-transparent" })
|
|
799
799
|
] }),
|
|
800
800
|
PAPER_SLIDERS.map((c) => /* @__PURE__ */ jsx6(PaintSlider, { control: c, value: readPath2(paper, c.path), onCommit: (v) => attempt(() => controller.setPaper(patchPath2(paper, c.path, v))) }, c.path)),
|
|
801
|
+
/* @__PURE__ */ jsxs5("label", { className: "flex items-center justify-between", children: [
|
|
802
|
+
/* @__PURE__ */ jsx6("span", { className: "text-slate-400", children: "Backlight colour" }),
|
|
803
|
+
/* @__PURE__ */ jsx6(CommitColorInput, { label: "Backlight colour", value: paper.backlightColor ?? DEFAULT_BACKLIGHT_COLOR, onCommit: (v) => attempt(() => controller.setPaper({ backlightColor: v })), className: "h-6 w-10 rounded bg-transparent" })
|
|
804
|
+
] }),
|
|
801
805
|
/* @__PURE__ */ jsxs5("label", { className: "flex items-center gap-2", children: [
|
|
802
806
|
/* @__PURE__ */ jsx6("input", { type: "checkbox", checked: paper.tiling === "mirror", onChange: (e) => attempt(() => controller.setPaper({ tiling: e.target.checked ? "mirror" : "repeat" })) }),
|
|
803
807
|
" Mirror tiling"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/editor-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.166.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.
|
|
257
|
+
"@pixerate/editor": ">=0.244.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.
|
|
308
|
+
"@pixerate/editor": "0.244.0"
|
|
309
309
|
},
|
|
310
310
|
"scripts": {
|
|
311
311
|
"build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",
|