solid_litequeen 0.19.3 → 0.20.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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/config/solid_litequeen_manifest.js +1 -0
- data/app/assets/stylesheets/solid_litequeen/tailwind.css +2 -0
- data/app/assets/tailwind/solid_litequeen/application.css +5 -0
- data/app/assets/tailwind/solid_litequeen/engine.css +267 -0
- data/app/javascript/solid_litequeen/controllers/command_palette_controller.js +5 -6
- data/app/javascript/solid_litequeen/controllers/table_relations_controller.js +17 -18
- data/app/javascript/solid_litequeen/vendor/dagre.min.js +3809 -0
- data/app/javascript/solid_litequeen/vendor/floating-ui-core.js +1 -0
- data/app/javascript/solid_litequeen/vendor/floating-ui-dom.js +1 -0
- data/app/javascript/solid_litequeen/vendor/joint.js +39629 -0
- data/app/views/layouts/solid_litequeen/application.html.erb +54 -67
- data/app/views/solid_litequeen/_command-palette.html.erb +46 -83
- data/app/views/solid_litequeen/_database-selector.html.erb +24 -26
- data/app/views/solid_litequeen/databases/_foreign-key-data.html.erb +31 -36
- data/app/views/solid_litequeen/databases/_table-data-context-dialog.html.erb +76 -22
- data/app/views/solid_litequeen/databases/_table-relationships-dialog.html.erb +43 -9
- data/app/views/solid_litequeen/databases/index.html.erb +67 -33
- data/app/views/solid_litequeen/databases/show.html.erb +49 -49
- data/app/views/solid_litequeen/databases/table_rows.html.erb +300 -232
- data/config/importmap.rb +0 -2
- data/lib/solid_litequeen/version.rb +1 -1
- metadata +22 -1
|
@@ -1,38 +1,72 @@
|
|
|
1
|
-
<div class="
|
|
2
|
-
|
|
3
|
-
<
|
|
1
|
+
<div class="space-y-8">
|
|
2
|
+
<div class="flex flex-wrap items-end justify-between gap-6">
|
|
3
|
+
<div>
|
|
4
|
+
<h1
|
|
5
|
+
class="
|
|
6
|
+
mt-2 text-3xl font-display font-semibold text-[var(--text)]
|
|
7
|
+
sm:text-4xl
|
|
8
|
+
"
|
|
9
|
+
>
|
|
10
|
+
SQLite Databases
|
|
11
|
+
</h1>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div class="surface-panel px-4 py-2 text-sm text-muted">
|
|
15
|
+
<span class="font-semibold text-[var(--text)]">
|
|
16
|
+
<%= available_databases.count %>
|
|
17
|
+
</span>
|
|
4
18
|
|
|
5
|
-
|
|
6
|
-
|
|
19
|
+
<span>
|
|
20
|
+
<%= "database".pluralize(available_databases.count) %> available
|
|
21
|
+
</span>
|
|
7
22
|
</div>
|
|
23
|
+
</div>
|
|
8
24
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</span>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</a>
|
|
29
|
-
<% end %>
|
|
30
|
-
</div>
|
|
31
|
-
<% else %>
|
|
32
|
-
<div class="bg-gray-50 rounded-lg p-8 text-center">
|
|
33
|
-
<p class="text-gray-600">No databases found</p>
|
|
34
|
-
</div>
|
|
35
|
-
<% end %>
|
|
25
|
+
<% if available_databases.any? %>
|
|
26
|
+
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
|
27
|
+
<% available_databases.each do |db| %>
|
|
28
|
+
<a
|
|
29
|
+
href="<%= database_path(Base64.urlsafe_encode64(db.database)) %>"
|
|
30
|
+
class="
|
|
31
|
+
group surface-card flex h-full flex-col gap-4 p-5 transition
|
|
32
|
+
hover:-translate-y-0.5
|
|
33
|
+
hover:shadow-[0_28px_70px_-45px_var(--shadow-strong)]
|
|
34
|
+
"
|
|
35
|
+
>
|
|
36
|
+
<div class="flex items-start justify-between gap-3">
|
|
37
|
+
<div class="min-w-0">
|
|
38
|
+
<h2 class="text-lg font-semibold text-[var(--text)]">
|
|
39
|
+
<span class="block truncate"><%= db.name %></span>
|
|
40
|
+
</h2>
|
|
36
41
|
|
|
37
|
-
|
|
42
|
+
<p class="mt-1 text-sm text-muted">
|
|
43
|
+
<span class="block truncate"><%= db.database %></span>
|
|
44
|
+
</p>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<span class="slq-chip slq-chip--warm"><%= db.env_name %></span>
|
|
48
|
+
</div>
|
|
38
49
|
|
|
50
|
+
<div class="mt-auto flex items-center justify-between text-xs text-faint">
|
|
51
|
+
<span>Open database</span>
|
|
52
|
+
|
|
53
|
+
<span class="inline-flex items-center gap-1 text-[var(--accent)]">
|
|
54
|
+
Explore
|
|
55
|
+
<svg class="h-3.5 w-3.5" viewBox="0 0 20 20" fill="currentColor">
|
|
56
|
+
<path
|
|
57
|
+
fill-rule="evenodd"
|
|
58
|
+
d="M10.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L12.586 11H5a1 1 0 110-2h7.586l-2.293-2.293a1 1 0 010-1.414z"
|
|
59
|
+
clip-rule="evenodd"
|
|
60
|
+
/>
|
|
61
|
+
</svg>
|
|
62
|
+
</span>
|
|
63
|
+
</div>
|
|
64
|
+
</a>
|
|
65
|
+
<% end %>
|
|
66
|
+
</div>
|
|
67
|
+
<% else %>
|
|
68
|
+
<div class="surface-soft p-10 text-center">
|
|
69
|
+
<p class="text-sm text-muted">No databases found.</p>
|
|
70
|
+
</div>
|
|
71
|
+
<% end %>
|
|
72
|
+
</div>
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
<div class="
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<h2 class="text-xl font-semibold">
|
|
11
|
-
<span>
|
|
12
|
-
Tables
|
|
13
|
-
</span>
|
|
14
|
-
<% if @table_relations[:tables].any? %>
|
|
15
|
-
|
|
16
|
-
<%= render "table-relationships-dialog" %>
|
|
17
|
-
|
|
18
|
-
<button title="Relationships" onclick="table_relationships.showModal()" class="hover:cursor-pointer outline-none">
|
|
19
|
-
<%= image_tag "solid_litequeen/icons/workflow.svg", class: "size-5 -mb-1 opacity-60 dark:filter-white" %>
|
|
20
|
-
</button>
|
|
21
|
-
|
|
22
|
-
<% end %>
|
|
23
|
-
</h2>
|
|
24
|
-
<p class="text-base-content/60"><%= pluralize(@tables.count, "table") %> found</p>
|
|
1
|
+
<div class="space-y-6">
|
|
2
|
+
<div class="flex flex-wrap items-start justify-between gap-6">
|
|
3
|
+
<div class="min-w-0">
|
|
4
|
+
<p class="text-xs uppercase tracking-[0.35em] text-faint">Database</p>
|
|
5
|
+
<h1 class="mt-2 flex items-center gap-2 text-2xl font-display font-semibold text-[var(--text)] sm:text-3xl">
|
|
6
|
+
<%= image_tag "solid_litequeen/icons/database.svg", class: "size-5 icon-muted" %>
|
|
7
|
+
<span class="block truncate"><%= @database_location %></span>
|
|
8
|
+
</h1>
|
|
9
|
+
<p class="mt-2 text-sm text-muted"><%= pluralize(@tables.count, "table") %> found</p>
|
|
25
10
|
</div>
|
|
26
11
|
|
|
27
|
-
<div class="
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<%= table.dig(:name) %>
|
|
41
|
-
<% end %>
|
|
42
|
-
</td>
|
|
43
|
-
<td class="px-6 py-4 text-base-content/60">
|
|
44
|
-
<%= pluralize(table.dig(:row_count), "Row") %>
|
|
45
|
-
</td>
|
|
46
|
-
</tr>
|
|
47
|
-
<% end %>
|
|
48
|
-
</tbody>
|
|
49
|
-
</table>
|
|
12
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
13
|
+
<% if @table_relations[:tables].any? %>
|
|
14
|
+
<%= render "table-relationships-dialog" %>
|
|
15
|
+
<button
|
|
16
|
+
title="Relationships"
|
|
17
|
+
onclick="table_relationships.showModal()"
|
|
18
|
+
class="inline-flex items-center gap-2 rounded-full border border-[var(--border)] bg-[var(--surface)] px-3 py-2 text-sm font-medium text-[var(--text)] shadow-sm transition hover:-translate-y-0.5 hover:shadow-md"
|
|
19
|
+
>
|
|
20
|
+
<%= image_tag "solid_litequeen/icons/workflow.svg", class: "size-4 icon-muted" %>
|
|
21
|
+
Relationships
|
|
22
|
+
</button>
|
|
23
|
+
<% end %>
|
|
24
|
+
<%= link_to "Download", database_download_path(@database_id), class: "inline-flex items-center gap-2 rounded-full border border-[var(--border)] bg-[var(--surface)] px-3 py-2 text-sm font-medium text-[var(--accent)] shadow-sm transition hover:-translate-y-0.5 hover:shadow-md" %>
|
|
50
25
|
</div>
|
|
51
|
-
|
|
52
|
-
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<div class="surface-card overflow-hidden">
|
|
29
|
+
<table class="w-full text-sm">
|
|
30
|
+
<thead class="bg-[var(--surface-strong)] text-xs uppercase tracking-[0.2em] text-faint">
|
|
31
|
+
<tr>
|
|
32
|
+
<th class="px-6 py-3 text-left">Table Name</th>
|
|
33
|
+
<th class="px-6 py-3 text-left">Row Count</th>
|
|
34
|
+
</tr>
|
|
35
|
+
</thead>
|
|
36
|
+
<tbody class="divide-y divide-[var(--border)]">
|
|
37
|
+
<% @tables.each do |table| %>
|
|
38
|
+
<tr class="transition hover:bg-[var(--surface-muted)]">
|
|
39
|
+
<td class="px-6 py-4">
|
|
40
|
+
<%= link_to database_table_rows_path(@database_id, table[:name]), class: "font-medium text-[var(--text)] hover:text-[var(--accent)]" do %>
|
|
41
|
+
<%= table.dig(:name) %>
|
|
42
|
+
<% end %>
|
|
43
|
+
</td>
|
|
44
|
+
<td class="px-6 py-4 text-muted">
|
|
45
|
+
<%= pluralize(table.dig(:row_count), "row") %>
|
|
46
|
+
</td>
|
|
47
|
+
</tr>
|
|
48
|
+
<% end %>
|
|
49
|
+
</tbody>
|
|
50
|
+
</table>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|