@zonetrix/viewer 2.1.0 → 2.1.1

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.
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { SeatMapConfig, SeatData, ColorSettings } from '../types';
3
-
4
3
  export interface SeatMapViewerProps {
5
4
  config?: SeatMapConfig;
6
5
  configUrl?: string;
@@ -1,5 +1,4 @@
1
1
  import { SeatMapConfig } from '../types';
2
-
3
2
  interface UseConfigFetcherResult {
4
3
  config: SeatMapConfig | null;
5
4
  loading: boolean;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),t=require("react"),h=require("react-konva");function $(i){const[f,n]=t.useState(null),[v,x]=t.useState(!1),[p,d]=t.useState(null),u=async()=>{if(i){x(!0),d(null);try{const c=await fetch(i);if(!c.ok)throw new Error(`Failed to fetch config: ${c.statusText}`);const l=await c.json();n(l)}catch(c){const l=c instanceof Error?c:new Error("Unknown error occurred");d(l),console.error("Failed to fetch seat map config:",l)}finally{x(!1)}}};return t.useEffect(()=>{u()},[i]),{config:f,loading:v,error:p,refetch:u}}const z={canvasBackground:"#1a1a1a",stageColor:"#808080",seatAvailable:"#2C2B30",seatReserved:"#FCEA00",seatSelected:"#3A7DE5",seatUnavailable:"#6b7280",seatHidden:"#4a4a4a",gridLines:"#404040",currency:"KD"},V=t.memo(({seat:i,state:f,colors:n,onClick:v})=>{const d={available:n.seatAvailable,reserved:n.seatReserved,selected:n.seatSelected,unavailable:n.seatUnavailable,hidden:n.seatHidden}[f],u=f==="available"||f==="selected",c=t.useCallback(()=>{u&&v(i)},[i,v,u]),l={x:i.position.x,y:i.position.y,fill:d,stroke:"#ffffff",strokeWidth:1,onClick:c,onTap:c};return i.shape==="circle"?s.jsx(h.Circle,{...l,radius:12}):s.jsx(h.Rect,{...l,width:24,height:24,offsetX:12,offsetY:12,cornerRadius:i.shape==="square"?0:4})});V.displayName="ViewerSeat";const q=t.memo(({stage:i,stageColor:f})=>s.jsxs(h.Group,{x:i.position.x,y:i.position.y,children:[s.jsx(h.Rect,{width:i.config.width,height:i.config.height,fill:f+"80",stroke:"#ffffff",strokeWidth:2,cornerRadius:10}),s.jsx(h.Text,{text:i.config.label,x:0,y:0,width:i.config.width,height:i.config.height,fontSize:24,fontStyle:"bold",fill:"#ffffff",align:"center",verticalAlign:"middle"})]}));q.displayName="ViewerStage";const X=({config:i,configUrl:f,floorId:n,onFloorChange:v,reservedSeats:x=[],unavailableSeats:p=[],onSeatSelect:d,onSeatDeselect:u,onSelectionChange:c,colorOverrides:l,showTooltip:G=!0,zoomEnabled:A=!0,className:k="",onConfigLoad:N,onError:R})=>{const L=t.useRef(null),[S,D]=t.useState(new Set),[M,O]=t.useState(1),[y,W]=t.useState({x:0,y:0}),{config:_,loading:U,error:b}=$(f),r=i||_,E=t.useMemo(()=>r?{...r.colors,...l}:{...z,...l},[r,l]),F=t.useMemo(()=>{if(!r)return[];let e=r.seats.filter(a=>a.state!=="hidden");return n&&(e=e.filter(a=>a.floorId===n||!a.floorId&&n==="floor_default")),e},[r,n]),Y=t.useMemo(()=>r?.stages?n?r.stages.filter(e=>e.floorId===n||!e.floorId&&n==="floor_default"):r.stages:[],[r,n]),w=t.useMemo(()=>{const e=new Set(x),a=new Set(p);return{reserved:e,unavailable:a}},[x,p]),T=t.useCallback(e=>{const a=e.id,o=e.seatNumber||"";return w.unavailable.has(a)||w.unavailable.has(o)?"unavailable":w.reserved.has(a)||w.reserved.has(o)?"reserved":S.has(a)?"selected":e.state},[w,S]);t.useEffect(()=>{r&&N&&N(r)},[r,N]),t.useEffect(()=>{b&&R&&R(b)},[b,R]);const B=t.useCallback(e=>{const a=T(e);if(a!=="available"&&a!=="selected")return;const o=S.has(e.id);D(g=>{const m=new Set(g);return o?m.delete(e.id):m.add(e.id),m}),o?u?.(e):(d?.(e),d||console.log("Seat selected:",e))},[T,S,d,u]),j=t.useMemo(()=>r?F.filter(e=>S.has(e.id)):[],[F,S]);t.useEffect(()=>{c?.(j)},[j,c]);const H=t.useCallback(e=>{if(!A)return;e.evt.preventDefault();const a=L.current;if(!a)return;const o=M,g=a.getPointerPosition();if(!g)return;const m={x:(g.x-y.x)/o,y:(g.y-y.y)/o},K=e.evt.deltaY>0?-1:1,P=1.05;let C=K>0?o*P:o/P;C=Math.max(.5,Math.min(5,C)),O(C),W({x:g.x-m.x*C,y:g.y-m.y*C})},[A,M,y]);return U?s.jsx("div",{className:`flex items-center justify-center h-full ${k}`,children:s.jsx("p",{children:"Loading seat map..."})}):b?s.jsx("div",{className:`flex items-center justify-center h-full ${k}`,children:s.jsxs("p",{className:"text-red-500",children:["Error loading seat map: ",b.message]})}):r?s.jsxs("div",{className:`relative ${k}`,children:[s.jsxs(h.Stage,{ref:L,width:r.canvas.width,height:r.canvas.height,scaleX:M,scaleY:M,x:y.x,y:y.y,onWheel:H,style:{backgroundColor:r.canvas.backgroundColor},children:[s.jsx(h.Layer,{listening:!1,children:Y.map(e=>s.jsx(q,{stage:e,stageColor:E.stageColor},e.id))}),s.jsx(h.Layer,{children:F.map(e=>s.jsx(V,{seat:e,state:T(e),colors:E,onClick:B},e.id))})]}),j.length>0&&s.jsxs("div",{className:"absolute top-4 right-4 bg-white dark:bg-gray-800 p-4 rounded shadow-lg",children:[s.jsxs("h3",{className:"font-semibold mb-2",children:["Selected Seats (",j.length,")"]}),s.jsx("div",{className:"max-h-48 overflow-y-auto space-y-1",children:j.map(e=>s.jsxs("div",{className:"text-sm",children:[e.seatNumber,e.price&&` - ${E.currency} ${e.price.toFixed(2)}`]},e.id))})]})]}):s.jsx("div",{className:`flex items-center justify-center h-full ${k}`,children:s.jsx("p",{children:"No configuration provided"})})};exports.DEFAULT_COLORS=z;exports.SeatMapViewer=X;exports.useConfigFetcher=$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),t=require("react"),h=require("react-konva");function $(i){const[f,n]=t.useState(null),[v,x]=t.useState(!1),[p,d]=t.useState(null),u=async()=>{if(i){x(!0),d(null);try{const o=await fetch(i);if(!o.ok)throw new Error(`Failed to fetch config: ${o.statusText}`);const c=await o.json();n(c)}catch(o){const c=o instanceof Error?o:new Error("Unknown error occurred");d(c),console.error("Failed to fetch seat map config:",c)}finally{x(!1)}}};return t.useEffect(()=>{u()},[i]),{config:f,loading:v,error:p,refetch:u}}const z={canvasBackground:"#1a1a1a",stageColor:"#808080",seatAvailable:"#2C2B30",seatReserved:"#FCEA00",seatSelected:"#3A7DE5",seatUnavailable:"#6b7280",seatHidden:"#4a4a4a",gridLines:"#404040",currency:"KD"},V=t.memo(({seat:i,state:f,colors:n,onClick:v})=>{const d={available:n.seatAvailable,reserved:n.seatReserved,selected:n.seatSelected,unavailable:n.seatUnavailable,hidden:n.seatHidden}[f],u=f==="available"||f==="selected",o=t.useCallback(()=>{u&&v(i)},[i,v,u]),c={x:i.position.x,y:i.position.y,fill:d,stroke:"#ffffff",strokeWidth:1,onClick:o,onTap:o};return i.shape==="circle"?s.jsx(h.Circle,{...c,radius:12}):s.jsx(h.Rect,{...c,width:24,height:24,offsetX:12,offsetY:12,cornerRadius:i.shape==="square"?0:4})});V.displayName="ViewerSeat";const _=t.memo(({stage:i,stageColor:f})=>s.jsxs(h.Group,{x:i.position.x,y:i.position.y,children:[s.jsx(h.Rect,{width:i.config.width,height:i.config.height,fill:f+"80",stroke:"#ffffff",strokeWidth:2,cornerRadius:10}),s.jsx(h.Text,{text:i.config.label,x:0,y:0,width:i.config.width,height:i.config.height,fontSize:24,fontStyle:"bold",fill:"#ffffff",align:"center",verticalAlign:"middle"})]}));_.displayName="ViewerStage";const X=({config:i,configUrl:f,floorId:n,onFloorChange:v,reservedSeats:x=[],unavailableSeats:p=[],onSeatSelect:d,onSeatDeselect:u,onSelectionChange:o,colorOverrides:c,showTooltip:G=!0,zoomEnabled:A=!0,className:k="",onConfigLoad:N,onError:R})=>{const L=t.useRef(null),[S,q]=t.useState(new Set),[M,D]=t.useState(1),[y,O]=t.useState({x:0,y:0}),{config:W,loading:U,error:b}=$(f),r=i||W,E=t.useMemo(()=>r?{...r.colors,...c}:{...z,...c},[r,c]),F=t.useMemo(()=>{if(!r)return[];let e=r.seats.filter(a=>a.state!=="hidden");return n&&(e=e.filter(a=>a.floorId===n||!a.floorId&&n==="floor_default")),e},[r,n]),Y=t.useMemo(()=>r?.stages?n?r.stages.filter(e=>e.floorId===n||!e.floorId&&n==="floor_default"):r.stages:[],[r,n]),w=t.useMemo(()=>{const e=new Set(x),a=new Set(p);return{reserved:e,unavailable:a}},[x,p]),T=t.useCallback(e=>{const a=e.id,l=e.seatNumber||"";return w.unavailable.has(a)||w.unavailable.has(l)?"unavailable":w.reserved.has(a)||w.reserved.has(l)?"reserved":S.has(a)?"selected":e.state},[w,S]);t.useEffect(()=>{r&&N&&N(r)},[r,N]),t.useEffect(()=>{b&&R&&R(b)},[b,R]);const B=t.useCallback(e=>{const a=T(e);if(a!=="available"&&a!=="selected")return;const l=S.has(e.id);q(g=>{const m=new Set(g);return l?m.delete(e.id):m.add(e.id),m}),l?u?.(e):(d?.(e),d||console.log("Seat selected:",e))},[T,S,d,u]),j=t.useMemo(()=>r?F.filter(e=>S.has(e.id)):[],[F,S]);t.useEffect(()=>{o?.(j)},[j,o]);const H=t.useCallback(e=>{if(!A)return;e.evt.preventDefault();const a=L.current;if(!a)return;const l=M,g=a.getPointerPosition();if(!g)return;const m={x:(g.x-y.x)/l,y:(g.y-y.y)/l},K=e.evt.deltaY>0?-1:1,P=1.05;let C=K>0?l*P:l/P;C=Math.max(.5,Math.min(5,C)),D(C),O({x:g.x-m.x*C,y:g.y-m.y*C})},[A,M,y]);return U?s.jsx("div",{className:`flex items-center justify-center h-full ${k}`,children:s.jsx("p",{children:"Loading seat map..."})}):b?s.jsx("div",{className:`flex items-center justify-center h-full ${k}`,children:s.jsxs("p",{className:"text-red-500",children:["Error loading seat map: ",b.message]})}):r?s.jsxs("div",{className:`relative ${k}`,children:[s.jsxs(h.Stage,{ref:L,width:r.canvas.width,height:r.canvas.height,scaleX:M,scaleY:M,x:y.x,y:y.y,onWheel:H,style:{backgroundColor:r.canvas.backgroundColor},children:[s.jsx(h.Layer,{listening:!1,children:Y.map(e=>s.jsx(_,{stage:e,stageColor:E.stageColor},e.id))}),s.jsx(h.Layer,{children:F.map(e=>s.jsx(V,{seat:e,state:T(e),colors:E,onClick:B},e.id))})]}),j.length>0&&s.jsxs("div",{className:"absolute top-4 right-4 bg-white dark:bg-gray-800 p-4 rounded shadow-lg",children:[s.jsxs("h3",{className:"font-semibold mb-2",children:["Selected Seats (",j.length,")"]}),s.jsx("div",{className:"max-h-48 overflow-y-auto space-y-1",children:j.map(e=>s.jsxs("div",{className:"text-sm",children:[e.seatNumber,e.price&&` - ${E.currency} ${e.price.toFixed(2)}`]},e.id))})]})]}):s.jsx("div",{className:`flex items-center justify-center h-full ${k}`,children:s.jsx("p",{children:"No configuration provided"})})};exports.DEFAULT_COLORS=z;exports.SeatMapViewer=X;exports.useConfigFetcher=$;
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as s, jsxs as u } from "react/jsx-runtime";
2
- import { useState as v, useEffect as $, useRef as Q, useMemo as N, useCallback as j, memo as D } from "react";
3
- import { Stage as Z, Layer as W, Group as ee, Rect as Y, Text as te, Circle as ie } from "react-konva";
2
+ import { useState as v, useEffect as T, useRef as Q, useMemo as N, useCallback as $, memo as W } from "react";
3
+ import { Stage as Z, Layer as L, Group as ee, Rect as D, Text as te, Circle as ie } from "react-konva";
4
4
  function re(t) {
5
5
  const [c, r] = v(null), [S, g] = v(!1), [y, d] = v(null), f = async () => {
6
6
  if (t) {
@@ -19,7 +19,7 @@ function re(t) {
19
19
  }
20
20
  }
21
21
  };
22
- return $(() => {
22
+ return T(() => {
23
23
  f();
24
24
  }, [t]), {
25
25
  config: c,
@@ -38,7 +38,7 @@ const ne = {
38
38
  seatHidden: "#4a4a4a",
39
39
  gridLines: "#404040",
40
40
  currency: "KD"
41
- }, _ = D(({ seat: t, state: c, colors: r, onClick: S }) => {
41
+ }, Y = W(({ seat: t, state: c, colors: r, onClick: S }) => {
42
42
  const d = {
43
43
  available: r.seatAvailable,
44
44
  reserved: r.seatReserved,
@@ -46,7 +46,7 @@ const ne = {
46
46
  unavailable: r.seatUnavailable,
47
47
  hidden: r.seatHidden
48
48
  // Hidden seats are filtered out, but included for type safety
49
- }[c], f = c === "available" || c === "selected", a = j(() => {
49
+ }[c], f = c === "available" || c === "selected", a = $(() => {
50
50
  f && S(t);
51
51
  }, [t, S, f]), o = {
52
52
  x: t.position.x,
@@ -64,7 +64,7 @@ const ne = {
64
64
  radius: 12
65
65
  }
66
66
  ) : /* @__PURE__ */ s(
67
- Y,
67
+ D,
68
68
  {
69
69
  ...o,
70
70
  width: 24,
@@ -75,10 +75,10 @@ const ne = {
75
75
  }
76
76
  );
77
77
  });
78
- _.displayName = "ViewerSeat";
79
- const B = D(({ stage: t, stageColor: c }) => /* @__PURE__ */ u(ee, { x: t.position.x, y: t.position.y, children: [
78
+ Y.displayName = "ViewerSeat";
79
+ const B = W(({ stage: t, stageColor: c }) => /* @__PURE__ */ u(ee, { x: t.position.x, y: t.position.y, children: [
80
80
  /* @__PURE__ */ s(
81
- Y,
81
+ D,
82
82
  {
83
83
  width: t.config.width,
84
84
  height: t.config.height,
@@ -117,15 +117,15 @@ const ce = ({
117
117
  onSelectionChange: a,
118
118
  colorOverrides: o,
119
119
  showTooltip: se = !0,
120
- zoomEnabled: T = !0,
121
- className: R = "",
122
- onConfigLoad: z,
123
- onError: A
120
+ zoomEnabled: P = !0,
121
+ className: F = "",
122
+ onConfigLoad: j,
123
+ onError: z
124
124
  }) => {
125
- const V = Q(null), [m, H] = v(/* @__PURE__ */ new Set()), [F, U] = v(1), [w, X] = v({ x: 0, y: 0 }), { config: q, loading: G, error: x } = re(c), i = t || q, E = N(
125
+ const V = Q(null), [m, H] = v(/* @__PURE__ */ new Set()), [R, U] = v(1), [w, X] = v({ x: 0, y: 0 }), { config: q, loading: G, error: x } = re(c), i = t || q, A = N(
126
126
  () => i ? { ...i.colors, ...o } : { ...ne, ...o },
127
127
  [i, o]
128
- ), M = N(() => {
128
+ ), E = N(() => {
129
129
  if (!i) return [];
130
130
  let e = i.seats.filter((n) => n.state !== "hidden");
131
131
  return r && (e = e.filter(
@@ -136,17 +136,17 @@ const ce = ({
136
136
  ) : i.stages : [], [i, r]), b = N(() => {
137
137
  const e = new Set(g), n = new Set(y);
138
138
  return { reserved: e, unavailable: n };
139
- }, [g, y]), P = j((e) => {
139
+ }, [g, y]), M = $((e) => {
140
140
  const n = e.id, l = e.seatNumber || "";
141
141
  return b.unavailable.has(n) || b.unavailable.has(l) ? "unavailable" : b.reserved.has(n) || b.reserved.has(l) ? "reserved" : m.has(n) ? "selected" : e.state;
142
142
  }, [b, m]);
143
- $(() => {
144
- i && z && z(i);
145
- }, [i, z]), $(() => {
146
- x && A && A(x);
147
- }, [x, A]);
148
- const O = j((e) => {
149
- const n = P(e);
143
+ T(() => {
144
+ i && j && j(i);
145
+ }, [i, j]), T(() => {
146
+ x && z && z(x);
147
+ }, [x, z]);
148
+ const O = $((e) => {
149
+ const n = M(e);
150
150
  if (n !== "available" && n !== "selected")
151
151
  return;
152
152
  const l = m.has(e.id);
@@ -154,58 +154,58 @@ const ce = ({
154
154
  const p = new Set(h);
155
155
  return l ? p.delete(e.id) : p.add(e.id), p;
156
156
  }), l ? f?.(e) : (d?.(e), d || console.log("Seat selected:", e));
157
- }, [P, m, d, f]), C = N(() => i ? M.filter((e) => m.has(e.id)) : [], [M, m]);
158
- $(() => {
157
+ }, [M, m, d, f]), C = N(() => i ? E.filter((e) => m.has(e.id)) : [], [E, m]);
158
+ T(() => {
159
159
  a?.(C);
160
160
  }, [C, a]);
161
- const I = j((e) => {
162
- if (!T) return;
161
+ const I = $((e) => {
162
+ if (!P) return;
163
163
  e.evt.preventDefault();
164
164
  const n = V.current;
165
165
  if (!n) return;
166
- const l = F, h = n.getPointerPosition();
166
+ const l = R, h = n.getPointerPosition();
167
167
  if (!h) return;
168
168
  const p = {
169
169
  x: (h.x - w.x) / l,
170
170
  y: (h.y - w.y) / l
171
- }, J = e.evt.deltaY > 0 ? -1 : 1, L = 1.05;
172
- let k = J > 0 ? l * L : l / L;
171
+ }, J = e.evt.deltaY > 0 ? -1 : 1, _ = 1.05;
172
+ let k = J > 0 ? l * _ : l / _;
173
173
  k = Math.max(0.5, Math.min(5, k)), U(k), X({
174
174
  x: h.x - p.x * k,
175
175
  y: h.y - p.y * k
176
176
  });
177
- }, [T, F, w]);
178
- return G ? /* @__PURE__ */ s("div", { className: `flex items-center justify-center h-full ${R}`, children: /* @__PURE__ */ s("p", { children: "Loading seat map..." }) }) : x ? /* @__PURE__ */ s("div", { className: `flex items-center justify-center h-full ${R}`, children: /* @__PURE__ */ u("p", { className: "text-red-500", children: [
177
+ }, [P, R, w]);
178
+ return G ? /* @__PURE__ */ s("div", { className: `flex items-center justify-center h-full ${F}`, children: /* @__PURE__ */ s("p", { children: "Loading seat map..." }) }) : x ? /* @__PURE__ */ s("div", { className: `flex items-center justify-center h-full ${F}`, children: /* @__PURE__ */ u("p", { className: "text-red-500", children: [
179
179
  "Error loading seat map: ",
180
180
  x.message
181
- ] }) }) : i ? /* @__PURE__ */ u("div", { className: `relative ${R}`, children: [
181
+ ] }) }) : i ? /* @__PURE__ */ u("div", { className: `relative ${F}`, children: [
182
182
  /* @__PURE__ */ u(
183
183
  Z,
184
184
  {
185
185
  ref: V,
186
186
  width: i.canvas.width,
187
187
  height: i.canvas.height,
188
- scaleX: F,
189
- scaleY: F,
188
+ scaleX: R,
189
+ scaleY: R,
190
190
  x: w.x,
191
191
  y: w.y,
192
192
  onWheel: I,
193
193
  style: { backgroundColor: i.canvas.backgroundColor },
194
194
  children: [
195
- /* @__PURE__ */ s(W, { listening: !1, children: K.map((e) => /* @__PURE__ */ s(
195
+ /* @__PURE__ */ s(L, { listening: !1, children: K.map((e) => /* @__PURE__ */ s(
196
196
  B,
197
197
  {
198
198
  stage: e,
199
- stageColor: E.stageColor
199
+ stageColor: A.stageColor
200
200
  },
201
201
  e.id
202
202
  )) }),
203
- /* @__PURE__ */ s(W, { children: M.map((e) => /* @__PURE__ */ s(
204
- _,
203
+ /* @__PURE__ */ s(L, { children: E.map((e) => /* @__PURE__ */ s(
204
+ Y,
205
205
  {
206
206
  seat: e,
207
- state: P(e),
208
- colors: E,
207
+ state: M(e),
208
+ colors: A,
209
209
  onClick: O
210
210
  },
211
211
  e.id
@@ -221,10 +221,10 @@ const ce = ({
221
221
  ] }),
222
222
  /* @__PURE__ */ s("div", { className: "max-h-48 overflow-y-auto space-y-1", children: C.map((e) => /* @__PURE__ */ u("div", { className: "text-sm", children: [
223
223
  e.seatNumber,
224
- e.price && ` - ${E.currency} ${e.price.toFixed(2)}`
224
+ e.price && ` - ${A.currency} ${e.price.toFixed(2)}`
225
225
  ] }, e.id)) })
226
226
  ] })
227
- ] }) : /* @__PURE__ */ s("div", { className: `flex items-center justify-center h-full ${R}`, children: /* @__PURE__ */ s("p", { children: "No configuration provided" }) });
227
+ ] }) : /* @__PURE__ */ s("div", { className: `flex items-center justify-center h-full ${F}`, children: /* @__PURE__ */ s("p", { children: "No configuration provided" }) });
228
228
  };
229
229
  export {
230
230
  ne as DEFAULT_COLORS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonetrix/viewer",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "type": "module",
5
5
  "description": "Lightweight React component for rendering interactive seat maps",
6
6
  "main": "./dist/index.js",
@@ -9,9 +9,9 @@
9
9
  "sideEffects": false,
10
10
  "exports": {
11
11
  ".": {
12
+ "types": "./dist/index.d.ts",
12
13
  "import": "./dist/index.mjs",
13
- "require": "./dist/index.js",
14
- "types": "./dist/index.d.ts"
14
+ "require": "./dist/index.js"
15
15
  },
16
16
  "./styles.css": "./dist/style.css"
17
17
  },
@@ -35,19 +35,19 @@
35
35
  "author": "",
36
36
  "license": "MIT",
37
37
  "peerDependencies": {
38
- "konva": "^9.0.0",
38
+ "konva": "^10.0.12",
39
39
  "react": "^18.0.0 || ^19.0.0",
40
40
  "react-dom": "^18.0.0 || ^19.0.0",
41
- "react-konva": "^18.0.0"
41
+ "react-konva": "^19.2.1"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/react": "^19.2.0",
45
45
  "@types/react-dom": "^19.2.0",
46
46
  "@vitejs/plugin-react-swc": "^4.2.2",
47
- "konva": "^9.3.18",
48
- "react-konva": "^18.2.10",
47
+ "konva": "^10.0.12",
48
+ "react-konva": "^19.2.1",
49
49
  "typescript": "^5.8.3",
50
50
  "vite": "^7.3.0",
51
- "vite-plugin-dts": "^3.7.0"
51
+ "vite-plugin-dts": "^4.5.4"
52
52
  }
53
53
  }