solid_litequeen 0.4.4 → 0.6.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: f9ea219d6e8a41230ac06a3cfbbd7bc15e4005c8e0744a329bed82dc01e2d252
4
- data.tar.gz: 9650a0ddd050018b17a044e3c8320b367d8fdc054e4ebe1ca0dc99453651239d
3
+ metadata.gz: 725383d898ae1afae1932a6973d7be481eec3bc4831b6491155e88b6546906c7
4
+ data.tar.gz: 4e1ae4eb0a663262fecef00b3923cb13853a8d3a0faa0a1cc63fdca1fb4fd3a6
5
5
  SHA512:
6
- metadata.gz: fa23b13e73d5fb47a9b569b1b222fc0614bbe10c19d0a0b98a996e32cdc519f76ad84f5ca32b2df9d97fd5009f6c158061d3c253979e1c96b2e1f6b1757c0d13
7
- data.tar.gz: ccf90477b30454b6836011ff25cb5b619627afb0b3010c8c5bea95844ca456a6cbe075153819fcfbb7ffb08258fb7d3214b580cf50774ad936c9ec6d4cd2a16b
6
+ metadata.gz: 7e4c27bebcd357f1692ca069645d84f233bf03f46cb7fa6b3375d3bf9dce769f1d429c7a38720f2877df701ce9bc75fe37f6fa28ee3f62ba011f7afd468e40de
7
+ data.tar.gz: f9bbf878c1071c2d0f67ada490dc68b3fc75cd55dd9362b781604e689f6dc82228ab0997de1624b93504cb88a06f3855d8a6c4615a5b7949be6fa1018ca5c61d
@@ -0,0 +1,4 @@
1
+ //= link_tree ../javascripts/solid_litequeen .js
2
+ //= link_tree ../javascripts/solid_litequeen .css
3
+ //= link_directory ../../javascript/solid_litequeen/jobs/controllers .js
4
+ //= link_directory ../../javascript/solid_litequeen/jobs/helpers .js
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-info"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4"></path><path d="M12 8h.01"></path></svg>
@@ -0,0 +1,3 @@
1
+ import "@hotwired/turbo-rails";
2
+ import "controllers";
3
+ import "helpers";
@@ -0,0 +1,9 @@
1
+ import { Application } from "@hotwired/stimulus";
2
+
3
+ const application = Application.start();
4
+
5
+ // Configure Stimulus development experience
6
+ application.debug = false;
7
+ window.Stimulus = application;
8
+
9
+ export { application };
@@ -0,0 +1,14 @@
1
+ // Import and register all your controllers from the importmap under controllers/*
2
+
3
+ import { application } from "controllers/application";
4
+
5
+ // Eager load all controllers defined in the import map under controllers/**/*_controller
6
+ import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading";
7
+ eagerLoadControllersFrom("controllers", application);
8
+
9
+ // Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
10
+ // import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
11
+ // lazyLoadControllersFrom("controllers", application)
12
+
13
+ document.querySelector("h1").innerText = "hi, i'm your engine";
14
+ console.log("hi, again");
@@ -5,9 +5,8 @@
5
5
  <%= csrf_meta_tags %>
6
6
  <%= csp_meta_tag %>
7
7
 
8
- <%= yield :head %>
9
8
 
10
- <%= stylesheet_link_tag "solid_litequeen/application", media: "all" %>
9
+ <%= stylesheet_link_tag "solid_litequeen/application", media: "all", "data-turbo-track": "reload" %>
11
10
  <script src="https://unpkg.com/@tailwindcss/browser@4"></script>
12
11
  <style type="text/tailwindcss">
13
12
 
@@ -16,9 +15,20 @@
16
15
  --color-clifford: #da373d;
17
16
  }
18
17
  </style>
18
+
19
+ <%# Only include the importmap tags if we're not in a host application %>
20
+
21
+ <%= javascript_importmap_tags %>
22
+
23
+
24
+ <%# Always include the engine's JavaScript module %>
25
+ <%= javascript_import_module_tag "solid_litequeen/application" %>
26
+
27
+ <%= yield :head %>
19
28
  </head>
20
29
  <body class="">
21
30
 
31
+
22
32
  <%= yield %>
23
33
 
24
34
  </body>
@@ -17,8 +17,8 @@
17
17
 
18
18
  <div class="bg-white rounded-lg shadow overflow-x-auto">
19
19
  <div class="min-w-full inline-block align-middle">
20
- <table class="min-w-full">
21
- <thead>
20
+ <table class="min-w-full relative">
21
+ <thead class="">
22
22
  <tr class="bg-gray-100 border-b border-gray-200">
23
23
  <% @data.columns.each do |column| %>
24
24
  <th class="px-6 py-3 text-left text-sm font-medium text-gray-700 whitespace-nowrap"><%= column %></th>
@@ -29,7 +29,20 @@
29
29
  <% @data.rows.each do |row| %>
30
30
  <tr class="hover:bg-gray-50">
31
31
  <% row.each do |item| %>
32
- <td class="px-6 py-4 text-sm text-gray-800 whitespace-nowrap"><%= item %></td>
32
+ <% truncated_item = item&.truncate(80) %>
33
+ <td class="px-6 py-4 text-sm text-gray-800 whitespace-nowrap" >
34
+
35
+ <div class="flex justify-between">
36
+
37
+ <span><%= truncated_item %></span>
38
+
39
+ <% if truncated_item&.to_s&.ends_with?("...") %>
40
+ <span title="<%= item %>" class="cursor-pointer size-4">
41
+ <%= image_tag "solid_litequeen/icons/info.svg", class: "size-4" %>
42
+ </span>
43
+ <% end %>
44
+ </div>
45
+ </td>
33
46
  <% end %>
34
47
  </tr>
35
48
  <% end %>
@@ -0,0 +1,9 @@
1
+ # NOTE: this pin works because `my_engine/app/assets/javascripts
2
+ # is in the `Rails.application.config.assets.paths`
3
+
4
+ pin "application", to: "solid_litequeen/application.js", preload: true
5
+ pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
6
+ pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true
7
+ pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
8
+ pin_all_from SolidLitequeen::Engine.root.join("app/javascript/solid_litequeen/jobs/controllers"), under: "controllers", to: "solid_litequeen/jobs/controllers"
9
+ pin_all_from SolidLitequeen::Engine.root.join("app/javascript/solid_litequeen/jobs/helpers"), under: "helpers", to: "solid_litequeen/jobs/helpers"
@@ -1,5 +1,28 @@
1
+ require "importmap-rails"
2
+ require "turbo-rails"
3
+ require "stimulus-rails"
4
+
5
+
1
6
  module SolidLitequeen
2
7
  class Engine < ::Rails::Engine
3
8
  isolate_namespace SolidLitequeen
9
+
10
+ initializer "solid_litequeen.importmap", before: "importmap" do |app|
11
+ # NOTE: this will add pins from this engine to the main app
12
+ # https://github.com/rails/importmap-rails#composing-import-maps
13
+ app.config.importmap.paths << root.join("config/importmap.rb")
14
+
15
+ # Add the engine's JavaScript directory to the asset paths
16
+ app.config.assets.paths << root.join("app/assets/javascripts")
17
+
18
+ # NOTE: something about cache; I did not look into it.
19
+ # https://github.com/rails/importmap-rails#sweeping-the-cache-in-development-and-test
20
+ app.config.importmap.cache_sweepers << root.join("app/assets/javascripts")
21
+ end
22
+
23
+ # NOTE: add engine manifest to precompile assets in production
24
+ initializer "solid_litequeen.assets" do |app|
25
+ app.config.assets.precompile += %w[solid_litequeen_manifest]
26
+ end
4
27
  end
5
28
  end
@@ -1,3 +1,3 @@
1
1
  module SolidLitequeen
2
- VERSION = "0.4.4"
2
+ VERSION = "0.6.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.4.4
4
+ version: 0.6.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-02-27 00:00:00.000000000 Z
11
+ date: 2025-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: stimulus-rails
42
+ name: turbo-rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: tailwindcss-rails
56
+ name: stimulus-rails
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -147,9 +147,14 @@ files:
147
147
  - MIT-LICENSE
148
148
  - README.md
149
149
  - Rakefile
150
+ - app/assets/config/solid_litequeen_manifest.js
150
151
  - app/assets/images/solid_litequeen/icons/chevron-left.svg
151
152
  - app/assets/images/solid_litequeen/icons/chevron-right.svg
152
153
  - app/assets/images/solid_litequeen/icons/database.svg
154
+ - app/assets/images/solid_litequeen/icons/info.svg
155
+ - app/assets/javascripts/solid_litequeen/application.js
156
+ - app/assets/javascripts/solid_litequeen/controllers/application.js
157
+ - app/assets/javascripts/solid_litequeen/controllers/index.js
153
158
  - app/assets/stylesheets/solid_litequeen/application.css
154
159
  - app/controllers/solid_litequeen/application_controller.rb
155
160
  - app/controllers/solid_litequeen/databases_controller.rb
@@ -162,6 +167,7 @@ files:
162
167
  - app/views/solid_litequeen/databases/index.html.erb
163
168
  - app/views/solid_litequeen/databases/show.html.erb
164
169
  - app/views/solid_litequeen/databases/table_rows.html.erb
170
+ - config/importmap.rb
165
171
  - config/routes.rb
166
172
  - lib/solid_litequeen.rb
167
173
  - lib/solid_litequeen/engine.rb