@pixerate/editor-react 0.172.0 → 0.173.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.
- package/dist/animation-editor/index.cjs +1 -1
- package/dist/animation-editor/index.js +1 -1
- package/dist/{paint-editor → brushes}/BrushLibraryBrowser.d.cts +2 -2
- package/dist/{paint-editor → brushes}/BrushLibraryBrowser.d.ts +2 -2
- package/dist/brushes/index.cjs +102 -0
- package/dist/brushes/index.d.cts +2 -0
- package/dist/brushes/index.d.ts +2 -0
- package/dist/brushes/index.js +10 -0
- package/dist/brushes/useBrushLibrary.d.cts +7 -0
- package/dist/brushes/useBrushLibrary.d.ts +7 -0
- package/dist/canvas/index.cjs +8 -3
- package/dist/canvas/index.js +8 -3
- package/dist/canvas/useCanvasDraw.d.cts +4 -2
- package/dist/canvas/useCanvasDraw.d.ts +4 -2
- package/dist/canvas/useShapeBrushstroke.d.cts +6 -2
- package/dist/canvas/useShapeBrushstroke.d.ts +6 -2
- package/dist/chunk-62FMEDGG.js +54 -0
- package/dist/chunk-PQK2UMAY.js +23 -0
- package/dist/{chunk-2UD3JH4W.js → chunk-UR4KL7WE.js} +29 -1
- package/dist/{chunk-TOYSB4DK.js → chunk-W6UZ7PVT.js} +1 -1
- package/dist/effects/index.cjs +1 -1
- package/dist/effects/index.js +1 -1
- package/dist/image-editor/BrushOptionsBar.d.cts +2 -1
- package/dist/image-editor/BrushOptionsBar.d.ts +2 -1
- package/dist/image-editor/index.cjs +965 -870
- package/dist/image-editor/index.js +4 -2
- package/dist/index.cjs +1485 -1390
- package/dist/index.js +13 -11
- package/dist/paint-editor/index.cjs +18 -3
- package/dist/paint-editor/index.d.cts +1 -1
- package/dist/paint-editor/index.d.ts +1 -1
- package/dist/paint-editor/index.js +326 -359
- package/dist/vector/index.cjs +3 -3
- package/dist/vector/index.js +4 -5
- package/dist/video-editor/index.cjs +1 -1
- package/dist/video-editor/index.js +1 -1
- package/package.json +16 -3
package/dist/vector/index.cjs
CHANGED
|
@@ -1169,7 +1169,7 @@ function VectorAppearancePanel({ controller, className }) {
|
|
|
1169
1169
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "space-y-1 rounded border border-border p-1", "data-vector-layer": `${l.kind}-${l.index}`, "data-vector-brushstroke": "", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
1170
1170
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("input", { type: "checkbox", "aria-label": `${name} visible`, title: "Show", checked: l.visible, onChange: (e) => update(l, { visible: e.target.checked }) }),
|
|
1171
1171
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("input", { type: "color", "aria-label": `${name} colour`, className: "h-7 w-10 cursor-pointer rounded border border-border bg-background", value: l.color ?? "#000000", onChange: (e) => controller.setBrushstroke(l.index, { color: e.target.value }, { ids, merge: true }), onBlur: end }),
|
|
1172
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("select", { "aria-label": `${name} brush`, className: selectClass2, value: l.brushstroke.brushId, onChange: (e) => controller.setBrushstroke(l.index, { brushId: e.target.value }, { ids }), children:
|
|
1172
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("select", { "aria-label": `${name} brush`, className: selectClass2, value: l.brushstroke.brushId, onChange: (e) => controller.setBrushstroke(l.index, { brushId: e.target.value }, { ids }), children: controller.listBrushstrokeBrushes().map((b) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("option", { value: b.id, children: b.name }, b.id)) }),
|
|
1173
1173
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1174
1174
|
"input",
|
|
1175
1175
|
{
|
|
@@ -1298,7 +1298,7 @@ function VectorAppearancePanel({ controller, className }) {
|
|
|
1298
1298
|
children: "+"
|
|
1299
1299
|
}
|
|
1300
1300
|
),
|
|
1301
|
-
kind === "stroke" && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("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:
|
|
1301
|
+
kind === "stroke" && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("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: controller.listBrushstrokeBrushes()[0].id, seed: (0, import_vector5.randomVectorBrushstrokeSeed)() }, { ids }), children: "\u270E+" })
|
|
1302
1302
|
] }),
|
|
1303
1303
|
[...layers].reverse().map((l) => layerRow(l, layers.length))
|
|
1304
1304
|
] });
|
|
@@ -3176,7 +3176,7 @@ function useEffectDescription(provider, effect) {
|
|
|
3176
3176
|
var import_react16 = require("react");
|
|
3177
3177
|
var import_effects = require("@pixerate/editor/effects");
|
|
3178
3178
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
3179
|
-
var LABELS = { motion: "Motion", camera: "Camera" };
|
|
3179
|
+
var LABELS = { motion: "Motion", camera: "Camera", timing: "Timing" };
|
|
3180
3180
|
function EffectThumbnail({ provider, effect, width = 96, height = 54, className = "" }) {
|
|
3181
3181
|
const ref = (0, import_react16.useRef)(null);
|
|
3182
3182
|
const [failed, setFailed] = (0, import_react16.useState)(effect.kind in LABELS);
|
package/dist/vector/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
EffectsBrowser,
|
|
4
4
|
useEffectDescription,
|
|
5
5
|
useEffects
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-W6UZ7PVT.js";
|
|
7
7
|
import "../chunk-5RPB4WGT.js";
|
|
8
8
|
import "../chunk-KIRIU53A.js";
|
|
9
9
|
import "../chunk-3I7FOSLF.js";
|
|
@@ -1054,8 +1054,7 @@ import {
|
|
|
1054
1054
|
VECTOR_FILTER_MENU,
|
|
1055
1055
|
VECTOR_STROKE_ALIGN_LABELS,
|
|
1056
1056
|
getVectorAppearancePanel,
|
|
1057
|
-
randomVectorBrushstrokeSeed
|
|
1058
|
-
vectorBrushstrokeBrushes
|
|
1057
|
+
randomVectorBrushstrokeSeed
|
|
1059
1058
|
} from "@pixerate/editor/vector";
|
|
1060
1059
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1061
1060
|
var buttonClass2 = "inline-flex h-7 min-w-7 items-center justify-center rounded-md border border-border bg-background px-1.5 text-xs font-medium text-foreground hover:bg-muted disabled:cursor-not-allowed disabled:opacity-40";
|
|
@@ -1076,7 +1075,7 @@ function VectorAppearancePanel({ controller, className }) {
|
|
|
1076
1075
|
return /* @__PURE__ */ jsx4("div", { className: "space-y-1 rounded border border-border p-1", "data-vector-layer": `${l.kind}-${l.index}`, "data-vector-brushstroke": "", children: /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-1", children: [
|
|
1077
1076
|
/* @__PURE__ */ jsx4("input", { type: "checkbox", "aria-label": `${name} visible`, title: "Show", checked: l.visible, onChange: (e) => update(l, { visible: e.target.checked }) }),
|
|
1078
1077
|
/* @__PURE__ */ jsx4("input", { type: "color", "aria-label": `${name} colour`, className: "h-7 w-10 cursor-pointer rounded border border-border bg-background", value: l.color ?? "#000000", onChange: (e) => controller.setBrushstroke(l.index, { color: e.target.value }, { ids, merge: true }), onBlur: end }),
|
|
1079
|
-
/* @__PURE__ */ jsx4("select", { "aria-label": `${name} brush`, className: selectClass2, value: l.brushstroke.brushId, onChange: (e) => controller.setBrushstroke(l.index, { brushId: e.target.value }, { ids }), children:
|
|
1078
|
+
/* @__PURE__ */ jsx4("select", { "aria-label": `${name} brush`, className: selectClass2, value: l.brushstroke.brushId, onChange: (e) => controller.setBrushstroke(l.index, { brushId: e.target.value }, { ids }), children: controller.listBrushstrokeBrushes().map((b) => /* @__PURE__ */ jsx4("option", { value: b.id, children: b.name }, b.id)) }),
|
|
1080
1079
|
/* @__PURE__ */ jsx4(
|
|
1081
1080
|
"input",
|
|
1082
1081
|
{
|
|
@@ -1205,7 +1204,7 @@ function VectorAppearancePanel({ controller, className }) {
|
|
|
1205
1204
|
children: "+"
|
|
1206
1205
|
}
|
|
1207
1206
|
),
|
|
1208
|
-
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:
|
|
1207
|
+
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: controller.listBrushstrokeBrushes()[0].id, seed: randomVectorBrushstrokeSeed() }, { ids }), children: "\u270E+" })
|
|
1209
1208
|
] }),
|
|
1210
1209
|
[...layers].reverse().map((l) => layerRow(l, layers.length))
|
|
1211
1210
|
] });
|
|
@@ -811,7 +811,7 @@ function useEffectDescription(provider, effect) {
|
|
|
811
811
|
var import_react9 = require("react");
|
|
812
812
|
var import_effects = require("@pixerate/editor/effects");
|
|
813
813
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
814
|
-
var LABELS2 = { motion: "Motion", camera: "Camera" };
|
|
814
|
+
var LABELS2 = { motion: "Motion", camera: "Camera", timing: "Timing" };
|
|
815
815
|
function EffectThumbnail({ provider, effect, width = 96, height = 54, className = "" }) {
|
|
816
816
|
const ref = (0, import_react9.useRef)(null);
|
|
817
817
|
const [failed, setFailed] = (0, import_react9.useState)(effect.kind in LABELS2);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/editor-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.173.0",
|
|
4
4
|
"description": "React bindings and prompt/rich-text components for @pixerate/editor",
|
|
5
5
|
"author": "Pixerate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -84,6 +84,16 @@
|
|
|
84
84
|
"default": "./dist/paint-editor/index.cjs"
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
|
+
"./brushes": {
|
|
88
|
+
"import": {
|
|
89
|
+
"types": "./dist/brushes/index.d.ts",
|
|
90
|
+
"default": "./dist/brushes/index.js"
|
|
91
|
+
},
|
|
92
|
+
"require": {
|
|
93
|
+
"types": "./dist/brushes/index.d.cts",
|
|
94
|
+
"default": "./dist/brushes/index.cjs"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
87
97
|
"./commands": {
|
|
88
98
|
"import": {
|
|
89
99
|
"types": "./dist/commands/index.d.ts",
|
|
@@ -219,6 +229,9 @@
|
|
|
219
229
|
"paint-editor": [
|
|
220
230
|
"./dist/paint-editor/index.d.ts"
|
|
221
231
|
],
|
|
232
|
+
"brushes": [
|
|
233
|
+
"./dist/brushes/index.d.ts"
|
|
234
|
+
],
|
|
222
235
|
"commands": [
|
|
223
236
|
"./dist/commands/index.d.ts"
|
|
224
237
|
],
|
|
@@ -264,7 +277,7 @@
|
|
|
264
277
|
"dependencies": {},
|
|
265
278
|
"peerDependencies": {
|
|
266
279
|
"@dagrejs/dagre": "^1.1.8",
|
|
267
|
-
"@pixerate/editor": ">=0.
|
|
280
|
+
"@pixerate/editor": ">=0.255.0 <1.0.0-0",
|
|
268
281
|
"@tiptap/core": "^2.27.3",
|
|
269
282
|
"@tiptap/extension-bubble-menu": "^2.27.3",
|
|
270
283
|
"@tiptap/extension-placeholder": "^2.27.3",
|
|
@@ -315,7 +328,7 @@
|
|
|
315
328
|
"tsup": "^9.0.0",
|
|
316
329
|
"typescript": "^5.7.3",
|
|
317
330
|
"vitest": "^5.0.5",
|
|
318
|
-
"@pixerate/editor": "0.
|
|
331
|
+
"@pixerate/editor": "0.255.0"
|
|
319
332
|
},
|
|
320
333
|
"scripts": {
|
|
321
334
|
"build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",
|