tailmix 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7c517006187e0dda710f20903df6e442b7d6fd844384213b7e031c2c7681342b
4
+ data.tar.gz: 833dbd51ffbe9a84d9c7ac09057b1d6f7867495d1fc09ffd7339d2addd9ec4dd
5
+ SHA512:
6
+ metadata.gz: c63e70ec35d7894f0600aca24b6b48d5b4690606e278d87da574cdcd2a7521bfa5cc0b4297123cefbf014ca56c3143feab7bcb52a23b5e2073115395d1174d15
7
+ data.tar.gz: e8eb45f22300c45e63aa0c47298c33ed8454f8940400ab945e99558e74e22a4c7adad5f5a30f6c45eed23648cf8a8384274255b496bf36edee7c82435451cee8
data/.rubocop.yml ADDED
@@ -0,0 +1,8 @@
1
+ AllCops:
2
+ TargetRubyVersion: 3.1
3
+
4
+ Style/StringLiterals:
5
+ EnforcedStyle: double_quotes
6
+
7
+ Style/StringLiteralsInInterpolation:
8
+ EnforcedStyle: double_quotes
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2025-08-12
4
+
5
+ - Initial release
@@ -0,0 +1,132 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official email address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ [INSERT CONTACT METHOD].
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
127
+
128
+ [homepage]: https://www.contributor-covenant.org
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
+ [Mozilla CoC]: https://github.com/mozilla/diversity
131
+ [FAQ]: https://www.contributor-covenant.org/faq
132
+ [translations]: https://www.contributor-covenant.org/translations
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Alexander
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,153 @@
1
+ # tailmix
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/tailmix.svg)](https://badge.fury.io/rb/tailmix)
4
+ [![Build Status](https://github.com/alexander-s-f/tailmix/actions/workflows/main.yml/badge.svg)](https://github.com/alexander-s-f/tailmix/actions/workflows/main.yml)
5
+
6
+ **Tailmix** is a powerful, declarative, and interactive class manager for building maintainable UI components in Ruby. It's designed to work seamlessly with utility-first CSS frameworks like **Tailwind CSS**, allowing you to co-locate your style logic with your component's code in a clean, structured, and highly reusable way.
7
+
8
+ Inspired by modern frontend tools like CVA (Class Variance Authority), `tailmix` brings a robust styling engine to your server-side components (like those built with Arbre, ViewComponent, or Phlex).
9
+
10
+ ## Philosophy
11
+
12
+ * **Co-location & Isolation:** Define all style variants for a component directly within its class. No more hunting for styles in separate files. Each component is fully self-contained.
13
+ * **Declarative First:** A beautiful DSL to *declare* your component's visual appearance based on variants like `state`, `size`, etc.
14
+ * **Imperative Power:** A rich runtime API to dynamically and imperatively `add`, `remove`, or `toggle` classes, perfect for server-side updates via Hotwire/Turbo.
15
+ * **Framework-Agnostic:** Written in pure Ruby with zero dependencies, ready to be used in any project.
16
+
17
+ ## Installation
18
+
19
+ Add this line to your application's Gemfile:
20
+
21
+ ```ruby
22
+ gem 'tailmix'
23
+ ```
24
+
25
+ And then execute: `$ bundle install`
26
+
27
+ Or install it yourself as: `$ gem install tailmix`
28
+
29
+ ## The DSL: A Detailed Breakdown
30
+
31
+ You define a component's style "schema" using the `tailmix` DSL within your class.
32
+
33
+ * `element :name, "base classes" do ... end`: Defines a "part" of your component. Every component has at least one element.
34
+ * `dimension_name do ... end` (e.g., `state do`, `size do`): Defines a variant "dimension". The name can be anything you choose.
35
+ * `option :name, "classes", default: true`: Defines a specific option within a dimension and its corresponding CSS classes. One option per dimension can be marked as the default.
36
+
37
+ ### Full Example of the DSL
38
+
39
+ ```ruby
40
+ class MyButtonComponent
41
+ include Tailmix
42
+
43
+ tailmix do
44
+ # Define the main element and its base classes
45
+ element :button, "inline-flex items-center font-medium rounded-md" do
46
+ # Define the 'size' dimension
47
+ size do
48
+ option :sm, "px-2.5 py-1.5 text-xs", default: true
49
+ option :md, "px-3 py-2 text-sm"
50
+ option :lg, "px-4 py-2 text-base"
51
+ end
52
+
53
+ # Define the 'intent' dimension
54
+ intent do
55
+ option :primary, "bg-blue-600 text-white hover:bg-blue-700", default: true
56
+ option :secondary, "bg-gray-200 text-gray-800 hover:bg-gray-300"
57
+ option :danger, "bg-red-600 text-white hover:bg-red-700"
58
+ end
59
+ end
60
+
61
+ # Define another element, like an icon
62
+ element :icon, "inline-block" do
63
+ size do
64
+ option :sm, "h-4 w-4"
65
+ option :md, "h-5 w-5", default: true
66
+ option :lg, "h-6 w-6"
67
+ end
68
+ end
69
+ end
70
+ # ...
71
+ end
72
+ ```
73
+
74
+ ## Usage
75
+
76
+ ### 1. Initialization
77
+
78
+ Inside your component, call the `tailmix` helper to create an interactive style manager. You can pass initial variants to it.
79
+
80
+ ```ruby
81
+ class MyButtonComponent
82
+ # ... (tailmix DSL from above)
83
+
84
+ attr_reader :classes
85
+
86
+ def initialize(intent: :primary, size: :md)
87
+ # The `tailmix` helper creates and returns the manager object
88
+ @classes = tailmix(intent: intent, size: size)
89
+ end
90
+
91
+ def render
92
+ # The manager's methods map to your elements.
93
+ # Ruby's `to_s` is called implicitly when rendering.
94
+ "<button class='#{@classes.button}'>
95
+ <span class='#{@classes.icon}'></span>
96
+ Click me
97
+ </button>"
98
+ end
99
+ end
100
+
101
+ # Renders a medium primary button by default
102
+ button = MyButtonComponent.new
103
+ button.render
104
+
105
+ # Renders a small danger button
106
+ button = MyButtonComponent.new(intent: :danger, size: :sm)
107
+ button.render
108
+ ```
109
+
110
+ ### 2. Dynamic & Imperative Usage
111
+
112
+ This is where `tailmix` truly shines. The `@classes` object is a live manager that you can modify. This is perfect for server-side re-rendering with Hotwire/Turbo.
113
+
114
+ ```ruby
115
+ class MyButtonComponent
116
+ # ...
117
+
118
+ # A method that might be called during a Turbo Stream update
119
+ def set_loading_state!
120
+ # The `combine` method updates the declarative state
121
+ @classes.combine(intent: :secondary)
122
+
123
+ # The imperative API allows for fine-grained control
124
+ @classes.button.add("cursor-wait opacity-75")
125
+ @classes.icon.add("animate-spin")
126
+ end
127
+
128
+ def remove_loading_state!
129
+ @classes.combine(intent: :primary) # Revert to original intent
130
+ @classes.button.remove("cursor-wait opacity-75")
131
+ @classes.icon.remove("animate-spin")
132
+ end
133
+ end
134
+
135
+ button = MyButtonComponent.new(intent: :primary)
136
+ button.set_loading_state!
137
+ button.render # Renders the button in a loading state
138
+
139
+ button.remove_loading_state!
140
+ button.render # Renders the button back in its primary state
141
+ ```
142
+
143
+ ### 3. The Bridge to JavaScript (Stimulus)
144
+
145
+ While `tailmix` is a server-side library, it enables clean integration with JavaScript controllers like Stimulus by providing the "source of truth" for classes. You can create a helper to export variants to `data-` attributes, keeping your JS free of hardcoded style strings.
146
+
147
+ ## Contributing
148
+
149
+ Bug reports and pull requests are welcome on GitHub at [https://github.com/alexander-s-f/tailmix](https://github.com/alexander-s-f/tailmix).
150
+
151
+ ## License
152
+
153
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rubocop/rake_task"
5
+
6
+ RuboCop::RakeTask.new
7
+
8
+ task default: :rubocop
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../lib/tailmix"
4
+
5
+ class StatusBadgeComponent
6
+ include Tailmix
7
+
8
+ tailmix do
9
+ element :badge, "inline-flex items-center font-medium px-2.5 py-0.5 rounded-full" do
10
+ size do
11
+ option :sm, "text-xs", default: true
12
+ option :lg, "text-base"
13
+ end
14
+ status do
15
+ option :success, "bg-green-100 text-green-800", default: true
16
+ option :warning, "bg-yellow-100 text-yellow-800"
17
+ option :error, "bg-red-100 text-red-800"
18
+ end
19
+ end
20
+ end
21
+
22
+ attr_reader :classes
23
+
24
+ def initialize(status: :success, size: :sm)
25
+ @classes = tailmix(status: status, size: size)
26
+ end
27
+
28
+ def highlight!
29
+ @classes.badge.add("ring-2 ring-offset-2 ring-blue-500")
30
+ end
31
+
32
+ def render
33
+ "<span class='#{@classes.badge}'>Status</span>"
34
+ end
35
+ end
36
+
37
+ badge1 = StatusBadgeComponent.new(status: :error, size: :lg)
38
+ puts "Error badge: #{badge1.render}"
39
+ # => Error badge: <span class='inline-flex ... text-base bg-red-100 text-red-800'>Status</span>
40
+
41
+ badge2 = StatusBadgeComponent.new(status: :success)
42
+ badge2.highlight!
43
+ puts "Success badge (highlighted): #{badge2.render}"
44
+ # => Success badge (highlighted): <span class='inline-flex ... text-xs bg-green-100 text-green-800 ring-2 ring-offset-2 ring-blue-500'>Status</span>
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tailmix
4
+ class Dimension
5
+ attr_reader :options, :default_option
6
+
7
+ def initialize(&block)
8
+ @options = {}
9
+ @default_option = nil
10
+ instance_eval(&block) if block_given?
11
+ end
12
+
13
+ def option(name, classes, default: false)
14
+ @options[name.to_sym] = classes
15
+ @default_option = name.to_sym if default
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "dimension"
4
+
5
+ module Tailmix
6
+ class Element
7
+ attr_reader :base_classes, :dimensions
8
+
9
+ def initialize(base_classes, &block)
10
+ @base_classes = base_classes
11
+ @dimensions = {}
12
+ instance_eval(&block) if block_given?
13
+ end
14
+
15
+ def method_missing(method_name, &block)
16
+ dimension_name = method_name.to_sym
17
+ @dimensions[dimension_name] = Dimension.new(&block)
18
+ end
19
+
20
+ def respond_to_missing?(method_name, include_private = false)
21
+ true
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "resolver"
4
+ require_relative "part"
5
+ require_relative "utils"
6
+
7
+ module Tailmix
8
+ class Manager
9
+ def initialize(schema, initial_variants = {})
10
+ @schema = schema
11
+ @current_variants = {}
12
+ @part_objects = {}
13
+
14
+ defaults = get_defaults_from_schema
15
+ combine(Utils.deep_merge(defaults, initial_variants))
16
+ end
17
+
18
+ def combine(variants_to_apply = {})
19
+ @current_variants = Utils.deep_merge(@current_variants, variants_to_apply)
20
+ rebuild_parts!
21
+ self
22
+ end
23
+
24
+ def method_missing(method_name, *args, &block)
25
+ part_name = method_name.to_sym
26
+ if @part_objects.key?(part_name)
27
+ @part_objects[part_name]
28
+ else
29
+ super
30
+ end
31
+ end
32
+
33
+ def respond_to_missing?(method_name, include_private = false)
34
+ @part_objects.key?(method_name.to_sym) || super
35
+ end
36
+
37
+ private
38
+
39
+ def rebuild_parts!
40
+ resolved_struct = Resolver.call(@schema, @current_variants)
41
+ @part_objects = {}
42
+
43
+ resolved_struct.to_h.each do |part_name, class_string|
44
+ @part_objects[part_name] = Part.new(class_string || "")
45
+ end
46
+ end
47
+
48
+ def get_defaults_from_schema
49
+ defaults = {}
50
+ @schema.elements.each_value do |element|
51
+ element.dimensions.each do |dim_name, dim|
52
+ defaults[dim_name] = dim.default_option if dim.default_option
53
+ end
54
+ end
55
+ defaults
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "set"
4
+
5
+ module Tailmix
6
+ class Part
7
+ def initialize(class_string)
8
+ @classes = Set.new(class_string.to_s.split)
9
+ end
10
+
11
+ def add(*new_classes)
12
+ @classes.merge(process_args(new_classes))
13
+ self
14
+ end
15
+
16
+ def remove(*classes_to_remove)
17
+ @classes.subtract(process_args(classes_to_remove))
18
+ self
19
+ end
20
+
21
+ def toggle(*classes_to_toggle)
22
+ process_args(classes_to_toggle).each do |cls|
23
+ @classes.delete?(cls) || @classes.add(cls)
24
+ end
25
+ self
26
+ end
27
+
28
+ def to_s
29
+ @classes.to_a.join(" ")
30
+ end
31
+ alias to_str to_s
32
+
33
+ private
34
+
35
+ def process_args(args)
36
+ args.flat_map { |arg| arg.to_s.split }
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+
5
+ module Tailmix
6
+ module Resolver
7
+ def self.call(schema, active_variants = {})
8
+ resolved_parts = schema.elements.each_with_object({}) do |(element_name, element), result|
9
+ class_list = []
10
+
11
+ class_list << element.base_classes
12
+
13
+ element.dimensions.each do |dimension_name, dimension|
14
+ active_option = active_variants[dimension_name] || dimension.default_option
15
+
16
+ if active_option
17
+ variant_class = dimension.options[active_option]
18
+ class_list << variant_class
19
+ end
20
+ end
21
+
22
+ result[element_name] = class_list.compact.join(" ")
23
+ end
24
+
25
+ OpenStruct.new(resolved_parts)
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "element"
4
+
5
+ module Tailmix
6
+ class Schema
7
+ attr_reader :elements
8
+
9
+ def initialize(&block)
10
+ @elements = {}
11
+ instance_eval(&block) if block_given?
12
+ end
13
+
14
+ def element(name, base_classes, &block)
15
+ @elements[name.to_sym] = Element.new(base_classes, &block)
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tailmix
4
+ module Utils
5
+ def self.deep_merge(original_hash, other_hash)
6
+ other_hash.each_with_object(original_hash.dup) do |(key, value), result|
7
+ if value.is_a?(Hash) && result[key].is_a?(Hash)
8
+ result[key] = deep_merge(result[key], value)
9
+ else
10
+ result[key] = value
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tailmix
4
+ VERSION = "0.1.0"
5
+ end
data/lib/tailmix.rb ADDED
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "tailmix/version"
4
+ require_relative "tailmix/schema"
5
+ require_relative "tailmix/resolver"
6
+ require_relative "tailmix/manager"
7
+ require_relative "tailmix/part"
8
+ require_relative "tailmix/dimension"
9
+ require_relative "tailmix/element"
10
+ require_relative "tailmix/utils"
11
+
12
+ module Tailmix
13
+ def self.included(base)
14
+ base.extend(ClassMethods)
15
+ base.instance_variable_set(:@tailmix_schema, nil)
16
+
17
+ base.define_singleton_method(:tailmix_schema) do
18
+ @tailmix_schema
19
+ end
20
+
21
+ base.define_singleton_method(:tailmix_schema=) do |value|
22
+ @tailmix_schema = value
23
+ end
24
+ end
25
+
26
+ module ClassMethods
27
+ def tailmix(&block)
28
+ self.tailmix_schema = Schema.new(&block)
29
+ end
30
+ end
31
+
32
+ private
33
+
34
+ def tailmix(options = {})
35
+ Manager.new(self.class.tailmix_schema, options)
36
+ end
37
+ end
data/sig/tailmix.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Tailmix
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,109 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tailmix
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Alexander Fokin
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2025-08-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '13.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '13.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ description: Tailmix provides a powerful DSL to define component style schemas, including
56
+ variants and parts. It enables clean, co-located style management and offers a rich
57
+ runtime API for dynamic class manipulation, perfect for Hotwire/Turbo and utility-first
58
+ CSS.
59
+ email:
60
+ - alexander.s.fokin@gmail.com
61
+ executables: []
62
+ extensions: []
63
+ extra_rdoc_files: []
64
+ files:
65
+ - ".rubocop.yml"
66
+ - CHANGELOG.md
67
+ - CODE_OF_CONDUCT.md
68
+ - LICENSE.txt
69
+ - README.md
70
+ - Rakefile
71
+ - examples/status_badge_component.rb
72
+ - lib/tailmix.rb
73
+ - lib/tailmix/dimension.rb
74
+ - lib/tailmix/element.rb
75
+ - lib/tailmix/manager.rb
76
+ - lib/tailmix/part.rb
77
+ - lib/tailmix/resolver.rb
78
+ - lib/tailmix/schema.rb
79
+ - lib/tailmix/utils.rb
80
+ - lib/tailmix/version.rb
81
+ - sig/tailmix.rbs
82
+ homepage: https://github.com/alexander-s-f/tailmix
83
+ licenses:
84
+ - MIT
85
+ metadata:
86
+ homepage_uri: https://github.com/alexander-s-f/tailmix
87
+ source_code_uri: https://github.com/alexander-s-f/tailmix
88
+ changelog_uri: https://github.com/alexander-s-f/tailmix/blob/main/CHANGELOG.md
89
+ allowed_push_host: https://rubygems.org
90
+ post_install_message:
91
+ rdoc_options: []
92
+ require_paths:
93
+ - lib
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: 3.1.0
99
+ required_rubygems_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ requirements: []
105
+ rubygems_version: 3.5.22
106
+ signing_key:
107
+ specification_version: 4
108
+ summary: A declarative class manager for Ruby UI components.
109
+ test_files: []