@principal-ade/code-quality-panels 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.
- package/LICENSE +21 -0
- package/README.md +536 -0
- package/dist/components/QualityHexagon.d.ts +26 -0
- package/dist/components/QualityHexagon.d.ts.map +1 -0
- package/dist/components/QualityHexagon.stories.d.ts +53 -0
- package/dist/components/QualityHexagon.stories.d.ts.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/mocks/panelContext.d.ts +33 -0
- package/dist/mocks/panelContext.d.ts.map +1 -0
- package/dist/panels/QualityHexagonPanel.d.ts +7 -0
- package/dist/panels/QualityHexagonPanel.d.ts.map +1 -0
- package/dist/panels/QualityHexagonPanel.stories.d.ts +59 -0
- package/dist/panels/QualityHexagonPanel.stories.d.ts.map +1 -0
- package/dist/panels.bundle.js +955 -0
- package/dist/panels.bundle.js.map +1 -0
- package/dist/tools/index.d.ts +7 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools.bundle.js +7 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +99 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PanelComponentProps, PanelContextValue, PanelActions, PanelEventEmitter } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Mock Panel Context for Storybook
|
|
5
|
+
*/
|
|
6
|
+
export declare const createMockContext: (overrides?: Partial<PanelContextValue>) => PanelContextValue;
|
|
7
|
+
/**
|
|
8
|
+
* Mock Panel Actions for Storybook
|
|
9
|
+
*/
|
|
10
|
+
export declare const createMockActions: (overrides?: Partial<PanelActions>) => PanelActions;
|
|
11
|
+
/**
|
|
12
|
+
* Mock Event Emitter for Storybook
|
|
13
|
+
*/
|
|
14
|
+
export declare const createMockEvents: () => PanelEventEmitter;
|
|
15
|
+
/**
|
|
16
|
+
* Mock Panel Props Provider
|
|
17
|
+
* Wraps components with mock context for Storybook
|
|
18
|
+
*/
|
|
19
|
+
export declare const MockPanelProvider: React.FC<{
|
|
20
|
+
children: (props: PanelComponentProps) => React.ReactNode;
|
|
21
|
+
contextOverrides?: Partial<PanelContextValue>;
|
|
22
|
+
actionsOverrides?: Partial<PanelActions>;
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* Create mock panel props with custom overrides
|
|
26
|
+
* Useful for Storybook stories
|
|
27
|
+
*/
|
|
28
|
+
export declare const createMockPanelProps: (options?: {
|
|
29
|
+
repositoryPath?: string;
|
|
30
|
+
repositoryName?: string;
|
|
31
|
+
slices?: Record<string, unknown>;
|
|
32
|
+
}) => PanelComponentProps;
|
|
33
|
+
//# sourceMappingURL=panelContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panelContext.d.ts","sourceRoot":"","sources":["../../src/mocks/panelContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EAIlB,MAAM,UAAU,CAAC;AA+BlB;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,YAAY,OAAO,CAAC,iBAAiB,CAAC,KACrC,iBAuHF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,YAAY,OAAO,CAAC,YAAY,CAAC,KAChC,YAkBD,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAO,iBAwCnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC;IACvC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,KAAK,CAAC,SAAS,CAAC;IAC1D,gBAAgB,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC9C,gBAAgB,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;CAC1C,CA+BA,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,UAAU;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,KAAG,mBAqCH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PanelComponentProps } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* QualityHexagonPanel - A panel for visualizing code quality metrics
|
|
5
|
+
*/
|
|
6
|
+
export declare const QualityHexagonPanel: React.FC<PanelComponentProps>;
|
|
7
|
+
//# sourceMappingURL=QualityHexagonPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QualityHexagonPanel.d.ts","sourceRoot":"","sources":["../../src/panels/QualityHexagonPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAwOpD;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAM7D,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
/**
|
|
3
|
+
* QualityHexagonPanel visualizes code quality metrics using a hexagonal radar chart.
|
|
4
|
+
* Shows quality tier, detailed metrics breakdown, and quick stats.
|
|
5
|
+
*/
|
|
6
|
+
declare const meta: {
|
|
7
|
+
title: string;
|
|
8
|
+
component: import("react").FC<import("@principal-ade/panel-framework-core").PanelComponentProps>;
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: string;
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
tags: string[];
|
|
18
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
19
|
+
context: import("@principal-ade/panel-framework-core").PanelContextValue;
|
|
20
|
+
actions: import("@principal-ade/panel-framework-core").PanelActions;
|
|
21
|
+
events: import("@principal-ade/panel-framework-core").PanelEventEmitter;
|
|
22
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
23
|
+
args: {
|
|
24
|
+
context: import("@principal-ade/panel-framework-core").PanelContextValue;
|
|
25
|
+
actions: import("@principal-ade/panel-framework-core").PanelActions;
|
|
26
|
+
events: import("@principal-ade/panel-framework-core").PanelEventEmitter;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export default meta;
|
|
30
|
+
type Story = StoryObj<typeof meta>;
|
|
31
|
+
/**
|
|
32
|
+
* Default state with good quality metrics
|
|
33
|
+
*/
|
|
34
|
+
export declare const Default: Story;
|
|
35
|
+
/**
|
|
36
|
+
* Platinum quality metrics - excellent codebase
|
|
37
|
+
*/
|
|
38
|
+
export declare const PlatinumQuality: Story;
|
|
39
|
+
/**
|
|
40
|
+
* Poor quality metrics - legacy codebase
|
|
41
|
+
*/
|
|
42
|
+
export declare const PoorQuality: Story;
|
|
43
|
+
/**
|
|
44
|
+
* Unbalanced metrics - good style but lacking tests
|
|
45
|
+
*/
|
|
46
|
+
export declare const UnbalancedMetrics: Story;
|
|
47
|
+
/**
|
|
48
|
+
* Monorepo with multiple packages
|
|
49
|
+
*/
|
|
50
|
+
export declare const Monorepo: Story;
|
|
51
|
+
/**
|
|
52
|
+
* No repository loaded
|
|
53
|
+
*/
|
|
54
|
+
export declare const NoRepository: Story;
|
|
55
|
+
/**
|
|
56
|
+
* Loading state
|
|
57
|
+
*/
|
|
58
|
+
export declare const Loading: Story;
|
|
59
|
+
//# sourceMappingURL=QualityHexagonPanel.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QualityHexagonPanel.stories.d.ts","sourceRoot":"","sources":["../../src/panels/QualityHexagonPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAU5D;;;GAGG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;CAyBkC,CAAC;AAE7C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAwD7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAuDzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAwD/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAgFtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAuB1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KA6BrB,CAAC"}
|