@principal-ade/bruno-panels 0.1.1
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/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/mocks/panelContext.d.ts +25 -0
- package/dist/mocks/panelContext.d.ts.map +1 -0
- package/dist/panels/ExamplePanel.d.ts +16 -0
- package/dist/panels/ExamplePanel.d.ts.map +1 -0
- package/dist/panels/ExamplePanel.stories.d.ts +63 -0
- package/dist/panels/ExamplePanel.stories.d.ts.map +1 -0
- package/dist/panels/bruno/BrunoPanel.d.ts +6 -0
- package/dist/panels/bruno/BrunoPanel.d.ts.map +1 -0
- package/dist/panels/bruno/BrunoPanel.stories.d.ts +13 -0
- package/dist/panels/bruno/BrunoPanel.stories.d.ts.map +1 -0
- package/dist/panels/bruno/components/CollectionTree.d.ts +9 -0
- package/dist/panels/bruno/components/CollectionTree.d.ts.map +1 -0
- package/dist/panels/bruno/components/RequestEditor.d.ts +8 -0
- package/dist/panels/bruno/components/RequestEditor.d.ts.map +1 -0
- package/dist/panels/bruno/components/ResponseViewer.d.ts +8 -0
- package/dist/panels/bruno/components/ResponseViewer.d.ts.map +1 -0
- package/dist/panels/bruno/components/index.d.ts +4 -0
- package/dist/panels/bruno/components/index.d.ts.map +1 -0
- package/dist/panels/bruno/hooks/useBrunoCollection.d.ts +43 -0
- package/dist/panels/bruno/hooks/useBrunoCollection.d.ts.map +1 -0
- package/dist/panels/bruno/index.d.ts +5 -0
- package/dist/panels/bruno/index.d.ts.map +1 -0
- package/dist/panels/bruno/types.d.ts +5 -0
- package/dist/panels/bruno/types.d.ts.map +1 -0
- package/dist/panels.bundle.js +1070 -0
- package/dist/panels.bundle.js.map +1 -0
- package/dist/tools/index.d.ts +27 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools.bundle.js +97 -0
- package/dist/types/index.d.ts +51 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +99 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
/**
|
|
3
|
+
* BrunoPanel is a Bruno-compatible API client panel.
|
|
4
|
+
* It displays collections of HTTP requests and allows sending them.
|
|
5
|
+
*/
|
|
6
|
+
declare const meta: Meta;
|
|
7
|
+
export default meta;
|
|
8
|
+
type Story = StoryObj;
|
|
9
|
+
/**
|
|
10
|
+
* Default state - shows collection tree with demo requests
|
|
11
|
+
*/
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
//# sourceMappingURL=BrunoPanel.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrunoPanel.stories.d.ts","sourceRoot":"","sources":["../../../src/panels/bruno/BrunoPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAI5D;;;GAGG;AACH,QAAA,MAAM,IAAI,EAAE,IAoBX,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CollectionItem } from '../hooks/useBrunoCollection';
|
|
3
|
+
export interface CollectionTreeProps {
|
|
4
|
+
items: CollectionItem[];
|
|
5
|
+
selectedItem: CollectionItem | null;
|
|
6
|
+
onSelectItem: (item: CollectionItem) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const CollectionTree: React.FC<CollectionTreeProps>;
|
|
9
|
+
//# sourceMappingURL=CollectionTree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollectionTree.d.ts","sourceRoot":"","sources":["../../../../src/panels/bruno/components/CollectionTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,YAAY,EAAE,cAAc,GAAG,IAAI,CAAC;IACpC,YAAY,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;CAC9C;AA+GD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAoCxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestEditor.d.ts","sourceRoot":"","sources":["../../../../src/panels/bruno/components/RequestEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAcD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA0OtD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { BrunoResponse } from '../../../types';
|
|
3
|
+
export interface ResponseViewerProps {
|
|
4
|
+
response: BrunoResponse | null;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const ResponseViewer: React.FC<ResponseViewerProps>;
|
|
8
|
+
//# sourceMappingURL=ResponseViewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseViewer.d.ts","sourceRoot":"","sources":["../../../../src/panels/bruno/components/ResponseViewer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,SAAS,EAAE,OAAO,CAAC;CACpB;AA8BD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwLxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/panels/bruno/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { BrunoResponse, BrunoPanelActions } from '../types';
|
|
2
|
+
export interface CollectionItem {
|
|
3
|
+
uid: string;
|
|
4
|
+
name: string;
|
|
5
|
+
type: 'folder' | 'request';
|
|
6
|
+
path: string;
|
|
7
|
+
request?: unknown;
|
|
8
|
+
items?: CollectionItem[];
|
|
9
|
+
}
|
|
10
|
+
export interface CollectionState {
|
|
11
|
+
name: string;
|
|
12
|
+
path: string;
|
|
13
|
+
items: CollectionItem[];
|
|
14
|
+
environments: Array<{
|
|
15
|
+
name: string;
|
|
16
|
+
variables: Array<{
|
|
17
|
+
name: string;
|
|
18
|
+
value: string;
|
|
19
|
+
enabled: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
}>;
|
|
22
|
+
}
|
|
23
|
+
export interface UseBrunoCollectionOptions {
|
|
24
|
+
actions: BrunoPanelActions;
|
|
25
|
+
collectionPath: string;
|
|
26
|
+
}
|
|
27
|
+
export interface UseBrunoCollectionResult {
|
|
28
|
+
collection: CollectionState | null;
|
|
29
|
+
selectedItem: CollectionItem | null;
|
|
30
|
+
response: BrunoResponse | null;
|
|
31
|
+
isLoading: boolean;
|
|
32
|
+
isSending: boolean;
|
|
33
|
+
error: string | null;
|
|
34
|
+
loadCollection: () => Promise<void>;
|
|
35
|
+
selectItem: (item: CollectionItem) => void;
|
|
36
|
+
sendRequest: (item: CollectionItem) => Promise<void>;
|
|
37
|
+
parseRequest: (content: string) => unknown;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Hook for managing Bruno collection state
|
|
41
|
+
*/
|
|
42
|
+
export declare function useBrunoCollection(options: UseBrunoCollectionOptions): UseBrunoCollectionResult;
|
|
43
|
+
//# sourceMappingURL=useBrunoCollection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBrunoCollection.d.ts","sourceRoot":"","sources":["../../../../src/panels/bruno/hooks/useBrunoCollection.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEjE,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,YAAY,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,OAAO,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC,CAAC;CAC5G;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,eAAe,GAAG,IAAI,CAAC;IACnC,YAAY,EAAE,cAAc,GAAG,IAAI,CAAC;IACpC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,UAAU,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;CAC5C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,wBAAwB,CAwK/F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/bruno/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/panels/bruno/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
|