@sidekickdb/components 0.0.0 → 2.0.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 (144) hide show
  1. package/.turbo/turbo-build.log +20 -0
  2. package/LICENSE.md +202 -0
  3. package/NOTICE +27 -0
  4. package/README.md +92 -2
  5. package/app/App.css +38 -0
  6. package/app/App.tsx +63 -0
  7. package/app/index.css +18 -0
  8. package/app/main.tsx +10 -0
  9. package/dist/components/DialogContentPrimitive.d.ts +1 -0
  10. package/dist/components/DialogContentPrimitive.d.ts.map +1 -0
  11. package/dist/components/StyleMe.d.ts +15 -0
  12. package/dist/components/StyleMe.d.ts.map +1 -0
  13. package/dist/components/error-boundary.d.ts +17 -0
  14. package/dist/components/error-boundary.d.ts.map +1 -0
  15. package/dist/components/explorer/__tests__/edit-row-dialog.test.d.ts +2 -0
  16. package/dist/components/explorer/__tests__/edit-row-dialog.test.d.ts.map +1 -0
  17. package/dist/components/explorer/__tests__/format-value.test.d.ts +2 -0
  18. package/dist/components/explorer/__tests__/format-value.test.d.ts.map +1 -0
  19. package/dist/components/explorer/edit-namespace-dialog.d.ts +17 -0
  20. package/dist/components/explorer/edit-namespace-dialog.d.ts.map +1 -0
  21. package/dist/components/explorer/edit-row-dialog.d.ts +15 -0
  22. package/dist/components/explorer/edit-row-dialog.d.ts.map +1 -0
  23. package/dist/components/explorer/expandable-deleted-attr.d.ts +15 -0
  24. package/dist/components/explorer/expandable-deleted-attr.d.ts.map +1 -0
  25. package/dist/components/explorer/explorer-layout.d.ts +9 -0
  26. package/dist/components/explorer/explorer-layout.d.ts.map +1 -0
  27. package/dist/components/explorer/format-value.d.ts +2 -0
  28. package/dist/components/explorer/format-value.d.ts.map +1 -0
  29. package/dist/components/explorer/index.d.ts +128 -0
  30. package/dist/components/explorer/index.d.ts.map +1 -0
  31. package/dist/components/explorer/inner-explorer.d.ts +17 -0
  32. package/dist/components/explorer/inner-explorer.d.ts.map +1 -0
  33. package/dist/components/explorer/new-namespace-dialog.d.ts +10 -0
  34. package/dist/components/explorer/new-namespace-dialog.d.ts.map +1 -0
  35. package/dist/components/explorer/query-inspector.d.ts +11 -0
  36. package/dist/components/explorer/query-inspector.d.ts.map +1 -0
  37. package/dist/components/explorer/recently-deleted.d.ts +36 -0
  38. package/dist/components/explorer/recently-deleted.d.ts.map +1 -0
  39. package/dist/components/explorer/search-input.d.ts +9 -0
  40. package/dist/components/explorer/search-input.d.ts.map +1 -0
  41. package/dist/components/explorer/table-components.d.ts +16 -0
  42. package/dist/components/explorer/table-components.d.ts.map +1 -0
  43. package/dist/components/explorer/view-settings.d.ts +10 -0
  44. package/dist/components/explorer/view-settings.d.ts.map +1 -0
  45. package/dist/components/rosePineDawnTheme.d.ts +13 -0
  46. package/dist/components/rosePineDawnTheme.d.ts.map +1 -0
  47. package/dist/components/select.d.ts +16 -0
  48. package/dist/components/select.d.ts.map +1 -0
  49. package/dist/components/toast.d.ts +4 -0
  50. package/dist/components/toast.d.ts.map +1 -0
  51. package/dist/components/ui.d.ts +349 -0
  52. package/dist/components/ui.d.ts.map +1 -0
  53. package/dist/config.d.ts +11 -0
  54. package/dist/config.d.ts.map +1 -0
  55. package/dist/hooks/__tests__/explorer.test.d.ts +2 -0
  56. package/dist/hooks/__tests__/explorer.test.d.ts.map +1 -0
  57. package/dist/hooks/explorer.d.ts +33 -0
  58. package/dist/hooks/explorer.d.ts.map +1 -0
  59. package/dist/hooks/useAttrNotes.d.ts +10 -0
  60. package/dist/hooks/useAttrNotes.d.ts.map +1 -0
  61. package/dist/hooks/useClickOutside.d.ts +3 -0
  62. package/dist/hooks/useClickOutside.d.ts.map +1 -0
  63. package/dist/hooks/useColumnVisibility.d.ts +12 -0
  64. package/dist/hooks/useColumnVisibility.d.ts.map +1 -0
  65. package/dist/hooks/useEditBlobConstraints.d.ts +32 -0
  66. package/dist/hooks/useEditBlobConstraints.d.ts.map +1 -0
  67. package/dist/hooks/useExplorerHistory.d.ts +1 -0
  68. package/dist/hooks/useExplorerHistory.d.ts.map +1 -0
  69. package/dist/hooks/useIsOverflow.d.ts +6 -0
  70. package/dist/hooks/useIsOverflow.d.ts.map +1 -0
  71. package/dist/hooks/useLocalStorage.d.ts +2 -0
  72. package/dist/hooks/useLocalStorage.d.ts.map +1 -0
  73. package/dist/hooks/useMonacoJSONSchema.d.ts +3 -0
  74. package/dist/hooks/useMonacoJSONSchema.d.ts.map +1 -0
  75. package/dist/hooks/useStableDB.d.ts +7 -0
  76. package/dist/hooks/useStableDB.d.ts.map +1 -0
  77. package/dist/index.cjs +15 -0
  78. package/dist/index.d.ts +7 -0
  79. package/dist/index.d.ts.map +1 -0
  80. package/dist/index.js +9751 -0
  81. package/dist/schema.d.ts +5 -0
  82. package/dist/schema.d.ts.map +1 -0
  83. package/dist/style.css +1 -0
  84. package/dist/types.d.ts +241 -0
  85. package/dist/types.d.ts.map +1 -0
  86. package/dist/utils/format.d.ts +2 -0
  87. package/dist/utils/format.d.ts.map +1 -0
  88. package/dist/utils/indexingJobs.d.ts +24 -0
  89. package/dist/utils/indexingJobs.d.ts.map +1 -0
  90. package/dist/utils/parsePermsJSON.d.ts +11 -0
  91. package/dist/utils/parsePermsJSON.d.ts.map +1 -0
  92. package/dist/utils/renames.d.ts +3 -0
  93. package/dist/utils/renames.d.ts.map +1 -0
  94. package/dist/utils/tableWidthSize.d.ts +9 -0
  95. package/dist/utils/tableWidthSize.d.ts.map +1 -0
  96. package/index.html +13 -0
  97. package/package.json +106 -3
  98. package/src/components/DialogContentPrimitive.tsx +0 -0
  99. package/src/components/StyleMe.tsx +97 -0
  100. package/src/components/error-boundary.tsx +76 -0
  101. package/src/components/explorer/__tests__/edit-row-dialog.test.ts +31 -0
  102. package/src/components/explorer/__tests__/format-value.test.ts +9 -0
  103. package/src/components/explorer/edit-namespace-dialog.tsx +1890 -0
  104. package/src/components/explorer/edit-row-dialog.tsx +1367 -0
  105. package/src/components/explorer/expandable-deleted-attr.tsx +170 -0
  106. package/src/components/explorer/explorer-layout.tsx +196 -0
  107. package/src/components/explorer/format-value.ts +9 -0
  108. package/src/components/explorer/index.tsx +280 -0
  109. package/src/components/explorer/inner-explorer.tsx +1524 -0
  110. package/src/components/explorer/new-namespace-dialog.tsx +55 -0
  111. package/src/components/explorer/query-inspector.tsx +395 -0
  112. package/src/components/explorer/recently-deleted.tsx +349 -0
  113. package/src/components/explorer/search-input.tsx +358 -0
  114. package/src/components/explorer/table-components.tsx +416 -0
  115. package/src/components/explorer/view-settings.tsx +76 -0
  116. package/src/components/rosePineDawnTheme.ts +45 -0
  117. package/src/components/select.tsx +198 -0
  118. package/src/components/toast.tsx +18 -0
  119. package/src/components/ui.tsx +1740 -0
  120. package/src/config.ts +57 -0
  121. package/src/hooks/__tests__/explorer.test.ts +109 -0
  122. package/src/hooks/explorer.tsx +137 -0
  123. package/src/hooks/useAttrNotes.ts +27 -0
  124. package/src/hooks/useClickOutside.ts +23 -0
  125. package/src/hooks/useColumnVisibility.ts +39 -0
  126. package/src/hooks/useEditBlobConstraints.ts +185 -0
  127. package/src/hooks/useExplorerHistory.ts +0 -0
  128. package/src/hooks/useIsOverflow.ts +24 -0
  129. package/src/hooks/useLocalStorage.ts +51 -0
  130. package/src/hooks/useMonacoJSONSchema.ts +41 -0
  131. package/src/hooks/useStableDB.ts +31 -0
  132. package/src/index.tsx +12 -0
  133. package/src/schema.ts +286 -0
  134. package/src/style.css +84 -0
  135. package/src/types.ts +359 -0
  136. package/src/utils/format.ts +13 -0
  137. package/src/utils/indexingJobs.ts +126 -0
  138. package/src/utils/parsePermsJSON.ts +35 -0
  139. package/src/utils/renames.ts +42 -0
  140. package/src/utils/tableWidthSize.ts +62 -0
  141. package/tailwind.config.cjs +48 -0
  142. package/tsconfig.json +22 -0
  143. package/vite-env.d.ts +1 -0
  144. package/vite.config.ts +50 -0
@@ -0,0 +1,128 @@
1
+ import { default as React } from 'react';
2
+ import { HasDefault, WithDefaults, WithOptional } from '../../types';
3
+ export type SetExplorerStateOptions = {
4
+ history?: 'push' | 'replace';
5
+ };
6
+ export type SetExplorerState = (action: React.SetStateAction<ExplorerNav | null>, options?: SetExplorerStateOptions) => void;
7
+ interface ExplorerProps {
8
+ appId: string;
9
+ adminToken: string;
10
+ apiURI: HasDefault<string>;
11
+ websocketURI: HasDefault<string>;
12
+ darkMode: HasDefault<boolean>;
13
+ className?: string;
14
+ explorerState: HasDefault<ExplorerNav | null | undefined>;
15
+ setExplorerState: HasDefault<SetExplorerState>;
16
+ useShadowDOM: HasDefault<boolean>;
17
+ }
18
+ export declare const useExplorerProps: () => WithDefaults<ExplorerProps>;
19
+ export declare const useExplorerState: () => {
20
+ explorerState: {
21
+ namespace: string;
22
+ where?: [string, any] | undefined;
23
+ sortAttr?: string | undefined;
24
+ sortAsc?: boolean | undefined;
25
+ filters?: [string, SearchFilterOp, any][] | undefined;
26
+ limit?: number | undefined;
27
+ page?: number | undefined;
28
+ dialog?: {
29
+ type: "add-row";
30
+ } | {
31
+ type: "edit-row";
32
+ rowId: string;
33
+ focusAttr?: string | undefined;
34
+ } | {
35
+ type: "edit-schema";
36
+ screen: {
37
+ kind: "main";
38
+ } | {
39
+ kind: "rename";
40
+ } | {
41
+ kind: "add-attr";
42
+ attrKind: "data" | "link";
43
+ } | {
44
+ kind: "edit-attr";
45
+ attrId: string;
46
+ isForward: boolean;
47
+ };
48
+ } | {
49
+ type: "new-namespace";
50
+ } | {
51
+ type: "recently-deleted-ns";
52
+ } | null | undefined;
53
+ };
54
+ history: {
55
+ push: (filter: React.SetStateAction<ExplorerNav>, replace?: boolean) => void;
56
+ pop: () => void;
57
+ items: ExplorerNav[];
58
+ };
59
+ };
60
+ export declare const useExplorerDialog: () => {
61
+ dialog: {
62
+ type: "add-row";
63
+ } | {
64
+ type: "edit-row";
65
+ rowId: string;
66
+ focusAttr?: string | undefined;
67
+ } | {
68
+ type: "edit-schema";
69
+ screen: {
70
+ kind: "main";
71
+ } | {
72
+ kind: "rename";
73
+ } | {
74
+ kind: "add-attr";
75
+ attrKind: "data" | "link";
76
+ } | {
77
+ kind: "edit-attr";
78
+ attrId: string;
79
+ isForward: boolean;
80
+ };
81
+ } | {
82
+ type: "new-namespace";
83
+ } | {
84
+ type: "recently-deleted-ns";
85
+ } | null;
86
+ setDialog: (d: ExplorerDialog | null, options?: SetExplorerStateOptions) => void;
87
+ };
88
+ export type SearchFilterOp = '=' | '$ilike' | '$like' | '$gt' | '$lt' | '$isNull';
89
+ export type SearchFilter = [string, SearchFilterOp, any];
90
+ export type EditSchemaScreen = {
91
+ kind: 'main';
92
+ } | {
93
+ kind: 'rename';
94
+ } | {
95
+ kind: 'add-attr';
96
+ attrKind: 'data' | 'link';
97
+ } | {
98
+ kind: 'edit-attr';
99
+ attrId: string;
100
+ isForward: boolean;
101
+ };
102
+ export type ExplorerDialog = {
103
+ type: 'add-row';
104
+ } | {
105
+ type: 'edit-row';
106
+ rowId: string;
107
+ focusAttr?: string;
108
+ } | {
109
+ type: 'edit-schema';
110
+ screen: EditSchemaScreen;
111
+ } | {
112
+ type: 'new-namespace';
113
+ } | {
114
+ type: 'recently-deleted-ns';
115
+ };
116
+ export interface ExplorerNav {
117
+ namespace: string;
118
+ where?: [string, any];
119
+ sortAttr?: string;
120
+ sortAsc?: boolean;
121
+ filters?: SearchFilter[];
122
+ limit?: number;
123
+ page?: number;
124
+ dialog?: ExplorerDialog | null;
125
+ }
126
+ export declare const Explorer: (_props: WithOptional<ExplorerProps>) => React.JSX.Element;
127
+ export {};
128
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/explorer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAQzE,MAAM,MAAM,uBAAuB,GAAG;IAGpC,OAAO,CAAC,EAAE,MAAM,GAAG,SAA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AAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,QAAQ,GAAI,QAAQ,YAAY,CAAC,aAAa,CAAC,sBA+G3D,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { InstantReactAbstractDatabase } from '@sidekickdb/react';
2
+ import { default as React } from 'react';
3
+ import { SchemaAttr, SchemaNamespace } from '../../types';
4
+ export type TableColMeta = {
5
+ sortable?: boolean;
6
+ disablePadding: boolean;
7
+ isLink?: boolean;
8
+ attr: SchemaAttr;
9
+ copyable?: boolean;
10
+ editable?: boolean;
11
+ };
12
+ export declare const InnerExplorer: React.FC<{
13
+ db: InstantReactAbstractDatabase<any, any>;
14
+ namespaces: SchemaNamespace[];
15
+ }>;
16
+ export declare function jsonFetch(input: RequestInfo, init: RequestInit | undefined): Promise<any>;
17
+ //# sourceMappingURL=inner-explorer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inner-explorer.d.ts","sourceRoot":"","sources":["../../../src/components/explorer/inner-explorer.tsx"],"names":[],"mappings":"AA2BA,OAAO,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AAejE,OAAO,KAMN,MAAM,OAAO,CAAC;AA6Bf,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAezD,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AA+IF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IACnC,EAAE,EAAE,4BAA4B,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC3C,UAAU,EAAE,eAAe,EAAE,CAAC;CAC/B,CAssCA,CAAC;AAcF,wBAAsB,SAAS,CAC7B,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,WAAW,GAAG,SAAS,GAC5B,OAAO,CAAC,GAAG,CAAC,CAMd"}
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { InstantReactWebDatabase } from '@sidekickdb/react';
3
+ export declare function NewNamespaceDialog({ db, onClose, }: {
4
+ db: InstantReactWebDatabase<any>;
5
+ onClose: (p?: {
6
+ id: string;
7
+ name: string;
8
+ }) => void;
9
+ }): React.JSX.Element;
10
+ //# sourceMappingURL=new-namespace-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"new-namespace-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/explorer/new-namespace-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAM,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAKhE,wBAAgB,kBAAkB,CAAC,EACjC,EAAE,EACF,OAAO,GACR,EAAE;IACD,EAAE,EAAE,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACjC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACrD,qBA0CA"}
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { InstantReactWebDatabase } from '@sidekickdb/react';
3
+ import { DBAttr, SchemaNamespace } from '../../types';
4
+ export declare function QueryInspector({ className, appId, db: baseDb, namespaces, attrs, }: {
5
+ className?: string;
6
+ appId: string;
7
+ db: InstantReactWebDatabase<any>;
8
+ namespaces: SchemaNamespace[] | null;
9
+ attrs: Record<string, DBAttr> | null;
10
+ }): React.JSX.Element;
11
+ //# sourceMappingURL=query-inspector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-inspector.d.ts","sourceRoot":"","sources":["../../../src/components/explorer/query-inspector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,EAAQ,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAoErD,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,KAAK,EACL,EAAE,EAAE,MAAM,EACV,UAAU,EACV,KAAK,GACN,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACjC,UAAU,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CACtC,qBAgTA"}
@@ -0,0 +1,36 @@
1
+ import { default as React } from 'react';
2
+ import { SchemaNamespace, DBAttr } from '../../types';
3
+ import { InstantReactWebDatabase } from '@sidekickdb/react';
4
+ import { useAttrNotes } from '../../hooks/useAttrNotes';
5
+ export type SoftDeletedAttr = Omit<DBAttr, 'metadata'> & {
6
+ 'deletion-marked-at': string;
7
+ metadata: {
8
+ soft_delete_snapshot?: {
9
+ is_indexed: boolean;
10
+ is_required: boolean;
11
+ id_attr_id: string;
12
+ };
13
+ };
14
+ };
15
+ type DeletedNamespace = {
16
+ idAttr: SoftDeletedAttr;
17
+ remainingCols: SoftDeletedAttr[];
18
+ };
19
+ export declare const useRecentlyDeletedAttrs: (appId: string) => import('swr').SWRResponse<{
20
+ attrs: SoftDeletedAttr[];
21
+ 'grace-period-days': number;
22
+ }, any, any>;
23
+ export declare const useRecentlyDeletedNamespaces: (appId: string) => DeletedNamespace[];
24
+ export declare function RecentlyDeletedNamespaces({ appId, db, }: {
25
+ db: InstantReactWebDatabase<any>;
26
+ appId: string;
27
+ }): React.JSX.Element;
28
+ export declare const RecentlyDeletedAttrs: React.FC<{
29
+ namespace: SchemaNamespace;
30
+ appId: string;
31
+ db: InstantReactWebDatabase<any>;
32
+ notes: ReturnType<typeof useAttrNotes>;
33
+ }>;
34
+ export declare const removeDeletedMarker: (s: string) => string;
35
+ export {};
36
+ //# sourceMappingURL=recently-deleted.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recently-deleted.d.ts","sourceRoot":"","sources":["../../../src/components/explorer/recently-deleted.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAK5D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAQvD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG;IACvD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,QAAQ,EAAE;QACR,oBAAoB,CAAC,EAAE;YACrB,UAAU,EAAE,OAAO,CAAC;YACpB,WAAW,EAAE,OAAO,CAAC;YACrB,UAAU,EAAE,MAAM,CAAC;SACpB,CAAC;KACH,CAAC;CACH,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,MAAM,EAAE,eAAe,CAAC;IACxB,aAAa,EAAE,eAAe,EAAE,CAAC;CAClC,CAAC;AAKF,eAAO,MAAM,uBAAuB,GAAI,OAAO,MAAM;WA2BxC,eAAe,EAAE;yBACH,MAAM;YAOhC,CAAC;AAEF,eAAO,MAAM,4BAA4B,GACvC,OAAO,MAAM,KACZ,gBAAgB,EAkBlB,CAAC;AAKF,wBAAgB,yBAAyB,CAAC,EACxC,KAAK,EACL,EAAE,GACH,EAAE;IACD,EAAE,EAAE,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;CACf,qBAgGA;AAKD,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC;IAC1C,SAAS,EAAE,eAAe,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACjC,KAAK,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;CACxC,CAoFA,CAAC;AA6BF,eAAO,MAAM,mBAAmB,GAAI,GAAG,MAAM,KAAG,MAI/C,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { SearchFilter } from '../../hooks/explorer';
2
+ import { SchemaAttr } from '../../types';
3
+ import { default as React } from 'react';
4
+ export declare function SearchInput({ onSearchChange, attrs, initialFilters, }: {
5
+ onSearchChange: (filters: SearchFilter[]) => void;
6
+ attrs?: SchemaAttr[];
7
+ initialFilters?: SearchFilter[];
8
+ }): React.JSX.Element;
9
+ //# sourceMappingURL=search-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-input.d.ts","sourceRoot":"","sources":["../../../src/components/explorer/search-input.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,KAMN,MAAM,OAAO,CAAC;AAqLf,wBAAgB,WAAW,CAAC,EAC1B,cAAc,EACd,KAAK,EACL,cAAmB,GACpB,EAAE;IACD,cAAc,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAClD,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;CACjC,qBAyJA"}
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { Cell, Header, HeaderGroup, Table } from '@tanstack/react-table';
3
+ export declare const TableHeader: ({ header, table, headerGroup, index, setMinViableColWidth, onSort, currentSortAttr, currentSortAsc, }: {
4
+ header: Header<any, any>;
5
+ table: Table<any>;
6
+ headerGroup: HeaderGroup<any>;
7
+ index: number;
8
+ setMinViableColWidth: (columnId: string) => void;
9
+ onSort?: (attrName: string, currentAttr: string | undefined, currentAsc?: boolean) => void;
10
+ currentSortAttr?: string;
11
+ currentSortAsc?: boolean;
12
+ }) => React.JSX.Element;
13
+ export declare const TableCell: ({ cell }: {
14
+ cell: Cell<any, unknown>;
15
+ }) => React.JSX.Element;
16
+ //# sourceMappingURL=table-components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-components.d.ts","sourceRoot":"","sources":["../../../src/components/explorer/table-components.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EACL,IAAI,EAEJ,MAAM,EACN,WAAW,EACX,KAAK,EACN,MAAM,uBAAuB,CAAC;AAmB/B,eAAO,MAAM,WAAW,GAAI,uGASzB;IACD,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,WAAW,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,MAAM,CAAC,EAAE,CACP,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,UAAU,CAAC,EAAE,OAAO,KACjB,IAAI,CAAC;IACV,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,sBA0JA,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,UAAU;IAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;CAAE,sBAqK/D,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { useColumnVisibility } from '../../hooks/useColumnVisibility';
3
+ interface ViewSettingsProps {
4
+ visiblity: ReturnType<typeof useColumnVisibility>;
5
+ localDates: boolean;
6
+ setLocalDates: (v: boolean | undefined) => void;
7
+ }
8
+ export declare const ViewSettings: ({ visiblity, localDates, setLocalDates, }: ViewSettingsProps) => React.JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=view-settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view-settings.d.ts","sourceRoot":"","sources":["../../../src/components/explorer/view-settings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAIrE,UAAU,iBAAiB;IACzB,SAAS,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;IAClD,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,GAAG,SAAS,KAAK,IAAI,CAAC;CACjD;AAED,eAAO,MAAM,YAAY,GAAI,2CAI1B,iBAAiB,sBA0DnB,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const rosePineDawnTheme: {
2
+ plain: {
3
+ backgroundColor: string;
4
+ color: string;
5
+ };
6
+ styles: {
7
+ types: string[];
8
+ style: {
9
+ color: string;
10
+ };
11
+ }[];
12
+ };
13
+ //# sourceMappingURL=rosePineDawnTheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rosePineDawnTheme.d.ts","sourceRoot":"","sources":["../../src/components/rosePineDawnTheme.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,iBAAiB;;;;;;;;;;;CA2C7B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ import * as SelectPrimitive from '@radix-ui/react-select';
3
+ declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): React.JSX.Element;
4
+ declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): React.JSX.Element;
5
+ declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): React.JSX.Element;
6
+ declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
7
+ size?: 'sm' | 'default';
8
+ }): React.JSX.Element;
9
+ declare function SelectContent({ className, children, position, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): React.JSX.Element;
10
+ declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): React.JSX.Element;
11
+ declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): React.JSX.Element;
12
+ declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): React.JSX.Element;
13
+ declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): React.JSX.Element;
14
+ declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): React.JSX.Element;
15
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
16
+ //# sourceMappingURL=select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/components/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAS1D,iBAAS,MAAM,CAAC,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,qBAEnD;AAED,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAEpD;AAED,iBAAS,WAAW,CAAC,EACn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,GACZ,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare function infoToast(text: string): void;
2
+ export declare function successToast(text: string): void;
3
+ export declare function errorToast(text: string, options?: any): void;
4
+ //# sourceMappingURL=toast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../src/components/toast.tsx"],"names":[],"mappings":"AAEA,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,QAErC;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,QAIxC;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,QAKrD"}