railsui 3.2.4 → 3.2.6

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: fef7e5e793d92ba7a9f865ef962b1451fdc0a2238f154ef1d1c69b1ca01938ce
4
- data.tar.gz: 98d0aaeaddb1201575fa08e68b02035e89b79dbef036773e953a89cd97e96e40
3
+ metadata.gz: c60c93266d6805e4d07eb8748a9d0331b51dfd39ff9e38e5d1127e2d74fc72f7
4
+ data.tar.gz: 6d9f13285b3cc3e58cd442b7f1233bbd594fb4dbd0a9f8461426f4d0b8d6f34d
5
5
  SHA512:
6
- metadata.gz: c59fbc965c98741728b2586b0245178c58a6556be492e18a386ae1713e094fe22704de49d33d423ddb9912cf0797ac9f6087dc8ed49f985a629c4d3c61bebb12
7
- data.tar.gz: 68aad9674397d34dc41a8a842b8be16d7f255da17246343da872cd020163cf12c9c66fe57ed1a0fcd86fb657f7ecf1f2b261b1f25ee2d36ce93621012f9ca972
6
+ metadata.gz: 07d424fb75b02f1d60ecd840975231b810b17f696da4139c564b6466e19c5656592e5142e29d1f1eb8302fe315a8bf9071df96f16090923d0040b04cd1b0327f
7
+ data.tar.gz: f373d62b2ffb75f24220190f938c64e17277c4bca711dd517f157420fc1d54491103fcaff51e07695243c03f40fc492272a2445abc2d9450f405fb8bd0f86e4d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- railsui (3.2.4)
4
+ railsui (3.2.6)
5
5
  meta-tags
6
6
  psych
7
7
  rails (>= 7.0)
@@ -25,7 +25,7 @@
25
25
  <% end %>
26
26
  </div>
27
27
  <div class="sm:col-span-6 md:pt-0 pt-2">
28
- <div data-controller="railsui-code" class="mt-5 mb-8 first:mt-0 last:mb-0 bg-gradient-to-br rounded-lg border from-neutral-900 to-neutral-700 border-neutral-700 selection:bg-salmon-500 selection:bg-opacity-25 relative text-base text-white">
28
+ <div data-controller="railsui-code" class="mt-5 mb-8 first:mt-0 last:mb-0 rounded-2xl border-2 bg-neutral-900 border-neutral-700 selection:bg-salmon-500 selection:bg-opacity-25 relative text-base text-white">
29
29
  <pre><code data-railsui-code-target="snippet" data-railsui-clipboard-target="content" class="language-bash text-neutral-100"># Path
30
30
  <%= route[:path].to_param.strip %>
31
31
 
@@ -51,7 +51,7 @@
51
51
  <div class="grid grid-cols-1 md:grid-cols-11 text-sm items-start py-4">
52
52
  <div class="sm:col-span-5"></div>
53
53
  <div class="sm:col-span-6">
54
- <div data-controller="railsui-code" class="mt-5 mb-8 first:mt-0 last:mb-0 bg-gradient-to-br rounded-lg overflow-hidden border from-neutral-900 to-neutral-700 border-neutral-700 selection:bg-salmon-500 selection:bg-opacity-25 relative text-base text-white">
54
+ <div data-controller="railsui-code" class="mt-5 mb-8 first:mt-0 last:mb-0 rounded-2xl overflow-hidden border-2 bg-neutral-900 border-neutral-700 selection:bg-salmon-500 selection:bg-opacity-25 relative text-base text-white">
55
55
  <pre><code data-railsui-code-target="snippet" data-railsui-clipboard-target="content" class="language-bash text-neutral-100"># Path
56
56
  <%= route[:path].to_param.strip %>
57
57
 
@@ -5,18 +5,20 @@ export default class extends Controller {
5
5
  static targets = ["modal", "input", "results"]
6
6
 
7
7
  connect() {
8
- useTransition(this, {
9
- element: this.modalTarget,
10
- enterActive: "transition ease-out duration-200",
11
- enterFrom: "opacity-0 scale-95",
12
- enterTo: "opacity-100 scale-100",
13
- leaveActive: "transition ease-in duration-150",
14
- leaveFrom: "opacity-100 scale-100",
15
- leaveTo: "opacity-0 scale-95",
16
- })
17
- this.isOpen = false
18
- this.activeIndex = -1
19
- this.currentResults = []
8
+ if (this.hasModalTarget) {
9
+ useTransition(this, {
10
+ element: this.modalTarget,
11
+ enterActive: "transition ease-out duration-200",
12
+ enterFrom: "opacity-0 scale-95",
13
+ enterTo: "opacity-100 scale-100",
14
+ leaveActive: "transition ease-in duration-150",
15
+ leaveFrom: "opacity-100 scale-100",
16
+ leaveTo: "opacity-0 scale-95",
17
+ })
18
+ this.isOpen = false
19
+ this.activeIndex = -1
20
+ this.currentResults = []
21
+ }
20
22
  }
21
23
 
22
24
  open() {
@@ -7,12 +7,16 @@
7
7
  <meta charset="UTF-8" />
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
9
  <meta name="apple-mobile-web-app-capable" content="yes">
10
+ <meta name="mobile-web-app-capable" content="yes">
10
11
 
11
12
  <%= csrf_meta_tags %>
12
13
  <%= csp_meta_tag %>
13
14
 
14
15
  <%= yield :head %>
15
16
 
17
+ <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
18
+ <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
19
+
16
20
  <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
17
21
  <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
18
22
 
@@ -7,12 +7,16 @@
7
7
  <meta charset="UTF-8" />
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
9
  <meta name="apple-mobile-web-app-capable" content="yes">
10
+ <meta name="mobile-web-app-capable" content="yes">
10
11
 
11
12
  <%= csrf_meta_tags %>
12
13
  <%= csp_meta_tag %>
13
14
 
14
15
  <%= yield :head %>
15
16
 
17
+ <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
18
+ <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
19
+
16
20
  <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
17
21
  <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
18
22
 
@@ -7,12 +7,16 @@
7
7
  <meta charset="UTF-8" />
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
9
  <meta name="apple-mobile-web-app-capable" content="yes">
10
+ <meta name="mobile-web-app-capable" content="yes">
10
11
 
11
12
  <%= csrf_meta_tags %>
12
13
  <%= csp_meta_tag %>
13
14
 
14
15
  <%= yield :head %>
15
16
 
17
+ <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
18
+ <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
19
+
16
20
  <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
17
21
  <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
18
22
 
@@ -126,8 +126,8 @@
126
126
  <% end %>
127
127
 
128
128
  <%= render "rui/shared/chat/message", user: true do %>
129
- <p>How do I approach front end more easily?</p>
130
- <% end %>>
129
+ How do I approach front end more easily?
130
+ <% end %>
131
131
 
132
132
  <%= render "rui/shared/chat/message" do %>
133
133
  Front-end technologies like HTML, CSS, and JavaScript are essential for building the user interface of a web
@@ -4,7 +4,7 @@
4
4
  <article class="relative group">
5
5
  <div class="flex justify-end mb-1">
6
6
  <div class="chat">
7
- <div class="prose prose-neutral dark:prose-invert" data-controller="markdown hightlight code-block" data-markdown-target="content">
7
+ <div class="prose prose-neutral dark:prose-invert border-neutral-300/80 dark:border-neutral-700/80 prose-pre:border dark:prose-pre:border-neutral-700/80" data-controller="markdown code-block" data-markdown-target="content">
8
8
  <%= yield %>
9
9
  </div>
10
10
  </div>
@@ -22,7 +22,6 @@
22
22
  </button>
23
23
  </div>
24
24
  </article>
25
-
26
25
  <% else %>
27
26
  <article class="relative w-full group">
28
27
  <div class="absolute top-0 flex flex-col transition-opacity duration-300 opacity-0 -left-10 group-hover:opacity-100">
@@ -32,7 +31,7 @@
32
31
  <span class="sr-only">Copy</span>
33
32
  </button>
34
33
  </div>
35
- <div class="max-w-full pb-2 mb-2 prose prose-neutral dark:prose-invert border-neutral-300/80 dark:border-neutral-700/80 prose-pre:p-0 prose-pre:bg-transparent prose-pre:border dark:prose-pre:border-neutral-700/80" data-controller="markdown highlight code-block" data-markdown-target="content" data-highlight-target="code">
34
+ <div class="max-w-full pb-2 mb-2 prose prose-neutral dark:prose-invert border-neutral-300/80 dark:border-neutral-700/80 prose-pre:border dark:prose-pre:border-neutral-700/80" data-controller="markdown code-block" data-markdown-target="content">
36
35
  <%= yield %>
37
36
  </div>
38
37
 
@@ -7,11 +7,15 @@
7
7
  <meta charset="UTF-8" />
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
9
  <meta name="apple-mobile-web-app-capable" content="yes">
10
+ <meta name="mobile-web-app-capable" content="yes">
10
11
  <%= csrf_meta_tags %>
11
12
  <%= csp_meta_tag %>
12
13
 
13
14
  <%= yield :head %>
14
15
 
16
+ <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
17
+ <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
18
+
15
19
  <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
16
20
  <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
17
21
 
@@ -7,11 +7,15 @@
7
7
  <meta charset="UTF-8" />
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
9
  <meta name="apple-mobile-web-app-capable" content="yes">
10
+ <meta name="mobile-web-app-capable" content="yes">
10
11
  <%= csrf_meta_tags %>
11
12
  <%= csp_meta_tag %>
12
13
 
13
14
  <%= yield :head %>
14
15
 
16
+ <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
17
+ <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
18
+
15
19
  <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
16
20
  <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
17
21
 
@@ -7,11 +7,15 @@
7
7
  <meta charset="UTF-8" />
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
9
  <meta name="apple-mobile-web-app-capable" content="yes">
10
+ <meta name="mobile-web-app-capable" content="yes">
10
11
  <%= csrf_meta_tags %>
11
12
  <%= csp_meta_tag %>
12
13
 
13
14
  <%= yield :head %>
14
15
 
16
+ <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.r b too!) %>
17
+ <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
18
+
15
19
  <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
16
20
  <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
17
21
 
@@ -7,11 +7,15 @@
7
7
  <meta charset="UTF-8" />
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
9
  <meta name="apple-mobile-web-app-capable" content="yes">
10
+ <meta name="mobile-web-app-capable" content="yes">
10
11
  <%= csrf_meta_tags %>
11
12
  <%= csp_meta_tag %>
12
13
 
13
14
  <%= yield :head %>
14
15
 
16
+ <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.r b too!) %>
17
+ <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
18
+
15
19
  <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
16
20
  <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
17
21
 
@@ -101,7 +101,7 @@ module Railsui
101
101
 
102
102
  # Generate import statements for stylesheets
103
103
  import_statements = stylesheet_files.map do |file|
104
- "@import \"../stylesheets/railsui/#{File.basename(file, ".css")}\";"
104
+ "@import \"./railsui/#{File.basename(file, ".css")}\";"
105
105
  end.join("\n")
106
106
 
107
107
  # Read the existing application.tailwind.css content
@@ -111,6 +111,8 @@ module Railsui
111
111
  cleaned_css_content = application_css_content
112
112
  cleaned_css_content = cleaned_css_content.gsub(/@import "tailwindcss";\n*/, "")
113
113
  cleaned_css_content = cleaned_css_content.gsub(%r{@import "\.\./stylesheets/railsui/.*";\n*}, "")
114
+ cleaned_css_content = cleaned_css_content.gsub(%r{@import "railsui/.*";\n*}, "")
115
+ cleaned_css_content = cleaned_css_content.gsub(%r{@import "\./railsui/.*";\n*}, "")
114
116
 
115
117
  # Add the new import statements in the correct order
116
118
  new_application_css_content = [
@@ -1,3 +1,3 @@
1
1
  module Railsui
2
- VERSION = "3.2.4"
2
+ VERSION = "3.2.6"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railsui
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.4
4
+ version: 3.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Leverenz
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-08-23 00:00:00.000000000 Z
10
+ date: 2025-09-08 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails
@@ -739,7 +739,6 @@ files:
739
739
  - app/assets/images/users.svg
740
740
  - app/assets/images/warning.svg
741
741
  - app/assets/javascripts/railsui.js
742
- - app/assets/stylesheets/railsui/code.css
743
742
  - app/assets/stylesheets/railsui/config.css
744
743
  - app/assets/stylesheets/railsui/docs.css
745
744
  - app/assets/stylesheets/railsui/forms.css
@@ -1405,7 +1404,6 @@ files:
1405
1404
  - lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/character_count_controller.js
1406
1405
  - lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/chat_controller.js
1407
1406
  - lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/help_search_controller.js
1408
- - lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/highlight_controller.js
1409
1407
  - lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/markdown_controller.js
1410
1408
  - lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/search_controller.js
1411
1409
  - lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/sidebar_controller.js
@@ -1,137 +0,0 @@
1
- pre code.hljs {
2
- display: block;
3
- overflow: auto !important;
4
- padding: 1em;
5
- font-family: theme("fontFamily.mono");
6
- font-size: 15px !important;
7
-
8
- @apply scrollbar-track-neutral-950 scrollbar-thumb-neutral-500;
9
- }
10
-
11
- code.hljs {
12
- padding: 3px 5px;
13
- }
14
-
15
- .hljs {
16
- color: theme("colors.neutral.100");
17
- }
18
- .hljs-attr,
19
- .hljs-tag {
20
- color: theme("colors.neutral.100");
21
- }
22
-
23
- .hljs-keyword {
24
- color: #c792ea;
25
- font-style: italic;
26
- }
27
- .hljs-built_in {
28
- color: #addb67;
29
- font-style: italic;
30
- }
31
- .hljs-type {
32
- color: #82aaff;
33
- }
34
- .hljs-literal {
35
- color: #ff5874;
36
- }
37
- .hljs-number {
38
- color: #f78c6c;
39
- }
40
- .hljs-regexp {
41
- color: #5ca7e4;
42
- }
43
- .hljs-string {
44
- color: theme("colors.sky.300");
45
- }
46
- .hljs-class {
47
- color: #ffcb8b;
48
- }
49
- .hljs-function {
50
- color: #82aaff;
51
- }
52
- .hljs-title {
53
- color: #dcdcaa;
54
- font-style: italic;
55
- }
56
- .hljs-params {
57
- color: #7fdbca;
58
- }
59
- .hljs-comment {
60
- color: #637777;
61
- font-style: italic;
62
- }
63
- .hljs-doctag {
64
- color: #7fdbca;
65
- }
66
- .hljs-meta,
67
- .hljs-meta .hljs-keyword {
68
- color: #82aaff;
69
- }
70
- .hljs-meta .hljs-string {
71
- color: #ecc48d;
72
- }
73
- .hljs-section {
74
- color: #82b1ff;
75
- }
76
- .hljs-selector-tag,
77
- .hljs-symbol,
78
- .hljs-subst,
79
- .hljs-name {
80
- color: theme("colors.pink.400");
81
- }
82
- .hljs-attribute {
83
- color: #80cbc4;
84
- }
85
- .hljs-variable {
86
- color: theme("colors.teal.400");
87
- }
88
- .hljs-bullet {
89
- color: #d9f5dd;
90
- }
91
- .hljs-code {
92
- color: #80cbc4;
93
- }
94
- .hljs-emphasis {
95
- color: #c792ea;
96
- font-style: italic;
97
- }
98
- .hljs-strong {
99
- color: #addb67;
100
- font-weight: 700;
101
- }
102
- .hljs-formula {
103
- color: #c792ea;
104
- }
105
- .hljs-link {
106
- color: #ff869a;
107
- }
108
- .hljs-quote {
109
- color: #697098;
110
- font-style: italic;
111
- }
112
- .hljs-selector-id {
113
- color: #fad430;
114
- }
115
- .hljs-selector-class {
116
- color: theme("colors.sky.400");
117
- font-style: italic;
118
- }
119
- .hljs-selector-attr,
120
- .hljs-selector-pseudo {
121
- color: #c792ea;
122
- font-style: italic;
123
- }
124
- .hljs-template-tag {
125
- color: #c792ea;
126
- }
127
- .hljs-template-variable {
128
- color: theme("colors.teal.400");
129
- }
130
- .hljs-addition {
131
- color: #addb67ff;
132
- font-style: italic;
133
- }
134
- .hljs-deletion {
135
- color: #ef535090;
136
- font-style: italic;
137
- }
@@ -1,13 +0,0 @@
1
- import { Controller } from "@hotwired/stimulus"
2
- import hljs from "highlight.js"
3
-
4
- export default class extends Controller {
5
- static targets = ["code"]
6
- connect() {
7
- this.codeTargets.forEach((target) => {
8
- target.querySelectorAll("pre code").forEach((c) => {
9
- hljs.highlightElement(c)
10
- })
11
- })
12
- }
13
- }