sqlite-wasm-viewer 1.0.2 → 1.0.3

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/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # SQLite Wasm Viewer
2
+
3
+ A simple web-based SQLite browser that lets you inspect SQLite databases created by the [SQLite Wasm module](https://github.com/sqlite/sqlite-wasm) and stored in OPFS storage. It also supports running queries and filtering tables.
4
+
5
+ ![Viewer](screenshot.png)
6
+
7
+ # Installation
8
+ ```
9
+ npm install --save sqlite-wasm-viewer
10
+ ```
11
+
12
+ or
13
+
14
+ ```
15
+ yarn add sqlite-wasm-viewer
16
+ ```
17
+
18
+ # Usage
19
+ To open the viewer:
20
+ ```js
21
+ import { showViewer } from 'sqlite-wasm-viewer';
22
+
23
+ showViewer();
24
+ ```
25
+
26
+ By default, only files ending with '.db' or '.sqlite' are recognized as SQLite databases, but you can modify this behavior as follows:
27
+ ```js
28
+ import { showViewer, setConfig } from 'sqlite-wasm-viewer';
29
+
30
+ setConfig({
31
+ isSqliteDatabase: databaseName => {
32
+ // return true if databaseName is an SQLite db
33
+ },
34
+ });
35
+
36
+ showViewer();
37
+ ```
38
+
39
+ # Development
40
+ A testing app will be available on `http://localhost:9000` after running:
41
+ ```
42
+ yarn start
43
+ ```
@@ -28,11 +28,12 @@
28
28
  }
29
29
 
30
30
  #table_container table {
31
+ flex: 1;
32
+ table-layout: fixed;
33
+ width: 100%;
31
34
  background-color: whitesmoke;
32
35
  border-collapse: collapse;
33
36
  border-spacing: 0;
34
- flex: 1;
35
- flex-direction: column;
36
37
  }
37
38
 
38
39
  #table_container tbody {
@@ -69,6 +70,7 @@
69
70
  padding: 4px;
70
71
  text-overflow: ellipsis;
71
72
  overflow: hidden;
73
+ white-space: pre;
72
74
  -webkit-line-clamp: 2;
73
75
  -webkit-box-orient: vertical;
74
76
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sqlite-wasm-viewer",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "An SQLite OPFS database viewer that enables database inspection and SQL command execution.",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {