@agentskillmania/skill-ui-shared 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.
Files changed (159) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +51 -0
  3. package/dist/components/CollapsibleCard.d.ts +22 -0
  4. package/dist/components/CollapsibleCard.d.ts.map +1 -0
  5. package/dist/components/CollapsibleCard.js +30 -0
  6. package/dist/components/CollapsibleCard.js.map +1 -0
  7. package/dist/components/CollapsibleCard.stories.d.ts +16 -0
  8. package/dist/components/CollapsibleCard.stories.d.ts.map +1 -0
  9. package/dist/components/CollapsibleCard.stories.js +57 -0
  10. package/dist/components/CollapsibleCard.stories.js.map +1 -0
  11. package/dist/components/CopyValue.d.ts +12 -0
  12. package/dist/components/CopyValue.d.ts.map +1 -0
  13. package/dist/components/CopyValue.js +39 -0
  14. package/dist/components/CopyValue.js.map +1 -0
  15. package/dist/components/EmptyState.d.ts +16 -0
  16. package/dist/components/EmptyState.d.ts.map +1 -0
  17. package/dist/components/EmptyState.js +31 -0
  18. package/dist/components/EmptyState.js.map +1 -0
  19. package/dist/components/EmptyState.stories.d.ts +15 -0
  20. package/dist/components/EmptyState.stories.d.ts.map +1 -0
  21. package/dist/components/EmptyState.stories.js +45 -0
  22. package/dist/components/EmptyState.stories.js.map +1 -0
  23. package/dist/components/ExpandableItem.d.ts +29 -0
  24. package/dist/components/ExpandableItem.d.ts.map +1 -0
  25. package/dist/components/ExpandableItem.js +28 -0
  26. package/dist/components/ExpandableItem.js.map +1 -0
  27. package/dist/components/ExpandableItem.stories.d.ts +14 -0
  28. package/dist/components/ExpandableItem.stories.d.ts.map +1 -0
  29. package/dist/components/ExpandableItem.stories.js +178 -0
  30. package/dist/components/ExpandableItem.stories.js.map +1 -0
  31. package/dist/components/ExpandableRow.d.ts +35 -0
  32. package/dist/components/ExpandableRow.d.ts.map +1 -0
  33. package/dist/components/ExpandableRow.js +69 -0
  34. package/dist/components/ExpandableRow.js.map +1 -0
  35. package/dist/components/InfoRow.d.ts +15 -0
  36. package/dist/components/InfoRow.d.ts.map +1 -0
  37. package/dist/components/InfoRow.js +27 -0
  38. package/dist/components/InfoRow.js.map +1 -0
  39. package/dist/components/MetricTile.d.ts +15 -0
  40. package/dist/components/MetricTile.d.ts.map +1 -0
  41. package/dist/components/MetricTile.js +32 -0
  42. package/dist/components/MetricTile.js.map +1 -0
  43. package/dist/components/PaginationBar.d.ts +17 -0
  44. package/dist/components/PaginationBar.d.ts.map +1 -0
  45. package/dist/components/PaginationBar.js +19 -0
  46. package/dist/components/PaginationBar.js.map +1 -0
  47. package/dist/components/SectionHeader.d.ts +15 -0
  48. package/dist/components/SectionHeader.d.ts.map +1 -0
  49. package/dist/components/SectionHeader.js +34 -0
  50. package/dist/components/SectionHeader.js.map +1 -0
  51. package/dist/components/SectionHeader.stories.d.ts +13 -0
  52. package/dist/components/SectionHeader.stories.d.ts.map +1 -0
  53. package/dist/components/SectionHeader.stories.js +32 -0
  54. package/dist/components/SectionHeader.stories.js.map +1 -0
  55. package/dist/components/SectionLabel.d.ts +10 -0
  56. package/dist/components/SectionLabel.d.ts.map +1 -0
  57. package/dist/components/SectionLabel.js +22 -0
  58. package/dist/components/SectionLabel.js.map +1 -0
  59. package/dist/components/SplitDivider.d.ts +13 -0
  60. package/dist/components/SplitDivider.d.ts.map +1 -0
  61. package/dist/components/SplitDivider.js +70 -0
  62. package/dist/components/SplitDivider.js.map +1 -0
  63. package/dist/components/SplitDivider.stories.d.ts +12 -0
  64. package/dist/components/SplitDivider.stories.d.ts.map +1 -0
  65. package/dist/components/SplitDivider.stories.js +62 -0
  66. package/dist/components/SplitDivider.stories.js.map +1 -0
  67. package/dist/components/StatusDot.d.ts +11 -0
  68. package/dist/components/StatusDot.d.ts.map +1 -0
  69. package/dist/components/StatusDot.js +21 -0
  70. package/dist/components/StatusDot.js.map +1 -0
  71. package/dist/components/index.d.ts +27 -0
  72. package/dist/components/index.d.ts.map +1 -0
  73. package/dist/components/index.js +14 -0
  74. package/dist/components/index.js.map +1 -0
  75. package/dist/components/sidebar/Sidebar.d.ts +21 -0
  76. package/dist/components/sidebar/Sidebar.d.ts.map +1 -0
  77. package/dist/components/sidebar/Sidebar.js +41 -0
  78. package/dist/components/sidebar/Sidebar.js.map +1 -0
  79. package/dist/components/sidebar/Sidebar.stories.d.ts +14 -0
  80. package/dist/components/sidebar/Sidebar.stories.d.ts.map +1 -0
  81. package/dist/components/sidebar/Sidebar.stories.js +92 -0
  82. package/dist/components/sidebar/Sidebar.stories.js.map +1 -0
  83. package/dist/components/sidebar/SidebarIcons.d.ts +25 -0
  84. package/dist/components/sidebar/SidebarIcons.d.ts.map +1 -0
  85. package/dist/components/sidebar/SidebarIcons.js +65 -0
  86. package/dist/components/sidebar/SidebarIcons.js.map +1 -0
  87. package/dist/components/sidebar/SidebarPanel.d.ts +13 -0
  88. package/dist/components/sidebar/SidebarPanel.d.ts.map +1 -0
  89. package/dist/components/sidebar/SidebarPanel.js +32 -0
  90. package/dist/components/sidebar/SidebarPanel.js.map +1 -0
  91. package/dist/components/sidebar/index.d.ts +7 -0
  92. package/dist/components/sidebar/index.d.ts.map +1 -0
  93. package/dist/components/sidebar/index.js +4 -0
  94. package/dist/components/sidebar/index.js.map +1 -0
  95. package/dist/hooks/index.d.ts +5 -0
  96. package/dist/hooks/index.d.ts.map +1 -0
  97. package/dist/hooks/index.js +3 -0
  98. package/dist/hooks/index.js.map +1 -0
  99. package/dist/hooks/useResize.d.ts +28 -0
  100. package/dist/hooks/useResize.d.ts.map +1 -0
  101. package/dist/hooks/useResize.js +39 -0
  102. package/dist/hooks/useResize.js.map +1 -0
  103. package/dist/hooks/useToggle.d.ts +17 -0
  104. package/dist/hooks/useToggle.d.ts.map +1 -0
  105. package/dist/hooks/useToggle.js +14 -0
  106. package/dist/hooks/useToggle.js.map +1 -0
  107. package/dist/index.d.ts +15 -0
  108. package/dist/index.d.ts.map +1 -0
  109. package/dist/index.js +18 -0
  110. package/dist/index.js.map +1 -0
  111. package/dist/locales/en-US.d.ts +11 -0
  112. package/dist/locales/en-US.d.ts.map +1 -0
  113. package/dist/locales/en-US.js +11 -0
  114. package/dist/locales/en-US.js.map +1 -0
  115. package/dist/locales/index.d.ts +28 -0
  116. package/dist/locales/index.d.ts.map +1 -0
  117. package/dist/locales/index.js +10 -0
  118. package/dist/locales/index.js.map +1 -0
  119. package/dist/locales/zh-CN.d.ts +11 -0
  120. package/dist/locales/zh-CN.d.ts.map +1 -0
  121. package/dist/locales/zh-CN.js +11 -0
  122. package/dist/locales/zh-CN.js.map +1 -0
  123. package/dist/styles/card.d.ts +12 -0
  124. package/dist/styles/card.d.ts.map +1 -0
  125. package/dist/styles/card.js +39 -0
  126. package/dist/styles/card.js.map +1 -0
  127. package/dist/styles/empty-text.d.ts +7 -0
  128. package/dist/styles/empty-text.d.ts.map +1 -0
  129. package/dist/styles/empty-text.js +13 -0
  130. package/dist/styles/empty-text.js.map +1 -0
  131. package/dist/styles/expandable.d.ts +12 -0
  132. package/dist/styles/expandable.d.ts.map +1 -0
  133. package/dist/styles/expandable.js +34 -0
  134. package/dist/styles/expandable.js.map +1 -0
  135. package/dist/styles/index.d.ts +5 -0
  136. package/dist/styles/index.d.ts.map +1 -0
  137. package/dist/styles/index.js +5 -0
  138. package/dist/styles/index.js.map +1 -0
  139. package/dist/styles/metric.d.ts +12 -0
  140. package/dist/styles/metric.d.ts.map +1 -0
  141. package/dist/styles/metric.js +26 -0
  142. package/dist/styles/metric.js.map +1 -0
  143. package/dist/utils/avatar-color.d.ts +32 -0
  144. package/dist/utils/avatar-color.d.ts.map +1 -0
  145. package/dist/utils/avatar-color.js +31 -0
  146. package/dist/utils/avatar-color.js.map +1 -0
  147. package/dist/utils/fonts.d.ts +6 -0
  148. package/dist/utils/fonts.d.ts.map +1 -0
  149. package/dist/utils/fonts.js +6 -0
  150. package/dist/utils/fonts.js.map +1 -0
  151. package/dist/utils/format.d.ts +32 -0
  152. package/dist/utils/format.d.ts.map +1 -0
  153. package/dist/utils/format.js +75 -0
  154. package/dist/utils/format.js.map +1 -0
  155. package/dist/utils/pagination.d.ts +6 -0
  156. package/dist/utils/pagination.d.ts.map +1 -0
  157. package/dist/utils/pagination.js +6 -0
  158. package/dist/utils/pagination.js.map +1 -0
  159. package/package.json +80 -0
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Avatar color utility
3
+ * Deterministic color assignment based on id hash.
4
+ * Used by ResourceAvatar (portal), AppBrand (frame), and other components.
5
+ */
6
+ /** Color block palette — solid opaque background + contrasting text color */
7
+ export const PALETTE = [
8
+ { bg: '#dc2626', text: '#ffffff' }, // Red
9
+ { bg: '#2563eb', text: '#ffffff' }, // Blue
10
+ { bg: '#eab308', text: '#1a1a1a' }, // Yellow (dark text)
11
+ { bg: '#16a34a', text: '#ffffff' }, // Green
12
+ { bg: '#8b5cf6', text: '#ffffff' }, // Purple
13
+ ];
14
+ /** Deterministic hash based on id */
15
+ export function hashId(id) {
16
+ let hash = 5381;
17
+ for (let i = 0; i < id.length; i++) {
18
+ hash = ((hash << 5) + hash + id.charCodeAt(i)) | 0;
19
+ }
20
+ return Math.abs(hash);
21
+ }
22
+ /** Get avatar background color based on id */
23
+ export function getAvatarColor(id) {
24
+ const h = hashId(id);
25
+ return PALETTE[h % PALETTE.length];
26
+ }
27
+ /** Get first letter (uppercase) from name */
28
+ export function getInitial(name) {
29
+ return name.charAt(0).toUpperCase();
30
+ }
31
+ //# sourceMappingURL=avatar-color.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar-color.js","sourceRoot":"","sources":["../../src/utils/avatar-color.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,MAAM;IAC1C,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO;IAC3C,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,qBAAqB;IACzD,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,QAAQ;IAC5C,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,SAAS;CACrC,CAAC;AAEX,qCAAqC;AACrC,MAAM,UAAU,MAAM,CAAC,EAAU;IAC/B,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACnC,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACrD,CAAC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC;AAED,8CAA8C;AAC9C,MAAM,UAAU,cAAc,CAAC,EAAU;IACvC,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;IACrB,OAAO,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AACrC,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AACtC,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Shared font stacks.
3
+ */
4
+ /** Display/serif font stack used by brand headers (PortalHeader, AppBrand). */
5
+ export declare const FONT_DISPLAY = "'Iowan Old Style', 'Charter', Georgia, 'Songti SC', serif";
6
+ //# sourceMappingURL=fonts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../src/utils/fonts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,+EAA+E;AAC/E,eAAO,MAAM,YAAY,8DAA8D,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Shared font stacks.
3
+ */
4
+ /** Display/serif font stack used by brand headers (PortalHeader, AppBrand). */
5
+ export const FONT_DISPLAY = "'Iowan Old Style', 'Charter', Georgia, 'Songti SC', serif";
6
+ //# sourceMappingURL=fonts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fonts.js","sourceRoot":"","sources":["../../src/utils/fonts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,+EAA+E;AAC/E,MAAM,CAAC,MAAM,YAAY,GAAG,2DAA2D,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Format a timestamp as a relative time string.
3
+ * Accepts a unix timestamp (ms) or an ISO date string.
4
+ * Returns "just now", "Xm ago", "Xh ago", or "Xd ago" relative to Date.now().
5
+ * Returns "-" for undefined/null/invalid input.
6
+ */
7
+ export declare function formatRelativeTime(timestamp: number | string | undefined): string;
8
+ /**
9
+ * Format token counts into human-readable strings.
10
+ * >= 1M → "X.XM", >= 1k → "X.Xk", otherwise locale number string.
11
+ * Returns "-" for undefined/null input.
12
+ */
13
+ export declare function formatTokens(value: number | undefined): string;
14
+ /**
15
+ * Format a number with locale formatting, or "-" for undefined.
16
+ */
17
+ export declare function formatNumber(value: number | undefined): string;
18
+ /**
19
+ * Format a duration in milliseconds.
20
+ * >= 1000ms → "X.Xs", otherwise "Xms".
21
+ */
22
+ export declare function formatDuration(ms: number): string;
23
+ /**
24
+ * Truncate text to maxLength characters, appending "..." if truncated.
25
+ */
26
+ export declare function truncate(text: string, maxLength: number): string;
27
+ /**
28
+ * Format an ISO timestamp to "M/D HH:mm" locale string.
29
+ * Returns "-" for undefined. Returns raw string for invalid dates.
30
+ */
31
+ export declare function formatTimestamp(iso: string | undefined): string;
32
+ //# sourceMappingURL=format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/utils/format.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAajF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAK9D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAG9D;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAGhE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAK/D"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Format a timestamp as a relative time string.
3
+ * Accepts a unix timestamp (ms) or an ISO date string.
4
+ * Returns "just now", "Xm ago", "Xh ago", or "Xd ago" relative to Date.now().
5
+ * Returns "-" for undefined/null/invalid input.
6
+ */
7
+ export function formatRelativeTime(timestamp) {
8
+ if (timestamp == null)
9
+ return '-';
10
+ const ms = typeof timestamp === 'string' ? new Date(timestamp).getTime() : timestamp;
11
+ if (Number.isNaN(ms))
12
+ return '-';
13
+ const diff = Date.now() - ms;
14
+ const seconds = Math.floor(diff / 1000);
15
+ if (seconds < 60)
16
+ return 'just now';
17
+ const minutes = Math.floor(seconds / 60);
18
+ if (minutes < 60)
19
+ return `${minutes}m ago`;
20
+ const hours = Math.floor(minutes / 60);
21
+ if (hours < 24)
22
+ return `${hours}h ago`;
23
+ const days = Math.floor(hours / 24);
24
+ return `${days}d ago`;
25
+ }
26
+ /**
27
+ * Format token counts into human-readable strings.
28
+ * >= 1M → "X.XM", >= 1k → "X.Xk", otherwise locale number string.
29
+ * Returns "-" for undefined/null input.
30
+ */
31
+ export function formatTokens(value) {
32
+ if (value == null)
33
+ return '-';
34
+ if (value >= 1_000_000)
35
+ return `${(value / 1_000_000).toFixed(1)}M`;
36
+ if (value >= 1_000)
37
+ return `${(value / 1_000).toFixed(1)}k`;
38
+ return value.toLocaleString();
39
+ }
40
+ /**
41
+ * Format a number with locale formatting, or "-" for undefined.
42
+ */
43
+ export function formatNumber(value) {
44
+ if (value == null)
45
+ return '-';
46
+ return value.toLocaleString();
47
+ }
48
+ /**
49
+ * Format a duration in milliseconds.
50
+ * >= 1000ms → "X.Xs", otherwise "Xms".
51
+ */
52
+ export function formatDuration(ms) {
53
+ return ms >= 1000 ? `${(ms / 1000).toFixed(1)}s` : `${ms}ms`;
54
+ }
55
+ /**
56
+ * Truncate text to maxLength characters, appending "..." if truncated.
57
+ */
58
+ export function truncate(text, maxLength) {
59
+ if (text.length <= maxLength)
60
+ return text;
61
+ return text.slice(0, maxLength - 3) + '...';
62
+ }
63
+ /**
64
+ * Format an ISO timestamp to "M/D HH:mm" locale string.
65
+ * Returns "-" for undefined. Returns raw string for invalid dates.
66
+ */
67
+ export function formatTimestamp(iso) {
68
+ if (!iso)
69
+ return '-';
70
+ const d = new Date(iso);
71
+ if (Number.isNaN(d.getTime()))
72
+ return iso;
73
+ return `${d.getMonth() + 1}/${d.getDate()} ${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}`;
74
+ }
75
+ //# sourceMappingURL=format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/utils/format.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Shared pagination defaults.
3
+ */
4
+ /** Default page size used by portal list sections (skills, agents, sessions). */
5
+ export declare const DEFAULT_PAGE_SIZE = 12;
6
+ //# sourceMappingURL=pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/utils/pagination.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,iFAAiF;AACjF,eAAO,MAAM,iBAAiB,KAAK,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Shared pagination defaults.
3
+ */
4
+ /** Default page size used by portal list sections (skills, agents, sessions). */
5
+ export const DEFAULT_PAGE_SIZE = 12;
6
+ //# sourceMappingURL=pagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../src/utils/pagination.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,iFAAiF;AACjF,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "@agentskillmania/skill-ui-shared",
3
+ "version": "0.1.0",
4
+ "description": "Shared UI components and utilities for @agentskillmania skill-ui packages.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ },
13
+ "./package.json": "./package.json"
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md",
18
+ "LICENSE"
19
+ ],
20
+ "author": {
21
+ "name": "yusangeng",
22
+ "email": "yusangeng@outlook.com"
23
+ },
24
+ "license": "MIT",
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "https://github.com/agentskillmania/skill-ui.git",
31
+ "directory": "packages/shared"
32
+ },
33
+ "dependencies": {
34
+ "@agentskillmania/skill-ui-theme": "0.1.0"
35
+ },
36
+ "peerDependencies": {
37
+ "antd": "^6.0.0",
38
+ "lucide-react": ">=0.400.0",
39
+ "react": "^19.0.0",
40
+ "react-dom": "^19.0.0",
41
+ "react-i18next": "^15.0.0",
42
+ "@emotion/react": "^11.0.0"
43
+ },
44
+ "devDependencies": {
45
+ "@testing-library/jest-dom": "^6.6.0",
46
+ "@testing-library/react": "^16.3.2",
47
+ "@types/react": "^19.0.0",
48
+ "@types/react-dom": "^19.0.0",
49
+ "@vitest/coverage-v8": "^2.0.0",
50
+ "antd": "^6.3.3",
51
+ "jsdom": "^29.0.1",
52
+ "lucide-react": "^0.460.0",
53
+ "react": "^19.0.0",
54
+ "react-dom": "^19.0.0",
55
+ "i18next": "^24.0.0",
56
+ "react-i18next": "^15.0.0",
57
+ "typescript": "^5.0.0",
58
+ "vitest": "^2.0.0",
59
+ "@chromatic-com/storybook": "^5.0.2",
60
+ "@storybook/addon-a11y": "^10.3.3",
61
+ "@storybook/addon-docs": "^10.3.3",
62
+ "@storybook/react-vite": "^10.3.3",
63
+ "storybook": "^10.3.3",
64
+ "vite": "^5.4.21",
65
+ "@vitejs/plugin-react": "^4.7.0"
66
+ },
67
+ "engines": {
68
+ "node": ">=18.0.0"
69
+ },
70
+ "scripts": {
71
+ "build": "tsc",
72
+ "dev": "tsc --watch",
73
+ "test": "vitest run",
74
+ "test:unit": "vitest run test/unit",
75
+ "test:coverage": "vitest run test/unit --coverage",
76
+ "test:watch": "vitest watch test/unit",
77
+ "storybook": "storybook dev -p 6008",
78
+ "build-storybook": "storybook build"
79
+ }
80
+ }