houseaccount 0.17.0 → 0.18.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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +27 -0
  3. data/README.md +14 -12
  4. data/app/views/layouts/houseaccount.html.erb +1 -1
  5. data/art/index.html.erb +5 -3
  6. data/lib/houseaccount/helpers/flows.rb +46 -7
  7. data/lib/houseaccount/helpers/heads.rb +21 -5
  8. data/lib/houseaccount/helpers.rb +2 -6
  9. data/lib/houseaccount/version.rb +1 -1
  10. data/lib/houseaccount.rb +0 -11
  11. data/public/{v0.17.0/css/houseaccount.css → bh/css/bh.css} +1 -1
  12. data/public/{v0.17.0/js/houseaccount.js → bh/js/bh.js} +20 -20
  13. data/public/css/houseaccount.css +1 -1
  14. data/public/index.html +8 -6
  15. data/public/js/houseaccount.js +1 -152
  16. data/public/v0.18.0/bh/css/bh.css +1 -0
  17. data/public/v0.18.0/bh/js/bh.js +152 -0
  18. data/public/v0.18.0/bh/theme/bootstrap.css +10 -0
  19. data/public/v0.18.0/bh/theme/dawn.css +189 -0
  20. data/public/v0.18.0/bh/theme/dracula.css +189 -0
  21. data/public/v0.18.0/bh/theme/gruvbox.css +189 -0
  22. data/public/v0.18.0/bh/theme/monokai.css +190 -0
  23. data/public/v0.18.0/bh/theme/nord.css +189 -0
  24. data/public/v0.18.0/bh/theme/one_dark.css +189 -0
  25. data/public/v0.18.0/bh/theme/solarized.css +188 -0
  26. data/public/v0.18.0/bh/theme/tokyo_night.css +189 -0
  27. data/public/v0.18.0/css/houseaccount.css +1 -0
  28. data/public/v0.18.0/js/houseaccount.js +1 -0
  29. metadata +34 -22
  30. data/app/views/recourses/_head.html.erb +0 -1
  31. /data/public/{v0.17.0 → bh}/theme/bootstrap.css +0 -0
  32. /data/public/{v0.17.0 → bh}/theme/dawn.css +0 -0
  33. /data/public/{v0.17.0 → bh}/theme/dracula.css +0 -0
  34. /data/public/{v0.17.0 → bh}/theme/gruvbox.css +0 -0
  35. /data/public/{v0.17.0 → bh}/theme/monokai.css +0 -0
  36. /data/public/{v0.17.0 → bh}/theme/nord.css +0 -0
  37. /data/public/{v0.17.0 → bh}/theme/one_dark.css +0 -0
  38. /data/public/{v0.17.0 → bh}/theme/solarized.css +0 -0
  39. /data/public/{v0.17.0 → bh}/theme/tokyo_night.css +0 -0
  40. /data/public/{v0.17.0 → v0.18.0}/font/bootstrap-icons-FRBPO3H7.woff2 +0 -0
  41. /data/public/{v0.17.0 → v0.18.0}/font/quicksand-500-latin-QHYSRFVK.woff2 +0 -0
  42. /data/public/{v0.17.0 → v0.18.0}/font/quicksand-500-latin-ext-QZ4PXVHB.woff2 +0 -0
  43. /data/public/{v0.17.0 → v0.18.0}/font/quicksand-500-latin-ext.woff2 +0 -0
  44. /data/public/{v0.17.0 → v0.18.0}/font/quicksand-500-latin.woff2 +0 -0
  45. /data/public/{v0.17.0 → v0.18.0}/font/quicksand-500-vietnamese-RRA5CUQB.woff2 +0 -0
  46. /data/public/{v0.17.0 → v0.18.0}/font/quicksand-500-vietnamese.woff2 +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c38f00185e5c9252a22102deb4364544009684dd39e164adaa755b5cf8dc33f
4
- data.tar.gz: 64f4791d9875ad24848a60e81ead1e519e477022c5ad1a0a2a41a74460632b6a
3
+ metadata.gz: d3bf3af360f931b4bedd87d0e8e552b7a9931b47e68d1c48d48bbb0c8f94e181
4
+ data.tar.gz: 6f088b6d8a80a2637ad457034ca7db7bcf24f40300cbf32e59ad3dfeaa901493
5
5
  SHA512:
6
- metadata.gz: 49eac16043f37eed2ffa4e6dd8ec9d1deaff77638c77c4015a836d825adb70998d78bdaf2a9907bca251db6b5b9394e0b640b2da22eae449263ec52173a27cc0
7
- data.tar.gz: b96627a40bb6764b183fca3a2fc46c17bf1991683d11975165a89d78bc6a1ceaf43f13f34792c119d3ac5aee9efbd6142c3fe16e9e1979f67fb571fbf88d2383
6
+ metadata.gz: 1b2b82a3aac085ef40b1cedecd9f9b0524e24c3c547f254e6d37dbf29baa4ac89194ce9601635389d92c975c294ee034897f14fd8a03bbbfd0a96b1644362969
7
+ data.tar.gz: 3bc4faf33b5aac0e143f33c41be7c7ee4df846f9a5e7846d0b81e0b1b2f57305a140b9bb3ef356a8154b27afe8b1974c7cb1ce1e065101eb6bcb29a0b12a81a1
data/CHANGELOG.md CHANGED
@@ -7,6 +7,33 @@ For more information about changelogs, check [Keep a Changelog](http://keepachan
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## 0.18.0 - 2026-09-19
11
+
12
+ * [BREAKING] The bundle is the house's layer alone
13
+
14
+ It carried bh's stylesheet and script inside it, so a page linking this one got Bootstrap
15
+ and the house together in 378K. It carries neither now: a page links bh's files first and
16
+ this one's after, which is what `houseaccount_layer` draws, and the house stylesheet is
17
+ 12K. `houseaccount_tags` draws the house's two alone, for a page that already has bh's.
18
+
19
+ * [BREAKING] `flow` is this gem's own
20
+
21
+ It wrapped bh's with `super`, which took an `include` ordering between two engines to
22
+ make work. bh no longer draws a signup page at all, so this one draws the whole of it.
23
+ `footer:` is `links:`, and `header:` is gone -- the lockup and the wall are what a house
24
+ flow is rather than options a caller passes. `logo:` is `href:`.
25
+
26
+ * [BREAKING] `houseaccount_url` goes, with `HouseAccount.url` and `HouseAccount::URL`
27
+
28
+ Nothing called it. The static pages name the design site outright.
29
+
30
+ * [BREAKING] The `recourses/head` partial goes
31
+
32
+ It was this gem reaching toward another by the name of its partial. An app that wants the
33
+ house layer on the pages recourse draws writes those two lines itself, which is one file
34
+ in the app that already knows about both.
35
+
36
+
10
37
  ## 0.17.0 - 2026-09-18
11
38
 
12
39
  * [FEATURE] bh 6.6, which draws a picture in a bubble as a thumbnail
data/README.md CHANGED
@@ -5,10 +5,12 @@ sit in, the wall a signup flow stands on, the palettes, the pages an app shows w
5
5
  or lost, and the one stylesheet and one script that carry all of it.
6
6
 
7
7
  The Bootstrap 6 underneath is [`bh`](https://claudiob.github.io/bh/), which this gem depends on
8
- and bundles. **The components are documented there, not here** the form builder, the combobox,
9
- the 6-digit code, the phone field, the dialog, the toasts, the thread of messages and the
10
- twenty-two Stimulus controllers are Bootstrap with the markup written once, and are worth the
11
- same to any Rails app. This gem is only what is the house's.
8
+ and draws on top of rather than bundling: a page links bh's stylesheet and script first and this
9
+ one's after, so the house rules win and Bootstrap ships once. **The components are documented
10
+ there, not here** the form builder, the combobox, the 6-digit code, the phone field, the
11
+ dialog, the toasts, the thread of messages and the twenty-two Stimulus controllers are Bootstrap
12
+ with the markup written once, and are worth the same to any Rails app. This gem is only what is
13
+ the house's.
12
14
 
13
15
  Published three ways from this repo:
14
16
 
@@ -130,14 +132,14 @@ view paths.
130
132
 
131
133
  ## The flow, and the wall it stands on
132
134
 
133
- `flow` is bh's page-of-a-signup-flow with the house's two things added: the lockup in its header
134
- and the cyanotype behind the card. A layout of the app's own calls it and nests on the gem's:
135
+ `flow` is the page a signup flow lives on: the lockup over the cyanotype, a title, a line, one
136
+ card, and the way out under it. A layout of the app's own calls it and nests on the gem's:
135
137
 
136
138
  ```erb
137
139
  <% content_for :logo, 'houseaccount' %>
138
140
 
139
141
  <% content_for :content do %>
140
- <%= flow logo: root_path, footer: [button_to('Sign out', session_path, method: :delete, class: 'btn btn-link')] do %>
142
+ <%= flow href: root_path, links: [button_to('Sign out', session_path, method: :delete, class: 'btn btn-link')] do %>
141
143
  <%= yield %>
142
144
  <% end %>
143
145
  <% end %>
@@ -145,11 +147,11 @@ and the cyanotype behind the card. A layout of the app's own calls it and nests
145
147
  <%= render template: 'layouts/houseaccount' %>
146
148
  ```
147
149
 
148
- `logo:` is where the mark links, the house's front door unless said; `footer:` the pieces of the
149
- foot, joined by a middot, none drawing no foot. Everything else `:title`, `:subtitle`,
150
- `:width`, how the card lays its fields out is bh's, and is
151
- [documented there](https://claudiob.github.io/bh/). `content_for :logo` is which of the family's
152
- marks the tab wears, for a page a customer reads rather than the app's own people.
150
+ `href:` is where the mark links, the house's front door unless said; `links:` the pieces of the
151
+ foot, joined by a middot, none drawing no foot. The mark and the wall are not asked for, being
152
+ what a house flow is. What the page says about itself`content_for :title`, `:subtitle` and
153
+ `:width` it says in its own view, and `content_for :logo` is which of the family's marks the
154
+ tab wears, for a page a customer reads rather than the app's own people.
153
155
 
154
156
  The wall alone is one attribute, `data-controller='wall'`, on any element that should stand on
155
157
  it: fourteen trade tools and the family's five marks drifting up in seven columns, on blueprint
@@ -19,6 +19,6 @@
19
19
  <main class='container-fluid py-4 flex-grow-1 d-flex flex-column'>
20
20
  <%= content_for?(:content) ? yield(:content) : yield %>
21
21
  </main>
22
- <%= notices %>
22
+ <%= toasts %>
23
23
  </body>
24
24
  </html>
data/art/index.html.erb CHANGED
@@ -14,8 +14,10 @@
14
14
  pins a host to, so the page is drawn by the bytes it hands out rather than by
15
15
  whatever was last built. Relative, so it reads the same on staging, on production
16
16
  and from a folder on disk. -->
17
+ <link rel='stylesheet' href='v<%= version %>/bh/css/bh.css'>
17
18
  <link rel='stylesheet' href='v<%= version %>/css/houseaccount.css'>
18
- <link rel='stylesheet' href='v<%= version %>/theme/bootstrap.css' data-recourse-theme=''>
19
+ <link rel='stylesheet' href='v<%= version %>/bh/theme/bootstrap.css' data-recourse-theme=''>
20
+ <script type='module' src='v<%= version %>/bh/js/bh.js'></script>
19
21
  <script type='module' src='v<%= version %>/js/houseaccount.js'></script>
20
22
  <style>
21
23
  /* The page's own chrome and nothing else: everything shown below is styled by
@@ -58,7 +60,7 @@
58
60
  <div class='col-12'>
59
61
  <div class='card p-3'>
60
62
  <strong>Pinned to a version — the latest is <%= version %></strong>
61
- <span class='design-url'><a href='v<%= version %>/css/houseaccount.css'>v<%= version %>/css/houseaccount.css</a> · <a href='v<%= version %>/js/houseaccount.js'>v<%= version %>/js/houseaccount.js</a> · <a href='v<%= version %>/theme/nord.css'>v<%= version %>/theme/nord.css</a></span>
63
+ <span class='design-url'><a href='v<%= version %>/css/houseaccount.css'>v<%= version %>/css/houseaccount.css</a> · <a href='v<%= version %>/js/houseaccount.js'>v<%= version %>/js/houseaccount.js</a> · <a href='v<%= version %>/bh/theme/nord.css'>v<%= version %>/bh/theme/nord.css</a></span>
62
64
  </div>
63
65
  </div>
64
66
  </div>
@@ -68,7 +70,7 @@
68
70
  <h2>Themes</h2>
69
71
  <button type='button' class='btn btn-outline theme-primary' data-controller='scheme' data-action='scheme#rotate'
70
72
  data-scheme-themes-value='["bootstrap","dawn","dracula","gruvbox","monokai","nord","one_dark","solarized","tokyo_night"]'
71
- data-scheme-path-value='v<%= version %>/theme' data-scheme-storage-value='recourse-scheme'>
73
+ data-scheme-path-value='v<%= version %>/bh/theme' data-scheme-storage-value='recourse-scheme'>
72
74
  <span class='recourse-scheme-light'><i class='bi bi-moon-fill'></i> Switch to dark</span>
73
75
  <span class='recourse-scheme-dark'><i class='bi bi-sun-fill'></i> Switch to light</span>
74
76
  </button>
@@ -1,13 +1,52 @@
1
1
  module HouseAccount
2
2
  module Helpers
3
- # The page of a signup flow as the house draws it: bh's column, with the lockup over it
4
- # and the cyanotype under it.
3
+ # The page of a signup flow: the house's mark over the wall it stands on, a title, a line,
4
+ # one card, and the way out under it.
5
5
  module Flows
6
- # bh's flow with the house's mark in its header, linking to `logo`, and the wall the
7
- # `wall` controller paints behind the card. Every other option is bh's, and overrides:
8
- # a page standing on something else of its own names the controller for it.
9
- def flow(logo: Logos::HOME, **, &)
10
- super(header: houseaccount_logo(href: logo), data: { controller: 'wall' }, **, &)
6
+ # How wide the card is unless a page says otherwise: as wide as a thread, a table or a
7
+ # contract wants. A page asking one question says a narrower one.
8
+ WIDTH = '75rem'
9
+
10
+ # Draws the page around the card's content: the lockup over what the view said in
11
+ # `content_for` — its `:title`, its `:subtitle`, how wide the card is in `:width` — and
12
+ # the `links` under the card joined by a middot. No subtitle draws no line and no links
13
+ # no foot: a page says only what it has. The mark and the wall are not asked for, being
14
+ # what a house flow is; every other option is an attribute of the column.
15
+ # @param href [String] where the lockup over the page leads.
16
+ # @param links [Array<String>] the way out, and whatever else stands beside it.
17
+ # @param options [Hash] anything else the column carries.
18
+ # @return [String] the page.
19
+ def flow(href: Logos::HOME, links: [], **options, &)
20
+ parts = [
21
+ tag.header(houseaccount_logo(href: href)),
22
+ *houseaccount_flow_words,
23
+ houseaccount_flow_card(content_for(:width), &),
24
+ houseaccount_flow_links(links),
25
+ ]
26
+ classes = class_names 'flow', options[:class]
27
+
28
+ tag.div safe_join(parts.compact), class: classes, data: { controller: 'wall' },
29
+ **options.except(:class)
30
+ end
31
+
32
+ private
33
+
34
+ def houseaccount_flow_words
35
+ [tag.h1(content_for(:title)), (tag.p content_for :subtitle if content_for? :subtitle)]
36
+ end
37
+
38
+ def houseaccount_flow_card(width, &)
39
+ width = width.presence || WIDTH
40
+ style = "--flow-width: #{width}" unless width == WIDTH
41
+
42
+ tag.div capture(&), class: 'flow-card p-3 md:p-4 mx-auto', style:
43
+ end
44
+
45
+ def houseaccount_flow_links(pieces)
46
+ pieces = Array(pieces).compact_blank
47
+ return if pieces.empty?
48
+
49
+ tag.footer safe_join(pieces, tag.span('·', class: 'fg-2', aria: { hidden: true }))
11
50
  end
12
51
  end
13
52
  end
@@ -17,15 +17,34 @@ module HouseAccount
17
17
  tag.meta(name: 'color-scheme', content: 'light dark'),
18
18
  tag.meta(name: 'turbo-refresh-method', content: 'morph'),
19
19
  tag.meta(name: 'turbo-refresh-scroll', content: 'preserve'),
20
+ houseaccount_layer,
21
+ houseaccount_icons(app),
22
+ ], INDENT
23
+ end
24
+
25
+ # bh's layer and the house's on top of it, in that order: every rule and every
26
+ # controller here is written against what bh draws, so bh goes first. bh's files are
27
+ # served by its own engine, under a path of its own.
28
+ def houseaccount_layer
29
+ safe_join [
30
+ tag.link(rel: 'stylesheet', href: "#{Bh::Engine::PREFIX}css/bh.css"),
31
+ tag.script('', type: 'module', src: "#{Bh::Engine::PREFIX}js/bh.js"),
32
+ houseaccount_tags,
33
+ ], INDENT
34
+ end
35
+
36
+ # The house's own two files, for a page that already links bh's. At this version's own
37
+ # path, which never changes and so is kept for a year.
38
+ def houseaccount_tags
39
+ safe_join [
20
40
  tag.link(rel: 'stylesheet', href: "/v#{VERSION}/css/houseaccount.css"),
21
41
  tag.script('', type: 'module', src: "/v#{VERSION}/js/houseaccount.js"),
22
- houseaccount_icons(app),
23
42
  ], INDENT
24
43
  end
25
44
 
26
45
  # The icons a tab, a home screen and a saved app know `app` by — this app unless said:
27
46
  # the SVG, its dev variant while developing, the 96px PNG, the apple touch icon and the
28
- # web manifest, one to a line. Also what `recourses/head` draws for a host of recourse.
47
+ # web manifest, one to a line.
29
48
  def houseaccount_icons(app = HouseAccount.app)
30
49
  mark = Rails.env.development? ? "#{app}-dev" : app
31
50
 
@@ -36,9 +55,6 @@ module HouseAccount
36
55
  tag.link(rel: 'manifest', href: "/favicon/#{app}.webmanifest"),
37
56
  ], INDENT
38
57
  end
39
-
40
- # An asset on the design site by its path, for a page this engine does not serve.
41
- def houseaccount_url(path) = "#{HouseAccount.url}/#{path}"
42
58
  end
43
59
  end
44
60
  end
@@ -4,12 +4,8 @@ require_relative 'helpers/heads'
4
4
  require_relative 'helpers/logos'
5
5
 
6
6
  module HouseAccount
7
- # Everything a view may call, in one module the engine puts on every Action View: the
8
- # house's own, and bh's components under them. Not alphabetical, and bh's listed here at
9
- # all rather than left to bh's engine, because both decide where the house's `flow` sits
10
- # against the one it wraps: `include A, B` seats A ahead of B, and a module already in the
11
- # chain is not moved by a second `include` — so this order wins whichever engine runs first.
7
+ # Everything a view may call, in one module the engine puts on every Action View.
12
8
  module Helpers
13
- include Flows, Heads, Logos, Bh::Helpers
9
+ include Flows, Heads, Logos
14
10
  end
15
11
  end
@@ -1,4 +1,4 @@
1
1
  module HouseAccount
2
2
  # Version of the gem, read by the gemspec and by hosts checking compatibility.
3
- VERSION = '0.17.0'
3
+ VERSION = '0.18.0'
4
4
  end
data/lib/houseaccount.rb CHANGED
@@ -10,9 +10,6 @@ require_relative 'houseaccount/engine'
10
10
  # with the house's own layer over it — the marks every app is known by, and the helpers that
11
11
  # draw a head, a logo or a signup page the same way everywhere.
12
12
  module HouseAccount
13
- # Where the same tree is published for a page this engine does not serve.
14
- URL = 'https://design.houseaccount.com'
15
-
16
13
  # The form every HouseAccount page is written with, which is bh's: the house dresses no
17
14
  # field differently, so this name and `Bh::FormBuilder` are one builder.
18
15
  FormBuilder = Bh::FormBuilder
@@ -21,14 +18,6 @@ module HouseAccount
21
18
  # the house's name before the components moved.
22
19
  Message = Bh::Message
23
20
 
24
- class << self
25
- # The origin a remote link points at, `URL` unless a host says otherwise.
26
- attr_writer :url
27
- end
28
-
29
- # The origin a remote link points at, `URL` unless a host says otherwise.
30
- def self.url = @url || URL
31
-
32
21
  # Which of the family this host is, read off the Rails application's own name — the
33
22
  # `Goldrush` of `Goldrush::Application` — and the house itself for any app not in `MARKS`.
34
23
  # What a tab wears, what a logo says and whose page answers `/down.html`.