@c-rex/components 0.1.36 → 0.1.38

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 (95) hide show
  1. package/package.json +1 -18
  2. package/src/article/article-content.tsx +26 -35
  3. package/src/autocomplete.tsx +26 -5
  4. package/src/carousel/carousel.tsx +53 -52
  5. package/src/check-article-lang.tsx +8 -4
  6. package/src/favorites/bookmark-button.tsx +26 -11
  7. package/src/favorites/favorite-button.tsx +67 -21
  8. package/src/info/info-table.tsx +60 -38
  9. package/src/info/set-available-versions.tsx +19 -0
  10. package/src/navbar/language-switcher/content-language-switch.tsx +36 -36
  11. package/src/navbar/language-switcher/ui-language-switch.tsx +5 -6
  12. package/src/navbar/navbar.tsx +17 -8
  13. package/src/renditions/html.tsx +38 -31
  14. package/src/restriction-menu/restriction-menu-item.tsx +8 -5
  15. package/src/restriction-menu/restriction-menu.tsx +26 -25
  16. package/src/results/generic/table-result-list.tsx +1 -1
  17. package/src/results/utils.ts +9 -2
  18. package/src/stores/favorites-store.ts +21 -21
  19. package/src/stores/language-store.ts +2 -31
  20. package/src/article/article-action-bar.analysis.md +0 -15
  21. package/src/article/article-action-bar.stories.tsx +0 -15
  22. package/src/article/article-content.analysis.md +0 -15
  23. package/src/article/article-content.stories.tsx +0 -21
  24. package/src/autocomplete.analysis.md +0 -17
  25. package/src/breadcrumb.analysis.md +0 -15
  26. package/src/carousel/carousel.analysis.md +0 -17
  27. package/src/check-article-lang.analysis.md +0 -15
  28. package/src/directoryNodes/tree-of-content.analysis.md +0 -14
  29. package/src/directoryNodes/tree-of-content.stories.tsx +0 -22
  30. package/src/documents/result-list.analysis.md +0 -14
  31. package/src/documents/result-list.stories.tsx +0 -19
  32. package/src/favorites/bookmark-button.analysis.md +0 -17
  33. package/src/favorites/bookmark-button.stories.tsx +0 -19
  34. package/src/favorites/favorite-button.analysis.md +0 -18
  35. package/src/favorites/favorite-button.stories.tsx +0 -22
  36. package/src/icons/file-icon.analysis.md +0 -14
  37. package/src/icons/file-icon.stories.tsx +0 -19
  38. package/src/icons/flag-icon.analysis.md +0 -14
  39. package/src/icons/flag-icon.stories.tsx +0 -25
  40. package/src/icons/loading.analysis.md +0 -14
  41. package/src/icons/loading.stories.tsx +0 -21
  42. package/src/info/info-table.analysis.md +0 -15
  43. package/src/info/shared.analysis.md +0 -14
  44. package/src/info/stories/info-table.stories.tsx +0 -31
  45. package/src/info/stories/shared.stories.tsx +0 -24
  46. package/src/navbar/language-switcher/content-language-switch.analysis.md +0 -15
  47. package/src/navbar/language-switcher/shared.analysis.md +0 -14
  48. package/src/navbar/language-switcher/ui-language-switch.analysis.md +0 -15
  49. package/src/navbar/navbar.analysis.md +0 -14
  50. package/src/navbar/settings.analysis.md +0 -14
  51. package/src/navbar/sign-in-out-btns.analysis.md +0 -14
  52. package/src/navbar/stories/navbar.stories.tsx +0 -31
  53. package/src/navbar/stories/settings.stories.tsx +0 -15
  54. package/src/navbar/stories/sign-in-out-btns.stories.tsx +0 -15
  55. package/src/navbar/stories/user-menu.stories.tsx +0 -20
  56. package/src/navbar/user-menu.analysis.md +0 -14
  57. package/src/page-wrapper.analysis.md +0 -14
  58. package/src/render-article.analysis.md +0 -15
  59. package/src/renditions/file-download.analysis.md +0 -14
  60. package/src/renditions/file-download.stories.tsx +0 -19
  61. package/src/renditions/html.analysis.md +0 -17
  62. package/src/renditions/html.stories.tsx +0 -19
  63. package/src/renditions/image/container.analysis.md +0 -15
  64. package/src/renditions/image/container.stories.tsx +0 -19
  65. package/src/renditions/image/rendition.analysis.md +0 -14
  66. package/src/renditions/image/rendition.stories.tsx +0 -19
  67. package/src/restriction-menu/restriction-menu-container.analysis.md +0 -14
  68. package/src/restriction-menu/restriction-menu-item.analysis.md +0 -14
  69. package/src/restriction-menu/restriction-menu.analysis.md +0 -17
  70. package/src/results/analysis/cards.analysis.md +0 -14
  71. package/src/results/analysis/dialog-filter.analysis.md +0 -17
  72. package/src/results/analysis/empty.analysis.md +0 -14
  73. package/src/results/analysis/filter-navbar.analysis.md +0 -16
  74. package/src/results/analysis/pagination.analysis.md +0 -14
  75. package/src/results/analysis/table-with-images.analysis.md +0 -15
  76. package/src/results/analysis/table.analysis.md +0 -15
  77. package/src/results/filter-sidebar/index.analysis.md +0 -14
  78. package/src/results/generic/table-result-list.analysis.md +0 -15
  79. package/src/results/generic/table-result-list.stories.tsx +0 -21
  80. package/src/results/stories/cards.stories.tsx +0 -66
  81. package/src/results/stories/dialog-filter.stories.tsx +0 -20
  82. package/src/results/stories/empty.stories.tsx +0 -25
  83. package/src/results/stories/filter-navbar.stories.tsx +0 -19
  84. package/src/results/stories/filter-sidebar.stories.tsx +0 -20
  85. package/src/results/stories/pagination.stories.tsx +0 -24
  86. package/src/results/stories/table-with-images.stories.tsx +0 -19
  87. package/src/results/stories/table.stories.tsx +0 -78
  88. package/src/search-input.analysis.md +0 -15
  89. package/src/share-button.analysis.md +0 -19
  90. package/src/stories/autocomplete.stories.tsx +0 -20
  91. package/src/stories/breadcrumb.stories.tsx +0 -93
  92. package/src/stories/check-article-lang.stories.tsx +0 -22
  93. package/src/stories/render-article.stories.tsx +0 -19
  94. package/src/stories/search-input.stories.tsx +0 -21
  95. package/src/stories/share-button.stories.tsx +0 -15
@@ -1,14 +0,0 @@
1
- # Analysis: navbar
2
-
3
- - Component: packages/components/src/navbar/navbar.tsx
4
- - Type: Server component
5
- - Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - No obvious excessive re-render trigger beyond normal prop/context updates.
9
-
10
- ## Possible bugs/risks
11
- - No critical bug is evident in this quick static pass; keep tests for error and loading paths.
12
-
13
- ## Recommended improvements
14
- - Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
@@ -1,14 +0,0 @@
1
- # Analysis: settings
2
-
3
- - Component: packages/components/src/navbar/settings.tsx
4
- - Type: Server component
5
- - Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - No obvious excessive re-render trigger beyond normal prop/context updates.
9
-
10
- ## Possible bugs/risks
11
- - No critical bug is evident in this quick static pass; keep tests for error and loading paths.
12
-
13
- ## Recommended improvements
14
- - Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
@@ -1,14 +0,0 @@
1
- # Analysis: sign-in-out-btns
2
-
3
- - Component: packages/components/src/navbar/sign-in-out-btns.tsx
4
- - Type: Client component
5
- - Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - No obvious excessive re-render trigger beyond normal prop/context updates.
9
-
10
- ## Possible bugs/risks
11
- - No critical bug is evident in this quick static pass; keep tests for error and loading paths.
12
-
13
- ## Recommended improvements
14
- - Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
@@ -1,31 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { NavBar } from '../navbar';
3
-
4
- const meta: Meta<typeof NavBar> = {
5
- title: 'Components/NavBar',
6
- component: NavBar,
7
- parameters: {
8
- layout: 'padded',
9
- },
10
- tags: ['autodocs'],
11
- };
12
- export default meta;
13
- type Story = StoryObj<typeof NavBar>;
14
-
15
- export const Basic: Story = {
16
- args: {
17
- title: 'C-Rex',
18
- showInput: false,
19
- showPkgFilter: false,
20
- },
21
- };
22
-
23
- export const WithSearch: Story = {
24
- args: {
25
- title: 'C-Rex',
26
- showInput: true,
27
- showPkgFilter: false,
28
- autocompleteType: 'default', // ajuste conforme opções reais
29
- onSelectPath: '/search',
30
- },
31
- };
@@ -1,15 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { SettingsMenu } from '../settings';
3
-
4
- const meta: Meta<typeof SettingsMenu> = {
5
- title: 'Components/Navbar/SettingsMenu',
6
- component: SettingsMenu,
7
- parameters: {
8
- layout: 'centered',
9
- },
10
- tags: ['autodocs'],
11
- };
12
- export default meta;
13
- type Story = StoryObj<typeof SettingsMenu>;
14
-
15
- export const Basic: Story = {};
@@ -1,15 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { SignInBtn } from '../sign-in-out-btns';
3
-
4
- const meta: Meta<typeof SignInBtn> = {
5
- title: 'Components/Navbar/SignInBtn',
6
- component: SignInBtn,
7
- parameters: {
8
- layout: 'centered',
9
- },
10
- tags: ['autodocs'],
11
- };
12
- export default meta;
13
- type Story = StoryObj<typeof SignInBtn>;
14
-
15
- export const Basic: Story = {};
@@ -1,20 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { UserMenu } from '../user-menu';
3
-
4
- const meta: Meta<typeof UserMenu> = {
5
- title: 'Components/Navbar/UserMenu',
6
- component: UserMenu,
7
- parameters: {
8
- layout: 'centered',
9
- },
10
- tags: ['autodocs'],
11
- };
12
- export default meta;
13
- type Story = StoryObj<typeof UserMenu>;
14
-
15
- export const Basic: Story = {
16
- args: {
17
- session: { user: { name: 'John Doe', email: 'john@doe.com' } },
18
- OIDCEndPoint: 'https://oidc.example.com/',
19
- },
20
- };
@@ -1,14 +0,0 @@
1
- # Analysis: user-menu
2
-
3
- - Component: packages/components/src/navbar/user-menu.tsx
4
- - Type: Client component
5
- - Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - No obvious excessive re-render trigger beyond normal prop/context updates.
9
-
10
- ## Possible bugs/risks
11
- - No critical bug is evident in this quick static pass; keep tests for error and loading paths.
12
-
13
- ## Recommended improvements
14
- - Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
@@ -1,14 +0,0 @@
1
- # Analysis: page-wrapper
2
-
3
- - Component: packages/components/src/page-wrapper.tsx
4
- - Type: Server component
5
- - Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - No obvious excessive re-render trigger beyond normal prop/context updates.
9
-
10
- ## Possible bugs/risks
11
- - No critical bug is evident in this quick static pass; keep tests for error and loading paths.
12
-
13
- ## Recommended improvements
14
- - Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
@@ -1,15 +0,0 @@
1
- # Analysis: render-article
2
-
3
- - Component: packages/components/src/render-article.tsx
4
- - Type: Client component
5
- - Detected signals: useQueryStates=no, stores=yes, window/document=no, effects=yes, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - Store subscriptions can re-render this component whenever the selected slice changes.
9
- - Effects that update state can add extra renders on mount and dependency changes.
10
-
11
- ## Possible bugs/risks
12
- - No critical bug is evident in this quick static pass; keep tests for error and loading paths.
13
-
14
- ## Recommended improvements
15
- - Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
@@ -1,14 +0,0 @@
1
- # Analysis: file-download
2
-
3
- - Component: packages/components/src/renditions/file-download.tsx
4
- - Type: Server component
5
- - Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - No obvious excessive re-render trigger beyond normal prop/context updates.
9
-
10
- ## Possible bugs/risks
11
- - No critical bug is evident in this quick static pass; keep tests for error and loading paths.
12
-
13
- ## Recommended improvements
14
- - Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
@@ -1,19 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { FileDownloadDropdown } from '../file-download';
3
-
4
- const meta: Meta<typeof FileDownloadDropdown> = {
5
- title: 'Components/Renditions/FileDownloadDropdown',
6
- component: FileDownloadDropdown,
7
- parameters: {
8
- layout: 'centered',
9
- },
10
- tags: ['autodocs'],
11
- };
12
- export default meta;
13
- type Story = StoryObj<typeof FileDownloadDropdown>;
14
-
15
- export const Basic: Story = {
16
- args: {
17
- renditions: [],
18
- },
19
- };
@@ -1,17 +0,0 @@
1
- # Analysis: html
2
-
3
- - Component: packages/components/src/renditions/html.tsx
4
- - Type: Server component
5
- - Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=yes
6
-
7
- ## Possible re-render causes
8
- - No obvious excessive re-render trigger beyond normal prop/context updates.
9
-
10
- ## Possible bugs/risks
11
- - Async flows can hit race conditions during fast param/route changes.
12
- - fetch(url) runs inside async server rendering path and can increase list/page latency.
13
-
14
- ## Recommended improvements
15
- - Consider cancellation guards (isMounted or AbortController) and standardized error handling.
16
- - Consider caching/revalidation and lighter fallback strategy to reduce N+1 impact.
17
-
@@ -1,19 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { HtmlRendition } from '../html';
3
-
4
- const meta: Meta<typeof HtmlRendition> = {
5
- title: 'Components/Renditions/HtmlRendition',
6
- component: HtmlRendition,
7
- parameters: {
8
- layout: 'centered',
9
- },
10
- tags: ['autodocs'],
11
- };
12
- export default meta;
13
- type Story = StoryObj<typeof HtmlRendition>;
14
-
15
- export const Basic: Story = {
16
- args: {
17
- shortId: 'doc-1',
18
- },
19
- };
@@ -1,15 +0,0 @@
1
- # Analysis: container
2
-
3
- - Component: packages/components/src/renditions/image/container.tsx
4
- - Type: Client component
5
- - Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - No obvious excessive re-render trigger beyond normal prop/context updates.
9
-
10
- ## Possible bugs/risks
11
- - imageRestrictions prop exists but is not applied to Restrict composition.
12
-
13
- ## Recommended improvements
14
- - Apply imageRestrictions to Restrict or remove the prop to avoid misleading API behavior.
15
-
@@ -1,19 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { ImageRenditionContainer } from './container';
3
-
4
- const meta: Meta<typeof ImageRenditionContainer> = {
5
- title: 'Components/Renditions/ImageRenditionContainer',
6
- component: ImageRenditionContainer,
7
- parameters: {
8
- layout: 'centered',
9
- },
10
- tags: ['autodocs'],
11
- };
12
- export default meta;
13
- type Story = StoryObj<typeof ImageRenditionContainer>;
14
-
15
- export const Basic: Story = {
16
- args: {
17
- itemShortId: 'doc-1',
18
- },
19
- };
@@ -1,14 +0,0 @@
1
- # Analysis: rendition
2
-
3
- - Component: packages/components/src/renditions/image/rendition.tsx
4
- - Type: Server component
5
- - Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - No obvious excessive re-render trigger beyond normal prop/context updates.
9
-
10
- ## Possible bugs/risks
11
- - No critical bug is evident in this quick static pass; keep tests for error and loading paths.
12
-
13
- ## Recommended improvements
14
- - Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
@@ -1,19 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { ImageRendition } from './rendition';
3
-
4
- const meta: Meta<typeof ImageRendition> = {
5
- title: 'Components/Renditions/ImageRendition',
6
- component: ImageRendition,
7
- parameters: {
8
- layout: 'centered',
9
- },
10
- tags: ['autodocs'],
11
- };
12
- export default meta;
13
- type Story = StoryObj<typeof ImageRendition>;
14
-
15
- export const Basic: Story = {
16
- args: {
17
- items: [],
18
- },
19
- };
@@ -1,14 +0,0 @@
1
- # Analysis: restriction-menu-container
2
-
3
- - Component: packages/components/src/restriction-menu/restriction-menu-container.tsx
4
- - Type: Client component
5
- - Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - No obvious excessive re-render trigger beyond normal prop/context updates.
9
-
10
- ## Possible bugs/risks
11
- - No critical bug is evident in this quick static pass; keep tests for error and loading paths.
12
-
13
- ## Recommended improvements
14
- - Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
@@ -1,14 +0,0 @@
1
- # Analysis: restriction-menu-item
2
-
3
- - Component: packages/components/src/restriction-menu/restriction-menu-item.tsx
4
- - Type: Client component
5
- - Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - No obvious excessive re-render trigger beyond normal prop/context updates.
9
-
10
- ## Possible bugs/risks
11
- - No critical bug is evident in this quick static pass; keep tests for error and loading paths.
12
-
13
- ## Recommended improvements
14
- - Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
@@ -1,17 +0,0 @@
1
- # Analysis: restriction-menu
2
-
3
- - Component: packages/components/src/restriction-menu/restriction-menu.tsx
4
- - Type: Client component
5
- - Detected signals: useQueryStates=yes, stores=yes, window/document=no, effects=yes, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - useQueryStates triggers re-renders whenever relevant query-string values change.
9
- - Store subscriptions can re-render this component whenever the selected slice changes.
10
- - Effects that update state can add extra renders on mount and dependency changes.
11
-
12
- ## Possible bugs/risks
13
- - Breakpoint-driven sorting/partitioning can trigger chained updates (visibleCount, visibleItems, hiddenItems).
14
-
15
- ## Recommended improvements
16
- - Derive visibleItems/hiddenItems via useMemo from sortedItems + visibleCount to reduce duplicated state.
17
-
@@ -1,14 +0,0 @@
1
- # Analysis: cards
2
-
3
- - Component: packages/components/src/results/cards.tsx
4
- - Type: Client component
5
- - Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - No obvious excessive re-render trigger beyond normal prop/context updates.
9
-
10
- ## Possible bugs/risks
11
- - No critical bug is evident in this quick static pass; keep tests for error and loading paths.
12
-
13
- ## Recommended improvements
14
- - Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
@@ -1,17 +0,0 @@
1
- # Analysis: dialog-filter
2
-
3
- - Component: packages/components/src/results/dialog-filter.tsx
4
- - Type: Client component
5
- - Detected signals: useQueryStates=yes, stores=yes, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - useQueryStates triggers re-renders whenever relevant query-string values change.
9
- - Store subscriptions can re-render this component whenever the selected slice changes.
10
- - Form changes and URL/store synchronization can re-render the dialog multiple times in dev mode.
11
-
12
- ## Possible bugs/risks
13
- - No critical bug is evident in this quick static pass; keep tests for error and loading paths.
14
-
15
- ## Recommended improvements
16
- - If needed, memoize trigger in parent and consider React.memo when props are stable.
17
-
@@ -1,14 +0,0 @@
1
- # Analysis: empty
2
-
3
- - Component: packages/components/src/results/empty.tsx
4
- - Type: Server component
5
- - Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - No obvious excessive re-render trigger beyond normal prop/context updates.
9
-
10
- ## Possible bugs/risks
11
- - No critical bug is evident in this quick static pass; keep tests for error and loading paths.
12
-
13
- ## Recommended improvements
14
- - Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
@@ -1,16 +0,0 @@
1
- # Analysis: filter-navbar
2
-
3
- - Component: packages/components/src/results/filter-navbar.tsx
4
- - Type: Client component
5
- - Detected signals: useQueryStates=yes, stores=yes, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - useQueryStates triggers re-renders whenever relevant query-string values change.
9
- - Store subscriptions can re-render this component whenever the selected slice changes.
10
-
11
- ## Possible bugs/risks
12
- - Query defaults based on getState() may diverge between SSR and CSR when cookie/store state changes between renders.
13
-
14
- ## Recommended improvements
15
- - Centralize defaults from server-provided props or a stable context to reduce mismatch risk.
16
-
@@ -1,14 +0,0 @@
1
- # Analysis: pagination
2
-
3
- - Component: packages/components/src/results/pagination.tsx
4
- - Type: Client component
5
- - Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - No obvious excessive re-render trigger beyond normal prop/context updates.
9
-
10
- ## Possible bugs/risks
11
- - No critical bug is evident in this quick static pass; keep tests for error and loading paths.
12
-
13
- ## Recommended improvements
14
- - Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
@@ -1,15 +0,0 @@
1
- # Analysis: table-with-images
2
-
3
- - Component: packages/components/src/results/table-with-images.tsx
4
- - Type: Server component
5
- - Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - No obvious excessive re-render trigger beyond normal prop/context updates.
9
-
10
- ## Possible bugs/risks
11
- - The component renders list-heavy UI; key stability and memoization strongly affect perceived performance.
12
-
13
- ## Recommended improvements
14
- - Review key strategy and extract memoized subcomponents for large-list rendering.
15
-
@@ -1,15 +0,0 @@
1
- # Analysis: table
2
-
3
- - Component: packages/components/src/results/table.tsx
4
- - Type: Server component
5
- - Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - No obvious excessive re-render trigger beyond normal prop/context updates.
9
-
10
- ## Possible bugs/risks
11
- - The component renders list-heavy UI; key stability and memoization strongly affect perceived performance.
12
-
13
- ## Recommended improvements
14
- - Review key strategy and extract memoized subcomponents for large-list rendering.
15
-
@@ -1,14 +0,0 @@
1
- # Analysis: index
2
-
3
- - Component: packages/components/src/results/filter-sidebar/index.tsx
4
- - Type: Client component
5
- - Detected signals: useQueryStates=yes, stores=no, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - useQueryStates triggers re-renders whenever relevant query-string values change.
9
-
10
- ## Possible bugs/risks
11
- - No critical bug is evident in this quick static pass; keep tests for error and loading paths.
12
-
13
- ## Recommended improvements
14
- - Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
@@ -1,15 +0,0 @@
1
- # Analysis: table-result-list
2
-
3
- - Component: packages/components/src/results/generic/table-result-list.tsx
4
- - Type: Server component
5
- - Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
6
-
7
- ## Possible re-render causes
8
- - No obvious excessive re-render trigger beyond normal prop/context updates.
9
-
10
- ## Possible bugs/risks
11
- - The component renders list-heavy UI; key stability and memoization strongly affect perceived performance.
12
-
13
- ## Recommended improvements
14
- - Review key strategy and extract memoized subcomponents for large-list rendering.
15
-
@@ -1,21 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { GenericTableResultList } from './table-result-list';
3
-
4
- const meta: Meta<typeof GenericTableResultList> = {
5
- title: 'Components/Results/GenericTableResultList',
6
- component: GenericTableResultList,
7
- parameters: {
8
- layout: 'centered',
9
- },
10
- tags: ['autodocs'],
11
- };
12
- export default meta;
13
- type Story = StoryObj<typeof GenericTableResultList>;
14
-
15
- export const Basic: Story = {
16
- args: {
17
- items: [],
18
- linkPattern: '/docs/[id]',
19
- addPackageId: false,
20
- },
21
- };
@@ -1,66 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import BlogView from '../cards';
3
-
4
- const meta: Meta<typeof BlogView> = {
5
- title: 'Components/ResultView/Blog',
6
- component: BlogView,
7
- parameters: {
8
- layout: 'centered',
9
- },
10
- tags: ['autodocs'],
11
- };
12
- export default meta;
13
- type Story = StoryObj<typeof BlogView>;
14
-
15
- const items = [
16
- {
17
- id: '1',
18
- shortId: 'doc-1',
19
- labels: [
20
- { value: 'Getting Started with C-Rex', language: 'en-US' },
21
- { value: 'Começando com C-Rex', language: 'pt-BR' }
22
- ],
23
- languages: ['pt-BR'],
24
- type: 'document',
25
- renditions: [],
26
- directoryNodes: [],
27
- disabled: false,
28
- },
29
- {
30
- id: '2',
31
- shortId: 'doc-2',
32
- labels: [
33
- { value: 'Advanced Configuration Guide', language: 'en-US' }
34
- ],
35
- languages: ['en-US'],
36
- type: 'document',
37
- renditions: [],
38
- directoryNodes: [],
39
- disabled: false,
40
- },
41
- {
42
- id: '3',
43
- shortId: 'doc-3',
44
- labels: [
45
- { value: 'API Documentation', language: 'en-US' },
46
- { value: 'Documentation API', language: 'fr-FR' }
47
- ],
48
- languages: ['fr-FR'],
49
- type: 'document',
50
- renditions: [],
51
- directoryNodes: [],
52
- disabled: true,
53
- }
54
- ];
55
-
56
- export const Basic: Story = {
57
- args: {
58
- items,
59
- },
60
- };
61
-
62
- export const WithDisabled: Story = {
63
- args: {
64
- items: items.map((item, i) => ({ ...item, disabled: i === 2 })),
65
- },
66
- };
@@ -1,20 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { DialogFilter } from '../dialog-filter';
3
- import { Button } from '@c-rex/ui/button';
4
-
5
- const meta: Meta<typeof DialogFilter> = {
6
- title: 'Components/Results/DialogFilter',
7
- component: DialogFilter,
8
- parameters: {
9
- layout: 'centered',
10
- },
11
- tags: ['autodocs'],
12
- };
13
- export default meta;
14
- type Story = StoryObj<typeof DialogFilter>;
15
-
16
- export const Basic: Story = {
17
- args: {
18
- trigger: <Button>Open Filter</Button>,
19
- },
20
- };