sqlite-wasm-viewer 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.
@@ -0,0 +1,79 @@
1
+ #table_view {
2
+ padding: 5px;
3
+ flex: 1;
4
+ position: relative;
5
+ overflow: hidden;
6
+ display: flex;
7
+ flex-direction: column;
8
+ }
9
+
10
+ #table_view_header {
11
+ max-height: 20px;
12
+ flex-basis: 20px;
13
+ left: 0;
14
+ right: 0;
15
+ position: sticky;
16
+ line-height: 1.1rem;
17
+ padding: 8px;
18
+ background-color: lightgray;
19
+ }
20
+
21
+ #table_view_header_title {
22
+ padding: 8px;
23
+ }
24
+
25
+ #table_container {
26
+ overflow-y: scroll;
27
+ display: flex;
28
+ }
29
+
30
+ #table_container table {
31
+ background-color: whitesmoke;
32
+ border-collapse: collapse;
33
+ border-spacing: 0;
34
+ flex: 1;
35
+ flex-direction: column;
36
+ }
37
+
38
+ #table_container tbody {
39
+ flex: 1;
40
+ overflow-y: scroll;
41
+ position: relative;
42
+ }
43
+
44
+ #table_container .columnHeaderCell {
45
+ height: 60px;
46
+ position: sticky;
47
+ top: 0;
48
+ background-color: darkgray;
49
+ z-index: 2;
50
+ }
51
+
52
+ #table_container .columnFilterCell {
53
+ padding-top: 5px;
54
+ }
55
+
56
+ #table_container td, #table_container .columnHeaderCell {
57
+ border: 1px solid lightgray;
58
+ }
59
+
60
+ #table_container td.selected {
61
+ background-color: lightslategray;
62
+ color: white;
63
+ }
64
+
65
+ #table_container td div {
66
+ height: 40px;
67
+ box-sizing: border-box;
68
+ display: -webkit-box;
69
+ padding: 4px;
70
+ text-overflow: ellipsis;
71
+ overflow: hidden;
72
+ -webkit-line-clamp: 2;
73
+ -webkit-box-orient: vertical;
74
+ }
75
+
76
+ #table_container .nullValue {
77
+ font-style: italic;
78
+ color: gray;
79
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "module": "ES2020",
5
+ "target": "ES5",
6
+ "esModuleInterop": true,
7
+ "strictNullChecks": true,
8
+ "outDir": "dist",
9
+ "declaration": true,
10
+ "emitDeclarationOnly": true,
11
+ "declarationMap": true,
12
+ "lib": [
13
+ "esnext",
14
+ "dom",
15
+ "Webworker"
16
+ ],
17
+ "baseUrl": ".",
18
+ },
19
+ "include": [
20
+ "src/**/*.tsx",
21
+ "src/**/*.ts",
22
+ "src/**/*d.ts"
23
+ ],
24
+ "exclude": [
25
+ "node_modules",
26
+ "**/build",
27
+ ]
28
+ }
package/types.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ type Config = {
2
+ isSqliteDatabase: (fileName: string) => boolean;
3
+ };
4
+
5
+ export declare function setConfig(userConfig: Partial<Config>): void;
6
+ export declare function showViewer(): void;
7
+ export declare function hideViewer(): void;