@jaw.id/ui 0.0.3 → 0.0.5

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.
Files changed (66) hide show
  1. package/cjs-error.cjs +3 -0
  2. package/dist/{ccip-BYa9WTP9.js → ccip-nTJDT8tV.js} +1 -1
  3. package/dist/{index-DBYNWeek.js → index-C2yN5Jh0.js} +20536 -20246
  4. package/dist/index.js +1 -1
  5. package/package.json +8 -2
  6. package/.babelrc +0 -12
  7. package/CHANGELOG.md +0 -23
  8. package/components.json +0 -22
  9. package/postcss.config.cjs +0 -6
  10. package/src/components/ConnectDialog/index.tsx +0 -270
  11. package/src/components/ConnectDialog/types.ts +0 -34
  12. package/src/components/DefaultDialog/index.tsx +0 -99
  13. package/src/components/Eip712Dialog/index.tsx +0 -525
  14. package/src/components/Eip712Dialog/types.ts +0 -27
  15. package/src/components/FeeTokenSelector/index.tsx +0 -308
  16. package/src/components/OnboardingDialog/index.tsx +0 -317
  17. package/src/components/OnboardingDialog/types.ts +0 -43
  18. package/src/components/OrSeparator/index.tsx +0 -13
  19. package/src/components/PermissionDialog/index.tsx +0 -598
  20. package/src/components/PermissionDialog/types.ts +0 -77
  21. package/src/components/SignatureDialog/index.tsx +0 -180
  22. package/src/components/SignatureDialog/types.ts +0 -27
  23. package/src/components/SiweDialog/index.tsx +0 -231
  24. package/src/components/SiweDialog/types.ts +0 -34
  25. package/src/components/TransactionDialog/DecodedCalldata.tsx +0 -79
  26. package/src/components/TransactionDialog/index.tsx +0 -663
  27. package/src/components/TransactionDialog/types.ts +0 -54
  28. package/src/components/ui/accordion.tsx +0 -66
  29. package/src/components/ui/avatar.tsx +0 -53
  30. package/src/components/ui/button.tsx +0 -59
  31. package/src/components/ui/card.tsx +0 -92
  32. package/src/components/ui/checkbox.tsx +0 -32
  33. package/src/components/ui/dialog.tsx +0 -183
  34. package/src/components/ui/dropdown-menu.tsx +0 -258
  35. package/src/components/ui/form.tsx +0 -167
  36. package/src/components/ui/input.tsx +0 -60
  37. package/src/components/ui/label.tsx +0 -24
  38. package/src/components/ui/popover.tsx +0 -48
  39. package/src/components/ui/scroll-area.tsx +0 -58
  40. package/src/components/ui/select.tsx +0 -160
  41. package/src/components/ui/separator.tsx +0 -28
  42. package/src/components/ui/sheet.tsx +0 -169
  43. package/src/components/ui/spinner.tsx +0 -18
  44. package/src/components/ui/tabs.tsx +0 -69
  45. package/src/components/ui/tooltip.tsx +0 -61
  46. package/src/hooks/index.ts +0 -5
  47. package/src/hooks/useChainIconURI.tsx +0 -117
  48. package/src/hooks/useDecodedCalldata.ts +0 -128
  49. package/src/hooks/useFeeTokenPrice.tsx +0 -36
  50. package/src/hooks/useGasEstimation.ts +0 -474
  51. package/src/hooks/useIsMobile.ts +0 -36
  52. package/src/icons/index.tsx +0 -114
  53. package/src/index.ts +0 -19
  54. package/src/lib/utils.ts +0 -6
  55. package/src/react/ReactUIHandler.tsx +0 -3004
  56. package/src/react/index.ts +0 -2
  57. package/src/styles.css +0 -210
  58. package/src/utils/formatAddress.ts +0 -24
  59. package/src/utils/index.ts +0 -4
  60. package/src/utils/justaNameInstance.ts +0 -25
  61. package/src/utils/tokenBalance.ts +0 -41
  62. package/src/utils/tokenPrice.ts +0 -58
  63. package/tailwind.config.js +0 -130
  64. package/tsconfig.json +0 -19
  65. package/tsconfig.lib.json +0 -43
  66. package/vite.config.ts +0 -45
@@ -1,2 +0,0 @@
1
- // React integration for @jaw.id/ui
2
- export { ReactUIHandler } from './ReactUIHandler';
package/src/styles.css DELETED
@@ -1,210 +0,0 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
4
-
5
- @layer base {
6
- :root {
7
- --background: oklch(1 0 0);
8
- --foreground: oklch(0.145 0 0);
9
- --card: oklch(1 0 0);
10
- --card-foreground: oklch(0.145 0 0);
11
- --popover: oklch(1 0 0);
12
- --popover-foreground: oklch(0.145 0 0);
13
- --primary: oklch(0.205 0 0);
14
- --primary-foreground: oklch(0.985 0 0);
15
- --secondary: oklch(0.97 0 0);
16
- --secondary-foreground: oklch(0.205 0 0);
17
- --muted: oklch(0.97 0 0);
18
- --muted-foreground: oklch(0.556 0 0);
19
- --accent: oklch(0.97 0 0);
20
- --accent-foreground: oklch(0.205 0 0);
21
- --destructive: oklch(0.577 0.245 27.325);
22
- --destructive-foreground: oklch(0.577 0.245 27.325);
23
- --border: oklch(0.922 0 0);
24
- --input: oklch(0.922 0 0);
25
- --ring: oklch(0.708 0 0);
26
- --chart-1: oklch(0.646 0.222 41.116);
27
- --chart-2: oklch(0.6 0.118 184.704);
28
- --chart-3: oklch(0.398 0.07 227.392);
29
- --chart-4: oklch(0.828 0.189 84.429);
30
- --chart-5: oklch(0.769 0.188 70.08);
31
- --radius: 0.625rem;
32
- --sidebar-background: #FAFAFA;
33
- --sidebar-foreground: 240 5.3% 26.1%;
34
- --sidebar-primary: 240 5.9% 10%;
35
- --sidebar-primary-foreground: 0 0% 98%;
36
- --sidebar-accent: 240 4.8% 95.9%;
37
- --sidebar-accent-foreground: 240 5.9% 10%;
38
- --sidebar-border: #E5E7EB;
39
- --sidebar-ring: #A1A1AA;
40
- --font-inter: 'Inter', sans-serif;
41
- /* Dynamic viewport height variables for mobile Safari compatibility */
42
- --vh: 1vh; /* Fallback value, will be updated by JavaScript */
43
- --vh-mobile: 1vh; /* Mobile-specific viewport height with safety margin */
44
- }
45
-
46
- .dark {
47
- --background: oklch(0.145 0 0);
48
- --foreground: oklch(0.985 0 0);
49
- --card: oklch(0.145 0 0);
50
- --card-foreground: oklch(0.985 0 0);
51
- --popover: oklch(0.145 0 0);
52
- --popover-foreground: oklch(0.985 0 0);
53
- --primary: oklch(0.985 0 0);
54
- --primary-foreground: oklch(0.205 0 0);
55
- --secondary: oklch(0.269 0 0);
56
- --secondary-foreground: oklch(0.985 0 0);
57
- --muted: oklch(0.269 0 0);
58
- --muted-foreground: oklch(0.708 0 0);
59
- --accent: oklch(0.269 0 0);
60
- --accent-foreground: oklch(0.985 0 0);
61
- --destructive: oklch(0.396 0.141 25.723);
62
- --destructive-foreground: oklch(0.637 0.237 25.331);
63
- --border: oklch(0.269 0 0);
64
- --input: oklch(0.269 0 0);
65
- --ring: oklch(0.439 0 0);
66
- --chart-1: oklch(0.488 0.243 264.376);
67
- --chart-2: oklch(0.696 0.17 162.48);
68
- --chart-3: oklch(0.769 0.188 70.08);
69
- --chart-4: oklch(0.627 0.265 303.9);
70
- --chart-5: oklch(0.645 0.246 16.439);
71
- --sidebar-background: #111111;
72
- --sidebar-foreground: 240 4.8% 95.9%;
73
- --sidebar-primary: 0 0% 98%;
74
- --sidebar-primary-foreground: 240 5.9% 10%;
75
- --sidebar-accent: 240 3.7% 15.9%;
76
- --sidebar-accent-foreground: 240 4.8% 95.9%;
77
- --sidebar-border: #E5E7EB;
78
- --sidebar-ring: #A1A1AA;
79
- --font-inter: 'Inter', sans-serif;
80
- }
81
-
82
- }
83
-
84
- @theme inline {
85
- --color-background: var(--background);
86
- --color-foreground: var(--foreground);
87
- --color-card: var(--card);
88
- --color-card-foreground: var(--card-foreground);
89
- --color-popover: var(--popover);
90
- --color-popover-foreground: var(--popover-foreground);
91
- --color-primary: var(--primary);
92
- --color-primary-foreground: var(--primary-foreground);
93
- --color-secondary: var(--secondary);
94
- --color-secondary-foreground: var(--secondary-foreground);
95
- --color-muted: var(--muted);
96
- --color-muted-foreground: var(--muted-foreground);
97
- --color-accent: var(--accent);
98
- --color-accent-foreground: var(--accent-foreground);
99
- --color-destructive: var(--destructive);
100
- --color-destructive-foreground: var(--destructive-foreground);
101
- --color-border: var(--border);
102
- --color-input: var(--input);
103
- --color-ring: var(--ring);
104
- --color-chart-1: var(--chart-1);
105
- --color-chart-2: var(--chart-2);
106
- --color-chart-3: var(--chart-3);
107
- --color-chart-4: var(--chart-4);
108
- --color-chart-5: var(--chart-5);
109
- --radius-sm: calc(var(--radius) - 4px);
110
- --radius-md: calc(var(--radius) - 2px);
111
- --radius-lg: var(--radius);
112
- --radius-xl: calc(var(--radius) + 4px);
113
- --color-sidebar: var(--sidebar);
114
- --color-sidebar-foreground: var(--sidebar-foreground);
115
- --color-sidebar-primary: var(--sidebar-primary);
116
- --color-sidebar-background: var(--sidebar-background);
117
- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
118
- --color-sidebar-accent: var(--sidebar-accent);
119
- --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
120
- --color-sidebar-border: var(--sidebar-border);
121
- --color-sidebar-ring: var(--sidebar-ring);
122
- --font-inter: 'Inter', sans-serif;
123
- }
124
-
125
- @layer base {
126
- * {
127
- @apply border-border;
128
- }
129
- body {
130
- @apply bg-background text-foreground;
131
- }
132
- }
133
-
134
-
135
- @layer utilities {
136
- /* Mobile-safe viewport height utilities */
137
- .h-screen-safe {
138
- height: 100vh;
139
- height: calc(var(--vh, 1vh) * 100);
140
- }
141
-
142
- .h-screen-mobile-safe {
143
- height: 100vh;
144
- height: calc(var(--vh-mobile, 1vh) * 100);
145
- }
146
-
147
- .min-h-screen-safe {
148
- min-height: 100vh;
149
- min-height: calc(var(--vh, 1vh) * 100);
150
- }
151
-
152
- .max-h-screen-safe {
153
- max-height: 100vh;
154
- max-height: calc(var(--vh, 1vh) * 100);
155
- }
156
- }
157
-
158
-
159
- /* SliderInput Styles */
160
- .sliderInput {
161
- width: 100%;
162
- height: 0.5rem;
163
- background-color: #bfdbfe;
164
- border-radius: 0.5rem;
165
- appearance: none;
166
- cursor: pointer;
167
- }
168
-
169
- .sliderInput:focus {
170
- outline: none;
171
- }
172
-
173
- /* Slider Thumb Styling */
174
- .sliderInput::-webkit-slider-thumb {
175
- appearance: none;
176
- width: 1rem;
177
- height: 1rem;
178
- background-color: #2563eb;
179
- border-radius: 50%;
180
- cursor: pointer;
181
- margin-top: -0.25rem;
182
- }
183
-
184
- .sliderInput::-moz-range-thumb {
185
- width: 1rem;
186
- height: 1rem;
187
- background-color: #2563eb;
188
- border: none;
189
- border-radius: 50%;
190
- cursor: pointer;
191
- }
192
-
193
- .sliderInput::-ms-thumb {
194
- width: 1rem;
195
- height: 1rem;
196
- background-color: #2563eb;
197
- border: none;
198
- border-radius: 50%;
199
- cursor: pointer;
200
- }
201
-
202
- .sliderInput::-webkit-slider-runnable-track {
203
- height: 0.5rem;
204
- background: transparent;
205
- border-radius: 0.5rem;
206
- }
207
-
208
- .scrollbar-hide::-webkit-scrollbar {
209
- display: none;
210
- }
@@ -1,24 +0,0 @@
1
- /**
2
- * Truncates an Ethereum address for display
3
- * Shows first 6 characters + ... + last 4 characters
4
- *
5
- * @example
6
- * formatAddress('0x1234567890abcdef1234567890abcdef12345678')
7
- * // Returns: '0x1234...5678'
8
- */
9
- export const formatAddress = (address: string): string => {
10
- if (!address || address.length < 10) return address;
11
- return `${address.slice(0, 6)}...${address.slice(-4)}`;
12
- };
13
-
14
- /**
15
- * Returns the display string for an address - either the resolved name or formatted address
16
- *
17
- * @param resolvedName - The resolved ENS/subname (if any)
18
- * @param address - The raw Ethereum address
19
- * @returns The resolved name if available, otherwise the formatted address
20
- */
21
- export const getDisplayAddress = (resolvedName: string | null | undefined, address: string): string => {
22
- if (resolvedName) return resolvedName;
23
- return formatAddress(address);
24
- };
@@ -1,4 +0,0 @@
1
- export * from './justaNameInstance';
2
- export * from './tokenPrice';
3
- export * from './formatAddress';
4
- export * from './tokenBalance';
@@ -1,25 +0,0 @@
1
- import { JustaName } from '@justaname.id/sdk';
2
-
3
- let justaNameInstance: ReturnType<typeof JustaName.init> | null = null;
4
- let currentProviderUrl: string | null = null;
5
-
6
- /**
7
- * Get or create the singleton JustaName SDK instance
8
- * @param providerUrl - The Ethereum mainnet RPC URL for ENS resolution
9
- */
10
- export function getJustaNameInstance(providerUrl: string) {
11
- // Re-initialize if providerUrl changes (supports different configurations)
12
- if (!justaNameInstance || currentProviderUrl !== providerUrl) {
13
- currentProviderUrl = providerUrl;
14
- justaNameInstance = JustaName.init({
15
- networks: [
16
- {
17
- chainId: 1,
18
- providerUrl
19
- }
20
- ]
21
- });
22
- }
23
- return justaNameInstance;
24
- }
25
-
@@ -1,41 +0,0 @@
1
- import { createPublicClient, http, erc20Abi, Address } from 'viem';
2
-
3
- // Common native token addresses used by various protocols
4
- const NATIVE_TOKEN_ADDRESSES = [
5
- '0x0000000000000000000000000000000000000000', // Zero address
6
- '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', // Common ERC-20 convention for native
7
- ];
8
-
9
- /**
10
- * Checks if a token address represents the native token (ETH)
11
- */
12
- export function isNativeToken(tokenAddress: string): boolean {
13
- return NATIVE_TOKEN_ADDRESSES.includes(tokenAddress.toLowerCase());
14
- }
15
-
16
- /**
17
- * Fetches the balance of a token for a given wallet address.
18
- * Supports both native ETH (address = 0x0...0 or 0xeee...eee) and ERC-20 tokens.
19
- */
20
- export async function fetchTokenBalance(
21
- tokenAddress: string,
22
- walletAddress: string,
23
- rpcUrl: string
24
- ): Promise<bigint> {
25
- const client = createPublicClient({
26
- transport: http(rpcUrl),
27
- });
28
-
29
- // Native token (ETH) - check common native addresses
30
- if (isNativeToken(tokenAddress)) {
31
- return client.getBalance({ address: walletAddress as Address });
32
- }
33
-
34
- // ERC-20 token
35
- return client.readContract({
36
- address: tokenAddress as Address,
37
- abi: erc20Abi,
38
- functionName: 'balanceOf',
39
- args: [walletAddress as Address],
40
- });
41
- }
@@ -1,58 +0,0 @@
1
- // ============================================================================
2
- // Token Price Fetching (using CryptoCompare API)
3
- // ============================================================================
4
-
5
- // Price cache with TTL per symbol
6
- const tokenPriceCache: Map<string, { price: number; timestamp: number }> = new Map();
7
- const PRICE_CACHE_TTL = 5 * 60 * 1000; // 5 minutes
8
-
9
- /**
10
- * Fetches the current price in USD for a token by its symbol from CryptoCompare API
11
- * Results are cached for 5 minutes per symbol to reduce API calls
12
- * @param symbol - The token symbol (ETH, AVAX, BNB, USDC, etc.)
13
- * @returns Promise<number> - The token price in USD, or 0 if fetch fails
14
- */
15
- export async function fetchTokenPrice(symbol: string): Promise<number> {
16
- if (!symbol) return 0;
17
-
18
- // Normalize symbol (remove special characters like ₮)
19
- const normalizedSymbol = symbol.replace(/[₮]/g, 'T').toUpperCase();
20
-
21
- const cached = tokenPriceCache.get(normalizedSymbol);
22
- if (cached && Date.now() - cached.timestamp < PRICE_CACHE_TTL) {
23
- return cached.price;
24
- }
25
-
26
- try {
27
- const response = await fetch(
28
- `https://min-api.cryptocompare.com/data/price?fsym=${normalizedSymbol}&tsyms=USD`
29
- );
30
-
31
- if (!response.ok) {
32
- throw new Error(`CryptoCompare API error: ${response.status}`);
33
- }
34
-
35
- const data = await response.json();
36
-
37
- // CryptoCompare returns { "USD": price } or { "Response": "Error", ... }
38
- if (data.Response === 'Error') {
39
- console.warn(`CryptoCompare error for ${normalizedSymbol}:`, data.Message);
40
- return cached?.price ?? 0;
41
- }
42
-
43
- const price = data.USD ?? 0;
44
-
45
- tokenPriceCache.set(normalizedSymbol, { price, timestamp: Date.now() });
46
- return price;
47
- } catch (error) {
48
- console.warn(`Failed to fetch ${normalizedSymbol} price:`, error);
49
- return cached?.price ?? 0;
50
- }
51
- }
52
-
53
- /**
54
- * Clears all token price caches (useful for testing or forcing refresh)
55
- */
56
- export function clearTokenPriceCache(): void {
57
- tokenPriceCache.clear();
58
- }
@@ -1,130 +0,0 @@
1
- /** @type {import('tailwindcss').Config} */
2
- module.exports = {
3
- darkMode: ["class"],
4
- content: [
5
- "./src/**/*.{js,ts,jsx,tsx}",
6
- ],
7
- // Disable preflight to prevent global CSS resets in consuming apps
8
- corePlugins: {
9
- preflight: false,
10
- },
11
- // Safelist ensures all Tailwind classes used by components are included
12
- safelist: [
13
- // Color variants for all semantic colors
14
- {
15
- pattern: /^(bg|text|border|ring)-(background|foreground|card|popover|primary|secondary|muted|accent|destructive|input|border|ring)/,
16
- variants: ['hover', 'focus', 'active', 'dark'],
17
- },
18
- // Common utilities used in dialogs
19
- {
20
- pattern: /^(rounded|shadow|opacity|z)-/,
21
- variants: ['hover', 'focus'],
22
- },
23
- // Layout and positioning
24
- {
25
- pattern: /^(fixed|absolute|relative|inset|top|bottom|left|right)-/,
26
- },
27
- // Spacing
28
- {
29
- pattern: /^(p|m|gap|space)-(0|1|2|3|4|5|6|8|10|12|16|20|24)/,
30
- },
31
- // Flexbox and Grid
32
- {
33
- pattern: /^(flex|grid|items|justify|content)-.*/,
34
- variants: ['sm', 'md', 'lg', 'xl', '2xl'],
35
- },
36
- // Animation classes from tailwindcss-animate
37
- 'animate-in',
38
- 'animate-out',
39
- 'fade-in-0',
40
- 'fade-out-0',
41
- 'zoom-in-95',
42
- 'zoom-out-95',
43
- 'slide-in-from-left-1/2',
44
- 'slide-in-from-top-1/2',
45
- 'slide-out-to-left-1/2',
46
- 'slide-out-to-top-1/2',
47
- // Common z-index values
48
- 'z-50',
49
- 'z-40',
50
- 'z-10',
51
- // Radix UI data attributes
52
- '[&[data-state=open]]',
53
- '[&[data-state=closed]]',
54
- ],
55
- theme: {
56
- extend: {
57
- borderRadius: {
58
- lg: 'var(--radius)',
59
- md: 'calc(var(--radius) - 2px)',
60
- sm: 'calc(var(--radius) - 4px)'
61
- },
62
- colors: {
63
- background: 'var(--background)',
64
- foreground: 'var(--foreground)',
65
- card: {
66
- DEFAULT: 'var(--card)',
67
- foreground: 'var(--card-foreground)'
68
- },
69
- popover: {
70
- DEFAULT: 'var(--popover)',
71
- foreground: 'var(--popover-foreground)'
72
- },
73
- primary: {
74
- DEFAULT: 'var(--primary)',
75
- foreground: 'var(--primary-foreground)'
76
- },
77
- secondary: {
78
- DEFAULT: 'var(--secondary)',
79
- foreground: 'var(--secondary-foreground)'
80
- },
81
- muted: {
82
- DEFAULT: 'var(--muted)',
83
- foreground: 'var(--muted-foreground)'
84
- },
85
- accent: {
86
- DEFAULT: 'var(--accent)',
87
- foreground: 'var(--accent-foreground)'
88
- },
89
- destructive: {
90
- DEFAULT: 'var(--destructive)',
91
- foreground: 'var(--destructive-foreground)'
92
- },
93
- border: 'var(--border)',
94
- input: 'var(--input)',
95
- ring: 'var(--ring)',
96
- chart: {
97
- '1': 'var(--chart-1)',
98
- '2': 'var(--chart-2)',
99
- '3': 'var(--chart-3)',
100
- '4': 'var(--chart-4)',
101
- '5': 'var(--chart-5)'
102
- }
103
- },
104
- keyframes: {
105
- 'accordion-down': {
106
- from: {
107
- height: '0'
108
- },
109
- to: {
110
- height: 'var(--radix-accordion-content-height)'
111
- }
112
- },
113
- 'accordion-up': {
114
- from: {
115
- height: 'var(--radix-accordion-content-height)'
116
- },
117
- to: {
118
- height: '0'
119
- }
120
- }
121
- },
122
- animation: {
123
- 'accordion-down': 'accordion-down 0.2s ease-out',
124
- 'accordion-up': 'accordion-up 0.2s ease-out'
125
- }
126
- }
127
- },
128
- plugins: [require("tailwindcss-animate")],
129
- }
130
-
package/tsconfig.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "files": [],
3
- "include": [],
4
- "references": [
5
- {
6
- "path": "../core"
7
- },
8
- {
9
- "path": "./tsconfig.lib.json"
10
- }
11
- ],
12
- "extends": "../../tsconfig.base.json",
13
- "compilerOptions": {
14
- "baseUrl": ".",
15
- "paths": {
16
- "@/*": ["./src/*"]
17
- }
18
- }
19
- }
package/tsconfig.lib.json DELETED
@@ -1,43 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "outDir": "dist",
5
- "lib": ["dom", "dom.iterable", "esnext"],
6
- "types": [
7
- "node",
8
- "@nx/react/typings/cssmodule.d.ts",
9
- "@nx/react/typings/image.d.ts",
10
- "vite/client"
11
- ],
12
- "rootDir": "src",
13
- "jsx": "react-jsx",
14
- "module": "esnext",
15
- "moduleResolution": "bundler",
16
- "tsBuildInfoFile": "dist/tsconfig.lib.tsbuildinfo"
17
- },
18
- "exclude": [
19
- "out-tsc",
20
- "dist",
21
- "**/*.spec.ts",
22
- "**/*.test.ts",
23
- "**/*.spec.tsx",
24
- "**/*.test.tsx",
25
- "**/*.spec.js",
26
- "**/*.test.js",
27
- "**/*.spec.jsx",
28
- "**/*.test.jsx"
29
- ],
30
- "include": [
31
- "src/**/*.js",
32
- "src/**/*.jsx",
33
- "src/**/*.ts",
34
- "src/**/*.tsx"
35
- ,
36
- "../../apps/keys-jaw-id/src/utils/constants.ts"
37
- ],
38
- "references": [
39
- {
40
- "path": "../core/tsconfig.lib.json"
41
- }
42
- ]
43
- }
package/vite.config.ts DELETED
@@ -1,45 +0,0 @@
1
- /// <reference types='vitest' />
2
- import { defineConfig } from 'vite';
3
- import react from '@vitejs/plugin-react';
4
- import { libInjectCss } from 'vite-plugin-lib-inject-css';
5
- import dts from 'vite-plugin-dts';
6
- import * as path from 'path';
7
-
8
- export default defineConfig(() => ({
9
- root: __dirname,
10
- cacheDir: '../../node_modules/.vite/packages/ui',
11
- plugins: [react(), libInjectCss(), dts({ entryRoot: 'src', tsconfigPath: path.join(__dirname, 'tsconfig.lib.json') })],
12
- resolve: {
13
- alias: {
14
- '@': path.resolve(__dirname, './src'),
15
- },
16
- },
17
- // Uncomment this if you are using workers.
18
- // worker: {
19
- // plugins: [ nxViteTsPaths() ],
20
- // },
21
- // Configuration for building your library.
22
- // See: https://vitejs.dev/guide/build.html#library-mode
23
- build: {
24
- outDir: './dist',
25
- emptyOutDir: true,
26
- reportCompressedSize: true,
27
- cssCodeSplit: true,
28
- commonjsOptions: {
29
- transformMixedEsModules: true,
30
- },
31
- lib: {
32
- // Could also be a dictionary or array of multiple entry points.
33
- entry: 'src/index.ts',
34
- name: '@jaw.id/ui',
35
- fileName: 'index',
36
- // Change this to the formats you want to support.
37
- // Don't forget to update your package.json as well.
38
- formats: ['es' as const]
39
- },
40
- rollupOptions: {
41
- // External packages that should not be bundled into your library.
42
- external: ['react', 'react-dom', 'react-dom/client', 'react/jsx-runtime']
43
- },
44
- },
45
- }));