voidable-hotwire 0.3.1 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5a4766c0b64231a9d6b0bcdfcd943f64e1d3f2a8b8eceb7ab550704acd7169b
4
- data.tar.gz: 51fa558391c3c034640af34d035f08d7d89a731652f30d6aa43b6f37c7447022
3
+ metadata.gz: 383061c49371adb1c779cd6137079515feacc4efd7a0d0c94cfd20433899e92e
4
+ data.tar.gz: 5b56bb49ef638341b2528b1d884ac4c239437dcd4c024c1b39088a1bdaa76153
5
5
  SHA512:
6
- metadata.gz: c1fcea45b2247b430afe6a357d9f456542b7a612cf67a00658531255e4f832a4f03400fe280d3e8f4cb8fb457d455434415e701d706c11c390515a2b9b6fecee
7
- data.tar.gz: 655a1af6fbfc051dd6c2bdea28ffcc9dffd53fdbc5d5be4f5d85dda04f03b99cd258ec51e8544a1926cf04a0ed26c2a23e5320464a59e0a58d5d9eba69b4a3e8
6
+ metadata.gz: 7c8776a82f85f8466393d6970d6213336c919767db5ebe0b04d9edacdea5002bc610efc52e0d55b106e5b38dd43f93e5d74a2f3512ca56e7e2bdff64ba04be7e
7
+ data.tar.gz: 9997e86f1f8c54f8a3517d629cc7b8cc1dba0d63b5db22d0d2a7c54ed6674023f0704952b402449cda3b05e89d121ddaeb91aab3ff9f0185e332d5f05ce6ab1e
@@ -107,16 +107,25 @@ module Voidable
107
107
  def add_js_import
108
108
  js_entrypoint = "app/javascript/application.js"
109
109
  return unless File.exist?(js_entrypoint)
110
- return if File.read(js_entrypoint).include?("@voidable/ui")
111
- prepend_to_file js_entrypoint, "import \"@voidable/ui\";\nimport \"@voidable/ui-hotwire\";\n\n"
112
- if vite?
113
- append_to_file js_entrypoint, <<~JS
110
+ contents = File.read(js_entrypoint)
111
+ unless contents.include?("@voidable/ui")
112
+ prepend_to_file js_entrypoint, "import \"@voidable/ui\";\nimport \"@voidable/ui-hotwire\";\n\n"
113
+ end
114
+ if vite? && !contents.include?("voidable-layout.js")
115
+ css_imports = %w[./application.css]
116
+ case options[:layout]
117
+ when "switching"
118
+ css_imports << "./voidable-layout-topbar.css"
119
+ css_imports << "./voidable-layout-sidebar.css"
120
+ else
121
+ css_imports << "./voidable-layout.css"
122
+ end
123
+ css_imports << "./voidable-devise.css"
114
124
 
115
- import "@voidable/theme";
116
- import "./voidable-layout.css";
117
- import "./voidable-devise.css";
118
- import "./voidable-layout.js";
119
- JS
125
+ imports = css_imports.map { |f| "import \"#{f}\";" }.join("\n")
126
+ imports += "\nimport \"@voidable/theme\";"
127
+ imports += "\nimport \"./voidable-layout.js\";"
128
+ append_to_file js_entrypoint, "\n#{imports}\n"
120
129
  end
121
130
  say "Added Voidable imports to application.js", :green
122
131
  end
@@ -327,6 +327,7 @@ a { color: inherit; text-decoration: none; }
327
327
  flex: 1;
328
328
  display: flex;
329
329
  flex-direction: column;
330
+ overflow-x: hidden;
330
331
  overflow-y: auto;
331
332
  padding: var(--void-space-6);
332
333
  }
@@ -1,5 +1,5 @@
1
1
  module Voidable
2
2
  module Hotwire
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voidable-hotwire
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaz Walker