diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2601677..d0ab664 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.1.0" + ".": "1.2.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 2c5f954..bee881e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 20 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-c91b0567307b069c250d073074b7c861b64e632a8380b24925e15d981846bb43.yml -openapi_spec_hash: e479aa097b1283c2acf19d6360787449 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-05a30711e18b0023520a660352d75595a050d1299bf0e3ee4a8cf55ded36aea2.yml +openapi_spec_hash: 8d0e1115a7d864f27c55cec3255d1e77 config_hash: 91cf2dcefb99c39eb9cd3e98e15d6011 diff --git a/CHANGELOG.md b/CHANGELOG.md index 22e34bb..38b8462 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 1.2.0 (2026-04-03) + +Full Changelog: [v1.1.0...v1.2.0](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/compare/v1.1.0...v1.2.0) + +### Features + +* **api:** api update ([31fce97](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/31fce97412ff85c3c00d97941c75c7abcb52ac3f)) + + +### Bug Fixes + +* align path encoding with RFC 3986 section 3.3 ([d7380ea](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/d7380ea2e73abf9d87f40dad634fb8d542dc7e52)) +* variable name typo ([83f277c](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/83f277c8837aff78ec010a77040a33dc42771bca)) + ## 1.1.0 (2026-03-28) Full Changelog: [v1.0.0...v1.1.0](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/compare/v1.0.0...v1.1.0) diff --git a/Gemfile.lock b/Gemfile.lock index dd5c3dd..da284c1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - brand.dev (1.1.0) + brand.dev (1.2.0) cgi connection_pool diff --git a/README.md b/README.md index 1757c66..6ac788c 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "brand.dev", "~> 1.1.0" +gem "brand.dev", "~> 1.2.0" ``` diff --git a/lib/brand_dev/internal/util.rb b/lib/brand_dev/internal/util.rb index e86023e..0b8022c 100644 --- a/lib/brand_dev/internal/util.rb +++ b/lib/brand_dev/internal/util.rb @@ -157,7 +157,7 @@ def coerce_hash!(input) in Hash | nil => coerced coerced else - message = "Expected a #{Hash} or #{BrandDev::Internal::Type::BaseModel}, got #{data.inspect}" + message = "Expected a #{Hash} or #{BrandDev::Internal::Type::BaseModel}, got #{input.inspect}" raise ArgumentError.new(message) end end @@ -237,6 +237,11 @@ def dig(data, pick, &blk) end end + # @type [Regexp] + # + # https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3 + RFC_3986_NOT_PCHARS = /[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/ + class << self # @api private # @@ -247,6 +252,15 @@ def uri_origin(uri) "#{uri.scheme}://#{uri.host}#{":#{uri.port}" unless uri.port == uri.default_port}" end + # @api private + # + # @param path [String, Integer] + # + # @return [String] + def encode_path(path) + path.to_s.gsub(BrandDev::Internal::Util::RFC_3986_NOT_PCHARS) { ERB::Util.url_encode(_1) } + end + # @api private # # @param path [String, Array] @@ -259,7 +273,7 @@ def interpolate_path(path) in [] "" in [String => p, *interpolations] - encoded = interpolations.map { ERB::Util.url_encode(_1) } + encoded = interpolations.map { encode_path(_1) } format(p, *encoded) end end @@ -576,10 +590,10 @@ def encode_query_params(query) case val in BrandDev::FilePart unless val.filename.nil? - filename = ERB::Util.url_encode(val.filename) + filename = encode_path(val.filename) y << "; filename=\"#{filename}\"" in Pathname | IO - filename = ERB::Util.url_encode(::File.basename(val.to_path)) + filename = encode_path(::File.basename(val.to_path)) y << "; filename=\"#{filename}\"" else end diff --git a/lib/brand_dev/models/brand_styleguide_params.rb b/lib/brand_dev/models/brand_styleguide_params.rb index 745c3cf..1bfa838 100644 --- a/lib/brand_dev/models/brand_styleguide_params.rb +++ b/lib/brand_dev/models/brand_styleguide_params.rb @@ -21,15 +21,6 @@ class BrandStyleguideParams < BrandDev::Internal::Type::BaseModel # @return [String, nil] optional :domain, String - # @!attribute prioritize - # Optional parameter to prioritize screenshot capture for styleguide extraction. - # If 'speed', optimizes for faster capture with basic quality. If 'quality', - # optimizes for higher quality with longer wait times. Defaults to 'quality' if - # not provided. - # - # @return [Symbol, BrandDev::Models::BrandStyleguideParams::Prioritize, nil] - optional :prioritize, enum: -> { BrandDev::BrandStyleguideParams::Prioritize } - # @!attribute timeout_ms # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed @@ -38,7 +29,7 @@ class BrandStyleguideParams < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer - # @!method initialize(direct_url: nil, domain: nil, prioritize: nil, timeout_ms: nil, request_options: {}) + # @!method initialize(direct_url: nil, domain: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandStyleguideParams} for more details. # @@ -46,25 +37,9 @@ class BrandStyleguideParams < BrandDev::Internal::Type::BaseModel # # @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The # - # @param prioritize [Symbol, BrandDev::Models::BrandStyleguideParams::Prioritize] Optional parameter to prioritize screenshot capture for styleguide extraction. I - # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] - - # Optional parameter to prioritize screenshot capture for styleguide extraction. - # If 'speed', optimizes for faster capture with basic quality. If 'quality', - # optimizes for higher quality with longer wait times. Defaults to 'quality' if - # not provided. - module Prioritize - extend BrandDev::Internal::Type::Enum - - SPEED = :speed - QUALITY = :quality - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/brand_dev/models/brand_styleguide_response.rb b/lib/brand_dev/models/brand_styleguide_response.rb index 9de999c..3dd6496 100644 --- a/lib/brand_dev/models/brand_styleguide_response.rb +++ b/lib/brand_dev/models/brand_styleguide_response.rb @@ -42,42 +42,42 @@ class Styleguide < BrandDev::Internal::Type::BaseModel # @!attribute colors # Primary colors used on the website # - # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::Colors, nil] - optional :colors, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Colors } + # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::Colors] + required :colors, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Colors } # @!attribute components # UI component styles # - # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::Components, nil] - optional :components, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Components } + # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::Components] + required :components, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Components } # @!attribute element_spacing # Spacing system used on the website # - # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing, nil] - optional :element_spacing, + # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing] + required :element_spacing, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing }, api_name: :elementSpacing # @!attribute mode # The primary color mode of the website design # - # @return [Symbol, BrandDev::Models::BrandStyleguideResponse::Styleguide::Mode, nil] - optional :mode, enum: -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Mode } + # @return [Symbol, BrandDev::Models::BrandStyleguideResponse::Styleguide::Mode] + required :mode, enum: -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Mode } # @!attribute shadows # Shadow styles used on the website # - # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::Shadows, nil] - optional :shadows, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Shadows } + # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::Shadows] + required :shadows, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Shadows } # @!attribute typography # Typography styles used on the website # - # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography, nil] - optional :typography, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography } + # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography] + required :typography, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography } - # @!method initialize(colors: nil, components: nil, element_spacing: nil, mode: nil, shadows: nil, typography: nil) + # @!method initialize(colors:, components:, element_spacing:, mode:, shadows:, typography:) # Comprehensive styleguide data extracted from the website # # @param colors [BrandDev::Models::BrandStyleguideResponse::Styleguide::Colors] Primary colors used on the website @@ -95,31 +95,31 @@ class Styleguide < BrandDev::Internal::Type::BaseModel # @see BrandDev::Models::BrandStyleguideResponse::Styleguide#colors class Colors < BrandDev::Internal::Type::BaseModel # @!attribute accent - # Accent color of the website (hex format) + # Accent color (hex format) # - # @return [String, nil] - optional :accent, String + # @return [String] + required :accent, String # @!attribute background - # Background color of the website (hex format) + # Background color (hex format) # - # @return [String, nil] - optional :background, String + # @return [String] + required :background, String # @!attribute text - # Text color of the website (hex format) + # Text color (hex format) # - # @return [String, nil] - optional :text, String + # @return [String] + required :text, String - # @!method initialize(accent: nil, background: nil, text: nil) + # @!method initialize(accent:, background:, text:) # Primary colors used on the website # - # @param accent [String] Accent color of the website (hex format) + # @param accent [String] Accent color (hex format) # - # @param background [String] Background color of the website (hex format) + # @param background [String] Background color (hex format) # - # @param text [String] Text color of the website (hex format) + # @param text [String] Text color (hex format) end # @see BrandDev::Models::BrandStyleguideResponse::Styleguide#components @@ -127,8 +127,8 @@ class Components < BrandDev::Internal::Type::BaseModel # @!attribute button # Button component styles # - # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button, nil] - optional :button, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button } + # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button] + required :button, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button } # @!attribute card # Card component style @@ -136,7 +136,7 @@ class Components < BrandDev::Internal::Type::BaseModel # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Card, nil] optional :card, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Card } - # @!method initialize(button: nil, card: nil) + # @!method initialize(button:, card: nil) # UI component styles # # @param button [BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button] Button component styles @@ -146,20 +146,17 @@ class Components < BrandDev::Internal::Type::BaseModel # @see BrandDev::Models::BrandStyleguideResponse::Styleguide::Components#button class Button < BrandDev::Internal::Type::BaseModel # @!attribute link - # Link button style # # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button::Link, nil] optional :link, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button::Link } # @!attribute primary - # Primary button style # # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button::Primary, nil] optional :primary, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button::Primary } # @!attribute secondary - # Secondary button style # # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button::Secondary, nil] optional :secondary, @@ -168,229 +165,416 @@ class Button < BrandDev::Internal::Type::BaseModel # @!method initialize(link: nil, primary: nil, secondary: nil) # Button component styles # - # @param link [BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button::Link] Link button style - # - # @param primary [BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button::Primary] Primary button style - # - # @param secondary [BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button::Secondary] Secondary button style + # @param link [BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button::Link] + # @param primary [BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button::Primary] + # @param secondary [BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button::Secondary] # @see BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button#link class Link < BrandDev::Internal::Type::BaseModel # @!attribute background_color # - # @return [String, nil] - optional :background_color, String, api_name: :backgroundColor + # @return [String] + required :background_color, String, api_name: :backgroundColor # @!attribute border_color + # Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has + # alpha) # - # @return [String, nil] - optional :border_color, String, api_name: :borderColor + # @return [String] + required :border_color, String, api_name: :borderColor # @!attribute border_radius # - # @return [String, nil] - optional :border_radius, String, api_name: :borderRadius + # @return [String] + required :border_radius, String, api_name: :borderRadius # @!attribute border_style # - # @return [String, nil] - optional :border_style, String, api_name: :borderStyle + # @return [String] + required :border_style, String, api_name: :borderStyle # @!attribute border_width # - # @return [String, nil] - optional :border_width, String, api_name: :borderWidth + # @return [String] + required :border_width, String, api_name: :borderWidth # @!attribute box_shadow + # Computed box-shadow (comma-separated layers when present) # - # @return [String, nil] - optional :box_shadow, String, api_name: :boxShadow + # @return [String] + required :box_shadow, String, api_name: :boxShadow # @!attribute color # - # @return [String, nil] - optional :color, String + # @return [String] + required :color, String + + # @!attribute css + # Ready-to-use CSS declaration block for this component style + # + # @return [String] + required :css, String # @!attribute font_size # - # @return [String, nil] - optional :font_size, String, api_name: :fontSize + # @return [String] + required :font_size, String, api_name: :fontSize # @!attribute font_weight # - # @return [Float, nil] - optional :font_weight, Float, api_name: :fontWeight + # @return [Float] + required :font_weight, Float, api_name: :fontWeight + + # @!attribute min_height + # Sampled minimum height of the button box (typically px) + # + # @return [String] + required :min_height, String, api_name: :minHeight + + # @!attribute min_width + # Sampled minimum width of the button box (typically px) + # + # @return [String] + required :min_width, String, api_name: :minWidth # @!attribute padding # - # @return [String, nil] - optional :padding, String + # @return [String] + required :padding, String # @!attribute text_decoration # + # @return [String] + required :text_decoration, String, api_name: :textDecoration + + # @!attribute font_fallbacks + # Full ordered font list from computed font-family + # + # @return [Array, nil] + optional :font_fallbacks, BrandDev::Internal::Type::ArrayOf[String], api_name: :fontFallbacks + + # @!attribute font_family + # Primary button typeface (first in fontFallbacks) + # # @return [String, nil] - optional :text_decoration, String, api_name: :textDecoration + optional :font_family, String, api_name: :fontFamily - # @!method initialize(background_color: nil, border_color: nil, border_radius: nil, border_style: nil, border_width: nil, box_shadow: nil, color: nil, font_size: nil, font_weight: nil, padding: nil, text_decoration: nil) - # Link button style + # @!attribute text_decoration_color + # Hex color of the underline when it differs from the text color + # + # @return [String, nil] + optional :text_decoration_color, String, api_name: :textDecorationColor + + # @!method initialize(background_color:, border_color:, border_radius:, border_style:, border_width:, box_shadow:, color:, css:, font_size:, font_weight:, min_height:, min_width:, padding:, text_decoration:, font_fallbacks: nil, font_family: nil, text_decoration_color: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button::Link} + # for more details. # # @param background_color [String] - # @param border_color [String] + # + # @param border_color [String] Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has alp + # # @param border_radius [String] + # # @param border_style [String] + # # @param border_width [String] - # @param box_shadow [String] + # + # @param box_shadow [String] Computed box-shadow (comma-separated layers when present) + # # @param color [String] + # + # @param css [String] Ready-to-use CSS declaration block for this component style + # # @param font_size [String] + # # @param font_weight [Float] + # + # @param min_height [String] Sampled minimum height of the button box (typically px) + # + # @param min_width [String] Sampled minimum width of the button box (typically px) + # # @param padding [String] + # # @param text_decoration [String] + # + # @param font_fallbacks [Array] Full ordered font list from computed font-family + # + # @param font_family [String] Primary button typeface (first in fontFallbacks) + # + # @param text_decoration_color [String] Hex color of the underline when it differs from the text color end # @see BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button#primary class Primary < BrandDev::Internal::Type::BaseModel # @!attribute background_color # - # @return [String, nil] - optional :background_color, String, api_name: :backgroundColor + # @return [String] + required :background_color, String, api_name: :backgroundColor # @!attribute border_color + # Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has + # alpha) # - # @return [String, nil] - optional :border_color, String, api_name: :borderColor + # @return [String] + required :border_color, String, api_name: :borderColor # @!attribute border_radius # - # @return [String, nil] - optional :border_radius, String, api_name: :borderRadius + # @return [String] + required :border_radius, String, api_name: :borderRadius # @!attribute border_style # - # @return [String, nil] - optional :border_style, String, api_name: :borderStyle + # @return [String] + required :border_style, String, api_name: :borderStyle # @!attribute border_width # - # @return [String, nil] - optional :border_width, String, api_name: :borderWidth + # @return [String] + required :border_width, String, api_name: :borderWidth # @!attribute box_shadow + # Computed box-shadow (comma-separated layers when present) # - # @return [String, nil] - optional :box_shadow, String, api_name: :boxShadow + # @return [String] + required :box_shadow, String, api_name: :boxShadow # @!attribute color # - # @return [String, nil] - optional :color, String + # @return [String] + required :color, String + + # @!attribute css + # Ready-to-use CSS declaration block for this component style + # + # @return [String] + required :css, String # @!attribute font_size # - # @return [String, nil] - optional :font_size, String, api_name: :fontSize + # @return [String] + required :font_size, String, api_name: :fontSize # @!attribute font_weight # - # @return [Float, nil] - optional :font_weight, Float, api_name: :fontWeight + # @return [Float] + required :font_weight, Float, api_name: :fontWeight + + # @!attribute min_height + # Sampled minimum height of the button box (typically px) + # + # @return [String] + required :min_height, String, api_name: :minHeight + + # @!attribute min_width + # Sampled minimum width of the button box (typically px) + # + # @return [String] + required :min_width, String, api_name: :minWidth # @!attribute padding # - # @return [String, nil] - optional :padding, String + # @return [String] + required :padding, String # @!attribute text_decoration # + # @return [String] + required :text_decoration, String, api_name: :textDecoration + + # @!attribute font_fallbacks + # Full ordered font list from computed font-family + # + # @return [Array, nil] + optional :font_fallbacks, BrandDev::Internal::Type::ArrayOf[String], api_name: :fontFallbacks + + # @!attribute font_family + # Primary button typeface (first in fontFallbacks) + # # @return [String, nil] - optional :text_decoration, String, api_name: :textDecoration + optional :font_family, String, api_name: :fontFamily + + # @!attribute text_decoration_color + # Hex color of the underline when it differs from the text color + # + # @return [String, nil] + optional :text_decoration_color, String, api_name: :textDecorationColor - # @!method initialize(background_color: nil, border_color: nil, border_radius: nil, border_style: nil, border_width: nil, box_shadow: nil, color: nil, font_size: nil, font_weight: nil, padding: nil, text_decoration: nil) - # Primary button style + # @!method initialize(background_color:, border_color:, border_radius:, border_style:, border_width:, box_shadow:, color:, css:, font_size:, font_weight:, min_height:, min_width:, padding:, text_decoration:, font_fallbacks: nil, font_family: nil, text_decoration_color: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button::Primary} + # for more details. # # @param background_color [String] - # @param border_color [String] + # + # @param border_color [String] Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has alp + # # @param border_radius [String] + # # @param border_style [String] + # # @param border_width [String] - # @param box_shadow [String] + # + # @param box_shadow [String] Computed box-shadow (comma-separated layers when present) + # # @param color [String] + # + # @param css [String] Ready-to-use CSS declaration block for this component style + # # @param font_size [String] + # # @param font_weight [Float] + # + # @param min_height [String] Sampled minimum height of the button box (typically px) + # + # @param min_width [String] Sampled minimum width of the button box (typically px) + # # @param padding [String] + # # @param text_decoration [String] + # + # @param font_fallbacks [Array] Full ordered font list from computed font-family + # + # @param font_family [String] Primary button typeface (first in fontFallbacks) + # + # @param text_decoration_color [String] Hex color of the underline when it differs from the text color end # @see BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button#secondary class Secondary < BrandDev::Internal::Type::BaseModel # @!attribute background_color # - # @return [String, nil] - optional :background_color, String, api_name: :backgroundColor + # @return [String] + required :background_color, String, api_name: :backgroundColor # @!attribute border_color + # Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has + # alpha) # - # @return [String, nil] - optional :border_color, String, api_name: :borderColor + # @return [String] + required :border_color, String, api_name: :borderColor # @!attribute border_radius # - # @return [String, nil] - optional :border_radius, String, api_name: :borderRadius + # @return [String] + required :border_radius, String, api_name: :borderRadius # @!attribute border_style # - # @return [String, nil] - optional :border_style, String, api_name: :borderStyle + # @return [String] + required :border_style, String, api_name: :borderStyle # @!attribute border_width # - # @return [String, nil] - optional :border_width, String, api_name: :borderWidth + # @return [String] + required :border_width, String, api_name: :borderWidth # @!attribute box_shadow + # Computed box-shadow (comma-separated layers when present) # - # @return [String, nil] - optional :box_shadow, String, api_name: :boxShadow + # @return [String] + required :box_shadow, String, api_name: :boxShadow # @!attribute color # - # @return [String, nil] - optional :color, String + # @return [String] + required :color, String + + # @!attribute css + # Ready-to-use CSS declaration block for this component style + # + # @return [String] + required :css, String # @!attribute font_size # - # @return [String, nil] - optional :font_size, String, api_name: :fontSize + # @return [String] + required :font_size, String, api_name: :fontSize # @!attribute font_weight # - # @return [Float, nil] - optional :font_weight, Float, api_name: :fontWeight + # @return [Float] + required :font_weight, Float, api_name: :fontWeight + + # @!attribute min_height + # Sampled minimum height of the button box (typically px) + # + # @return [String] + required :min_height, String, api_name: :minHeight + + # @!attribute min_width + # Sampled minimum width of the button box (typically px) + # + # @return [String] + required :min_width, String, api_name: :minWidth # @!attribute padding # - # @return [String, nil] - optional :padding, String + # @return [String] + required :padding, String # @!attribute text_decoration # + # @return [String] + required :text_decoration, String, api_name: :textDecoration + + # @!attribute font_fallbacks + # Full ordered font list from computed font-family + # + # @return [Array, nil] + optional :font_fallbacks, BrandDev::Internal::Type::ArrayOf[String], api_name: :fontFallbacks + + # @!attribute font_family + # Primary button typeface (first in fontFallbacks) + # # @return [String, nil] - optional :text_decoration, String, api_name: :textDecoration + optional :font_family, String, api_name: :fontFamily - # @!method initialize(background_color: nil, border_color: nil, border_radius: nil, border_style: nil, border_width: nil, box_shadow: nil, color: nil, font_size: nil, font_weight: nil, padding: nil, text_decoration: nil) - # Secondary button style + # @!attribute text_decoration_color + # Hex color of the underline when it differs from the text color + # + # @return [String, nil] + optional :text_decoration_color, String, api_name: :textDecorationColor + + # @!method initialize(background_color:, border_color:, border_radius:, border_style:, border_width:, box_shadow:, color:, css:, font_size:, font_weight:, min_height:, min_width:, padding:, text_decoration:, font_fallbacks: nil, font_family: nil, text_decoration_color: nil) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button::Secondary} + # for more details. # # @param background_color [String] - # @param border_color [String] + # + # @param border_color [String] Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has alp + # # @param border_radius [String] + # # @param border_style [String] + # # @param border_width [String] - # @param box_shadow [String] + # + # @param box_shadow [String] Computed box-shadow (comma-separated layers when present) + # # @param color [String] + # + # @param css [String] Ready-to-use CSS declaration block for this component style + # # @param font_size [String] + # # @param font_weight [Float] + # + # @param min_height [String] Sampled minimum height of the button box (typically px) + # + # @param min_width [String] Sampled minimum width of the button box (typically px) + # # @param padding [String] + # # @param text_decoration [String] + # + # @param font_fallbacks [Array] Full ordered font list from computed font-family + # + # @param font_family [String] Primary button typeface (first in fontFallbacks) + # + # @param text_decoration_color [String] Hex color of the underline when it differs from the text color end end @@ -398,54 +582,75 @@ class Secondary < BrandDev::Internal::Type::BaseModel class Card < BrandDev::Internal::Type::BaseModel # @!attribute background_color # - # @return [String, nil] - optional :background_color, String, api_name: :backgroundColor + # @return [String] + required :background_color, String, api_name: :backgroundColor # @!attribute border_color + # Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has + # alpha) # - # @return [String, nil] - optional :border_color, String, api_name: :borderColor + # @return [String] + required :border_color, String, api_name: :borderColor # @!attribute border_radius # - # @return [String, nil] - optional :border_radius, String, api_name: :borderRadius + # @return [String] + required :border_radius, String, api_name: :borderRadius # @!attribute border_style # - # @return [String, nil] - optional :border_style, String, api_name: :borderStyle + # @return [String] + required :border_style, String, api_name: :borderStyle # @!attribute border_width # - # @return [String, nil] - optional :border_width, String, api_name: :borderWidth + # @return [String] + required :border_width, String, api_name: :borderWidth # @!attribute box_shadow # - # @return [String, nil] - optional :box_shadow, String, api_name: :boxShadow + # @return [String] + required :box_shadow, String, api_name: :boxShadow + + # @!attribute css + # Ready-to-use CSS declaration block for this component style + # + # @return [String] + required :css, String # @!attribute padding # - # @return [String, nil] - optional :padding, String + # @return [String] + required :padding, String # @!attribute text_color # - # @return [String, nil] - optional :text_color, String, api_name: :textColor + # @return [String] + required :text_color, String, api_name: :textColor - # @!method initialize(background_color: nil, border_color: nil, border_radius: nil, border_style: nil, border_width: nil, box_shadow: nil, padding: nil, text_color: nil) + # @!method initialize(background_color:, border_color:, border_radius:, border_style:, border_width:, box_shadow:, css:, padding:, text_color:) + # Some parameter documentations has been truncated, see + # {BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Card} for + # more details. + # # Card component style # # @param background_color [String] - # @param border_color [String] + # + # @param border_color [String] Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has alp + # # @param border_radius [String] + # # @param border_style [String] + # # @param border_width [String] + # # @param box_shadow [String] + # + # @param css [String] Ready-to-use CSS declaration block for this component style + # # @param padding [String] + # # @param text_color [String] end end @@ -453,47 +658,38 @@ class Card < BrandDev::Internal::Type::BaseModel # @see BrandDev::Models::BrandStyleguideResponse::Styleguide#element_spacing class ElementSpacing < BrandDev::Internal::Type::BaseModel # @!attribute lg - # Large spacing value # - # @return [String, nil] - optional :lg, String + # @return [String] + required :lg, String # @!attribute md - # Medium spacing value # - # @return [String, nil] - optional :md, String + # @return [String] + required :md, String # @!attribute sm - # Small spacing value # - # @return [String, nil] - optional :sm, String + # @return [String] + required :sm, String # @!attribute xl - # Extra large spacing value # - # @return [String, nil] - optional :xl, String + # @return [String] + required :xl, String # @!attribute xs - # Extra small spacing value # - # @return [String, nil] - optional :xs, String + # @return [String] + required :xs, String - # @!method initialize(lg: nil, md: nil, sm: nil, xl: nil, xs: nil) + # @!method initialize(lg:, md:, sm:, xl:, xs:) # Spacing system used on the website # - # @param lg [String] Large spacing value - # - # @param md [String] Medium spacing value - # - # @param sm [String] Small spacing value - # - # @param xl [String] Extra large spacing value - # - # @param xs [String] Extra small spacing value + # @param lg [String] + # @param md [String] + # @param sm [String] + # @param xl [String] + # @param xs [String] end # The primary color mode of the website design @@ -512,47 +708,38 @@ module Mode # @see BrandDev::Models::BrandStyleguideResponse::Styleguide#shadows class Shadows < BrandDev::Internal::Type::BaseModel # @!attribute inner - # Inner shadow value # - # @return [String, nil] - optional :inner, String + # @return [String] + required :inner, String # @!attribute lg - # Large shadow value # - # @return [String, nil] - optional :lg, String + # @return [String] + required :lg, String # @!attribute md - # Medium shadow value # - # @return [String, nil] - optional :md, String + # @return [String] + required :md, String # @!attribute sm - # Small shadow value # - # @return [String, nil] - optional :sm, String + # @return [String] + required :sm, String # @!attribute xl - # Extra large shadow value # - # @return [String, nil] - optional :xl, String + # @return [String] + required :xl, String - # @!method initialize(inner: nil, lg: nil, md: nil, sm: nil, xl: nil) + # @!method initialize(inner:, lg:, md:, sm:, xl:) # Shadow styles used on the website # - # @param inner [String] Inner shadow value - # - # @param lg [String] Large shadow value - # - # @param md [String] Medium shadow value - # - # @param sm [String] Small shadow value - # - # @param xl [String] Extra large shadow value + # @param inner [String] + # @param lg [String] + # @param md [String] + # @param sm [String] + # @param xl [String] end # @see BrandDev::Models::BrandStyleguideResponse::Styleguide#typography @@ -560,21 +747,20 @@ class Typography < BrandDev::Internal::Type::BaseModel # @!attribute headings # Heading styles # - # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::Headings, nil] - optional :headings, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::Headings } + # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::Headings] + required :headings, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::Headings } # @!attribute p_ - # Paragraph text styles # # @return [BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::P, nil] optional :p_, -> { BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::P }, api_name: :p - # @!method initialize(headings: nil, p_: nil) + # @!method initialize(headings:, p_: nil) # Typography styles used on the website # # @param headings [BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::Headings] Heading styles # - # @param p_ [BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::P] Paragraph text styles + # @param p_ [BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::P] # @see BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography#headings class Headings < BrandDev::Internal::Type::BaseModel @@ -608,179 +794,242 @@ class Headings < BrandDev::Internal::Type::BaseModel # @see BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::Headings#h1 class H1 < BrandDev::Internal::Type::BaseModel + # @!attribute font_fallbacks + # Full ordered font list from resolved computed font-family + # + # @return [Array] + required :font_fallbacks, BrandDev::Internal::Type::ArrayOf[String], api_name: :fontFallbacks + # @!attribute font_family + # Primary face (first family in the computed stack) # - # @return [String, nil] - optional :font_family, String, api_name: :fontFamily + # @return [String] + required :font_family, String, api_name: :fontFamily # @!attribute font_size # - # @return [String, nil] - optional :font_size, String, api_name: :fontSize + # @return [String] + required :font_size, String, api_name: :fontSize # @!attribute font_weight # - # @return [Float, nil] - optional :font_weight, Float, api_name: :fontWeight + # @return [Float] + required :font_weight, Float, api_name: :fontWeight # @!attribute letter_spacing # - # @return [String, nil] - optional :letter_spacing, String, api_name: :letterSpacing + # @return [String] + required :letter_spacing, String, api_name: :letterSpacing # @!attribute line_height # - # @return [String, nil] - optional :line_height, String, api_name: :lineHeight + # @return [String] + required :line_height, String, api_name: :lineHeight - # @!method initialize(font_family: nil, font_size: nil, font_weight: nil, letter_spacing: nil, line_height: nil) - # @param font_family [String] + # @!method initialize(font_fallbacks:, font_family:, font_size:, font_weight:, letter_spacing:, line_height:) + # @param font_fallbacks [Array] Full ordered font list from resolved computed font-family + # + # @param font_family [String] Primary face (first family in the computed stack) + # # @param font_size [String] + # # @param font_weight [Float] + # # @param letter_spacing [String] + # # @param line_height [String] end # @see BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::Headings#h2 class H2 < BrandDev::Internal::Type::BaseModel + # @!attribute font_fallbacks + # Full ordered font list from resolved computed font-family + # + # @return [Array] + required :font_fallbacks, BrandDev::Internal::Type::ArrayOf[String], api_name: :fontFallbacks + # @!attribute font_family + # Primary face (first family in the computed stack) # - # @return [String, nil] - optional :font_family, String, api_name: :fontFamily + # @return [String] + required :font_family, String, api_name: :fontFamily # @!attribute font_size # - # @return [String, nil] - optional :font_size, String, api_name: :fontSize + # @return [String] + required :font_size, String, api_name: :fontSize # @!attribute font_weight # - # @return [Float, nil] - optional :font_weight, Float, api_name: :fontWeight + # @return [Float] + required :font_weight, Float, api_name: :fontWeight # @!attribute letter_spacing # - # @return [String, nil] - optional :letter_spacing, String, api_name: :letterSpacing + # @return [String] + required :letter_spacing, String, api_name: :letterSpacing # @!attribute line_height # - # @return [String, nil] - optional :line_height, String, api_name: :lineHeight + # @return [String] + required :line_height, String, api_name: :lineHeight - # @!method initialize(font_family: nil, font_size: nil, font_weight: nil, letter_spacing: nil, line_height: nil) - # @param font_family [String] + # @!method initialize(font_fallbacks:, font_family:, font_size:, font_weight:, letter_spacing:, line_height:) + # @param font_fallbacks [Array] Full ordered font list from resolved computed font-family + # + # @param font_family [String] Primary face (first family in the computed stack) + # # @param font_size [String] + # # @param font_weight [Float] + # # @param letter_spacing [String] + # # @param line_height [String] end # @see BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::Headings#h3 class H3 < BrandDev::Internal::Type::BaseModel + # @!attribute font_fallbacks + # Full ordered font list from resolved computed font-family + # + # @return [Array] + required :font_fallbacks, BrandDev::Internal::Type::ArrayOf[String], api_name: :fontFallbacks + # @!attribute font_family + # Primary face (first family in the computed stack) # - # @return [String, nil] - optional :font_family, String, api_name: :fontFamily + # @return [String] + required :font_family, String, api_name: :fontFamily # @!attribute font_size # - # @return [String, nil] - optional :font_size, String, api_name: :fontSize + # @return [String] + required :font_size, String, api_name: :fontSize # @!attribute font_weight # - # @return [Float, nil] - optional :font_weight, Float, api_name: :fontWeight + # @return [Float] + required :font_weight, Float, api_name: :fontWeight # @!attribute letter_spacing # - # @return [String, nil] - optional :letter_spacing, String, api_name: :letterSpacing + # @return [String] + required :letter_spacing, String, api_name: :letterSpacing # @!attribute line_height # - # @return [String, nil] - optional :line_height, String, api_name: :lineHeight + # @return [String] + required :line_height, String, api_name: :lineHeight - # @!method initialize(font_family: nil, font_size: nil, font_weight: nil, letter_spacing: nil, line_height: nil) - # @param font_family [String] + # @!method initialize(font_fallbacks:, font_family:, font_size:, font_weight:, letter_spacing:, line_height:) + # @param font_fallbacks [Array] Full ordered font list from resolved computed font-family + # + # @param font_family [String] Primary face (first family in the computed stack) + # # @param font_size [String] + # # @param font_weight [Float] + # # @param letter_spacing [String] + # # @param line_height [String] end # @see BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::Headings#h4 class H4 < BrandDev::Internal::Type::BaseModel + # @!attribute font_fallbacks + # Full ordered font list from resolved computed font-family + # + # @return [Array] + required :font_fallbacks, BrandDev::Internal::Type::ArrayOf[String], api_name: :fontFallbacks + # @!attribute font_family + # Primary face (first family in the computed stack) # - # @return [String, nil] - optional :font_family, String, api_name: :fontFamily + # @return [String] + required :font_family, String, api_name: :fontFamily # @!attribute font_size # - # @return [String, nil] - optional :font_size, String, api_name: :fontSize + # @return [String] + required :font_size, String, api_name: :fontSize # @!attribute font_weight # - # @return [Float, nil] - optional :font_weight, Float, api_name: :fontWeight + # @return [Float] + required :font_weight, Float, api_name: :fontWeight # @!attribute letter_spacing # - # @return [String, nil] - optional :letter_spacing, String, api_name: :letterSpacing + # @return [String] + required :letter_spacing, String, api_name: :letterSpacing # @!attribute line_height # - # @return [String, nil] - optional :line_height, String, api_name: :lineHeight + # @return [String] + required :line_height, String, api_name: :lineHeight - # @!method initialize(font_family: nil, font_size: nil, font_weight: nil, letter_spacing: nil, line_height: nil) - # @param font_family [String] + # @!method initialize(font_fallbacks:, font_family:, font_size:, font_weight:, letter_spacing:, line_height:) + # @param font_fallbacks [Array] Full ordered font list from resolved computed font-family + # + # @param font_family [String] Primary face (first family in the computed stack) + # # @param font_size [String] + # # @param font_weight [Float] + # # @param letter_spacing [String] + # # @param line_height [String] end end # @see BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography#p_ class P < BrandDev::Internal::Type::BaseModel + # @!attribute font_fallbacks + # Full ordered font list from resolved computed font-family + # + # @return [Array] + required :font_fallbacks, BrandDev::Internal::Type::ArrayOf[String], api_name: :fontFallbacks + # @!attribute font_family + # Primary face (first family in the computed stack) # - # @return [String, nil] - optional :font_family, String, api_name: :fontFamily + # @return [String] + required :font_family, String, api_name: :fontFamily # @!attribute font_size # - # @return [String, nil] - optional :font_size, String, api_name: :fontSize + # @return [String] + required :font_size, String, api_name: :fontSize # @!attribute font_weight # - # @return [Float, nil] - optional :font_weight, Float, api_name: :fontWeight + # @return [Float] + required :font_weight, Float, api_name: :fontWeight # @!attribute letter_spacing # - # @return [String, nil] - optional :letter_spacing, String, api_name: :letterSpacing + # @return [String] + required :letter_spacing, String, api_name: :letterSpacing # @!attribute line_height # - # @return [String, nil] - optional :line_height, String, api_name: :lineHeight + # @return [String] + required :line_height, String, api_name: :lineHeight - # @!method initialize(font_family: nil, font_size: nil, font_weight: nil, letter_spacing: nil, line_height: nil) - # Paragraph text styles + # @!method initialize(font_fallbacks:, font_family:, font_size:, font_weight:, letter_spacing:, line_height:) + # @param font_fallbacks [Array] Full ordered font list from resolved computed font-family + # + # @param font_family [String] Primary face (first family in the computed stack) # - # @param font_family [String] # @param font_size [String] + # # @param font_weight [Float] + # # @param letter_spacing [String] + # # @param line_height [String] end end diff --git a/lib/brand_dev/resources/brand.rb b/lib/brand_dev/resources/brand.rb index d6803fe..34dfad5 100644 --- a/lib/brand_dev/resources/brand.rb +++ b/lib/brand_dev/resources/brand.rb @@ -503,14 +503,12 @@ def screenshot(params) # Either 'domain' or 'directUrl' must be provided as a query parameter, but not # both. # - # @overload styleguide(direct_url: nil, domain: nil, prioritize: nil, timeout_ms: nil, request_options: {}) + # @overload styleguide(direct_url: nil, domain: nil, timeout_ms: nil, request_options: {}) # # @param direct_url [String] A specific URL to fetch the styleguide from directly, bypassing domain resolutio # # @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The # - # @param prioritize [Symbol, BrandDev::Models::BrandStyleguideParams::Prioritize] Optional parameter to prioritize screenshot capture for styleguide extraction. I - # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil] diff --git a/lib/brand_dev/version.rb b/lib/brand_dev/version.rb index 558c82f..d4aea6c 100644 --- a/lib/brand_dev/version.rb +++ b/lib/brand_dev/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module BrandDev - VERSION = "1.1.0" + VERSION = "1.2.0" end diff --git a/rbi/brand_dev/internal/util.rbi b/rbi/brand_dev/internal/util.rbi index 70f1385..9f00b56 100644 --- a/rbi/brand_dev/internal/util.rbi +++ b/rbi/brand_dev/internal/util.rbi @@ -148,12 +148,20 @@ module BrandDev end end + # https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3 + RFC_3986_NOT_PCHARS = T.let(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/, Regexp) + class << self # @api private sig { params(uri: URI::Generic).returns(String) } def uri_origin(uri) end + # @api private + sig { params(path: T.any(String, Integer)).returns(String) } + def encode_path(path) + end + # @api private sig { params(path: T.any(String, T::Array[String])).returns(String) } def interpolate_path(path) diff --git a/rbi/brand_dev/models/brand_styleguide_params.rbi b/rbi/brand_dev/models/brand_styleguide_params.rbi index d33c19c..d38bf66 100644 --- a/rbi/brand_dev/models/brand_styleguide_params.rbi +++ b/rbi/brand_dev/models/brand_styleguide_params.rbi @@ -27,24 +27,6 @@ module BrandDev sig { params(domain: String).void } attr_writer :domain - # Optional parameter to prioritize screenshot capture for styleguide extraction. - # If 'speed', optimizes for faster capture with basic quality. If 'quality', - # optimizes for higher quality with longer wait times. Defaults to 'quality' if - # not provided. - sig do - returns( - T.nilable(BrandDev::BrandStyleguideParams::Prioritize::OrSymbol) - ) - end - attr_reader :prioritize - - sig do - params( - prioritize: BrandDev::BrandStyleguideParams::Prioritize::OrSymbol - ).void - end - attr_writer :prioritize - # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -58,7 +40,6 @@ module BrandDev params( direct_url: String, domain: String, - prioritize: BrandDev::BrandStyleguideParams::Prioritize::OrSymbol, timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) @@ -70,11 +51,6 @@ module BrandDev # Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The # domain will be automatically normalized and validated. domain: nil, - # Optional parameter to prioritize screenshot capture for styleguide extraction. - # If 'speed', optimizes for faster capture with basic quality. If 'quality', - # optimizes for higher quality with longer wait times. Defaults to 'quality' if - # not provided. - prioritize: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -88,7 +64,6 @@ module BrandDev { direct_url: String, domain: String, - prioritize: BrandDev::BrandStyleguideParams::Prioritize::OrSymbol, timeout_ms: Integer, request_options: BrandDev::RequestOptions } @@ -96,39 +71,6 @@ module BrandDev end def to_hash end - - # Optional parameter to prioritize screenshot capture for styleguide extraction. - # If 'speed', optimizes for faster capture with basic quality. If 'quality', - # optimizes for higher quality with longer wait times. Defaults to 'quality' if - # not provided. - module Prioritize - extend BrandDev::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, BrandDev::BrandStyleguideParams::Prioritize) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - SPEED = - T.let( - :speed, - BrandDev::BrandStyleguideParams::Prioritize::TaggedSymbol - ) - QUALITY = - T.let( - :quality, - BrandDev::BrandStyleguideParams::Prioritize::TaggedSymbol - ) - - sig do - override.returns( - T::Array[BrandDev::BrandStyleguideParams::Prioritize::TaggedSymbol] - ) - end - def self.values - end - end end end end diff --git a/rbi/brand_dev/models/brand_styleguide_response.rbi b/rbi/brand_dev/models/brand_styleguide_response.rbi index 1491058..7b8bfda 100644 --- a/rbi/brand_dev/models/brand_styleguide_response.rbi +++ b/rbi/brand_dev/models/brand_styleguide_response.rbi @@ -93,11 +93,7 @@ module BrandDev # Primary colors used on the website sig do - returns( - T.nilable( - BrandDev::Models::BrandStyleguideResponse::Styleguide::Colors - ) - ) + returns(BrandDev::Models::BrandStyleguideResponse::Styleguide::Colors) end attr_reader :colors @@ -112,9 +108,7 @@ module BrandDev # UI component styles sig do returns( - T.nilable( - BrandDev::Models::BrandStyleguideResponse::Styleguide::Components - ) + BrandDev::Models::BrandStyleguideResponse::Styleguide::Components ) end attr_reader :components @@ -130,9 +124,7 @@ module BrandDev # Spacing system used on the website sig do returns( - T.nilable( - BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing - ) + BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing ) end attr_reader :element_spacing @@ -148,27 +140,15 @@ module BrandDev # The primary color mode of the website design sig do returns( - T.nilable( - BrandDev::Models::BrandStyleguideResponse::Styleguide::Mode::TaggedSymbol - ) + BrandDev::Models::BrandStyleguideResponse::Styleguide::Mode::TaggedSymbol ) end - attr_reader :mode - - sig do - params( - mode: - BrandDev::Models::BrandStyleguideResponse::Styleguide::Mode::OrSymbol - ).void - end - attr_writer :mode + attr_accessor :mode # Shadow styles used on the website sig do returns( - T.nilable( - BrandDev::Models::BrandStyleguideResponse::Styleguide::Shadows - ) + BrandDev::Models::BrandStyleguideResponse::Styleguide::Shadows ) end attr_reader :shadows @@ -184,9 +164,7 @@ module BrandDev # Typography styles used on the website sig do returns( - T.nilable( - BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography - ) + BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography ) end attr_reader :typography @@ -218,17 +196,17 @@ module BrandDev end def self.new( # Primary colors used on the website - colors: nil, + colors:, # UI component styles - components: nil, + components:, # Spacing system used on the website - element_spacing: nil, + element_spacing:, # The primary color mode of the website design - mode: nil, + mode:, # Shadow styles used on the website - shadows: nil, + shadows:, # Typography styles used on the website - typography: nil + typography: ) end @@ -262,26 +240,17 @@ module BrandDev ) end - # Accent color of the website (hex format) - sig { returns(T.nilable(String)) } - attr_reader :accent + # Accent color (hex format) + sig { returns(String) } + attr_accessor :accent - sig { params(accent: String).void } - attr_writer :accent + # Background color (hex format) + sig { returns(String) } + attr_accessor :background - # Background color of the website (hex format) - sig { returns(T.nilable(String)) } - attr_reader :background - - sig { params(background: String).void } - attr_writer :background - - # Text color of the website (hex format) - sig { returns(T.nilable(String)) } - attr_reader :text - - sig { params(text: String).void } - attr_writer :text + # Text color (hex format) + sig { returns(String) } + attr_accessor :text # Primary colors used on the website sig do @@ -290,12 +259,12 @@ module BrandDev ) end def self.new( - # Accent color of the website (hex format) - accent: nil, - # Background color of the website (hex format) - background: nil, - # Text color of the website (hex format) - text: nil + # Accent color (hex format) + accent:, + # Background color (hex format) + background:, + # Text color (hex format) + text: ) end @@ -320,9 +289,7 @@ module BrandDev # Button component styles sig do returns( - T.nilable( - BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button - ) + BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button ) end attr_reader :button @@ -364,7 +331,7 @@ module BrandDev end def self.new( # Button component styles - button: nil, + button:, # Card component style card: nil ) @@ -392,7 +359,6 @@ module BrandDev ) end - # Link button style sig do returns( T.nilable( @@ -410,7 +376,6 @@ module BrandDev end attr_writer :link - # Primary button style sig do returns( T.nilable( @@ -428,7 +393,6 @@ module BrandDev end attr_writer :primary - # Secondary button style sig do returns( T.nilable( @@ -457,14 +421,7 @@ module BrandDev BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button::Secondary::OrHash ).returns(T.attached_class) end - def self.new( - # Link button style - link: nil, - # Primary button style - primary: nil, - # Secondary button style - secondary: nil - ) + def self.new(link: nil, primary: nil, secondary: nil) end sig do @@ -491,73 +448,75 @@ module BrandDev ) end - sig { returns(T.nilable(String)) } - attr_reader :background_color + sig { returns(String) } + attr_accessor :background_color - sig { params(background_color: String).void } - attr_writer :background_color + # Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has + # alpha) + sig { returns(String) } + attr_accessor :border_color - sig { returns(T.nilable(String)) } - attr_reader :border_color + sig { returns(String) } + attr_accessor :border_radius - sig { params(border_color: String).void } - attr_writer :border_color + sig { returns(String) } + attr_accessor :border_style - sig { returns(T.nilable(String)) } - attr_reader :border_radius - - sig { params(border_radius: String).void } - attr_writer :border_radius - - sig { returns(T.nilable(String)) } - attr_reader :border_style + sig { returns(String) } + attr_accessor :border_width - sig { params(border_style: String).void } - attr_writer :border_style + # Computed box-shadow (comma-separated layers when present) + sig { returns(String) } + attr_accessor :box_shadow - sig { returns(T.nilable(String)) } - attr_reader :border_width + sig { returns(String) } + attr_accessor :color - sig { params(border_width: String).void } - attr_writer :border_width + # Ready-to-use CSS declaration block for this component style + sig { returns(String) } + attr_accessor :css - sig { returns(T.nilable(String)) } - attr_reader :box_shadow + sig { returns(String) } + attr_accessor :font_size - sig { params(box_shadow: String).void } - attr_writer :box_shadow + sig { returns(Float) } + attr_accessor :font_weight - sig { returns(T.nilable(String)) } - attr_reader :color + # Sampled minimum height of the button box (typically px) + sig { returns(String) } + attr_accessor :min_height - sig { params(color: String).void } - attr_writer :color + # Sampled minimum width of the button box (typically px) + sig { returns(String) } + attr_accessor :min_width - sig { returns(T.nilable(String)) } - attr_reader :font_size + sig { returns(String) } + attr_accessor :padding - sig { params(font_size: String).void } - attr_writer :font_size + sig { returns(String) } + attr_accessor :text_decoration - sig { returns(T.nilable(Float)) } - attr_reader :font_weight + # Full ordered font list from computed font-family + sig { returns(T.nilable(T::Array[String])) } + attr_reader :font_fallbacks - sig { params(font_weight: Float).void } - attr_writer :font_weight + sig { params(font_fallbacks: T::Array[String]).void } + attr_writer :font_fallbacks + # Primary button typeface (first in fontFallbacks) sig { returns(T.nilable(String)) } - attr_reader :padding + attr_reader :font_family - sig { params(padding: String).void } - attr_writer :padding + sig { params(font_family: String).void } + attr_writer :font_family + # Hex color of the underline when it differs from the text color sig { returns(T.nilable(String)) } - attr_reader :text_decoration + attr_reader :text_decoration_color - sig { params(text_decoration: String).void } - attr_writer :text_decoration + sig { params(text_decoration_color: String).void } + attr_writer :text_decoration_color - # Link button style sig do params( background_color: String, @@ -567,24 +526,45 @@ module BrandDev border_width: String, box_shadow: String, color: String, + css: String, font_size: String, font_weight: Float, + min_height: String, + min_width: String, padding: String, - text_decoration: String + text_decoration: String, + font_fallbacks: T::Array[String], + font_family: String, + text_decoration_color: String ).returns(T.attached_class) end def self.new( - background_color: nil, - border_color: nil, - border_radius: nil, - border_style: nil, - border_width: nil, - box_shadow: nil, - color: nil, - font_size: nil, - font_weight: nil, - padding: nil, - text_decoration: nil + background_color:, + # Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has + # alpha) + border_color:, + border_radius:, + border_style:, + border_width:, + # Computed box-shadow (comma-separated layers when present) + box_shadow:, + color:, + # Ready-to-use CSS declaration block for this component style + css:, + font_size:, + font_weight:, + # Sampled minimum height of the button box (typically px) + min_height:, + # Sampled minimum width of the button box (typically px) + min_width:, + padding:, + text_decoration:, + # Full ordered font list from computed font-family + font_fallbacks: nil, + # Primary button typeface (first in fontFallbacks) + font_family: nil, + # Hex color of the underline when it differs from the text color + text_decoration_color: nil ) end @@ -598,10 +578,16 @@ module BrandDev border_width: String, box_shadow: String, color: String, + css: String, font_size: String, font_weight: Float, + min_height: String, + min_width: String, padding: String, - text_decoration: String + text_decoration: String, + font_fallbacks: T::Array[String], + font_family: String, + text_decoration_color: String } ) end @@ -618,73 +604,75 @@ module BrandDev ) end - sig { returns(T.nilable(String)) } - attr_reader :background_color + sig { returns(String) } + attr_accessor :background_color - sig { params(background_color: String).void } - attr_writer :background_color + # Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has + # alpha) + sig { returns(String) } + attr_accessor :border_color - sig { returns(T.nilable(String)) } - attr_reader :border_color + sig { returns(String) } + attr_accessor :border_radius - sig { params(border_color: String).void } - attr_writer :border_color + sig { returns(String) } + attr_accessor :border_style - sig { returns(T.nilable(String)) } - attr_reader :border_radius + sig { returns(String) } + attr_accessor :border_width - sig { params(border_radius: String).void } - attr_writer :border_radius + # Computed box-shadow (comma-separated layers when present) + sig { returns(String) } + attr_accessor :box_shadow - sig { returns(T.nilable(String)) } - attr_reader :border_style + sig { returns(String) } + attr_accessor :color - sig { params(border_style: String).void } - attr_writer :border_style + # Ready-to-use CSS declaration block for this component style + sig { returns(String) } + attr_accessor :css - sig { returns(T.nilable(String)) } - attr_reader :border_width - - sig { params(border_width: String).void } - attr_writer :border_width - - sig { returns(T.nilable(String)) } - attr_reader :box_shadow + sig { returns(String) } + attr_accessor :font_size - sig { params(box_shadow: String).void } - attr_writer :box_shadow + sig { returns(Float) } + attr_accessor :font_weight - sig { returns(T.nilable(String)) } - attr_reader :color + # Sampled minimum height of the button box (typically px) + sig { returns(String) } + attr_accessor :min_height - sig { params(color: String).void } - attr_writer :color + # Sampled minimum width of the button box (typically px) + sig { returns(String) } + attr_accessor :min_width - sig { returns(T.nilable(String)) } - attr_reader :font_size + sig { returns(String) } + attr_accessor :padding - sig { params(font_size: String).void } - attr_writer :font_size + sig { returns(String) } + attr_accessor :text_decoration - sig { returns(T.nilable(Float)) } - attr_reader :font_weight + # Full ordered font list from computed font-family + sig { returns(T.nilable(T::Array[String])) } + attr_reader :font_fallbacks - sig { params(font_weight: Float).void } - attr_writer :font_weight + sig { params(font_fallbacks: T::Array[String]).void } + attr_writer :font_fallbacks + # Primary button typeface (first in fontFallbacks) sig { returns(T.nilable(String)) } - attr_reader :padding + attr_reader :font_family - sig { params(padding: String).void } - attr_writer :padding + sig { params(font_family: String).void } + attr_writer :font_family + # Hex color of the underline when it differs from the text color sig { returns(T.nilable(String)) } - attr_reader :text_decoration + attr_reader :text_decoration_color - sig { params(text_decoration: String).void } - attr_writer :text_decoration + sig { params(text_decoration_color: String).void } + attr_writer :text_decoration_color - # Primary button style sig do params( background_color: String, @@ -694,24 +682,45 @@ module BrandDev border_width: String, box_shadow: String, color: String, + css: String, font_size: String, font_weight: Float, + min_height: String, + min_width: String, padding: String, - text_decoration: String + text_decoration: String, + font_fallbacks: T::Array[String], + font_family: String, + text_decoration_color: String ).returns(T.attached_class) end def self.new( - background_color: nil, - border_color: nil, - border_radius: nil, - border_style: nil, - border_width: nil, - box_shadow: nil, - color: nil, - font_size: nil, - font_weight: nil, - padding: nil, - text_decoration: nil + background_color:, + # Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has + # alpha) + border_color:, + border_radius:, + border_style:, + border_width:, + # Computed box-shadow (comma-separated layers when present) + box_shadow:, + color:, + # Ready-to-use CSS declaration block for this component style + css:, + font_size:, + font_weight:, + # Sampled minimum height of the button box (typically px) + min_height:, + # Sampled minimum width of the button box (typically px) + min_width:, + padding:, + text_decoration:, + # Full ordered font list from computed font-family + font_fallbacks: nil, + # Primary button typeface (first in fontFallbacks) + font_family: nil, + # Hex color of the underline when it differs from the text color + text_decoration_color: nil ) end @@ -725,10 +734,16 @@ module BrandDev border_width: String, box_shadow: String, color: String, + css: String, font_size: String, font_weight: Float, + min_height: String, + min_width: String, padding: String, - text_decoration: String + text_decoration: String, + font_fallbacks: T::Array[String], + font_family: String, + text_decoration_color: String } ) end @@ -745,73 +760,75 @@ module BrandDev ) end - sig { returns(T.nilable(String)) } - attr_reader :background_color - - sig { params(background_color: String).void } - attr_writer :background_color + sig { returns(String) } + attr_accessor :background_color - sig { returns(T.nilable(String)) } - attr_reader :border_color + # Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has + # alpha) + sig { returns(String) } + attr_accessor :border_color - sig { params(border_color: String).void } - attr_writer :border_color + sig { returns(String) } + attr_accessor :border_radius - sig { returns(T.nilable(String)) } - attr_reader :border_radius + sig { returns(String) } + attr_accessor :border_style - sig { params(border_radius: String).void } - attr_writer :border_radius + sig { returns(String) } + attr_accessor :border_width - sig { returns(T.nilable(String)) } - attr_reader :border_style + # Computed box-shadow (comma-separated layers when present) + sig { returns(String) } + attr_accessor :box_shadow - sig { params(border_style: String).void } - attr_writer :border_style + sig { returns(String) } + attr_accessor :color - sig { returns(T.nilable(String)) } - attr_reader :border_width + # Ready-to-use CSS declaration block for this component style + sig { returns(String) } + attr_accessor :css - sig { params(border_width: String).void } - attr_writer :border_width + sig { returns(String) } + attr_accessor :font_size - sig { returns(T.nilable(String)) } - attr_reader :box_shadow - - sig { params(box_shadow: String).void } - attr_writer :box_shadow + sig { returns(Float) } + attr_accessor :font_weight - sig { returns(T.nilable(String)) } - attr_reader :color + # Sampled minimum height of the button box (typically px) + sig { returns(String) } + attr_accessor :min_height - sig { params(color: String).void } - attr_writer :color + # Sampled minimum width of the button box (typically px) + sig { returns(String) } + attr_accessor :min_width - sig { returns(T.nilable(String)) } - attr_reader :font_size + sig { returns(String) } + attr_accessor :padding - sig { params(font_size: String).void } - attr_writer :font_size + sig { returns(String) } + attr_accessor :text_decoration - sig { returns(T.nilable(Float)) } - attr_reader :font_weight + # Full ordered font list from computed font-family + sig { returns(T.nilable(T::Array[String])) } + attr_reader :font_fallbacks - sig { params(font_weight: Float).void } - attr_writer :font_weight + sig { params(font_fallbacks: T::Array[String]).void } + attr_writer :font_fallbacks + # Primary button typeface (first in fontFallbacks) sig { returns(T.nilable(String)) } - attr_reader :padding + attr_reader :font_family - sig { params(padding: String).void } - attr_writer :padding + sig { params(font_family: String).void } + attr_writer :font_family + # Hex color of the underline when it differs from the text color sig { returns(T.nilable(String)) } - attr_reader :text_decoration + attr_reader :text_decoration_color - sig { params(text_decoration: String).void } - attr_writer :text_decoration + sig { params(text_decoration_color: String).void } + attr_writer :text_decoration_color - # Secondary button style sig do params( background_color: String, @@ -821,24 +838,45 @@ module BrandDev border_width: String, box_shadow: String, color: String, + css: String, font_size: String, font_weight: Float, + min_height: String, + min_width: String, padding: String, - text_decoration: String + text_decoration: String, + font_fallbacks: T::Array[String], + font_family: String, + text_decoration_color: String ).returns(T.attached_class) end def self.new( - background_color: nil, - border_color: nil, - border_radius: nil, - border_style: nil, - border_width: nil, - box_shadow: nil, - color: nil, - font_size: nil, - font_weight: nil, - padding: nil, - text_decoration: nil + background_color:, + # Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has + # alpha) + border_color:, + border_radius:, + border_style:, + border_width:, + # Computed box-shadow (comma-separated layers when present) + box_shadow:, + color:, + # Ready-to-use CSS declaration block for this component style + css:, + font_size:, + font_weight:, + # Sampled minimum height of the button box (typically px) + min_height:, + # Sampled minimum width of the button box (typically px) + min_width:, + padding:, + text_decoration:, + # Full ordered font list from computed font-family + font_fallbacks: nil, + # Primary button typeface (first in fontFallbacks) + font_family: nil, + # Hex color of the underline when it differs from the text color + text_decoration_color: nil ) end @@ -852,10 +890,16 @@ module BrandDev border_width: String, box_shadow: String, color: String, + css: String, font_size: String, font_weight: Float, + min_height: String, + min_width: String, padding: String, - text_decoration: String + text_decoration: String, + font_fallbacks: T::Array[String], + font_family: String, + text_decoration_color: String } ) end @@ -873,53 +917,35 @@ module BrandDev ) end - sig { returns(T.nilable(String)) } - attr_reader :background_color - - sig { params(background_color: String).void } - attr_writer :background_color - - sig { returns(T.nilable(String)) } - attr_reader :border_color - - sig { params(border_color: String).void } - attr_writer :border_color + sig { returns(String) } + attr_accessor :background_color - sig { returns(T.nilable(String)) } - attr_reader :border_radius + # Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has + # alpha) + sig { returns(String) } + attr_accessor :border_color - sig { params(border_radius: String).void } - attr_writer :border_radius + sig { returns(String) } + attr_accessor :border_radius - sig { returns(T.nilable(String)) } - attr_reader :border_style + sig { returns(String) } + attr_accessor :border_style - sig { params(border_style: String).void } - attr_writer :border_style + sig { returns(String) } + attr_accessor :border_width - sig { returns(T.nilable(String)) } - attr_reader :border_width + sig { returns(String) } + attr_accessor :box_shadow - sig { params(border_width: String).void } - attr_writer :border_width + # Ready-to-use CSS declaration block for this component style + sig { returns(String) } + attr_accessor :css - sig { returns(T.nilable(String)) } - attr_reader :box_shadow + sig { returns(String) } + attr_accessor :padding - sig { params(box_shadow: String).void } - attr_writer :box_shadow - - sig { returns(T.nilable(String)) } - attr_reader :padding - - sig { params(padding: String).void } - attr_writer :padding - - sig { returns(T.nilable(String)) } - attr_reader :text_color - - sig { params(text_color: String).void } - attr_writer :text_color + sig { returns(String) } + attr_accessor :text_color # Card component style sig do @@ -930,19 +956,24 @@ module BrandDev border_style: String, border_width: String, box_shadow: String, + css: String, padding: String, text_color: String ).returns(T.attached_class) end def self.new( - background_color: nil, - border_color: nil, - border_radius: nil, - border_style: nil, - border_width: nil, - box_shadow: nil, - padding: nil, - text_color: nil + background_color:, + # Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has + # alpha) + border_color:, + border_radius:, + border_style:, + border_width:, + box_shadow:, + # Ready-to-use CSS declaration block for this component style + css:, + padding:, + text_color: ) end @@ -955,6 +986,7 @@ module BrandDev border_style: String, border_width: String, box_shadow: String, + css: String, padding: String, text_color: String } @@ -974,40 +1006,20 @@ module BrandDev ) end - # Large spacing value - sig { returns(T.nilable(String)) } - attr_reader :lg - - sig { params(lg: String).void } - attr_writer :lg - - # Medium spacing value - sig { returns(T.nilable(String)) } - attr_reader :md - - sig { params(md: String).void } - attr_writer :md - - # Small spacing value - sig { returns(T.nilable(String)) } - attr_reader :sm - - sig { params(sm: String).void } - attr_writer :sm + sig { returns(String) } + attr_accessor :lg - # Extra large spacing value - sig { returns(T.nilable(String)) } - attr_reader :xl + sig { returns(String) } + attr_accessor :md - sig { params(xl: String).void } - attr_writer :xl + sig { returns(String) } + attr_accessor :sm - # Extra small spacing value - sig { returns(T.nilable(String)) } - attr_reader :xs + sig { returns(String) } + attr_accessor :xl - sig { params(xs: String).void } - attr_writer :xs + sig { returns(String) } + attr_accessor :xs # Spacing system used on the website sig do @@ -1019,18 +1031,7 @@ module BrandDev xs: String ).returns(T.attached_class) end - def self.new( - # Large spacing value - lg: nil, - # Medium spacing value - md: nil, - # Small spacing value - sm: nil, - # Extra large spacing value - xl: nil, - # Extra small spacing value - xs: nil - ) + def self.new(lg:, md:, sm:, xl:, xs:) end sig do @@ -1086,40 +1087,20 @@ module BrandDev ) end - # Inner shadow value - sig { returns(T.nilable(String)) } - attr_reader :inner - - sig { params(inner: String).void } - attr_writer :inner - - # Large shadow value - sig { returns(T.nilable(String)) } - attr_reader :lg - - sig { params(lg: String).void } - attr_writer :lg + sig { returns(String) } + attr_accessor :inner - # Medium shadow value - sig { returns(T.nilable(String)) } - attr_reader :md + sig { returns(String) } + attr_accessor :lg - sig { params(md: String).void } - attr_writer :md + sig { returns(String) } + attr_accessor :md - # Small shadow value - sig { returns(T.nilable(String)) } - attr_reader :sm + sig { returns(String) } + attr_accessor :sm - sig { params(sm: String).void } - attr_writer :sm - - # Extra large shadow value - sig { returns(T.nilable(String)) } - attr_reader :xl - - sig { params(xl: String).void } - attr_writer :xl + sig { returns(String) } + attr_accessor :xl # Shadow styles used on the website sig do @@ -1131,18 +1112,7 @@ module BrandDev xl: String ).returns(T.attached_class) end - def self.new( - # Inner shadow value - inner: nil, - # Large shadow value - lg: nil, - # Medium shadow value - md: nil, - # Small shadow value - sm: nil, - # Extra large shadow value - xl: nil - ) + def self.new(inner:, lg:, md:, sm:, xl:) end sig do @@ -1166,9 +1136,7 @@ module BrandDev # Heading styles sig do returns( - T.nilable( - BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::Headings - ) + BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::Headings ) end attr_reader :headings @@ -1181,7 +1149,6 @@ module BrandDev end attr_writer :headings - # Paragraph text styles sig do returns( T.nilable( @@ -1210,8 +1177,7 @@ module BrandDev end def self.new( # Heading styles - headings: nil, - # Paragraph text styles + headings:, p_: nil ) end @@ -1348,38 +1314,29 @@ module BrandDev ) end - sig { returns(T.nilable(String)) } - attr_reader :font_family - - sig { params(font_family: String).void } - attr_writer :font_family - - sig { returns(T.nilable(String)) } - attr_reader :font_size - - sig { params(font_size: String).void } - attr_writer :font_size + # Full ordered font list from resolved computed font-family + sig { returns(T::Array[String]) } + attr_accessor :font_fallbacks - sig { returns(T.nilable(Float)) } - attr_reader :font_weight + # Primary face (first family in the computed stack) + sig { returns(String) } + attr_accessor :font_family - sig { params(font_weight: Float).void } - attr_writer :font_weight + sig { returns(String) } + attr_accessor :font_size - sig { returns(T.nilable(String)) } - attr_reader :letter_spacing + sig { returns(Float) } + attr_accessor :font_weight - sig { params(letter_spacing: String).void } - attr_writer :letter_spacing + sig { returns(String) } + attr_accessor :letter_spacing - sig { returns(T.nilable(String)) } - attr_reader :line_height - - sig { params(line_height: String).void } - attr_writer :line_height + sig { returns(String) } + attr_accessor :line_height sig do params( + font_fallbacks: T::Array[String], font_family: String, font_size: String, font_weight: Float, @@ -1388,17 +1345,21 @@ module BrandDev ).returns(T.attached_class) end def self.new( - font_family: nil, - font_size: nil, - font_weight: nil, - letter_spacing: nil, - line_height: nil + # Full ordered font list from resolved computed font-family + font_fallbacks:, + # Primary face (first family in the computed stack) + font_family:, + font_size:, + font_weight:, + letter_spacing:, + line_height: ) end sig do override.returns( { + font_fallbacks: T::Array[String], font_family: String, font_size: String, font_weight: Float, @@ -1420,38 +1381,29 @@ module BrandDev ) end - sig { returns(T.nilable(String)) } - attr_reader :font_family - - sig { params(font_family: String).void } - attr_writer :font_family - - sig { returns(T.nilable(String)) } - attr_reader :font_size + # Full ordered font list from resolved computed font-family + sig { returns(T::Array[String]) } + attr_accessor :font_fallbacks - sig { params(font_size: String).void } - attr_writer :font_size + # Primary face (first family in the computed stack) + sig { returns(String) } + attr_accessor :font_family - sig { returns(T.nilable(Float)) } - attr_reader :font_weight + sig { returns(String) } + attr_accessor :font_size - sig { params(font_weight: Float).void } - attr_writer :font_weight + sig { returns(Float) } + attr_accessor :font_weight - sig { returns(T.nilable(String)) } - attr_reader :letter_spacing + sig { returns(String) } + attr_accessor :letter_spacing - sig { params(letter_spacing: String).void } - attr_writer :letter_spacing - - sig { returns(T.nilable(String)) } - attr_reader :line_height - - sig { params(line_height: String).void } - attr_writer :line_height + sig { returns(String) } + attr_accessor :line_height sig do params( + font_fallbacks: T::Array[String], font_family: String, font_size: String, font_weight: Float, @@ -1460,17 +1412,21 @@ module BrandDev ).returns(T.attached_class) end def self.new( - font_family: nil, - font_size: nil, - font_weight: nil, - letter_spacing: nil, - line_height: nil + # Full ordered font list from resolved computed font-family + font_fallbacks:, + # Primary face (first family in the computed stack) + font_family:, + font_size:, + font_weight:, + letter_spacing:, + line_height: ) end sig do override.returns( { + font_fallbacks: T::Array[String], font_family: String, font_size: String, font_weight: Float, @@ -1492,38 +1448,29 @@ module BrandDev ) end - sig { returns(T.nilable(String)) } - attr_reader :font_family - - sig { params(font_family: String).void } - attr_writer :font_family + # Full ordered font list from resolved computed font-family + sig { returns(T::Array[String]) } + attr_accessor :font_fallbacks - sig { returns(T.nilable(String)) } - attr_reader :font_size + # Primary face (first family in the computed stack) + sig { returns(String) } + attr_accessor :font_family - sig { params(font_size: String).void } - attr_writer :font_size - - sig { returns(T.nilable(Float)) } - attr_reader :font_weight - - sig { params(font_weight: Float).void } - attr_writer :font_weight - - sig { returns(T.nilable(String)) } - attr_reader :letter_spacing + sig { returns(String) } + attr_accessor :font_size - sig { params(letter_spacing: String).void } - attr_writer :letter_spacing + sig { returns(Float) } + attr_accessor :font_weight - sig { returns(T.nilable(String)) } - attr_reader :line_height + sig { returns(String) } + attr_accessor :letter_spacing - sig { params(line_height: String).void } - attr_writer :line_height + sig { returns(String) } + attr_accessor :line_height sig do params( + font_fallbacks: T::Array[String], font_family: String, font_size: String, font_weight: Float, @@ -1532,17 +1479,21 @@ module BrandDev ).returns(T.attached_class) end def self.new( - font_family: nil, - font_size: nil, - font_weight: nil, - letter_spacing: nil, - line_height: nil + # Full ordered font list from resolved computed font-family + font_fallbacks:, + # Primary face (first family in the computed stack) + font_family:, + font_size:, + font_weight:, + letter_spacing:, + line_height: ) end sig do override.returns( { + font_fallbacks: T::Array[String], font_family: String, font_size: String, font_weight: Float, @@ -1564,38 +1515,29 @@ module BrandDev ) end - sig { returns(T.nilable(String)) } - attr_reader :font_family - - sig { params(font_family: String).void } - attr_writer :font_family - - sig { returns(T.nilable(String)) } - attr_reader :font_size - - sig { params(font_size: String).void } - attr_writer :font_size + # Full ordered font list from resolved computed font-family + sig { returns(T::Array[String]) } + attr_accessor :font_fallbacks - sig { returns(T.nilable(Float)) } - attr_reader :font_weight + # Primary face (first family in the computed stack) + sig { returns(String) } + attr_accessor :font_family - sig { params(font_weight: Float).void } - attr_writer :font_weight + sig { returns(String) } + attr_accessor :font_size - sig { returns(T.nilable(String)) } - attr_reader :letter_spacing + sig { returns(Float) } + attr_accessor :font_weight - sig { params(letter_spacing: String).void } - attr_writer :letter_spacing + sig { returns(String) } + attr_accessor :letter_spacing - sig { returns(T.nilable(String)) } - attr_reader :line_height - - sig { params(line_height: String).void } - attr_writer :line_height + sig { returns(String) } + attr_accessor :line_height sig do params( + font_fallbacks: T::Array[String], font_family: String, font_size: String, font_weight: Float, @@ -1604,17 +1546,21 @@ module BrandDev ).returns(T.attached_class) end def self.new( - font_family: nil, - font_size: nil, - font_weight: nil, - letter_spacing: nil, - line_height: nil + # Full ordered font list from resolved computed font-family + font_fallbacks:, + # Primary face (first family in the computed stack) + font_family:, + font_size:, + font_weight:, + letter_spacing:, + line_height: ) end sig do override.returns( { + font_fallbacks: T::Array[String], font_family: String, font_size: String, font_weight: Float, @@ -1637,39 +1583,29 @@ module BrandDev ) end - sig { returns(T.nilable(String)) } - attr_reader :font_family - - sig { params(font_family: String).void } - attr_writer :font_family - - sig { returns(T.nilable(String)) } - attr_reader :font_size - - sig { params(font_size: String).void } - attr_writer :font_size - - sig { returns(T.nilable(Float)) } - attr_reader :font_weight + # Full ordered font list from resolved computed font-family + sig { returns(T::Array[String]) } + attr_accessor :font_fallbacks - sig { params(font_weight: Float).void } - attr_writer :font_weight + # Primary face (first family in the computed stack) + sig { returns(String) } + attr_accessor :font_family - sig { returns(T.nilable(String)) } - attr_reader :letter_spacing + sig { returns(String) } + attr_accessor :font_size - sig { params(letter_spacing: String).void } - attr_writer :letter_spacing + sig { returns(Float) } + attr_accessor :font_weight - sig { returns(T.nilable(String)) } - attr_reader :line_height + sig { returns(String) } + attr_accessor :letter_spacing - sig { params(line_height: String).void } - attr_writer :line_height + sig { returns(String) } + attr_accessor :line_height - # Paragraph text styles sig do params( + font_fallbacks: T::Array[String], font_family: String, font_size: String, font_weight: Float, @@ -1678,17 +1614,21 @@ module BrandDev ).returns(T.attached_class) end def self.new( - font_family: nil, - font_size: nil, - font_weight: nil, - letter_spacing: nil, - line_height: nil + # Full ordered font list from resolved computed font-family + font_fallbacks:, + # Primary face (first family in the computed stack) + font_family:, + font_size:, + font_weight:, + letter_spacing:, + line_height: ) end sig do override.returns( { + font_fallbacks: T::Array[String], font_family: String, font_size: String, font_weight: Float, diff --git a/rbi/brand_dev/resources/brand.rbi b/rbi/brand_dev/resources/brand.rbi index 7a8cfd3..40f6081 100644 --- a/rbi/brand_dev/resources/brand.rbi +++ b/rbi/brand_dev/resources/brand.rbi @@ -441,7 +441,6 @@ module BrandDev params( direct_url: String, domain: String, - prioritize: BrandDev::BrandStyleguideParams::Prioritize::OrSymbol, timeout_ms: Integer, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandStyleguideResponse) @@ -453,11 +452,6 @@ module BrandDev # Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The # domain will be automatically normalized and validated. domain: nil, - # Optional parameter to prioritize screenshot capture for styleguide extraction. - # If 'speed', optimizes for faster capture with basic quality. If 'quality', - # optimizes for higher quality with longer wait times. Defaults to 'quality' if - # not provided. - prioritize: nil, # Optional timeout in milliseconds for the request. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). diff --git a/sig/brand_dev/internal/util.rbs b/sig/brand_dev/internal/util.rbs index c8b6b90..2d700b6 100644 --- a/sig/brand_dev/internal/util.rbs +++ b/sig/brand_dev/internal/util.rbs @@ -45,8 +45,12 @@ module BrandDev -> top? } -> top? + RFC_3986_NOT_PCHARS: Regexp + def self?.uri_origin: (URI::Generic uri) -> String + def self?.encode_path: (String | Integer path) -> String + def self?.interpolate_path: (String | ::Array[String] path) -> String def self?.decode_query: (String? query) -> ::Hash[String, ::Array[String]] diff --git a/sig/brand_dev/models/brand_styleguide_params.rbs b/sig/brand_dev/models/brand_styleguide_params.rbs index 6985e43..0d98deb 100644 --- a/sig/brand_dev/models/brand_styleguide_params.rbs +++ b/sig/brand_dev/models/brand_styleguide_params.rbs @@ -1,12 +1,7 @@ module BrandDev module Models type brand_styleguide_params = - { - direct_url: String, - domain: String, - prioritize: BrandDev::Models::BrandStyleguideParams::prioritize, - timeout_ms: Integer - } + { direct_url: String, domain: String, timeout_ms: Integer } & BrandDev::Internal::Type::request_parameters class BrandStyleguideParams < BrandDev::Internal::Type::BaseModel @@ -21,12 +16,6 @@ module BrandDev def domain=: (String) -> String - attr_reader prioritize: BrandDev::Models::BrandStyleguideParams::prioritize? - - def prioritize=: ( - BrandDev::Models::BrandStyleguideParams::prioritize - ) -> BrandDev::Models::BrandStyleguideParams::prioritize - attr_reader timeout_ms: Integer? def timeout_ms=: (Integer) -> Integer @@ -34,7 +23,6 @@ module BrandDev def initialize: ( ?direct_url: String, ?domain: String, - ?prioritize: BrandDev::Models::BrandStyleguideParams::prioritize, ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> void @@ -42,21 +30,9 @@ module BrandDev def to_hash: -> { direct_url: String, domain: String, - prioritize: BrandDev::Models::BrandStyleguideParams::prioritize, timeout_ms: Integer, request_options: BrandDev::RequestOptions } - - type prioritize = :speed | :quality - - module Prioritize - extend BrandDev::Internal::Type::Enum - - SPEED: :speed - QUALITY: :quality - - def self?.values: -> ::Array[BrandDev::Models::BrandStyleguideParams::prioritize] - end end end end diff --git a/sig/brand_dev/models/brand_styleguide_response.rbs b/sig/brand_dev/models/brand_styleguide_response.rbs index 9528272..185b941 100644 --- a/sig/brand_dev/models/brand_styleguide_response.rbs +++ b/sig/brand_dev/models/brand_styleguide_response.rbs @@ -52,49 +52,25 @@ module BrandDev } class Styleguide < BrandDev::Internal::Type::BaseModel - attr_reader colors: BrandDev::Models::BrandStyleguideResponse::Styleguide::Colors? + attr_accessor colors: BrandDev::Models::BrandStyleguideResponse::Styleguide::Colors - def colors=: ( - BrandDev::Models::BrandStyleguideResponse::Styleguide::Colors - ) -> BrandDev::Models::BrandStyleguideResponse::Styleguide::Colors + attr_accessor components: BrandDev::Models::BrandStyleguideResponse::Styleguide::Components - attr_reader components: BrandDev::Models::BrandStyleguideResponse::Styleguide::Components? + attr_accessor element_spacing: BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing - def components=: ( - BrandDev::Models::BrandStyleguideResponse::Styleguide::Components - ) -> BrandDev::Models::BrandStyleguideResponse::Styleguide::Components + attr_accessor mode: BrandDev::Models::BrandStyleguideResponse::Styleguide::mode - attr_reader element_spacing: BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing? + attr_accessor shadows: BrandDev::Models::BrandStyleguideResponse::Styleguide::Shadows - def element_spacing=: ( - BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing - ) -> BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing - - attr_reader mode: BrandDev::Models::BrandStyleguideResponse::Styleguide::mode? - - def mode=: ( - BrandDev::Models::BrandStyleguideResponse::Styleguide::mode - ) -> BrandDev::Models::BrandStyleguideResponse::Styleguide::mode - - attr_reader shadows: BrandDev::Models::BrandStyleguideResponse::Styleguide::Shadows? - - def shadows=: ( - BrandDev::Models::BrandStyleguideResponse::Styleguide::Shadows - ) -> BrandDev::Models::BrandStyleguideResponse::Styleguide::Shadows - - attr_reader typography: BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography? - - def typography=: ( - BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography - ) -> BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography + attr_accessor typography: BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography def initialize: ( - ?colors: BrandDev::Models::BrandStyleguideResponse::Styleguide::Colors, - ?components: BrandDev::Models::BrandStyleguideResponse::Styleguide::Components, - ?element_spacing: BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing, - ?mode: BrandDev::Models::BrandStyleguideResponse::Styleguide::mode, - ?shadows: BrandDev::Models::BrandStyleguideResponse::Styleguide::Shadows, - ?typography: BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography + colors: BrandDev::Models::BrandStyleguideResponse::Styleguide::Colors, + components: BrandDev::Models::BrandStyleguideResponse::Styleguide::Components, + element_spacing: BrandDev::Models::BrandStyleguideResponse::Styleguide::ElementSpacing, + mode: BrandDev::Models::BrandStyleguideResponse::Styleguide::mode, + shadows: BrandDev::Models::BrandStyleguideResponse::Styleguide::Shadows, + typography: BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography ) -> void def to_hash: -> { @@ -109,22 +85,16 @@ module BrandDev type colors = { accent: String, background: String, text: String } class Colors < BrandDev::Internal::Type::BaseModel - attr_reader accent: String? - - def accent=: (String) -> String - - attr_reader background: String? + attr_accessor accent: String - def background=: (String) -> String + attr_accessor background: String - attr_reader text: String? - - def text=: (String) -> String + attr_accessor text: String def initialize: ( - ?accent: String, - ?background: String, - ?text: String + accent: String, + background: String, + text: String ) -> void def to_hash: -> { accent: String, background: String, text: String } @@ -137,11 +107,7 @@ module BrandDev } class Components < BrandDev::Internal::Type::BaseModel - attr_reader button: BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button? - - def button=: ( - BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button - ) -> BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button + attr_accessor button: BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button attr_reader card: BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Card? @@ -150,7 +116,7 @@ module BrandDev ) -> BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Card def initialize: ( - ?button: BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button, + button: BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Button, ?card: BrandDev::Models::BrandStyleguideResponse::Styleguide::Components::Card ) -> void @@ -206,69 +172,77 @@ module BrandDev border_width: String, box_shadow: String, color: String, + css: String, font_size: String, font_weight: Float, + min_height: String, + min_width: String, padding: String, - text_decoration: String + text_decoration: String, + font_fallbacks: ::Array[String], + font_family: String, + text_decoration_color: String } class Link < BrandDev::Internal::Type::BaseModel - attr_reader background_color: String? - - def background_color=: (String) -> String + attr_accessor background_color: String - attr_reader border_color: String? + attr_accessor border_color: String - def border_color=: (String) -> String + attr_accessor border_radius: String - attr_reader border_radius: String? + attr_accessor border_style: String - def border_radius=: (String) -> String + attr_accessor border_width: String - attr_reader border_style: String? + attr_accessor box_shadow: String - def border_style=: (String) -> String + attr_accessor color: String - attr_reader border_width: String? + attr_accessor css: String - def border_width=: (String) -> String + attr_accessor font_size: String - attr_reader box_shadow: String? + attr_accessor font_weight: Float - def box_shadow=: (String) -> String + attr_accessor min_height: String - attr_reader color: String? + attr_accessor min_width: String - def color=: (String) -> String + attr_accessor padding: String - attr_reader font_size: String? + attr_accessor text_decoration: String - def font_size=: (String) -> String + attr_reader font_fallbacks: ::Array[String]? - attr_reader font_weight: Float? + def font_fallbacks=: (::Array[String]) -> ::Array[String] - def font_weight=: (Float) -> Float - - attr_reader padding: String? + attr_reader font_family: String? - def padding=: (String) -> String + def font_family=: (String) -> String - attr_reader text_decoration: String? + attr_reader text_decoration_color: String? - def text_decoration=: (String) -> String + def text_decoration_color=: (String) -> String def initialize: ( - ?background_color: String, - ?border_color: String, - ?border_radius: String, - ?border_style: String, - ?border_width: String, - ?box_shadow: String, - ?color: String, - ?font_size: String, - ?font_weight: Float, - ?padding: String, - ?text_decoration: String + background_color: String, + border_color: String, + border_radius: String, + border_style: String, + border_width: String, + box_shadow: String, + color: String, + css: String, + font_size: String, + font_weight: Float, + min_height: String, + min_width: String, + padding: String, + text_decoration: String, + ?font_fallbacks: ::Array[String], + ?font_family: String, + ?text_decoration_color: String ) -> void def to_hash: -> { @@ -279,10 +253,16 @@ module BrandDev border_width: String, box_shadow: String, color: String, + css: String, font_size: String, font_weight: Float, + min_height: String, + min_width: String, padding: String, - text_decoration: String + text_decoration: String, + font_fallbacks: ::Array[String], + font_family: String, + text_decoration_color: String } end @@ -295,69 +275,77 @@ module BrandDev border_width: String, box_shadow: String, color: String, + css: String, font_size: String, font_weight: Float, + min_height: String, + min_width: String, padding: String, - text_decoration: String + text_decoration: String, + font_fallbacks: ::Array[String], + font_family: String, + text_decoration_color: String } class Primary < BrandDev::Internal::Type::BaseModel - attr_reader background_color: String? - - def background_color=: (String) -> String + attr_accessor background_color: String - attr_reader border_color: String? + attr_accessor border_color: String - def border_color=: (String) -> String + attr_accessor border_radius: String - attr_reader border_radius: String? + attr_accessor border_style: String - def border_radius=: (String) -> String + attr_accessor border_width: String - attr_reader border_style: String? + attr_accessor box_shadow: String - def border_style=: (String) -> String + attr_accessor color: String - attr_reader border_width: String? + attr_accessor css: String - def border_width=: (String) -> String + attr_accessor font_size: String - attr_reader box_shadow: String? + attr_accessor font_weight: Float - def box_shadow=: (String) -> String + attr_accessor min_height: String - attr_reader color: String? + attr_accessor min_width: String - def color=: (String) -> String + attr_accessor padding: String - attr_reader font_size: String? + attr_accessor text_decoration: String - def font_size=: (String) -> String + attr_reader font_fallbacks: ::Array[String]? - attr_reader font_weight: Float? + def font_fallbacks=: (::Array[String]) -> ::Array[String] - def font_weight=: (Float) -> Float - - attr_reader padding: String? + attr_reader font_family: String? - def padding=: (String) -> String + def font_family=: (String) -> String - attr_reader text_decoration: String? + attr_reader text_decoration_color: String? - def text_decoration=: (String) -> String + def text_decoration_color=: (String) -> String def initialize: ( - ?background_color: String, - ?border_color: String, - ?border_radius: String, - ?border_style: String, - ?border_width: String, - ?box_shadow: String, - ?color: String, - ?font_size: String, - ?font_weight: Float, - ?padding: String, - ?text_decoration: String + background_color: String, + border_color: String, + border_radius: String, + border_style: String, + border_width: String, + box_shadow: String, + color: String, + css: String, + font_size: String, + font_weight: Float, + min_height: String, + min_width: String, + padding: String, + text_decoration: String, + ?font_fallbacks: ::Array[String], + ?font_family: String, + ?text_decoration_color: String ) -> void def to_hash: -> { @@ -368,10 +356,16 @@ module BrandDev border_width: String, box_shadow: String, color: String, + css: String, font_size: String, font_weight: Float, + min_height: String, + min_width: String, padding: String, - text_decoration: String + text_decoration: String, + font_fallbacks: ::Array[String], + font_family: String, + text_decoration_color: String } end @@ -384,69 +378,77 @@ module BrandDev border_width: String, box_shadow: String, color: String, + css: String, font_size: String, font_weight: Float, + min_height: String, + min_width: String, padding: String, - text_decoration: String + text_decoration: String, + font_fallbacks: ::Array[String], + font_family: String, + text_decoration_color: String } class Secondary < BrandDev::Internal::Type::BaseModel - attr_reader background_color: String? - - def background_color=: (String) -> String - - attr_reader border_color: String? + attr_accessor background_color: String - def border_color=: (String) -> String + attr_accessor border_color: String - attr_reader border_radius: String? + attr_accessor border_radius: String - def border_radius=: (String) -> String + attr_accessor border_style: String - attr_reader border_style: String? + attr_accessor border_width: String - def border_style=: (String) -> String + attr_accessor box_shadow: String - attr_reader border_width: String? + attr_accessor color: String - def border_width=: (String) -> String + attr_accessor css: String - attr_reader box_shadow: String? + attr_accessor font_size: String - def box_shadow=: (String) -> String + attr_accessor font_weight: Float - attr_reader color: String? + attr_accessor min_height: String - def color=: (String) -> String + attr_accessor min_width: String - attr_reader font_size: String? + attr_accessor padding: String - def font_size=: (String) -> String + attr_accessor text_decoration: String - attr_reader font_weight: Float? + attr_reader font_fallbacks: ::Array[String]? - def font_weight=: (Float) -> Float + def font_fallbacks=: (::Array[String]) -> ::Array[String] - attr_reader padding: String? + attr_reader font_family: String? - def padding=: (String) -> String + def font_family=: (String) -> String - attr_reader text_decoration: String? + attr_reader text_decoration_color: String? - def text_decoration=: (String) -> String + def text_decoration_color=: (String) -> String def initialize: ( - ?background_color: String, - ?border_color: String, - ?border_radius: String, - ?border_style: String, - ?border_width: String, - ?box_shadow: String, - ?color: String, - ?font_size: String, - ?font_weight: Float, - ?padding: String, - ?text_decoration: String + background_color: String, + border_color: String, + border_radius: String, + border_style: String, + border_width: String, + box_shadow: String, + color: String, + css: String, + font_size: String, + font_weight: Float, + min_height: String, + min_width: String, + padding: String, + text_decoration: String, + ?font_fallbacks: ::Array[String], + ?font_family: String, + ?text_decoration_color: String ) -> void def to_hash: -> { @@ -457,10 +459,16 @@ module BrandDev border_width: String, box_shadow: String, color: String, + css: String, font_size: String, font_weight: Float, + min_height: String, + min_width: String, padding: String, - text_decoration: String + text_decoration: String, + font_fallbacks: ::Array[String], + font_family: String, + text_decoration_color: String } end end @@ -473,52 +481,40 @@ module BrandDev border_style: String, border_width: String, box_shadow: String, + css: String, padding: String, text_color: String } class Card < BrandDev::Internal::Type::BaseModel - attr_reader background_color: String? - - def background_color=: (String) -> String - - attr_reader border_color: String? - - def border_color=: (String) -> String + attr_accessor background_color: String - attr_reader border_radius: String? + attr_accessor border_color: String - def border_radius=: (String) -> String + attr_accessor border_radius: String - attr_reader border_style: String? + attr_accessor border_style: String - def border_style=: (String) -> String + attr_accessor border_width: String - attr_reader border_width: String? + attr_accessor box_shadow: String - def border_width=: (String) -> String + attr_accessor css: String - attr_reader box_shadow: String? + attr_accessor padding: String - def box_shadow=: (String) -> String - - attr_reader padding: String? - - def padding=: (String) -> String - - attr_reader text_color: String? - - def text_color=: (String) -> String + attr_accessor text_color: String def initialize: ( - ?background_color: String, - ?border_color: String, - ?border_radius: String, - ?border_style: String, - ?border_width: String, - ?box_shadow: String, - ?padding: String, - ?text_color: String + background_color: String, + border_color: String, + border_radius: String, + border_style: String, + border_width: String, + box_shadow: String, + css: String, + padding: String, + text_color: String ) -> void def to_hash: -> { @@ -528,6 +524,7 @@ module BrandDev border_style: String, border_width: String, box_shadow: String, + css: String, padding: String, text_color: String } @@ -538,32 +535,22 @@ module BrandDev { lg: String, md: String, sm: String, xl: String, xs: String } class ElementSpacing < BrandDev::Internal::Type::BaseModel - attr_reader lg: String? - - def lg=: (String) -> String - - attr_reader md: String? - - def md=: (String) -> String - - attr_reader sm: String? + attr_accessor lg: String - def sm=: (String) -> String + attr_accessor md: String - attr_reader xl: String? + attr_accessor sm: String - def xl=: (String) -> String + attr_accessor xl: String - attr_reader xs: String? - - def xs=: (String) -> String + attr_accessor xs: String def initialize: ( - ?lg: String, - ?md: String, - ?sm: String, - ?xl: String, - ?xs: String + lg: String, + md: String, + sm: String, + xl: String, + xs: String ) -> void def to_hash: -> { @@ -590,32 +577,22 @@ module BrandDev { inner: String, lg: String, md: String, sm: String, xl: String } class Shadows < BrandDev::Internal::Type::BaseModel - attr_reader inner: String? - - def inner=: (String) -> String - - attr_reader lg: String? - - def lg=: (String) -> String - - attr_reader md: String? + attr_accessor inner: String - def md=: (String) -> String + attr_accessor lg: String - attr_reader sm: String? + attr_accessor md: String - def sm=: (String) -> String + attr_accessor sm: String - attr_reader xl: String? - - def xl=: (String) -> String + attr_accessor xl: String def initialize: ( - ?inner: String, - ?lg: String, - ?md: String, - ?sm: String, - ?xl: String + inner: String, + lg: String, + md: String, + sm: String, + xl: String ) -> void def to_hash: -> { @@ -634,11 +611,7 @@ module BrandDev } class Typography < BrandDev::Internal::Type::BaseModel - attr_reader headings: BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::Headings? - - def headings=: ( - BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::Headings - ) -> BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::Headings + attr_accessor headings: BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::Headings attr_reader p_: BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::P? @@ -647,7 +620,7 @@ module BrandDev ) -> BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::P def initialize: ( - ?headings: BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::Headings, + headings: BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::Headings, ?p_: BrandDev::Models::BrandStyleguideResponse::Styleguide::Typography::P ) -> void @@ -705,6 +678,7 @@ module BrandDev type h1 = { + font_fallbacks: ::Array[String], font_family: String, font_size: String, font_weight: Float, @@ -713,35 +687,29 @@ module BrandDev } class H1 < BrandDev::Internal::Type::BaseModel - attr_reader font_family: String? - - def font_family=: (String) -> String - - attr_reader font_size: String? - - def font_size=: (String) -> String + attr_accessor font_fallbacks: ::Array[String] - attr_reader font_weight: Float? + attr_accessor font_family: String - def font_weight=: (Float) -> Float + attr_accessor font_size: String - attr_reader letter_spacing: String? + attr_accessor font_weight: Float - def letter_spacing=: (String) -> String + attr_accessor letter_spacing: String - attr_reader line_height: String? - - def line_height=: (String) -> String + attr_accessor line_height: String def initialize: ( - ?font_family: String, - ?font_size: String, - ?font_weight: Float, - ?letter_spacing: String, - ?line_height: String + font_fallbacks: ::Array[String], + font_family: String, + font_size: String, + font_weight: Float, + letter_spacing: String, + line_height: String ) -> void def to_hash: -> { + font_fallbacks: ::Array[String], font_family: String, font_size: String, font_weight: Float, @@ -752,6 +720,7 @@ module BrandDev type h2 = { + font_fallbacks: ::Array[String], font_family: String, font_size: String, font_weight: Float, @@ -760,35 +729,29 @@ module BrandDev } class H2 < BrandDev::Internal::Type::BaseModel - attr_reader font_family: String? - - def font_family=: (String) -> String - - attr_reader font_size: String? - - def font_size=: (String) -> String + attr_accessor font_fallbacks: ::Array[String] - attr_reader font_weight: Float? + attr_accessor font_family: String - def font_weight=: (Float) -> Float + attr_accessor font_size: String - attr_reader letter_spacing: String? + attr_accessor font_weight: Float - def letter_spacing=: (String) -> String + attr_accessor letter_spacing: String - attr_reader line_height: String? - - def line_height=: (String) -> String + attr_accessor line_height: String def initialize: ( - ?font_family: String, - ?font_size: String, - ?font_weight: Float, - ?letter_spacing: String, - ?line_height: String + font_fallbacks: ::Array[String], + font_family: String, + font_size: String, + font_weight: Float, + letter_spacing: String, + line_height: String ) -> void def to_hash: -> { + font_fallbacks: ::Array[String], font_family: String, font_size: String, font_weight: Float, @@ -799,6 +762,7 @@ module BrandDev type h3 = { + font_fallbacks: ::Array[String], font_family: String, font_size: String, font_weight: Float, @@ -807,35 +771,29 @@ module BrandDev } class H3 < BrandDev::Internal::Type::BaseModel - attr_reader font_family: String? - - def font_family=: (String) -> String + attr_accessor font_fallbacks: ::Array[String] - attr_reader font_size: String? + attr_accessor font_family: String - def font_size=: (String) -> String + attr_accessor font_size: String - attr_reader font_weight: Float? + attr_accessor font_weight: Float - def font_weight=: (Float) -> Float + attr_accessor letter_spacing: String - attr_reader letter_spacing: String? - - def letter_spacing=: (String) -> String - - attr_reader line_height: String? - - def line_height=: (String) -> String + attr_accessor line_height: String def initialize: ( - ?font_family: String, - ?font_size: String, - ?font_weight: Float, - ?letter_spacing: String, - ?line_height: String + font_fallbacks: ::Array[String], + font_family: String, + font_size: String, + font_weight: Float, + letter_spacing: String, + line_height: String ) -> void def to_hash: -> { + font_fallbacks: ::Array[String], font_family: String, font_size: String, font_weight: Float, @@ -846,6 +804,7 @@ module BrandDev type h4 = { + font_fallbacks: ::Array[String], font_family: String, font_size: String, font_weight: Float, @@ -854,35 +813,29 @@ module BrandDev } class H4 < BrandDev::Internal::Type::BaseModel - attr_reader font_family: String? + attr_accessor font_fallbacks: ::Array[String] - def font_family=: (String) -> String - - attr_reader font_size: String? - - def font_size=: (String) -> String - - attr_reader font_weight: Float? - - def font_weight=: (Float) -> Float + attr_accessor font_family: String - attr_reader letter_spacing: String? + attr_accessor font_size: String - def letter_spacing=: (String) -> String + attr_accessor font_weight: Float - attr_reader line_height: String? + attr_accessor letter_spacing: String - def line_height=: (String) -> String + attr_accessor line_height: String def initialize: ( - ?font_family: String, - ?font_size: String, - ?font_weight: Float, - ?letter_spacing: String, - ?line_height: String + font_fallbacks: ::Array[String], + font_family: String, + font_size: String, + font_weight: Float, + letter_spacing: String, + line_height: String ) -> void def to_hash: -> { + font_fallbacks: ::Array[String], font_family: String, font_size: String, font_weight: Float, @@ -894,6 +847,7 @@ module BrandDev type p_ = { + font_fallbacks: ::Array[String], font_family: String, font_size: String, font_weight: Float, @@ -902,35 +856,29 @@ module BrandDev } class P < BrandDev::Internal::Type::BaseModel - attr_reader font_family: String? - - def font_family=: (String) -> String - - attr_reader font_size: String? - - def font_size=: (String) -> String - - attr_reader font_weight: Float? + attr_accessor font_fallbacks: ::Array[String] - def font_weight=: (Float) -> Float + attr_accessor font_family: String - attr_reader letter_spacing: String? + attr_accessor font_size: String - def letter_spacing=: (String) -> String + attr_accessor font_weight: Float - attr_reader line_height: String? + attr_accessor letter_spacing: String - def line_height=: (String) -> String + attr_accessor line_height: String def initialize: ( - ?font_family: String, - ?font_size: String, - ?font_weight: Float, - ?letter_spacing: String, - ?line_height: String + font_fallbacks: ::Array[String], + font_family: String, + font_size: String, + font_weight: Float, + letter_spacing: String, + line_height: String ) -> void def to_hash: -> { + font_fallbacks: ::Array[String], font_family: String, font_size: String, font_weight: Float, diff --git a/sig/brand_dev/resources/brand.rbs b/sig/brand_dev/resources/brand.rbs index a7ea916..9b9be50 100644 --- a/sig/brand_dev/resources/brand.rbs +++ b/sig/brand_dev/resources/brand.rbs @@ -118,7 +118,6 @@ module BrandDev def styleguide: ( ?direct_url: String, ?domain: String, - ?prioritize: BrandDev::Models::BrandStyleguideParams::prioritize, ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandStyleguideResponse