Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ jobs:
- uses: actions/checkout@v5

- name: Build SPM package
run: xcodebuild build -scheme Nucleus -destination 'generic/platform=iOS' -skipPackagePluginValidation
run: xcodebuild build -scheme Nucleus-Package -destination 'generic/platform=iOS' -skipPackagePluginValidation
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
node_modules/
build/
/build/
.build/
.next/
*.DS_Store
*.idea/
.swiftpm/*
.swiftpm
.swiftpm/
.swiftpm/xcode/
11 changes: 11 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,22 @@ let package = Package(
name: "NucleusColors",
targets: ["NucleusColors"]
),
.library(
name: "NucleusFonts",
targets: ["NucleusFonts"]
),
],
targets: [
.target(
name: "NucleusColors",
path: "ios/Sources/NucleusColors"
),
.target(
name: "NucleusFonts",
path: "ios/Sources/NucleusFonts",
resources: [
.process("Resources/Fonts"),
]
),
]
)
289 changes: 185 additions & 104 deletions README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
// This file is auto-generated. Do not edit manually.

package com.worldcoin.nucleus.tokens

import androidx.compose.ui.text.font.Font
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.TextUnit
import androidx.compose.ui.unit.em
import androidx.compose.ui.unit.sp
import com.worldcoin.nucleus.R

/**
* A Nucleus design token font.
*
* Each value carries enough information to construct a Compose `TextStyle`. The `fontFamily` is
* wired to the bundled Nucleus font resource, so consumers never need to reference `R.font.*`
* directly. See `NucleusFonts` for the available tokens and the repo `README.md#typography-tokens`
* for usage guidance.
*/
data class NucleusFontStyle(
val fontFamily: FontFamily,
val fontSize: TextUnit,
val fontWeight: FontWeight,
val letterSpacing: TextUnit,
val lineHeight: TextUnit,
)

object NucleusFonts {
val d1 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 56.sp,
fontWeight = FontWeight(600),
letterSpacing = (-0.02).em,
lineHeight = (1.2).em,
)
val n1 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 44.sp,
fontWeight = FontWeight(600),
letterSpacing = (-0.01).em,
lineHeight = (1.2).em,
)
val n2 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 34.sp,
fontWeight = FontWeight(600),
letterSpacing = (-0.02).em,
lineHeight = (1.2).em,
)
val n3 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 30.sp,
fontWeight = FontWeight(600),
letterSpacing = (-0.01).em,
lineHeight = (1.2).em,
)
val n4 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 26.sp,
fontWeight = FontWeight(600),
letterSpacing = (-0.02).em,
lineHeight = (1.2).em,
)
val n5 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 19.sp,
fontWeight = FontWeight(600),
letterSpacing = (-0.02).em,
lineHeight = (1.2).em,
)
val h1 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 34.sp,
fontWeight = FontWeight(600),
letterSpacing = (-0.01).em,
lineHeight = (1.2).em,
)
val h2 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 30.sp,
fontWeight = FontWeight(600),
letterSpacing = (-0.01).em,
lineHeight = (1.2).em,
)
val h3 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 26.sp,
fontWeight = FontWeight(600),
letterSpacing = (-0.01).em,
lineHeight = (1.2).em,
)
val h4 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 20.sp,
fontWeight = FontWeight(600),
letterSpacing = (-0.01).em,
lineHeight = (1.2).em,
)
val s1 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 19.sp,
fontWeight = FontWeight(500),
letterSpacing = (0).em,
lineHeight = (1.2).em,
)
val s2 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 17.sp,
fontWeight = FontWeight(500),
letterSpacing = (0).em,
lineHeight = (1.2).em,
)
val s3 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 15.sp,
fontWeight = FontWeight(500),
letterSpacing = (0).em,
lineHeight = (1.2).em,
)
val s4 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 12.sp,
fontWeight = FontWeight(500),
letterSpacing = (0).em,
lineHeight = (1.2).em,
)
val l1 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 17.sp,
fontWeight = FontWeight(600),
letterSpacing = (0).em,
lineHeight = (1.2).em,
)
val l2 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 15.sp,
fontWeight = FontWeight(600),
letterSpacing = (0).em,
lineHeight = (1.2).em,
)
val l3 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 13.sp,
fontWeight = FontWeight(600),
letterSpacing = (0).em,
lineHeight = (1.2).em,
)
val b1 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 19.sp,
fontWeight = FontWeight(325),
letterSpacing = (0).em,
lineHeight = (1.3).em,
)
val b2 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 17.sp,
fontWeight = FontWeight(325),
letterSpacing = (0).em,
lineHeight = (1.3).em,
)
val b3 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 15.sp,
fontWeight = FontWeight(325),
letterSpacing = (0).em,
lineHeight = (1.3).em,
)
val b4 = NucleusFontStyle(
fontFamily = FontFamily(Font(R.font.world_pro_mvp)),
fontSize = 13.sp,
fontWeight = FontWeight(325),
letterSpacing = (0).em,
lineHeight = (1.3).em,
)
}
Binary file not shown.
172 changes: 172 additions & 0 deletions ios/Sources/NucleusFonts/NucleusFont+Defaults.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
// This file is auto-generated. Do not edit manually.

public extension NucleusFont {
static let d1 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 56,
weight: 600,
letterSpacing: -0.02,
lineHeight: 1.2,
dynamicTypeStyle: .largeTitle
)
static let n1 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 44,
weight: 600,
letterSpacing: -0.01,
lineHeight: 1.2,
dynamicTypeStyle: .largeTitle
)
static let n2 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 34,
weight: 600,
letterSpacing: -0.02,
lineHeight: 1.2,
dynamicTypeStyle: .largeTitle
)
static let n3 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 30,
weight: 600,
letterSpacing: -0.01,
lineHeight: 1.2,
dynamicTypeStyle: .title1
)
static let n4 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 26,
weight: 600,
letterSpacing: -0.02,
lineHeight: 1.2,
dynamicTypeStyle: .title1
)
static let n5 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 19,
weight: 600,
letterSpacing: -0.02,
lineHeight: 1.2,
dynamicTypeStyle: .title3
)
static let h1 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 34,
weight: 600,
letterSpacing: -0.01,
lineHeight: 1.2,
dynamicTypeStyle: .largeTitle
)
static let h2 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 30,
weight: 600,
letterSpacing: -0.01,
lineHeight: 1.2,
dynamicTypeStyle: .title1
)
static let h3 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 26,
weight: 600,
letterSpacing: -0.01,
lineHeight: 1.2,
dynamicTypeStyle: .title1
)
static let h4 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 20,
weight: 600,
letterSpacing: -0.01,
lineHeight: 1.2,
dynamicTypeStyle: .title3
)
static let s1 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 19,
weight: 500,
letterSpacing: 0,
lineHeight: 1.2,
dynamicTypeStyle: .title3
)
static let s2 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 17,
weight: 500,
letterSpacing: 0,
lineHeight: 1.2,
dynamicTypeStyle: .headline
)
static let s3 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 15,
weight: 500,
letterSpacing: 0,
lineHeight: 1.2,
dynamicTypeStyle: .subheadline
)
static let s4 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 12,
weight: 500,
letterSpacing: 0,
lineHeight: 1.2,
dynamicTypeStyle: .caption1
)
static let l1 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 17,
weight: 600,
letterSpacing: 0,
lineHeight: 1.2,
dynamicTypeStyle: .headline
)
static let l2 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 15,
weight: 600,
letterSpacing: 0,
lineHeight: 1.2,
dynamicTypeStyle: .subheadline
)
static let l3 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 13,
weight: 600,
letterSpacing: 0,
lineHeight: 1.2,
dynamicTypeStyle: .footnote
)
static let b1 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 19,
weight: 325,
letterSpacing: 0,
lineHeight: 1.3,
dynamicTypeStyle: .body
)
static let b2 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 17,
weight: 325,
letterSpacing: 0,
lineHeight: 1.3,
dynamicTypeStyle: .body
)
static let b3 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 15,
weight: 325,
letterSpacing: 0,
lineHeight: 1.3,
dynamicTypeStyle: .subheadline
)
static let b4 = NucleusFont(
fontName: "WorldProMVPLH-Regular",
size: 13,
weight: 325,
letterSpacing: 0,
lineHeight: 1.3,
dynamicTypeStyle: .caption2
)
}
Loading
Loading