@pixerate/editor-react 0.204.0 → 0.205.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.
@@ -2786,10 +2786,11 @@ function VectorPerspectivePanel({ controller, className }) {
2786
2786
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: `space-y-2 ${className ?? ""}`, "data-vector-perspective-panel": "", "aria-label": "Perspective", children: [
2787
2787
  /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex flex-wrap items-center gap-1", children: [
2788
2788
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "w-16 text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: "Perspective" }),
2789
- [1, 2, 3].map((n) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("button", { type: "button", className: buttonClass14, "aria-pressed": grid?.vanishingPoints.length === n, "data-vector-perspective-preset": n, title: `A ${n}-point perspective grid for the page`, onClick: () => add(n), children: [
2789
+ [1, 2, 3].map((n) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("button", { type: "button", className: buttonClass14, "aria-pressed": !grid?.isometric && grid?.vanishingPoints.length === n, "data-vector-perspective-preset": n, title: `A ${n}-point perspective grid for the page`, onClick: () => add(n), children: [
2790
2790
  n,
2791
2791
  "-pt"
2792
- ] }, n))
2792
+ ] }, n)),
2793
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("button", { type: "button", className: buttonClass14, "aria-pressed": !!grid?.isometric, "data-vector-perspective-preset": "isometric", title: "An isometric grid for the page: parallel lines stay parallel", onClick: () => controller.setPerspective((0, import_vector17.vectorIsometricPerspectivePreset)(state.document.width, state.document.height)), children: "Iso" })
2793
2794
  ] }),
2794
2795
  grid && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex flex-wrap items-center gap-1", children: [
2795
2796
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "w-16" }),
@@ -2318,7 +2318,7 @@ function VectorSymmetryPanel({ controller, className }) {
2318
2318
 
2319
2319
  // src/vector/VectorPerspectivePanel.tsx
2320
2320
  import React10 from "react";
2321
- import { vectorPerspectivePlanes, vectorPerspectivePreset } from "@pixerate/editor/vector";
2321
+ import { vectorIsometricPerspectivePreset, vectorPerspectivePlanes, vectorPerspectivePreset } from "@pixerate/editor/vector";
2322
2322
  import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
2323
2323
  var buttonClass14 = "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 aria-pressed:bg-primary aria-pressed:text-primary-foreground";
2324
2324
  var selectClass11 = "h-7 min-w-0 flex-1 rounded border border-border bg-background px-1 text-xs";
@@ -2333,10 +2333,11 @@ function VectorPerspectivePanel({ controller, className }) {
2333
2333
  return /* @__PURE__ */ jsxs16("div", { className: `space-y-2 ${className ?? ""}`, "data-vector-perspective-panel": "", "aria-label": "Perspective", children: [
2334
2334
  /* @__PURE__ */ jsxs16("div", { className: "flex flex-wrap items-center gap-1", children: [
2335
2335
  /* @__PURE__ */ jsx16("span", { className: "w-16 text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: "Perspective" }),
2336
- [1, 2, 3].map((n) => /* @__PURE__ */ jsxs16("button", { type: "button", className: buttonClass14, "aria-pressed": grid?.vanishingPoints.length === n, "data-vector-perspective-preset": n, title: `A ${n}-point perspective grid for the page`, onClick: () => add(n), children: [
2336
+ [1, 2, 3].map((n) => /* @__PURE__ */ jsxs16("button", { type: "button", className: buttonClass14, "aria-pressed": !grid?.isometric && grid?.vanishingPoints.length === n, "data-vector-perspective-preset": n, title: `A ${n}-point perspective grid for the page`, onClick: () => add(n), children: [
2337
2337
  n,
2338
2338
  "-pt"
2339
- ] }, n))
2339
+ ] }, n)),
2340
+ /* @__PURE__ */ jsx16("button", { type: "button", className: buttonClass14, "aria-pressed": !!grid?.isometric, "data-vector-perspective-preset": "isometric", title: "An isometric grid for the page: parallel lines stay parallel", onClick: () => controller.setPerspective(vectorIsometricPerspectivePreset(state.document.width, state.document.height)), children: "Iso" })
2340
2341
  ] }),
2341
2342
  grid && /* @__PURE__ */ jsxs16("div", { className: "flex flex-wrap items-center gap-1", children: [
2342
2343
  /* @__PURE__ */ jsx16("span", { className: "w-16" }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor-react",
3
- "version": "0.204.0",
3
+ "version": "0.205.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.302.0 <1.0.0-0",
286
+ "@pixerate/editor": ">=0.312.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.302.0"
337
+ "@pixerate/editor": "0.312.0"
338
338
  },
339
339
  "scripts": {
340
340
  "build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",