Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ updates:
- "jsdom"
build-tools:
patterns:
- "tsup"
- "tsdown"
- "vite"
- "@vitejs/*"
types:
Expand Down
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ This file provides guidance to AI coding assistants when working with code in th
All commands run from `packages/seatmaps/`:

```bash
pnpm build # Build CJS + ESM via tsup
pnpm dev # Watch mode with tsup
pnpm build # Build CJS + ESM via tsdown
pnpm dev # Watch mode with tsdown
pnpm test # Run tests with Vitest
pnpm test:watch # Watch mode for tests
pnpm lint # ESLint
Expand Down Expand Up @@ -61,7 +61,7 @@ Uses Emotion (`@emotion/react`, `@emotion/styled`) for dynamic SVG styling. Emot
## TypeScript Configuration

- Single `tsconfig.json` (ES2020, strict mode, JSX react-jsx, bundler module resolution)
- tsup handles CJS/ESM bundling → `dist/`
- tsdown handles CJS/ESM bundling → `dist/`
- Tests and stories excluded from compilation

## Testing
Expand Down
5 changes: 1 addition & 4 deletions knip.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"ignoreDependencies": [
"@babel/preset-typescript",
"babel-plugin-react-compiler"
]
"ignoreDependencies": ["@babel/preset-typescript"]
}
2 changes: 1 addition & 1 deletion packages/seatmaps/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts",
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.mts",
"apiReport": {
"enabled": true,
"reportFileName": "<unscopedPackageName>.api.md",
Expand Down
26 changes: 13 additions & 13 deletions packages/seatmaps/api/react-seatmaps.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

```ts

import * as _$react_jsx_runtime0 from 'react/jsx-runtime';
import { CSSProperties } from 'react';
import { default as React_2 } from 'react';
import * as react_jsx_runtime from 'react/jsx-runtime';
import { ReactNode } from 'react';

// @public
Expand All @@ -26,7 +26,7 @@ export interface AreaProps {
}

// @public
export const Badge: (input: BadgeProps) => react_jsx_runtime.JSX.Element;
export const Badge: (input: BadgeProps) => _$react_jsx_runtime0.JSX.Element;

// @public
export interface BadgeProps {
Expand All @@ -37,7 +37,7 @@ export interface BadgeProps {
}

// @public
export const Block: (input: BlockProps) => react_jsx_runtime.JSX.Element;
export const Block: (input: BlockProps) => _$react_jsx_runtime0.JSX.Element;

// @public
export interface BlockProps {
Expand All @@ -50,7 +50,7 @@ export interface BlockProps {
}

// @public
export const Circle: (input: CircleProps) => react_jsx_runtime.JSX.Element;
export const Circle: (input: CircleProps) => _$react_jsx_runtime0.JSX.Element;

// @public
export interface CircleProps {
Expand All @@ -67,15 +67,15 @@ export interface Dimensions {
}

// @public
export const Div: (input: DivProps) => react_jsx_runtime.JSX.Element;
export const Div: (input: DivProps) => _$react_jsx_runtime0.JSX.Element;

// @public
export interface DivProps {
children?: ReactNode;
}

// @public
export const Ellipse: (input: EllipseProps) => react_jsx_runtime.JSX.Element;
export const Ellipse: (input: EllipseProps) => _$react_jsx_runtime0.JSX.Element;

// @public
export interface EllipseProps {
Expand All @@ -101,7 +101,7 @@ export interface NewSeatCountBadgeProps {
}

// @public
export const Rectangle: (input: RectangleProps) => react_jsx_runtime.JSX.Element;
export const Rectangle: (input: RectangleProps) => _$react_jsx_runtime0.JSX.Element;

// @public
export interface RectangleProps {
Expand All @@ -114,7 +114,7 @@ export interface RectangleProps {
}

// @public
export const Row: (input: RowProps) => react_jsx_runtime.JSX.Element;
export const Row: (input: RowProps) => _$react_jsx_runtime0.JSX.Element;

// @public
export interface RowProps {
Expand All @@ -130,16 +130,16 @@ export interface RowProps {
export const Seat: React_2.ForwardRefExoticComponent<SeatProps & React_2.RefAttributes<SVGGElement>>;

// @public
export const SeatCountBadge: (input: SeatCountBadgeProps) => react_jsx_runtime.JSX.Element;
export const SeatCountBadge: (input: SeatCountBadgeProps) => _$react_jsx_runtime0.JSX.Element;

// @public
export const SeatCountBadgeOnEllipse: (input: NewSeatCountBadgeProps) => react_jsx_runtime.JSX.Element;
export const SeatCountBadgeOnEllipse: (input: NewSeatCountBadgeProps) => _$react_jsx_runtime0.JSX.Element;

// @public
export type SeatCountBadgeProps = LegacySeatCountBadgeProps | NewSeatCountBadgeProps;

// @public
export const Seatmap: (input: SeatmapProps) => react_jsx_runtime.JSX.Element;
export const Seatmap: (input: SeatmapProps) => _$react_jsx_runtime0.JSX.Element;

// @public
export interface SeatmapAreaData {
Expand Down Expand Up @@ -193,7 +193,7 @@ export interface SeatmapEllipseDecoration {
}

// @public
export const SeatmapLayout: (input: SeatmapLayoutProps) => react_jsx_runtime.JSX.Element;
export const SeatmapLayout: (input: SeatmapLayoutProps) => _$react_jsx_runtime0.JSX.Element;

// @public
export interface SeatmapLayoutData {
Expand Down Expand Up @@ -316,7 +316,7 @@ export enum SeatShape {
}

// @public
const Text_2: (input: TextProps) => react_jsx_runtime.JSX.Element;
const Text_2: (input: TextProps) => _$react_jsx_runtime0.JSX.Element;
export { Text_2 as Text }

// @public
Expand Down
22 changes: 13 additions & 9 deletions packages/seatmaps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,31 @@
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"./package.json": "./package.json"
},
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"module": "./dist/index.mjs",
"types": "./dist/index.d.mts",
"files": [
"dist"
],
"scripts": {
"api": "api-extractor run --local",
"api:check": "api-extractor run",
"build": "tsup",
"build": "tsdown",
"build-storybook": "storybook build",
"ch": "pnpm lint && pnpm typecheck && pnpm test && pnpm format:check && pnpm api:check",
"clean": "rm -rf dist",
"dev": "tsup --watch",
"dev": "tsdown --watch",
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "eslint src",
Expand All @@ -57,7 +62,6 @@
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^6.0.1",
"babel-plugin-react-compiler": "^1.0.0",
"esbuild": "^0.27.4",
"eslint": "^10.1.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^7.0.1",
Expand All @@ -66,7 +70,7 @@
"react": "^19.2.4",
"react-dom": "^19.2.4",
"storybook": "^10.3.1",
"tsup": "^8.0.0",
"tsdown": "^0.21.7",
"typescript": "^5.7.0",
"typescript-eslint": "^8.57.1",
"vite": "^8.0.5",
Expand Down
33 changes: 33 additions & 0 deletions packages/seatmaps/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { transformAsync } from '@babel/core';
import { defineConfig } from 'tsdown';

const reactCompilerPlugin = {
name: 'react-compiler',
transform: {
filter: {
id: /\.[jt]sx?$/,
},
async handler(code, id) {
if (id.includes('node_modules')) return undefined;
const result = await transformAsync(code, {
filename: id,
plugins: [['babel-plugin-react-compiler']],
presets: [['@babel/preset-typescript', { isTSX: true, allExtensions: true }]],
sourceMaps: true,
});
if (!result?.code) return undefined;
return { code: result.code, map: result.map ?? undefined };
},
},
};

export default defineConfig({
entry: ['src/index.ts'],
format: ['cjs', 'esm'],
dts: true,
sourcemap: true,
deps: {
neverBundle: ['react', 'react-dom', 'react/jsx-runtime', '@emotion/react', '@emotion/styled'],
},
plugins: [reactCompilerPlugin],
});
54 changes: 0 additions & 54 deletions packages/seatmaps/tsup.config.ts

This file was deleted.

Loading