Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bf78fd7
Добавил генерацию border токенов
nschpy Mar 16, 2025
c98c15a
Фикс шаблона
nschpy Mar 17, 2025
ca1cd89
Исправил генерацию шаблона border
nschpy Mar 17, 2025
b7d7f8a
Генерация новых ресурсов в Demo проекте
nschpy Mar 17, 2025
635eeff
Добавил генерацию borderWidth токенов
nschpy Mar 17, 2025
0c58e21
Удалил лишний коментарий
nschpy Mar 20, 2025
03949f5
Merge pull request #87 from hhru/MOB-33712
nschpy Mar 20, 2025
85cf24e
Добавил основные типы для генерации градиентов
nschpy Mar 26, 2025
8ff0b43
Основная логика создания токенов градиента
nschpy Mar 26, 2025
90acb2b
Генерация градиентов
nschpy Mar 27, 2025
e80f6ca
Небольшие улучшения
nschpy Mar 28, 2025
82439e9
Исправил значение процентов в токене градиента
nschpy Mar 28, 2025
904e57d
Фикс базового шаблона
nschpy Mar 28, 2025
0ae8760
Добавление динамических тем
nschpy Mar 31, 2025
0e4fd4b
Исправил генераторы
nschpy Apr 1, 2025
8a402e9
Merge pull request #88 from hhru/MOB-44781
nschpy Apr 1, 2025
d39e0ed
Обновил модели токенов использующие темы
nschpy Apr 1, 2025
5c3d80b
Обновил шаблоны и удалил лишние логи из консоли
nschpy Apr 2, 2025
080edfa
Исправил генерацию значений для тем
nschpy Apr 3, 2025
a37844d
Исправление багов при генерации темы
nschpy Apr 3, 2025
3d8befc
Улучшения кода + исправил название градиентов в конфиге
nschpy Apr 7, 2025
9c012a4
Merge pull request #89 from hhru/THEMES_CONFIG
nschpy Apr 8, 2025
0f8fa4e
Исправил шаблоны
nschpy Apr 8, 2025
29de193
Обновил версию ubuntu
nschpy Apr 8, 2025
f3c9291
Исправил тесты
nschpy Apr 8, 2025
5247128
Фикс для билда на CI
nschpy Apr 8, 2025
28b718a
Merge pull request #92 from hhru/FIX_BUILD
nschpy Apr 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

linux:
name: Linux
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Ruby
Expand Down
8 changes: 8 additions & 0 deletions Demo/.figmagen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ shadowStyles:

tokens:
file: https://www.figma.com/file/W6dy4CFSZWUVpVnSzNZIxA/FigmaGen-Tokens-Demo
themes:
- hh-day
- hh-night
fallbackTheme: hh-day
templates:
colors:
- destination: FigmaGenDemo/Generated/ColorTokens.swift
Expand Down Expand Up @@ -66,6 +70,10 @@ tokens:
destination: FigmaGenDemo/Generated/SpacingTokens.swift
templateOptions:
publicAccess: true
borders:
destination: FigmaGenDemo/Generated/BorderTokens.swift
templateOptions:
publicAccess: true
theme:
destination: FigmaGenDemo/Generated/Theme.swift
templateOptions:
Expand Down
3 changes: 3 additions & 0 deletions Demo/FigmaGenDemo/Generated/BorderTokens.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// swiftlint:disable all
// Generated using FigmaGen - https://github.com/hhru/FigmaGen
// No border tokens found
39 changes: 24 additions & 15 deletions Demo/FigmaGenDemo/Generated/BoxShadowTokens.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,34 @@ import AppKit

public struct BoxShadowTokens {

/// level-1
///
/// Offset: day – x 0; y 4 / night – x 0; y 4
/// Radius: day – 12 / night – 12
/// Color: day – #7090b029 / night – #7090b029
/// - hh-day:
/// Offset: x 0; y 4
/// Radius: 12
/// Color: #7090b029
/// - hh-night:
/// Offset: x 0; y 4
/// Radius: 12
/// Color: #7090b029
public let level1: ShadowToken

/// level-2
///
/// Offset: day – x 0; y 8 / night – x 0; y 8
/// Radius: day – 16 / night – 16
/// Color: day – #7090b03d / night – #7090b03d
/// - hh-day:
/// Offset: x 0; y 8
/// Radius: 16
/// Color: #7090b03d
/// - hh-night:
/// Offset: x 0; y 8
/// Radius: 16
/// Color: #7090b03d
public let level2: ShadowToken

/// level-3
///
/// Offset: day – x 0; y 12 / night – x 0; y 12
/// Radius: day – 24 / night – 24
/// Color: day – #7090b052 / night – #7090b052
/// - hh-day:
/// Offset: x 0; y 12
/// Radius: 24
/// Color: #7090b052
/// - hh-night:
/// Offset: x 0; y 12
/// Radius: 24
/// Color: #7090b052
public let level3: ShadowToken
}

Expand Down
40 changes: 20 additions & 20 deletions Demo/FigmaGenDemo/Generated/ColorTokens.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,65 +11,65 @@ public struct ColorTokens {
public struct Accent {
/// accent.bg
///
/// Day: #c3dafe
/// Night: #434190
/// hh-day: #c3dafe
/// hh-night: #434190
public let bg: UIColor
/// accent.default
///
/// Day: #7f9cf5
/// Night: #5a67d8
/// hh-day: #7f9cf5
/// hh-night: #5a67d8
public let `default`: UIColor
/// accent.onAccent
///
/// Day: #ffffff
/// Night: #ffffff
/// hh-day: #ffffff
/// hh-night: #ffffff
public let onAccent: UIColor
}

public let accent: Accent
public struct Bg {
/// bg.default
///
/// Day: #ffffff
/// Night: #1a202c
/// hh-day: #ffffff
/// hh-night: #1a202c
public let `default`: UIColor
/// bg.muted
///
/// Day: #f7fafc
/// Night: #4a5568
/// hh-day: #f7fafc
/// hh-night: #4a5568
public let muted: UIColor
/// bg.subtle
///
/// Day: #edf2f7
/// Night: #718096
/// hh-day: #edf2f7
/// hh-night: #718096
public let subtle: UIColor
}

public let bg: Bg
public struct Fg {
/// fg.default
///
/// Day: #000000
/// Night: #ffffff
/// hh-day: #000000
/// hh-night: #ffffff
public let `default`: UIColor
/// fg.muted
///
/// Day: #4a5568
/// Night: #e2e8f0
/// hh-day: #4a5568
/// hh-night: #e2e8f0
public let muted: UIColor
/// fg.subtle
///
/// Day: #a0aec0
/// Night: #a0aec0
/// hh-day: #a0aec0
/// hh-night: #a0aec0
public let subtle: UIColor
}

public let fg: Fg
public struct Shadows {
/// shadows.default
///
/// Day: #1a202c
/// Night: #00000000
/// hh-day: #1a202c
/// hh-night: #00000000
public let `default`: UIColor
}

Expand Down
5 changes: 2 additions & 3 deletions Demo/FigmaGenDemo/Generated/Theme.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public struct Theme {

extension Theme {

public static let defaultLight = Self(
public static let hhDay = Self(
colors: ColorTokens(
accent: ColorTokens.Accent(
bg: UIColor(hex: 0xC3DAFEFF),
Expand Down Expand Up @@ -68,8 +68,7 @@ extension Theme {
)
)
)

public static let defaultDark = Self(
public static let hhNight = Self(
colors: ColorTokens(
accent: ColorTokens.Accent(
bg: UIColor(hex: 0x434190FF),
Expand Down
4 changes: 2 additions & 2 deletions Demo/FigmaGenDemo/Resources/Colors.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "FigmaGen"
"author" : "FigmaGen",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.35686275362968445",
"alpha" : "0.75",
"blue" : "0.5882353186607361",
"green" : "0.25882354378700256"
"green" : "0.25882354378700256",
"red" : "0.35686275362968445"
}
},
"idiom" : "universal"
}
]
],
"info" : {
"author" : "FigmaGen",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.2235294133424759",
"alpha" : "1.0",
"blue" : "0.2235294133424759",
"green" : "0.2235294133424759"
"green" : "0.2235294133424759",
"red" : "0.2235294133424759"
}
},
"idiom" : "universal"
}
]
],
"info" : {
"author" : "FigmaGen",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.25882354378700256",
"alpha" : "1.0",
"blue" : "0.5882353186607361",
"green" : "0.4901960790157318"
"green" : "0.4901960790157318",
"red" : "0.25882354378700256"
}
},
"idiom" : "universal"
}
]
],
"info" : {
"author" : "FigmaGen",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.25882354378700256",
"alpha" : "1.0",
"blue" : "0.4901960790157318",
"green" : "0.5882353186607361"
"green" : "0.5882353186607361",
"red" : "0.25882354378700256"
}
},
"idiom" : "universal"
}
]
],
"info" : {
"author" : "FigmaGen",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.8901960849761963",
"alpha" : "1.0",
"blue" : "0.3607843220233917",
"green" : "0.04313725605607033"
"green" : "0.04313725605607033",
"red" : "0.8901960849761963"
}
},
"idiom" : "universal"
}
]
],
"info" : {
"author" : "FigmaGen",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.8549019694328308",
"alpha" : "1.0",
"blue" : "0.8509804010391235",
"green" : "0.8549019694328308"
"green" : "0.8549019694328308",
"red" : "0.8549019694328308"
}
},
"idiom" : "universal"
}
]
],
"info" : {
"author" : "FigmaGen",
"version" : 1
}
}
Loading
Loading