@nex125/seatmap-viewer 0.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/dist/index.cjs +32 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +17 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/package.json +43 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var seatmapReact = require('@nex125/seatmap-react');
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
|
|
6
|
+
// src/SeatmapViewer.tsx
|
|
7
|
+
function SeatmapViewer({
|
|
8
|
+
venue,
|
|
9
|
+
onSeatClick,
|
|
10
|
+
onSeatHover,
|
|
11
|
+
renderTooltip,
|
|
12
|
+
className
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ jsxRuntime.jsx(seatmapReact.SeatmapProvider, { venue, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className, style: { width: "100%", height: "100%", position: "relative" }, children: [
|
|
15
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16
|
+
seatmapReact.SeatmapCanvas,
|
|
17
|
+
{
|
|
18
|
+
onSeatClick,
|
|
19
|
+
onSeatHover
|
|
20
|
+
}
|
|
21
|
+
),
|
|
22
|
+
/* @__PURE__ */ jsxRuntime.jsx(seatmapReact.TooltipOverlay, { renderTooltip })
|
|
23
|
+
] }) });
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Object.defineProperty(exports, "useSeatStatus", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () { return seatmapReact.useSeatStatus; }
|
|
29
|
+
});
|
|
30
|
+
exports.SeatmapViewer = SeatmapViewer;
|
|
31
|
+
//# sourceMappingURL=index.cjs.map
|
|
32
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/SeatmapViewer.tsx"],"names":["jsx","SeatmapProvider","jsxs","SeatmapCanvas","TooltipOverlay"],"mappings":";;;;;;AAkBO,SAAS,aAAA,CAAc;AAAA,EAC5B,KAAA;AAAA,EACA,WAAA;AAAA,EACA,WAAA;AAAA,EACA,aAAA;AAAA,EACA;AACF,CAAA,EAAuB;AACrB,EAAA,uBACEA,cAAA,CAACC,4BAAA,EAAA,EAAgB,KAAA,EACf,QAAA,kBAAAC,eAAA,CAAC,SAAI,SAAA,EAAsB,KAAA,EAAO,EAAE,KAAA,EAAO,MAAA,EAAQ,MAAA,EAAQ,MAAA,EAAQ,QAAA,EAAU,YAAW,EACtF,QAAA,EAAA;AAAA,oBAAAF,cAAA;AAAA,MAACG,0BAAA;AAAA,MAAA;AAAA,QACC,WAAA;AAAA,QACA;AAAA;AAAA,KACF;AAAA,oBACAH,cAAA,CAACI,+BAAe,aAAA,EAA8B;AAAA,GAAA,EAChD,CAAA,EACF,CAAA;AAEJ","file":"index.cjs","sourcesContent":["import type { Venue, SeatStatus } from \"@nex125/seatmap-core\";\nimport {\n SeatmapProvider,\n SeatmapCanvas,\n TooltipOverlay,\n} from \"@nex125/seatmap-react\";\nimport type { TooltipData } from \"@nex125/seatmap-react\";\n\nexport interface SeatmapViewerProps {\n venue: Venue;\n onSeatClick?: (seatId: string, sectionId: string) => void;\n onSeatHover?: (seatId: string | null, sectionId: string | null) => void;\n onSelectionChange?: (seatIds: string[]) => void;\n onStatusUpdate?: (seatId: string, status: SeatStatus) => void;\n renderTooltip?: (data: TooltipData) => React.ReactNode;\n className?: string;\n}\n\nexport function SeatmapViewer({\n venue,\n onSeatClick,\n onSeatHover,\n renderTooltip,\n className,\n}: SeatmapViewerProps) {\n return (\n <SeatmapProvider venue={venue}>\n <div className={className} style={{ width: \"100%\", height: \"100%\", position: \"relative\" }}>\n <SeatmapCanvas\n onSeatClick={onSeatClick}\n onSeatHover={onSeatHover}\n />\n <TooltipOverlay renderTooltip={renderTooltip} />\n </div>\n </SeatmapProvider>\n );\n}\n"]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Venue, SeatStatus } from '@nex125/seatmap-core';
|
|
3
|
+
import { TooltipData } from '@nex125/seatmap-react';
|
|
4
|
+
export { useSeatStatus } from '@nex125/seatmap-react';
|
|
5
|
+
|
|
6
|
+
interface SeatmapViewerProps {
|
|
7
|
+
venue: Venue;
|
|
8
|
+
onSeatClick?: (seatId: string, sectionId: string) => void;
|
|
9
|
+
onSeatHover?: (seatId: string | null, sectionId: string | null) => void;
|
|
10
|
+
onSelectionChange?: (seatIds: string[]) => void;
|
|
11
|
+
onStatusUpdate?: (seatId: string, status: SeatStatus) => void;
|
|
12
|
+
renderTooltip?: (data: TooltipData) => React.ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
declare function SeatmapViewer({ venue, onSeatClick, onSeatHover, renderTooltip, className, }: SeatmapViewerProps): react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
export { SeatmapViewer, type SeatmapViewerProps };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Venue, SeatStatus } from '@nex125/seatmap-core';
|
|
3
|
+
import { TooltipData } from '@nex125/seatmap-react';
|
|
4
|
+
export { useSeatStatus } from '@nex125/seatmap-react';
|
|
5
|
+
|
|
6
|
+
interface SeatmapViewerProps {
|
|
7
|
+
venue: Venue;
|
|
8
|
+
onSeatClick?: (seatId: string, sectionId: string) => void;
|
|
9
|
+
onSeatHover?: (seatId: string | null, sectionId: string | null) => void;
|
|
10
|
+
onSelectionChange?: (seatIds: string[]) => void;
|
|
11
|
+
onStatusUpdate?: (seatId: string, status: SeatStatus) => void;
|
|
12
|
+
renderTooltip?: (data: TooltipData) => React.ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
declare function SeatmapViewer({ venue, onSeatClick, onSeatHover, renderTooltip, className, }: SeatmapViewerProps): react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
export { SeatmapViewer, type SeatmapViewerProps };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { SeatmapProvider, SeatmapCanvas, TooltipOverlay } from '@nex125/seatmap-react';
|
|
2
|
+
export { useSeatStatus } from '@nex125/seatmap-react';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
// src/SeatmapViewer.tsx
|
|
6
|
+
function SeatmapViewer({
|
|
7
|
+
venue,
|
|
8
|
+
onSeatClick,
|
|
9
|
+
onSeatHover,
|
|
10
|
+
renderTooltip,
|
|
11
|
+
className
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ jsx(SeatmapProvider, { venue, children: /* @__PURE__ */ jsxs("div", { className, style: { width: "100%", height: "100%", position: "relative" }, children: [
|
|
14
|
+
/* @__PURE__ */ jsx(
|
|
15
|
+
SeatmapCanvas,
|
|
16
|
+
{
|
|
17
|
+
onSeatClick,
|
|
18
|
+
onSeatHover
|
|
19
|
+
}
|
|
20
|
+
),
|
|
21
|
+
/* @__PURE__ */ jsx(TooltipOverlay, { renderTooltip })
|
|
22
|
+
] }) });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { SeatmapViewer };
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/SeatmapViewer.tsx"],"names":[],"mappings":";;;;;AAkBO,SAAS,aAAA,CAAc;AAAA,EAC5B,KAAA;AAAA,EACA,WAAA;AAAA,EACA,WAAA;AAAA,EACA,aAAA;AAAA,EACA;AACF,CAAA,EAAuB;AACrB,EAAA,uBACE,GAAA,CAAC,eAAA,EAAA,EAAgB,KAAA,EACf,QAAA,kBAAA,IAAA,CAAC,SAAI,SAAA,EAAsB,KAAA,EAAO,EAAE,KAAA,EAAO,MAAA,EAAQ,MAAA,EAAQ,MAAA,EAAQ,QAAA,EAAU,YAAW,EACtF,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,aAAA;AAAA,MAAA;AAAA,QACC,WAAA;AAAA,QACA;AAAA;AAAA,KACF;AAAA,oBACA,GAAA,CAAC,kBAAe,aAAA,EAA8B;AAAA,GAAA,EAChD,CAAA,EACF,CAAA;AAEJ","file":"index.js","sourcesContent":["import type { Venue, SeatStatus } from \"@nex125/seatmap-core\";\nimport {\n SeatmapProvider,\n SeatmapCanvas,\n TooltipOverlay,\n} from \"@nex125/seatmap-react\";\nimport type { TooltipData } from \"@nex125/seatmap-react\";\n\nexport interface SeatmapViewerProps {\n venue: Venue;\n onSeatClick?: (seatId: string, sectionId: string) => void;\n onSeatHover?: (seatId: string | null, sectionId: string | null) => void;\n onSelectionChange?: (seatIds: string[]) => void;\n onStatusUpdate?: (seatId: string, status: SeatStatus) => void;\n renderTooltip?: (data: TooltipData) => React.ReactNode;\n className?: string;\n}\n\nexport function SeatmapViewer({\n venue,\n onSeatClick,\n onSeatHover,\n renderTooltip,\n className,\n}: SeatmapViewerProps) {\n return (\n <SeatmapProvider venue={venue}>\n <div className={className} style={{ width: \"100%\", height: \"100%\", position: \"relative\" }}>\n <SeatmapCanvas\n onSeatClick={onSeatClick}\n onSeatHover={onSeatHover}\n />\n <TooltipOverlay renderTooltip={renderTooltip} />\n </div>\n </SeatmapProvider>\n );\n}\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nex125/seatmap-viewer",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.cjs"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsup",
|
|
21
|
+
"dev": "tsup --watch",
|
|
22
|
+
"lint": "tsc --noEmit",
|
|
23
|
+
"clean": "rm -rf dist"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@nex125/seatmap-core": "*",
|
|
27
|
+
"@nex125/seatmap-react": "*"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"react": "^19",
|
|
31
|
+
"react-dom": "^19",
|
|
32
|
+
"pixi.js": "^8"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/react": "^19",
|
|
36
|
+
"@types/react-dom": "^19",
|
|
37
|
+
"react": "^19",
|
|
38
|
+
"react-dom": "^19",
|
|
39
|
+
"pixi.js": "^8",
|
|
40
|
+
"tsup": "^8",
|
|
41
|
+
"typescript": "^5.7"
|
|
42
|
+
}
|
|
43
|
+
}
|