diff --git a/packages/shared/package.json b/packages/shared/package.json index 455134555..61866ae7c 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -2,9 +2,5 @@ "name": "@genarrative/shared", "private": true, "version": "0.1.0", - "type": "module", - "exports": { - ".": "./src/index.ts" - }, - "types": "./src/index.ts" + "type": "module" } diff --git a/packages/shared/src/components/PlatformMudPointWalletEntry.test.tsx b/packages/shared/src/components/PlatformMudPointWalletEntry.test.tsx index 01edad980..e6aca12a9 100644 --- a/packages/shared/src/components/PlatformMudPointWalletEntry.test.tsx +++ b/packages/shared/src/components/PlatformMudPointWalletEntry.test.tsx @@ -4,7 +4,7 @@ import { act, fireEvent, render, screen, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { expect, test, vi } from 'vitest'; -import { formatMudPointCount } from '@genarrative/shared'; +import { formatMudPointCount } from '../utils/format'; import { PlatformMudPointWalletEntry } from './PlatformMudPointWalletEntry.tsx'; const breakdown = { diff --git a/packages/shared/src/components/PlatformMudPointWalletEntry.tsx b/packages/shared/src/components/PlatformMudPointWalletEntry.tsx index 4128cd48e..41d017a5d 100644 --- a/packages/shared/src/components/PlatformMudPointWalletEntry.tsx +++ b/packages/shared/src/components/PlatformMudPointWalletEntry.tsx @@ -8,7 +8,7 @@ import { useState, } from 'react'; -import type { ProfileMudPointBalance } from '../index'; +import type { ProfileMudPointBalance } from '../contracts/runtime'; import MUD_POINT_ICON_SRC from '../icons/topbar-wallet.png'; import { formatMudPointCount } from '../utils/format'; diff --git a/src/components/image-editor/ImageCanvasTopbarView.tsx b/src/components/image-editor/ImageCanvasTopbarView.tsx index 606ab3fb6..37f5f1092 100644 --- a/src/components/image-editor/ImageCanvasTopbarView.tsx +++ b/src/components/image-editor/ImageCanvasTopbarView.tsx @@ -8,7 +8,7 @@ import { } from 'lucide-react'; import type { ProfileMudPointBalance } from '../../../packages/shared/src/contracts/runtime'; -import { PlatformMudPointWalletEntry } from '@genarrative/shared'; +import { PlatformMudPointWalletEntry } from '../../../packages/shared/src/components/PlatformMudPointWalletEntry'; import { PlatformStatusMessage } from '../common/PlatformStatusMessage'; import { PlatformTextField } from '../common/PlatformTextField'; import { EditorIconButton } from './ImageCanvasEditorPrimitives'; diff --git a/src/components/platform-entry/PlatformProfileRechargeModal.tsx b/src/components/platform-entry/PlatformProfileRechargeModal.tsx index 1d535ec70..12d3baa5e 100644 --- a/src/components/platform-entry/PlatformProfileRechargeModal.tsx +++ b/src/components/platform-entry/PlatformProfileRechargeModal.tsx @@ -15,7 +15,7 @@ import { PlatformSubpanel } from '../common/PlatformSubpanel'; import { formatRechargePrice } from '../rpg-entry/rpgEntryProfileFundsViewModel'; import { PlatformProfileModalShell } from './PlatformProfileModalShell'; import type { NativeWechatPaymentState } from './usePlatformProfileCenterController'; -import { formatMudPointCount } from '@genarrative/shared'; +import { formatMudPointCount } from '../../../packages/shared/src/utils/format'; const WECHAT_NATIVE_PAY_QR_IMAGE_SIZE = 180; export type PlatformProfileRechargeModalProps = { diff --git a/src/components/rpg-entry/RpgEntryHomeView.tsx b/src/components/rpg-entry/RpgEntryHomeView.tsx index 7d00dae74..70272c476 100644 --- a/src/components/rpg-entry/RpgEntryHomeView.tsx +++ b/src/components/rpg-entry/RpgEntryHomeView.tsx @@ -89,7 +89,7 @@ import { PlatformAsyncStatePanel } from '../common/PlatformAsyncStatePanel'; import { PlatformEmptyState } from '../common/PlatformEmptyState'; import { PlatformFilterToolbar } from '../common/PlatformFilterToolbar'; import { PlatformIconButton } from '../common/PlatformIconButton'; -import { PlatformMudPointWalletEntry } from '@genarrative/shared'; +import { PlatformMudPointWalletEntry } from '../../../packages/shared/src/components/PlatformMudPointWalletEntry'; import { PlatformNavigableListItem } from '../common/PlatformNavigableListItem'; import { PlatformPillBadge } from '../common/PlatformPillBadge'; import { diff --git a/tsconfig.json b/tsconfig.json index 42f06c521..fb623bd18 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,9 +19,6 @@ "paths": { "@/*": [ "./*" - ], - "@genarrative/shared": [ - "./packages/shared/src/index.ts" ] }, "allowImportingTsExtensions": true, diff --git a/vite.config.ts b/vite.config.ts index fdfa8ade2..afe9b24a4 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -53,7 +53,6 @@ export default defineConfig(({mode}) => { resolve: { alias: { '@': path.resolve(__dirname, '.'), - '@genarrative/shared': path.resolve(__dirname, 'packages/shared/src/index.ts'), }, }, optimizeDeps: { diff --git a/vitest.config.ts b/vitest.config.ts index df50756c6..30f506d44 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -7,7 +7,6 @@ export default defineConfig({ alias: { // Keep shared components' application-root imports resolvable in tests. '@': path.resolve(__dirname, '.'), - '@genarrative/shared': path.resolve(__dirname, 'packages/shared/src/index.ts'), }, }, test: {