@powerhousedao/design-system 5.1.0-dev.3 → 5.1.0-dev.30

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 (94) hide show
  1. package/dist/src/connect/components/db-explorer/components/index.d.ts +3 -0
  2. package/dist/src/connect/components/db-explorer/components/index.d.ts.map +1 -0
  3. package/dist/src/connect/components/db-explorer/components/index.js +3 -0
  4. package/dist/src/connect/components/db-explorer/components/index.js.map +1 -0
  5. package/dist/src/connect/components/db-explorer/components/schema-tree-sidebar.d.ts +15 -0
  6. package/dist/src/connect/components/db-explorer/components/schema-tree-sidebar.d.ts.map +1 -0
  7. package/dist/src/connect/components/db-explorer/components/schema-tree-sidebar.js +47 -0
  8. package/dist/src/connect/components/db-explorer/components/schema-tree-sidebar.js.map +1 -0
  9. package/dist/src/connect/components/db-explorer/components/schema-tree-sidebar.stories.d.ts +12 -0
  10. package/dist/src/connect/components/db-explorer/components/schema-tree-sidebar.stories.d.ts.map +1 -0
  11. package/dist/src/connect/components/db-explorer/components/schema-tree-sidebar.stories.js +119 -0
  12. package/dist/src/connect/components/db-explorer/components/schema-tree-sidebar.stories.js.map +1 -0
  13. package/dist/src/connect/components/db-explorer/components/table-view.d.ts +26 -0
  14. package/dist/src/connect/components/db-explorer/components/table-view.d.ts.map +1 -0
  15. package/dist/src/connect/components/db-explorer/components/table-view.js +67 -0
  16. package/dist/src/connect/components/db-explorer/components/table-view.js.map +1 -0
  17. package/dist/src/connect/components/db-explorer/components/table-view.stories.d.ts +14 -0
  18. package/dist/src/connect/components/db-explorer/components/table-view.stories.d.ts.map +1 -0
  19. package/dist/src/connect/components/db-explorer/components/table-view.stories.js +203 -0
  20. package/dist/src/connect/components/db-explorer/components/table-view.stories.js.map +1 -0
  21. package/dist/src/connect/components/db-explorer/db-explorer.d.ts +32 -0
  22. package/dist/src/connect/components/db-explorer/db-explorer.d.ts.map +1 -0
  23. package/dist/src/connect/components/db-explorer/db-explorer.js +119 -0
  24. package/dist/src/connect/components/db-explorer/db-explorer.js.map +1 -0
  25. package/dist/src/connect/components/db-explorer/db-explorer.stories.d.ts +11 -0
  26. package/dist/src/connect/components/db-explorer/db-explorer.stories.d.ts.map +1 -0
  27. package/dist/src/connect/components/db-explorer/db-explorer.stories.js +182 -0
  28. package/dist/src/connect/components/db-explorer/db-explorer.stories.js.map +1 -0
  29. package/dist/src/connect/components/db-explorer/index.d.ts +2 -0
  30. package/dist/src/connect/components/db-explorer/index.d.ts.map +1 -0
  31. package/dist/src/connect/components/db-explorer/index.js +2 -0
  32. package/dist/src/connect/components/db-explorer/index.js.map +1 -0
  33. package/dist/src/connect/components/index.d.ts +2 -0
  34. package/dist/src/connect/components/index.d.ts.map +1 -1
  35. package/dist/src/connect/components/index.js +2 -0
  36. package/dist/src/connect/components/index.js.map +1 -1
  37. package/dist/src/connect/components/modal/index.d.ts +1 -0
  38. package/dist/src/connect/components/modal/index.d.ts.map +1 -1
  39. package/dist/src/connect/components/modal/index.js +1 -0
  40. package/dist/src/connect/components/modal/index.js.map +1 -1
  41. package/dist/src/connect/components/modal/inspector-modal/index.d.ts +2 -0
  42. package/dist/src/connect/components/modal/inspector-modal/index.d.ts.map +1 -0
  43. package/dist/src/connect/components/modal/inspector-modal/index.js +2 -0
  44. package/dist/src/connect/components/modal/inspector-modal/index.js.map +1 -0
  45. package/dist/src/connect/components/modal/inspector-modal/inspector-modal.d.ts +18 -0
  46. package/dist/src/connect/components/modal/inspector-modal/inspector-modal.d.ts.map +1 -0
  47. package/dist/src/connect/components/modal/inspector-modal/inspector-modal.js +13 -0
  48. package/dist/src/connect/components/modal/inspector-modal/inspector-modal.js.map +1 -0
  49. package/dist/src/connect/components/modal/inspector-modal/inspector-modal.stories.d.ts +10 -0
  50. package/dist/src/connect/components/modal/inspector-modal/inspector-modal.stories.d.ts.map +1 -0
  51. package/dist/src/connect/components/modal/inspector-modal/inspector-modal.stories.js +226 -0
  52. package/dist/src/connect/components/modal/inspector-modal/inspector-modal.stories.js.map +1 -0
  53. package/dist/src/connect/components/remotes-inspector/components/channel-inspector.d.ts +9 -0
  54. package/dist/src/connect/components/remotes-inspector/components/channel-inspector.d.ts.map +1 -0
  55. package/dist/src/connect/components/remotes-inspector/components/channel-inspector.js +38 -0
  56. package/dist/src/connect/components/remotes-inspector/components/channel-inspector.js.map +1 -0
  57. package/dist/src/connect/components/remotes-inspector/components/channel-inspector.stories.d.ts +12 -0
  58. package/dist/src/connect/components/remotes-inspector/components/channel-inspector.stories.d.ts.map +1 -0
  59. package/dist/src/connect/components/remotes-inspector/components/channel-inspector.stories.js +113 -0
  60. package/dist/src/connect/components/remotes-inspector/components/channel-inspector.stories.js.map +1 -0
  61. package/dist/src/connect/components/remotes-inspector/components/mailbox-table.d.ts +14 -0
  62. package/dist/src/connect/components/remotes-inspector/components/mailbox-table.d.ts.map +1 -0
  63. package/dist/src/connect/components/remotes-inspector/components/mailbox-table.js +97 -0
  64. package/dist/src/connect/components/remotes-inspector/components/mailbox-table.js.map +1 -0
  65. package/dist/src/connect/components/remotes-inspector/components/sort-icon.d.ts +7 -0
  66. package/dist/src/connect/components/remotes-inspector/components/sort-icon.d.ts.map +1 -0
  67. package/dist/src/connect/components/remotes-inspector/components/sort-icon.js +10 -0
  68. package/dist/src/connect/components/remotes-inspector/components/sort-icon.js.map +1 -0
  69. package/dist/src/connect/components/remotes-inspector/index.d.ts +3 -0
  70. package/dist/src/connect/components/remotes-inspector/index.d.ts.map +1 -0
  71. package/dist/src/connect/components/remotes-inspector/index.js +3 -0
  72. package/dist/src/connect/components/remotes-inspector/index.js.map +1 -0
  73. package/dist/src/connect/components/remotes-inspector/remotes-inspector.d.ts +6 -0
  74. package/dist/src/connect/components/remotes-inspector/remotes-inspector.d.ts.map +1 -0
  75. package/dist/src/connect/components/remotes-inspector/remotes-inspector.js +104 -0
  76. package/dist/src/connect/components/remotes-inspector/remotes-inspector.js.map +1 -0
  77. package/dist/src/connect/components/remotes-inspector/remotes-inspector.stories.d.ts +10 -0
  78. package/dist/src/connect/components/remotes-inspector/remotes-inspector.stories.d.ts.map +1 -0
  79. package/dist/src/connect/components/remotes-inspector/remotes-inspector.stories.js +128 -0
  80. package/dist/src/connect/components/remotes-inspector/remotes-inspector.stories.js.map +1 -0
  81. package/dist/src/connect/components/remotes-inspector/utils.d.ts +12 -0
  82. package/dist/src/connect/components/remotes-inspector/utils.d.ts.map +1 -0
  83. package/dist/src/connect/components/remotes-inspector/utils.js +6 -0
  84. package/dist/src/connect/components/remotes-inspector/utils.js.map +1 -0
  85. package/dist/src/connect/components/sidebar/sidebar-footer.d.ts +1 -0
  86. package/dist/src/connect/components/sidebar/sidebar-footer.d.ts.map +1 -1
  87. package/dist/src/connect/components/sidebar/sidebar-footer.js +2 -2
  88. package/dist/src/connect/components/sidebar/sidebar-footer.js.map +1 -1
  89. package/dist/src/connect/components/sidebar/sidebar.d.ts.map +1 -1
  90. package/dist/src/connect/components/sidebar/sidebar.js +2 -2
  91. package/dist/src/connect/components/sidebar/sidebar.js.map +1 -1
  92. package/dist/style.css +90 -0
  93. package/dist/tsconfig.tsbuildinfo +1 -1
  94. package/package.json +6 -5
@@ -0,0 +1,119 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useRef, useState } from "react";
3
+ import { ConnectConfirmationModal } from "../modal/confirmation-modal.js";
4
+ import { SchemaTreeSidebar, } from "./components/schema-tree-sidebar.js";
5
+ import { TableView, } from "./components/table-view.js";
6
+ const DEFAULT_PAGE_SIZE = 50;
7
+ export function DBExplorer({ schema, getTables, getTableRows, pageSize = DEFAULT_PAGE_SIZE, onImportDb, onExportDb, }) {
8
+ const fileInputRef = useRef(null);
9
+ const [tables, setTables] = useState([]);
10
+ const [tablesLoading, setTablesLoading] = useState(true);
11
+ const [selectedTable, setSelectedTable] = useState();
12
+ const [tableData, setTableData] = useState(null);
13
+ const [pagination, setPagination] = useState({
14
+ offset: 0,
15
+ limit: pageSize,
16
+ total: null,
17
+ });
18
+ const [sort, setSort] = useState();
19
+ const [loading, setLoading] = useState(false);
20
+ const [pendingImport, setPendingImport] = useState(null);
21
+ const columns = tables.find((t) => t.name === selectedTable)?.columns ?? [];
22
+ const loadTableData = useCallback(async () => {
23
+ if (!selectedTable)
24
+ return;
25
+ setLoading(true);
26
+ const data = await getTableRows(selectedTable, {
27
+ schema,
28
+ limit: pagination.limit,
29
+ offset: pagination.offset,
30
+ sort,
31
+ });
32
+ setTableData(data);
33
+ setPagination((prev) => ({ ...prev, total: data.total }));
34
+ setLoading(false);
35
+ }, [
36
+ selectedTable,
37
+ schema,
38
+ pagination.limit,
39
+ pagination.offset,
40
+ sort,
41
+ getTableRows,
42
+ ]);
43
+ const loadTables = useCallback(async () => {
44
+ setTablesLoading(true);
45
+ const data = await getTables();
46
+ setTables(data);
47
+ setTablesLoading(false);
48
+ return data;
49
+ }, [getTables]);
50
+ const handleRefresh = useCallback(async () => {
51
+ const newTables = await loadTables();
52
+ // Clear selection if selected table no longer exists
53
+ if (selectedTable && !newTables.some((t) => t.name === selectedTable)) {
54
+ setSelectedTable(undefined);
55
+ setTableData(null);
56
+ return;
57
+ }
58
+ // Reload current table data if a table is selected
59
+ if (selectedTable) {
60
+ await loadTableData();
61
+ }
62
+ }, [loadTables, selectedTable, loadTableData]);
63
+ // Load tables on mount
64
+ useEffect(() => {
65
+ void loadTables();
66
+ }, [loadTables]);
67
+ useEffect(() => {
68
+ if (selectedTable) {
69
+ void loadTableData();
70
+ }
71
+ }, [selectedTable, pagination.offset, sort, loadTableData]);
72
+ const handleSelectTable = (table) => {
73
+ if (table === selectedTable)
74
+ return;
75
+ setSelectedTable(table);
76
+ setPagination((prev) => ({ ...prev, offset: 0, total: null }));
77
+ setSort(undefined);
78
+ setTableData(null);
79
+ };
80
+ const handlePageChange = (offset) => {
81
+ setPagination((prev) => ({ ...prev, offset }));
82
+ };
83
+ const handleSort = (newSort) => {
84
+ setSort(newSort);
85
+ setPagination((prev) => ({ ...prev, offset: 0 }));
86
+ };
87
+ const handleImportClick = () => {
88
+ fileInputRef.current?.click();
89
+ };
90
+ const handleFileChange = (e) => {
91
+ const file = e.target.files?.[0];
92
+ if (!file)
93
+ return;
94
+ void file.text().then((content) => {
95
+ setPendingImport(content);
96
+ });
97
+ e.target.value = "";
98
+ };
99
+ const handleImportConfirm = async () => {
100
+ if (pendingImport) {
101
+ // Clear selection before import to prevent stale queries
102
+ setSelectedTable(undefined);
103
+ setTableData(null);
104
+ await onImportDb?.(pendingImport);
105
+ setPendingImport(null);
106
+ await loadTables();
107
+ }
108
+ };
109
+ const handleImportCancel = () => {
110
+ setPendingImport(null);
111
+ };
112
+ const handleExportClick = () => {
113
+ void onExportDb?.();
114
+ };
115
+ return (_jsxs("div", { className: "flex h-full", children: [_jsx("input", { ref: fileInputRef, type: "file", accept: ".sql,.txt,text/plain", className: "hidden", onChange: handleFileChange }), _jsx(ConnectConfirmationModal, { open: !!pendingImport, onOpenChange: (open) => !open && setPendingImport(null), header: "Replace Database?", body: "This will delete all existing data and replace it with the imported file. This action cannot be undone.", cancelLabel: "Cancel", continueLabel: "Replace Data", onCancel: handleImportCancel, onContinue: () => void handleImportConfirm(), continueButtonProps: {
116
+ className: "bg-red-900 text-white hover:bg-red-800",
117
+ } }), _jsxs("div", { className: "flex w-64 shrink-0 flex-col border-r border-gray-200", children: [_jsx("div", { className: "flex-1 overflow-auto", children: _jsx(SchemaTreeSidebar, { schema: schema, tables: tables, selectedTable: selectedTable, onSelectTable: handleSelectTable, onRefresh: handleRefresh, loading: tablesLoading || loading }) }), (onImportDb || onExportDb) && (_jsxs("div", { className: "flex shrink-0 flex-col gap-2 border-t border-gray-200 p-2", children: [onImportDb && (_jsx("button", { className: "rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100", onClick: handleImportClick, type: "button", children: "Import DB" })), onExportDb && (_jsx("button", { className: "rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100", onClick: handleExportClick, type: "button", children: "Export DB" }))] }))] }), _jsx("div", { className: "flex-1 overflow-auto p-4", children: !selectedTable ? (_jsx("div", { className: "text-sm text-gray-500", children: "Select a table to view data" })) : !tableData && loading ? (_jsx("div", { className: "text-sm text-gray-500", children: "Loading..." })) : tableData ? (_jsx(TableView, { columns: columns, rows: tableData.rows, pagination: pagination, onPageChange: handlePageChange, onSort: handleSort, currentSort: sort, loading: loading })) : null })] }));
118
+ }
119
+ //# sourceMappingURL=db-explorer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db-explorer.js","sourceRoot":"","sources":["../../../../../src/connect/components/db-explorer/db-explorer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EACL,iBAAiB,GAElB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,SAAS,GAIV,MAAM,4BAA4B,CAAC;AAsCpC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B,MAAM,UAAU,UAAU,CAAC,EACzB,MAAM,EACN,SAAS,EACT,YAAY,EACZ,QAAQ,GAAG,iBAAiB,EAC5B,UAAU,EACV,UAAU,GACM;IAChB,MAAM,YAAY,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IACpD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAc,EAAE,CAAC,CAAC;IACtD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACzD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,EAAsB,CAAC;IACzE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAmB,IAAI,CAAC,CAAC;IACnE,MAAM,CAAC,UAAU,EAAE,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E,UAAU,IAAI,CACb,iBACE,SAAS,EAAC,6FAA6F,EACvG,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAC,QAAQ,0BAGN,CACV,EACA,UAAU,IAAI,CACb,iBACE,SAAS,EAAC,6FAA6F,EACvG,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAC,QAAQ,0BAGN,CACV,IACG,CACP,IACG,EAEN,cAAK,SAAS,EAAC,0BAA0B,YACtC,CAAC,aAAa,CAAC,CAAC,CAAC,CAChB,cAAK,SAAS,EAAC,uBAAuB,4CAEhC,CACP,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,OAAO,CAAC,CAAC,CAAC,CAC1B,cAAK,SAAS,EAAC,uBAAuB,2BAAiB,CACxD,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CACd,KAAC,SAAS,IACR,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,SAAS,CAAC,IAAI,EACpB,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,gBAAgB,EAC9B,MAAM,EAAE,UAAU,EAClB,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,OAAO,GAChB,CACH,CAAC,CAAC,CAAC,IAAI,GACJ,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { DBExplorer } from "./db-explorer.js";
3
+ declare const meta: Meta<typeof DBExplorer>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof DBExplorer>;
6
+ export declare const Default: Story;
7
+ export declare const EmptySchema: Story;
8
+ export declare const SingleTable: Story;
9
+ export declare const CustomPageSize: Story;
10
+ export declare const WithImportExport: Story;
11
+ //# sourceMappingURL=db-explorer.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db-explorer.stories.d.ts","sourceRoot":"","sources":["../../../../../src/connect/components/db-explorer/db-explorer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EACL,UAAU,EAIX,MAAM,kBAAkB,CAAC;AAE1B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAajC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAqHzC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAC;AAoCF,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAO5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAc9B,CAAC"}
@@ -0,0 +1,182 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DBExplorer, } from "./db-explorer.js";
3
+ const meta = {
4
+ title: "Connect/Components/DBExplorer/DBExplorer",
5
+ component: DBExplorer,
6
+ parameters: {
7
+ layout: "fullscreen",
8
+ },
9
+ decorators: [
10
+ (Story) => (_jsx("div", { className: "h-[600px] w-full", children: _jsx(Story, {}) })),
11
+ ],
12
+ };
13
+ export default meta;
14
+ const mockTables = [
15
+ {
16
+ name: "users",
17
+ columns: [
18
+ { name: "id", dataType: "int4", isNullable: false },
19
+ { name: "name", dataType: "varchar", isNullable: false },
20
+ { name: "email", dataType: "varchar", isNullable: false },
21
+ { name: "created_at", dataType: "timestamp", isNullable: true },
22
+ ],
23
+ },
24
+ {
25
+ name: "posts",
26
+ columns: [
27
+ { name: "id", dataType: "int4", isNullable: false },
28
+ { name: "title", dataType: "varchar", isNullable: false },
29
+ { name: "content", dataType: "text", isNullable: true },
30
+ { name: "author_id", dataType: "int4", isNullable: false },
31
+ { name: "published_at", dataType: "timestamp", isNullable: true },
32
+ ],
33
+ },
34
+ {
35
+ name: "comments",
36
+ columns: [
37
+ { name: "id", dataType: "int4", isNullable: false },
38
+ { name: "post_id", dataType: "int4", isNullable: false },
39
+ { name: "user_id", dataType: "int4", isNullable: false },
40
+ { name: "body", dataType: "text", isNullable: false },
41
+ { name: "created_at", dataType: "timestamp", isNullable: true },
42
+ ],
43
+ },
44
+ {
45
+ name: "tags",
46
+ columns: [
47
+ { name: "id", dataType: "int4", isNullable: false },
48
+ { name: "name", dataType: "varchar", isNullable: false },
49
+ ],
50
+ },
51
+ ];
52
+ function generateMockRows(table, limit, offset) {
53
+ const rows = [];
54
+ for (let i = 0; i < limit; i++) {
55
+ const rowNum = offset + i + 1;
56
+ if (table === "users") {
57
+ rows.push({
58
+ id: rowNum,
59
+ name: `User ${rowNum}`,
60
+ email: `user${rowNum}@example.com`,
61
+ created_at: rowNum % 5 === 0
62
+ ? null
63
+ : `2024-01-${String((rowNum % 28) + 1).padStart(2, "0")}`,
64
+ });
65
+ }
66
+ else if (table === "posts") {
67
+ rows.push({
68
+ id: rowNum,
69
+ title: `Post Title ${rowNum}`,
70
+ content: rowNum % 3 === 0 ? null : `This is the content of post ${rowNum}...`,
71
+ author_id: (rowNum % 10) + 1,
72
+ published_at: rowNum % 4 === 0
73
+ ? null
74
+ : `2024-02-${String((rowNum % 28) + 1).padStart(2, "0")}`,
75
+ });
76
+ }
77
+ else if (table === "comments") {
78
+ rows.push({
79
+ id: rowNum,
80
+ post_id: (rowNum % 20) + 1,
81
+ user_id: (rowNum % 10) + 1,
82
+ body: `Comment ${rowNum}: This is a sample comment.`,
83
+ created_at: `2024-03-${String((rowNum % 28) + 1).padStart(2, "0")}`,
84
+ });
85
+ }
86
+ else if (table === "tags") {
87
+ rows.push({
88
+ id: rowNum,
89
+ name: `tag-${rowNum}`,
90
+ });
91
+ }
92
+ }
93
+ return rows;
94
+ }
95
+ const tableTotals = {
96
+ users: 234,
97
+ posts: 567,
98
+ comments: 1234,
99
+ tags: 45,
100
+ };
101
+ const mockGetTableRows = async (table, options) => {
102
+ await new Promise((resolve) => setTimeout(resolve, 300));
103
+ const total = tableTotals[table] ?? 100;
104
+ const actualLimit = Math.min(options.limit, total - options.offset);
105
+ return {
106
+ columns: mockTables.find((t) => t.name === table)?.columns.map((c) => c.name) ??
107
+ [],
108
+ rows: generateMockRows(table, Math.max(0, actualLimit), options.offset),
109
+ total,
110
+ };
111
+ };
112
+ export const Default = {
113
+ args: {
114
+ schema: "public",
115
+ getTables: () => Promise.resolve(mockTables),
116
+ getTableRows: mockGetTableRows,
117
+ },
118
+ };
119
+ export const EmptySchema = {
120
+ args: {
121
+ schema: "public",
122
+ getTables: () => Promise.resolve([]),
123
+ getTableRows: mockGetTableRows,
124
+ },
125
+ };
126
+ const singleTable = [
127
+ {
128
+ name: "settings",
129
+ columns: [
130
+ { name: "key", dataType: "varchar", isNullable: false },
131
+ { name: "value", dataType: "text", isNullable: true },
132
+ ],
133
+ },
134
+ ];
135
+ const mockGetSettingsRows = async (_table, options) => {
136
+ await new Promise((resolve) => setTimeout(resolve, 200));
137
+ const allRows = [
138
+ { key: "app_name", value: "My Application" },
139
+ { key: "theme", value: "dark" },
140
+ { key: "max_upload_size", value: "10MB" },
141
+ { key: "debug_mode", value: null },
142
+ { key: "api_endpoint", value: "https://api.example.com" },
143
+ ];
144
+ const start = options.offset;
145
+ const end = Math.min(start + options.limit, allRows.length);
146
+ return {
147
+ columns: ["key", "value"],
148
+ rows: allRows.slice(start, end),
149
+ total: allRows.length,
150
+ };
151
+ };
152
+ export const SingleTable = {
153
+ args: {
154
+ schema: "config",
155
+ getTables: () => Promise.resolve(singleTable),
156
+ getTableRows: mockGetSettingsRows,
157
+ },
158
+ };
159
+ export const CustomPageSize = {
160
+ args: {
161
+ schema: "public",
162
+ getTables: () => Promise.resolve(mockTables),
163
+ getTableRows: mockGetTableRows,
164
+ pageSize: 10,
165
+ },
166
+ };
167
+ export const WithImportExport = {
168
+ args: {
169
+ schema: "public",
170
+ getTables: () => Promise.resolve(mockTables),
171
+ getTableRows: mockGetTableRows,
172
+ onImportDb: (sqlContent) => {
173
+ console.log("Import DB called with content:", sqlContent.slice(0, 100));
174
+ alert(`Imported ${sqlContent.length} characters`);
175
+ },
176
+ onExportDb: () => {
177
+ console.log("Export DB called");
178
+ alert("Export DB clicked");
179
+ },
180
+ },
181
+ };
182
+ //# sourceMappingURL=db-explorer.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db-explorer.stories.js","sourceRoot":"","sources":["../../../../../src/connect/components/db-explorer/db-explorer.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,UAAU,GAIX,MAAM,kBAAkB,CAAC;AAE1B,MAAM,IAAI,GAA4B;IACpC,KAAK,EAAE,0CAA0C;IACjD,SAAS,EAAE,UAAU;IACrB,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,SAAS,EAAC,kBAAkB,YAC/B,KAAC,KAAK,KAAG,GACL,CACP;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,UAAU,GAAgB;IAC9B;QACE,IAAI,EAAE,OAAO;QACb,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE;YACnD,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE;YACxD,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE;YACzD,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE;SAChE;KACF;IACD;QACE,IAAI,EAAE,OAAO;QACb,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE;YACnD,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,E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AAC;QAC7B,CAAC;KACF;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./db-explorer.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/connect/components/db-explorer/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./db-explorer.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/connect/components/db-explorer/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -48,4 +48,6 @@ export * from "./toggle/toggle.js";
48
48
  export * from "./tooltip/tooltip.js";
49
49
  export * from "./upload-file-item/upload-file-item.js";
50
50
  export * from "./upload-file-list/upload-file-list.js";
51
+ export * from "./db-explorer/index.js";
52
+ export * from "./remotes-inspector/index.js";
51
53
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/connect/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,kDAAkD,CAAC;AACjE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0CAA0C,CAAC;AACzD,cAAc,wCAAwC,CAAC;AACvD,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,kCAAkC,CAAC;AACjD,cAAc,kDAAkD,CAAC;AACjE,cAAc,wDAAwD,CAAC;AACvE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC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AC;AACzC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,kCAAkC,CAAC;AACjD,cAAc,kDAAkD,CAAC;AACjE,cAAc,wDAAwD,CAAC;AACvE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,wCAAwC,CAAC;AACvD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,kBAAkB,CAAC;AACjC,cAAc,0CAA0C,CAAC;AACzD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wCAAwC,CAAC;AACvD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC"}
@@ -48,4 +48,6 @@ export * from "./toggle/toggle.js";
48
48
  export * from "./tooltip/tooltip.js";
49
49
  export * from "./upload-file-item/upload-file-item.js";
50
50
  export * from "./upload-file-list/upload-file-list.js";
51
+ export * from "./db-explorer/index.js";
52
+ export * from "./remotes-inspector/index.js";
51
53
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/connect/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,kDAAkD,CAAC;AACjE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0CAA0C,CAAC;AACzD,cAAc,wCAAwC,CAAC;AACvD,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,kCAAkC,CAAC;AACjD,cAAc,kDAAkD,CAAC;AACjE,cAAc,wDAAwD,CAAC;AACvE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,wCAAwC,CAAC;AACvD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,kBAAkB,CAAC;AACjC,cAAc,0CAA0C,CAAC;AACzD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wCAAwC,CAAC;AACvD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc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AAwC,CAAC;AACvD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC"}
@@ -6,6 +6,7 @@ export * from "./create-document-modal.js";
6
6
  export * from "./delete-drive-modal.js";
7
7
  export * from "./delete-item-modal.js";
8
8
  export * from "./drive-settings-modal.js";
9
+ export * from "./inspector-modal/index.js";
9
10
  export * from "./read-required-modal.js";
10
11
  export * from "./replace-duplicate-modal.js";
11
12
  export * from "./settings-modal-v2/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/connect/components/modal/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/connect/components/modal/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC"}
@@ -6,6 +6,7 @@ export * from "./create-document-modal.js";
6
6
  export * from "./delete-drive-modal.js";
7
7
  export * from "./delete-item-modal.js";
8
8
  export * from "./drive-settings-modal.js";
9
+ export * from "./inspector-modal/index.js";
9
10
  export * from "./read-required-modal.js";
10
11
  export * from "./replace-duplicate-modal.js";
11
12
  export * from "./settings-modal-v2/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/connect/components/modal/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/connect/components/modal/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./inspector-modal.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/connect/components/modal/inspector-modal/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./inspector-modal.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/connect/components/modal/inspector-modal/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { DivProps } from "@powerhousedao/design-system";
2
+ import { Modal } from "@powerhousedao/design-system";
3
+ import type { ComponentPropsWithoutRef } from "react";
4
+ import { type DBExplorerProps } from "../../db-explorer/index.js";
5
+ import { type RemotesInspectorProps } from "../../remotes-inspector/index.js";
6
+ type ModalProps = ComponentPropsWithoutRef<typeof Modal>;
7
+ export type InspectorModalProps = {
8
+ readonly open: boolean;
9
+ readonly onOpenChange: (open: boolean) => void;
10
+ readonly modalProps?: ModalProps;
11
+ readonly containerProps?: DivProps;
12
+ readonly dbExplorerProps: DBExplorerProps;
13
+ readonly remotesInspectorProps: RemotesInspectorProps;
14
+ readonly defaultTab?: "Database" | "Remotes";
15
+ };
16
+ export declare function InspectorModal({ open, onOpenChange, modalProps, containerProps, dbExplorerProps, remotesInspectorProps, defaultTab, }: InspectorModalProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
18
+ //# sourceMappingURL=inspector-modal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspector-modal.d.ts","sourceRoot":"","sources":["../../../../../../src/connect/components/modal/inspector-modal/inspector-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAQ,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,kCAAkC,CAAC;AAI1C,KAAK,UAAU,GAAG,wBAAwB,CAAC,OAAO,KAAK,CAAC,CAAC;AAEzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IACjC,QAAQ,CAAC,cAAc,CAAC,EAAE,QAAQ,CAAC;IACnC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;IACtD,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;CAC9C,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,UAAuB,GACxB,EAAE,mBAAmB,2CA4CrB"}
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Icon, Modal } from "@powerhousedao/design-system";
3
+ import { twMerge } from "tailwind-merge";
4
+ import { DBExplorer } from "../../db-explorer/index.js";
5
+ import { RemotesInspector, } from "../../remotes-inspector/index.js";
6
+ import { TabContent } from "../../tabs/tab-content.js";
7
+ import { Tabs } from "../../tabs/tabs.js";
8
+ export function InspectorModal({ open, onOpenChange, modalProps, containerProps, dbExplorerProps, remotesInspectorProps, defaultTab = "Database", }) {
9
+ return (_jsx(Modal, { ...modalProps, contentProps: {
10
+ className: "rounded-2xl",
11
+ }, onOpenChange: onOpenChange, open: open, children: _jsxs("div", { ...containerProps, className: twMerge("flex h-[600px] w-[900px] flex-col rounded-2xl", containerProps?.className), children: [_jsx("div", { className: "flex items-center justify-end p-4 pb-0", children: _jsx("button", { className: "flex size-6 cursor-pointer items-center justify-center rounded-md text-gray-500 outline-none hover:text-gray-900", onClick: () => onOpenChange(false), type: "button", children: _jsx(Icon, { name: "XmarkLight", size: 24 }) }) }), _jsx("div", { className: "flex flex-1 flex-col overflow-hidden p-4 pt-2", children: _jsxs(Tabs, { defaultValue: defaultTab, children: [_jsx(TabContent, { description: "Database explorer", label: "Database", children: _jsx("div", { className: "h-[480px]", children: _jsx(DBExplorer, { ...dbExplorerProps }) }) }), _jsx(TabContent, { description: "Remotes inspector", label: "Remotes", children: _jsx("div", { className: "h-[480px]", children: _jsx(RemotesInspector, { ...remotesInspectorProps }) }) })] }) })] }) }));
12
+ }
13
+ //# sourceMappingURL=inspector-modal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspector-modal.js","sourceRoot":"","sources":["../../../../../../src/connect/components/modal/inspector-modal/inspector-modal.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAwB,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EACL,gBAAgB,GAEjB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAc1C,MAAM,UAAU,cAAc,CAAC,EAC7B,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,UAAU,GAAG,UAAU,GACH;IACpB,OAAO,CACL,KAAC,KAAK,OACA,UAAU,EACd,YAAY,EAAE;YACZ,SAAS,EAAE,aAAa;SACzB,EACD,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,IAAI,YAEV,kBACM,cAAc,EAClB,SAAS,EAAE,OAAO,CAChB,+CAA+C,EAC/C,cAAc,EAAE,SAAS,CAC1B,aAED,cAAK,SAAS,EAAC,wCAAwC,YACrD,iBACE,SAAS,EAAC,kHAAkH,EAC5H,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EAClC,IAAI,EAAC,QAAQ,YAEb,KAAC,IAAI,IAAC,IAAI,EAAC,YAAY,EAAC,IAAI,EAAE,EAAE,GAAI,GAC7B,GACL,EAEN,cAAK,SAAS,EAAC,+CAA+C,YAC5D,MAAC,IAAI,IAAC,YAAY,EAAE,UAAU,aAC5B,KAAC,UAAU,IAAC,WAAW,EAAC,mBAAmB,EAAC,KAAK,EAAC,UAAU,YAC1D,cAAK,SAAS,EAAC,WAAW,YACxB,KAAC,UAAU,OAAK,eAAe,GAAI,GAC/B,GACK,EACb,KAAC,UAAU,IAAC,WAAW,EAAC,mBAAmB,EAAC,KAAK,EAAC,SAAS,YACzD,cAAK,SAAS,EAAC,WAAW,YACxB,KAAC,gBAAgB,OAAK,qBAAqB,GAAI,GAC3C,GACK,IACR,GACH,IACF,GACA,CACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { InspectorModal } from "./inspector-modal.js";
3
+ declare const meta: Meta<typeof InspectorModal>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof InspectorModal>;
6
+ export declare const Default: Story;
7
+ export declare const DatabaseTab: Story;
8
+ export declare const RemotesTab: Story;
9
+ export declare const EmptyData: Story;
10
+ //# sourceMappingURL=inspector-modal.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspector-modal.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/connect/components/modal/inspector-modal/inspector-modal.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAavD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAMrC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAC;AA+N7C,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAgBzB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAcxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAcvB,CAAC"}