solid_litequeen 0.15.2 → 0.16.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31714e5e8147a58b408fbc7198854d0c75ecd13e2a96d1602336f98f4fdf92f1
4
- data.tar.gz: 54d3d08d55a038351d909863db7e6f127c3f7e27dab518a00dda87117daab48e
3
+ metadata.gz: 886c8238aefeec357dec711fb169908049efcccfdd8dfcc788cf2090ca3b1228
4
+ data.tar.gz: '0925a136b657a61c4cc840bae08aba2a2bcea103de8635c8db10104bf2b6ef4c'
5
5
  SHA512:
6
- metadata.gz: a85fb56321a1a4354f9e93345c30e8c6263f3dc6ee998919f212f5c6fd7649cd2f2d853a2a2a5dd113436466b696ffcfd940e409990a465d4350be8898c220dd
7
- data.tar.gz: f910587e5b2fe23a5cf1e0fc2738cf3e920c250ebc907c28cff6fbe37fad93e6e827bc1d1a4f17a01748613a4bba4a8168b5ad3ac1a55a1d6a98c9c0756e08e9
6
+ metadata.gz: cee842c3dd8d486a661378031fa5f7340d2787e9dc9c9eb107cb08fa3c070f203d5243a2afb828f82f0b1bdb05829d7350803149e0e5deb9ec3ffc1b1a211d9c
7
+ data.tar.gz: 580f7da690297440375d1edb516da6e4f575fb1e0cfa831b298cf22eca0bdb0361b2cfff85f67685bc911f64616dde9b334b440337e4ef653661ab1c57651482
@@ -19,6 +19,10 @@ export default class extends Controller {
19
19
  this.element?.close();
20
20
  }
21
21
 
22
+ close(){
23
+ this.element?.close()
24
+ }
25
+
22
26
  /**
23
27
  * Handles mouse events for the search dialog.
24
28
  * @param {MouseEvent} event - The mouse event triggered by user interaction.
@@ -17,17 +17,37 @@
17
17
  @plugins "form";
18
18
 
19
19
  :root{
20
- /* color-scheme: light dark; */
21
- }
22
-
23
- @theme {
24
- --color-clifford: #da373d;
20
+ color-scheme: light dark;
21
+
22
+ --color-background: var(--color-slate-50);
23
+ --color-background-light: var(--color-white);
24
+ --color-border-muted: ()
25
+ --color-text: var(--color-gray-900);
26
+ --color-text-muted: var(--color-gray-500);
25
27
  }
26
28
 
29
+ @media (prefers-color-scheme: dark) {
30
+ :root {
31
+ --color-background: var(--color-slate-900);
32
+ --color-background-light: var(--color-slate-800);
33
+ --color-text: var(--color-slate-50);
34
+ --color-text-muted: var(--color-gray-400);
35
+ }
36
+ }
37
+
38
+
27
39
  @utility filter-blue{
28
40
  filter: invert(32%) sepia(65%) saturate(6380%) hue-rotate(219deg) brightness(98%) contrast(102%);
29
41
  }
30
42
 
43
+ @utility filter-cyan{
44
+ filter: invert(67%) sepia(62%) saturate(4644%) hue-rotate(156deg) brightness(97%) contrast(101%);
45
+ }
46
+
47
+ @utility filter-white{
48
+ filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
49
+ }
50
+
31
51
 
32
52
  /* popover fix for safari */
33
53
  @media screen and (-webkit-min-device-pixel-ratio: 0) {
@@ -50,7 +70,7 @@
50
70
 
51
71
  <%= yield :head %>
52
72
  </head>
53
- <body class="">
73
+ <body class="bg-[var(--color-background)] text-[var(--color-text)]">
54
74
  <header class="container mx-auto mt-4 mb-8">
55
75
  <%= render "solid_litequeen/database-selector" %>
56
76
  </header>
@@ -9,23 +9,23 @@
9
9
  </h1>
10
10
 
11
11
  <div class="mx-auto my-4 p-4 max-w-[90%]">
12
- <table class="min-w-full divide-y divide-gray-200 border border-gray-200">
13
- <thead class="bg-gray-50">
12
+ <table class="min-w-full divide-y divide-gray-200 dark:border-gray-200/50 border border-gray-200">
13
+ <thead class="bg-gray-50 dark:bg-[var(--color-background)]/40">
14
14
  <tr>
15
- <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
15
+ <th class="px-6 py-3 text-left text-xs font-medium dark:font-bold text-gray-500 dark:text-[var(--color-text)] uppercase tracking-wider">
16
16
  Column Name
17
17
  </th>
18
- <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
18
+ <th class="px-6 py-3 text-left text-xs font-medium dark:font-bold text-gray-500 dark:text-[var(--color-text)] uppercase tracking-wider">
19
19
  Value
20
20
  </th>
21
21
  </tr>
22
22
  </thead>
23
- <tbody class="bg-white divide-y divide-gray-200">
23
+ <tbody class="bg-white dark:bg-transparent divide-y divide-gray-200 dark:divide-gray-200/50">
24
24
  <% @result.rows.each do |row| %>
25
25
  <% @result.columns.zip(row).each do |column, value| %>
26
26
  <tr>
27
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800 font-semibold"><%= column %></td>
28
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800 in-aria-busy:blur"><%= value&.truncate(80) %></td>
27
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)] font-semibold"><%= column %></td>
28
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)]/80 in-aria-busy:blur"><%= value&.truncate(80) %></td>
29
29
  </tr>
30
30
  <% end %>
31
31
  <% end %>
@@ -1,13 +1,13 @@
1
- <dialog id="<%= dialog_id %>" data-controller="dialog" class="w-[800px] m-auto overscroll-y-contain">
2
- <form method="submit" class="flex flex-row-reverse">
3
- <button formmethod="dialog" class="cursor-pointer mr-4 mt-2 outline-none">
4
- <%= image_tag "solid_litequeen/icons/x.svg", class: "size-5" %>
1
+ <dialog id="<%= dialog_id %>" data-controller="dialog" class="bg-[var(--color-background-light)] dark:border dark:rounded dark:border-gray-50/20 w-[800px] m-auto overscroll-y-contain">
2
+ <div class="flex flex-row-reverse">
3
+ <button data-action="click->dialog#close" class="cursor-pointer mr-4 mt-2 outline-none">
4
+ <%= image_tag "solid_litequeen/icons/x.svg", class: "size-5 dark:filter-white" %>
5
5
  </button>
6
- </form>
6
+ </div>
7
7
 
8
8
  <h1 class="text-lg font-semibold text-center"><%= column_name %></h1>
9
9
 
10
- <div class="flex items-center max-w-[90%] h-80 max-h-80 mx-auto my-4 p-2 bg-gray-100 rounded ">
10
+ <div class="flex items-center max-w-[90%] h-80 max-h-80 mx-auto my-4 p-2 dark:bg-transparent bg-gray-100 dark:border dark:border-gray-50/50 rounded ">
11
11
  <p class="text-wrap overflow-auto w-[inherit] h-[inherit] p-2">
12
12
  <%= data %>
13
13
  </p>
@@ -1,10 +1,10 @@
1
- <dialog id="table_relationships" data-controller="dialog table-relations" data-relations="<%= @table_relations.to_json %>" class="w-[1000px] h-full m-auto overscroll-y-contain">
2
- <form method="submit" class="flex flex-row-reverse">
3
- <button formmethod="dialog" class="cursor-pointer mr-4 mt-2 outline-none">
4
- <%= image_tag "solid_litequeen/icons/x.svg", class: "size-5" %>
1
+ <dialog id="table_relationships" data-controller="dialog table-relations" data-relations="<%= @table_relations.to_json %>" class="dark:bg-[var(--color-background-light)] dark:border dark:border-gray-50/20 rounded w-[1000px] h-full m-auto overscroll-y-contain">
2
+ <div class="flex flex-row-reverse">
3
+ <button data-action="click->dialog#close" class="cursor-pointer mr-4 mt-2 outline-none">
4
+ <%= image_tag "solid_litequeen/icons/x.svg", class: "size-5 dark:filter-white" %>
5
5
  </button>
6
- </form>
7
- <h1 class="text-black text-center mt-4">Table Relationships</h1>
6
+ </div>
7
+ <h1 class=" text-center mt-4">Table Relationships</h1>
8
8
 
9
9
  <div class="w-full p-4 mx-auto overflow-x-auto">
10
10
  <div id="paper" class="m-auto my-10 w-full h-[600px] border rounded"></div>
@@ -1,9 +1,9 @@
1
1
  <div class="container mx-auto px-4 py-8">
2
2
 
3
- <h1 class="text-3xl font-bold text-gray-900 mb-6">Solid Lite Queen</h1>
3
+ <h1 class="text-3xl font-bold mb-6">Solid Lite Queen</h1>
4
4
 
5
5
  <div class="mb-6">
6
- <p class="text-gray-600"><%= pluralize(available_databases.count, "SQLite database") %> found</p>
6
+ <p class="text-[var(--color-text-muted)]"><%= pluralize(available_databases.count, "SQLite database") %> found</p>
7
7
  </div>
8
8
 
9
9
  <% if available_databases.any? %>
@@ -1,13 +1,13 @@
1
1
  <div class="container mx-auto px-4 py-8">
2
- <h1 class="text-3xl font-bold text-gray-900 mb-6 flex gap-1 items-center justify-center">
3
- <%= image_tag "solid_litequeen/icons/database.svg", class: "size-6" %>
2
+ <h1 class="text-3xl font-bold mb-6 flex gap-1 items-center justify-center">
3
+ <%= image_tag "solid_litequeen/icons/database.svg", class: "size-6 dark:filter-white" %>
4
4
  <span>
5
5
  <%= @database_location %>
6
6
  </span>
7
7
  </h1>
8
8
 
9
9
  <div class="mb-6">
10
- <h2 class="text-xl font-semibold text-gray-800">
10
+ <h2 class="text-xl font-semibold">
11
11
  <span>
12
12
  Tables
13
13
  </span>
@@ -16,31 +16,31 @@
16
16
  <%= render "table-relationships-dialog" %>
17
17
 
18
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" %>
19
+ <%= image_tag "solid_litequeen/icons/workflow.svg", class: "size-5 -mb-1 dark:filter-white" %>
20
20
  </button>
21
21
 
22
22
  <% end %>
23
23
  </h2>
24
- <p class="text-gray-600"><%= pluralize(@tables.count, "table") %> found</p>
24
+ <p class="text-[var(--color-text-muted)]"><%= pluralize(@tables.count, "table") %> found</p>
25
25
  </div>
26
26
 
27
- <div class="bg-white rounded-lg shadow overflow-hidden">
27
+ <div class="bg-white dark:bg-transparent rounded-lg shadow overflow-hidden">
28
28
  <table class="w-full">
29
29
  <thead>
30
- <tr class="bg-gray-100 border-b border-gray-200">
31
- <th class="px-6 py-3 text-left text-sm font-medium text-gray-700">Table Name</th>
32
- <th class="px-6 py-3 text-left text-sm font-medium text-gray-700">Row Count</th>
30
+ <tr class="bg-gray-100 dark:bg-[var(--color-background-light)] border-b border-gray-200">
31
+ <th class="px-6 py-3 text-left text-sm font-medium text-gray-700 dark:text-[var(--color-text)] ">Table Name</th>
32
+ <th class="px-6 py-3 text-left text-sm font-medium text-gray-700 dark:text-[var(--color-text)]">Row Count</th>
33
33
  </tr>
34
34
  </thead>
35
- <tbody class="divide-y divide-gray-200">
35
+ <tbody class="divide-y divide-gray-200 dark:divide-gray-200/50">
36
36
  <% @tables.each do |table| %>
37
- <tr class="hover:bg-gray-50">
37
+ <tr class="hover:bg-gray-50 dark:hover:bg-[var(--color-background-light)]/50">
38
38
  <td class="px-6 py-4">
39
- <%= link_to database_table_rows_path(@database_id, table[:name]), class: "text-blue-600 hover:text-blue-800 font-medium" do %>
39
+ <%= link_to database_table_rows_path(@database_id, table[:name]), class: "text-blue-600 hover:text-blue-800 dark:text-cyan-500 dark:hover:text-cyan-600 font-medium" do %>
40
40
  <%= table.dig(:name) %>
41
41
  <% end %>
42
42
  </td>
43
- <td class="px-6 py-4 text-gray-600">
43
+ <td class="px-6 py-4 text-gray-600 dark:text-gray-300">
44
44
  <%= pluralize(table.dig(:row_count), "Row") %>
45
45
  </td>
46
46
  </tr>
@@ -1,10 +1,10 @@
1
1
  <div class="container mx-auto px-4 py-8">
2
- <h1 class="text-3xl font-bold text-gray-900 mb-6 flex gap-1 items-center justify-center">
2
+ <h1 class="text-3xl font-bold mb-6 flex gap-1 items-center justify-center">
3
3
  <%= link_to database_path(params[:database_id]) do %>
4
- <%= image_tag "solid_litequeen/icons/database.svg", class: "size-6" %>
4
+ <%= image_tag "solid_litequeen/icons/database.svg", class: "size-6 dark:filter-white" %>
5
5
  <% end %>
6
6
 
7
- <%= image_tag "solid_litequeen/icons/chevron-right.svg", class: "size-6" %>
7
+ <%= image_tag "solid_litequeen/icons/chevron-right.svg", class: "size-6 dark:filter-white" %>
8
8
 
9
9
  <span>
10
10
  <%= @table_name %>
@@ -12,10 +12,10 @@
12
12
  </h1>
13
13
 
14
14
  <div class="mb-6">
15
- <p class="text-gray-600"><%= pluralize(@row_count, "row") %> found</p>
15
+ <p class="text-[var(--color-text-muted)]"><%= pluralize(@row_count, "row") %> found</p>
16
16
  </div>
17
17
 
18
- <div class="bg-white rounded-lg shadow overflow-x-auto">
18
+ <div class="bg-white dark:bg-transparent rounded-lg shadow overflow-x-auto">
19
19
  <div class="min-w-full inline-block align-middle">
20
20
  <table
21
21
  data-controller="table"
@@ -24,46 +24,46 @@
24
24
  class="min-w-full relative"
25
25
  >
26
26
  <thead class="">
27
- <tr class="bg-gray-100 border-b border-gray-200">
27
+ <tr class="bg-gray-100 dark:bg-[var(--color-background-light)] border-b border-gray-200">
28
28
  <% @data.columns.each_with_index do |column, index| %>
29
29
  <th
30
30
  draggable="true"
31
31
  data-column-index="<%= index %>"
32
32
  data-column-name="<%= column %>"
33
- class="hover:cursor-move px-6 py-3 text-left text-sm font-medium text-gray-700 whitespace-nowrap data-[is-dragging]:bg-orange-300/30 data-[column-order-about-to-be-swapped]:bg-green-300/30"
33
+ class="hover:cursor-move px-6 py-3 text-left text-sm font-medium text-gray-700 dark:text-[var(--color-text)] whitespace-nowrap data-[is-dragging]:bg-orange-300/30 data-[column-order-about-to-be-swapped]:bg-green-300/30"
34
34
  >
35
35
 
36
36
  <%# popover the the column info %>
37
37
  <% popover_id = "popover_#{column}_#{SecureRandom.hex(8)}" %>
38
38
 
39
39
  <button popovertarget="<%= popover_id %>" class="mr-1 p-1 hover:cursor-pointer" style="anchor-name: --anchor_<%= popover_id %>;">
40
- <%= image_tag "solid_litequeen/icons/info.svg", class: "size-3.5" %>
40
+ <%= image_tag "solid_litequeen/icons/info.svg", class: "size-3.5 dark:filter-white" %>
41
41
  </button>
42
42
 
43
- <div popover id="<%= popover_id %>" class="max-w-lg min-h-10 bg-gray-100 border-gray-400 border p-4 rounded-md" style="position-anchor: --anchor_<%= popover_id%>; top: anchor(--anchor_<%= popover_id%> bottom); left: anchor(--anchor_<%= popover_id%> right);">
43
+ <div popover id="<%= popover_id %>" class="max-w-lg min-h-10 bg-gray-100 dark:bg-[var(--color-background)] border-gray-400 dark:border-gray-200/50 border p-4 rounded-md" style="position-anchor: --anchor_<%= popover_id%>; top: anchor(--anchor_<%= popover_id%> bottom); left: anchor(--anchor_<%= popover_id%> right);">
44
44
  <table class="min-w-full divide-y divide-gray-200 border border-gray-200">
45
45
 
46
- <tbody class="bg-white divide-y divide-gray-200">
46
+ <tbody class="bg-white dark:dark:bg-[var(--color-background-light)] divide-y divide-gray-200 dark:divide-gray-200/50 ">
47
47
  <% column_info = @columns_info[column] %>
48
48
 
49
49
  <tr>
50
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800 font-semibold">Type</td>
51
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800 "><%= column_info&.dig(:sql_type) %></td>
50
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)] font-semibold">Type</td>
51
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)]/80 "><%= column_info&.dig(:sql_type) %></td>
52
52
  </tr>
53
53
 
54
54
  <tr>
55
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800 font-semibold">Primary Key</td>
56
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800 "><%= column_info&.dig(:is_primary_key) %></td>
55
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)] font-semibold">Primary Key</td>
56
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)]/80 "><%= column_info&.dig(:is_primary_key) %></td>
57
57
  </tr>
58
58
 
59
59
  <tr>
60
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800 font-semibold">Nullable</td>
61
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800 "><%= column_info&.dig(:null) %></td>
60
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)] font-semibold">Nullable</td>
61
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)]/80 "><%= column_info&.dig(:null) %></td>
62
62
  </tr>
63
63
 
64
64
  <tr>
65
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800 font-semibold">Default</td>
66
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-800 "><%= column_info&.dig(:default) %></td>
65
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)] font-semibold">Default</td>
66
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-[var(--color-text)]/80 "><%= column_info&.dig(:default) %></td>
67
67
  </tr>
68
68
 
69
69
  <% if column_info&.dig(:foreign_key).present? %>
@@ -140,9 +140,9 @@
140
140
  </tr>
141
141
  </thead>
142
142
 
143
- <tbody class="divide-y divide-gray-200">
143
+ <tbody class="divide-y divide-gray-200 dark:divide-gray-200/50">
144
144
  <% @data.rows.each do |row| %>
145
- <tr class="hover:bg-gray-50" >
145
+ <tr class="hover:bg-gray-50 dark:hover:bg-[var(--color-background-light)]/50" >
146
146
  <% row.each_with_index do |item, index| %>
147
147
  <% truncated_item = item&.truncate(80) %>
148
148
  <% column_name = @data.columns[index] %>
@@ -150,7 +150,7 @@
150
150
  <td
151
151
  data-column="<%= column_name %>"
152
152
  data-data_type="<%= @columns_info.dig(column_name).dig(:type) %>"
153
- class="px-6 py-4 text-sm text-gray-800 whitespace-nowrap"
153
+ class="px-6 py-4 text-sm text-gray-800 dark:text-gray-300 whitespace-nowrap"
154
154
  >
155
155
 
156
156
  <div class="flex justify-between gap-1">
@@ -165,7 +165,7 @@
165
165
  data-fk_target_field_value="<%= truncated_item %>"
166
166
  class="size-4 mt-0.5 hover:cursor-pointer flex-grow outline-none"
167
167
  >
168
- <%= image_tag "solid_litequeen/icons/spline.svg", class: "size-4 filter-blue" %>
168
+ <%= image_tag "solid_litequeen/icons/spline.svg", class: "size-4 filter-blue dark:filter-cyan" %>
169
169
  </button>
170
170
 
171
171
  <% end %>
@@ -178,7 +178,7 @@
178
178
  <%= render "table-data-context-dialog", dialog_id: dialog_id, column_name: column_name, data: item %>
179
179
 
180
180
  <button onclick="document.getElementById('<%= dialog_id %>').showModal()" class="cursor-pointer size-4 outline-none">
181
- <%= image_tag "solid_litequeen/icons/circle-elipsis.svg", class: "size-4" %>
181
+ <%= image_tag "solid_litequeen/icons/circle-elipsis.svg", class: "size-4 dark:filter-white" %>
182
182
 
183
183
  </button>
184
184
 
@@ -193,13 +193,12 @@
193
193
  <% end %>
194
194
  </tbody>
195
195
 
196
- <dialog id="foreign-key-data" data-controller="dialog" class="w-[900px] m-auto overscroll-y-contain">
196
+ <dialog id="foreign-key-data" data-controller="dialog" class="bg-[var(--color-background-light)] dark:border dark:rounded dark:border-gray-50/20 w-[900px] m-auto overscroll-y-contain">
197
197
  <div class="flex flex-row-reverse">
198
- <form method="submit">
199
- <button formmethod="dialog" class="cursor-pointer mr-4 mt-2 outline-none">
200
- <%= image_tag "solid_litequeen/icons/x.svg", class: "size-5" %>
201
- </button>
202
- </form>
198
+ <button data-action="click->dialog#close" class="cursor-pointer mr-4 mt-2 outline-none">
199
+ <%= image_tag "solid_litequeen/icons/x.svg", class: "size-5 dark:filter-white" %>
200
+ </button>
201
+
203
202
  </div>
204
203
 
205
204
  <div class="overflow-x-auto relative">
@@ -1,3 +1,3 @@
1
1
  module SolidLitequeen
2
- VERSION = "0.15.2"
2
+ VERSION = "0.16.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solid_litequeen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.2
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vik Borges
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-24 00:00:00.000000000 Z
11
+ date: 2025-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails