@zonetrix/shared 1.1.0 → 2.1.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/README.md CHANGED
@@ -22,6 +22,8 @@ pnpm add @zonetrix/shared
22
22
  - ✅ **Validation** - Built-in configuration validation
23
23
  - 🔧 **Utilities** - Helper functions for config manipulation
24
24
  - 🎨 **Default Settings** - Pre-configured color schemes and settings
25
+ - 🏢 **Multi-floor Support** - Organize seats and stages across multiple floors
26
+ - 👁️ **Hidden Seats** - Support for hidden/invisible seats in layouts
25
27
  - 📦 **Zero dependencies** - Lightweight and fast
26
28
 
27
29
  ## Type Definitions
@@ -37,12 +39,13 @@ import {
37
39
  SeatState,
38
40
  SeatShape,
39
41
  ColorSettings,
42
+ FloorConfig,
40
43
  } from '@zonetrix/shared';
41
44
  ```
42
45
 
43
46
  #### SeatState
44
47
  ```typescript
45
- type SeatState = 'available' | 'reserved' | 'selected' | 'unavailable';
48
+ type SeatState = 'available' | 'reserved' | 'selected' | 'unavailable' | 'hidden';
46
49
  ```
47
50
 
48
51
  #### SeatShape
@@ -62,6 +65,7 @@ interface SerializedSeat {
62
65
  columnLabel?: string;
63
66
  seatNumber?: string;
64
67
  price?: number;
68
+ floorId?: string; // Floor reference for multi-floor venues
65
69
  }
66
70
  ```
67
71
 
@@ -74,11 +78,22 @@ interface ColorSettings {
74
78
  seatReserved: string;
75
79
  seatSelected: string;
76
80
  seatUnavailable: string;
81
+ seatHidden: string;
77
82
  gridLines: string;
78
83
  currency: string;
79
84
  }
80
85
  ```
81
86
 
87
+ #### FloorConfig
88
+ ```typescript
89
+ interface FloorConfig {
90
+ id: string;
91
+ name: string;
92
+ order: number;
93
+ color?: string;
94
+ }
95
+ ```
96
+
82
97
  #### SeatMapConfig
83
98
  ```typescript
84
99
  interface SeatMapConfig {
@@ -100,6 +115,7 @@ interface SeatMapConfig {
100
115
  seats: SerializedSeat[];
101
116
  sections?: SerializedSection[];
102
117
  stages?: SerializedStage[];
118
+ floors?: FloorConfig[]; // Multi-floor venue support
103
119
  }
104
120
  ```
105
121
 
@@ -274,6 +290,7 @@ console.log(DEFAULT_COLORS);
274
290
  // seatReserved: '#FCEA00',
275
291
  // seatSelected: '#3A7DE5',
276
292
  // seatUnavailable: '#6b7280',
293
+ // seatHidden: '#4a4a4a',
277
294
  // gridLines: '#404040',
278
295
  // currency: 'KD'
279
296
  // }
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Centralized type definitions for the Seat Map Studio packages
3
3
  */
4
- type SeatState = "available" | "reserved" | "selected" | "unavailable";
4
+ type SeatState = "available" | "reserved" | "selected" | "unavailable" | "hidden";
5
5
  type SeatShape = "circle" | "square" | "rounded-square";
6
6
  type Tool = "select" | "seat" | "row" | "section" | "stage";
7
7
  type EditorMode = "edit" | "read";
@@ -16,6 +16,7 @@ interface SeatData {
16
16
  columnLabel?: string;
17
17
  price?: number;
18
18
  seatNumber?: string;
19
+ floorId?: string;
19
20
  }
20
21
  /**
21
22
  * Section configuration for creating seat groups
@@ -47,6 +48,16 @@ interface StageConfig {
47
48
  height: number;
48
49
  rotation?: number;
49
50
  color?: string;
51
+ floorId?: string;
52
+ }
53
+ /**
54
+ * Floor configuration for multi-floor venues
55
+ */
56
+ interface FloorConfig {
57
+ id: string;
58
+ name: string;
59
+ order: number;
60
+ color?: string;
50
61
  }
51
62
  /**
52
63
  * Color settings for customizing the appearance
@@ -58,6 +69,7 @@ interface ColorSettings {
58
69
  seatReserved: string;
59
70
  seatSelected: string;
60
71
  seatUnavailable: string;
72
+ seatHidden: string;
61
73
  gridLines: string;
62
74
  currency: string;
63
75
  }
@@ -108,6 +120,7 @@ interface SerializedSeat {
108
120
  columnLabel?: string;
109
121
  seatNumber?: string;
110
122
  price?: number;
123
+ floorId?: string;
111
124
  }
112
125
  /**
113
126
  * Serialized section for JSON export/import
@@ -132,6 +145,7 @@ interface SerializedStage {
132
145
  y: number;
133
146
  };
134
147
  config: StageConfig;
148
+ floorId?: string;
135
149
  }
136
150
  /**
137
151
  * Canvas configuration for export/import
@@ -164,6 +178,7 @@ interface SeatMapConfig {
164
178
  seats: SerializedSeat[];
165
179
  sections?: SerializedSection[];
166
180
  stages?: SerializedStage[];
181
+ floors?: FloorConfig[];
167
182
  }
168
183
  /**
169
184
  * Validation result for config validation
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Centralized type definitions for the Seat Map Studio packages
3
3
  */
4
- type SeatState = "available" | "reserved" | "selected" | "unavailable";
4
+ type SeatState = "available" | "reserved" | "selected" | "unavailable" | "hidden";
5
5
  type SeatShape = "circle" | "square" | "rounded-square";
6
6
  type Tool = "select" | "seat" | "row" | "section" | "stage";
7
7
  type EditorMode = "edit" | "read";
@@ -16,6 +16,7 @@ interface SeatData {
16
16
  columnLabel?: string;
17
17
  price?: number;
18
18
  seatNumber?: string;
19
+ floorId?: string;
19
20
  }
20
21
  /**
21
22
  * Section configuration for creating seat groups
@@ -47,6 +48,16 @@ interface StageConfig {
47
48
  height: number;
48
49
  rotation?: number;
49
50
  color?: string;
51
+ floorId?: string;
52
+ }
53
+ /**
54
+ * Floor configuration for multi-floor venues
55
+ */
56
+ interface FloorConfig {
57
+ id: string;
58
+ name: string;
59
+ order: number;
60
+ color?: string;
50
61
  }
51
62
  /**
52
63
  * Color settings for customizing the appearance
@@ -58,6 +69,7 @@ interface ColorSettings {
58
69
  seatReserved: string;
59
70
  seatSelected: string;
60
71
  seatUnavailable: string;
72
+ seatHidden: string;
61
73
  gridLines: string;
62
74
  currency: string;
63
75
  }
@@ -108,6 +120,7 @@ interface SerializedSeat {
108
120
  columnLabel?: string;
109
121
  seatNumber?: string;
110
122
  price?: number;
123
+ floorId?: string;
111
124
  }
112
125
  /**
113
126
  * Serialized section for JSON export/import
@@ -132,6 +145,7 @@ interface SerializedStage {
132
145
  y: number;
133
146
  };
134
147
  config: StageConfig;
148
+ floorId?: string;
135
149
  }
136
150
  /**
137
151
  * Canvas configuration for export/import
@@ -164,6 +178,7 @@ interface SeatMapConfig {
164
178
  seats: SerializedSeat[];
165
179
  sections?: SerializedSection[];
166
180
  stages?: SerializedStage[];
181
+ floors?: FloorConfig[];
167
182
  }
168
183
  /**
169
184
  * Validation result for config validation
package/dist/index.js CHANGED
@@ -42,10 +42,11 @@ module.exports = __toCommonJS(index_exports);
42
42
  var DEFAULT_COLORS = {
43
43
  canvasBackground: "#1a1a1a",
44
44
  stageColor: "#808080",
45
- seatAvailable: "#2C2B30",
45
+ seatAvailable: "#808080",
46
46
  seatReserved: "#FCEA00",
47
47
  seatSelected: "#3A7DE5",
48
48
  seatUnavailable: "#6b7280",
49
+ seatHidden: "#4a4a4a",
49
50
  gridLines: "#404040",
50
51
  currency: "KD"
51
52
  };
package/dist/index.mjs CHANGED
@@ -2,10 +2,11 @@
2
2
  var DEFAULT_COLORS = {
3
3
  canvasBackground: "#1a1a1a",
4
4
  stageColor: "#808080",
5
- seatAvailable: "#2C2B30",
5
+ seatAvailable: "#808080",
6
6
  seatReserved: "#FCEA00",
7
7
  seatSelected: "#3A7DE5",
8
8
  seatUnavailable: "#6b7280",
9
+ seatHidden: "#4a4a4a",
9
10
  gridLines: "#404040",
10
11
  currency: "KD"
11
12
  };
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@zonetrix/shared",
3
- "version": "1.1.0",
3
+ "version": "2.1.0",
4
4
  "description": "Shared types and utilities for seat-map-studio packages",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
8
+ "sideEffects": false,
8
9
  "exports": {
9
10
  ".": {
10
11
  "import": "./dist/index.mjs",