diff --git a/packages/tokens/CHANGELOG.md b/packages/tokens/CHANGELOG.md index bbc1e52d6..7be46b430 100644 --- a/packages/tokens/CHANGELOG.md +++ b/packages/tokens/CHANGELOG.md @@ -1,5 +1,11 @@ # @hopper-ui/tokens +## 2.0.0 + +### Major Changes + +- 51c5357: replace the relative path of assets by an absolute path + ## 1.1.0 ### Minor Changes diff --git a/packages/tokens/assets/fonts/ABCFavorit-Bold.otf b/packages/tokens/assets/fonts/ABCFavorit-Bold.otf deleted file mode 100644 index bf932ef01..000000000 Binary files a/packages/tokens/assets/fonts/ABCFavorit-Bold.otf and /dev/null differ diff --git a/packages/tokens/assets/fonts/ABCFavorit-Bold.woff b/packages/tokens/assets/fonts/ABCFavorit-Bold.woff deleted file mode 100644 index 77ffa804a..000000000 Binary files a/packages/tokens/assets/fonts/ABCFavorit-Bold.woff and /dev/null differ diff --git a/packages/tokens/assets/fonts/ABCFavorit-Medium.otf b/packages/tokens/assets/fonts/ABCFavorit-Medium.otf deleted file mode 100644 index b287ad2cf..000000000 Binary files a/packages/tokens/assets/fonts/ABCFavorit-Medium.otf and /dev/null differ diff --git a/packages/tokens/assets/fonts/ABCFavorit-Medium.woff b/packages/tokens/assets/fonts/ABCFavorit-Medium.woff deleted file mode 100644 index baba91eb4..000000000 Binary files a/packages/tokens/assets/fonts/ABCFavorit-Medium.woff and /dev/null differ diff --git a/packages/tokens/assets/fonts/ABCFavorit-Regular.otf b/packages/tokens/assets/fonts/ABCFavorit-Regular.otf deleted file mode 100644 index 0efaf72ce..000000000 Binary files a/packages/tokens/assets/fonts/ABCFavorit-Regular.otf and /dev/null differ diff --git a/packages/tokens/assets/fonts/ABCFavorit-Regular.woff b/packages/tokens/assets/fonts/ABCFavorit-Regular.woff deleted file mode 100644 index 5759443d4..000000000 Binary files a/packages/tokens/assets/fonts/ABCFavorit-Regular.woff and /dev/null differ diff --git a/packages/tokens/assets/fonts/ABCFavoritMono-Regular.otf b/packages/tokens/assets/fonts/ABCFavoritMono-Regular.otf deleted file mode 100644 index 8f0445633..000000000 Binary files a/packages/tokens/assets/fonts/ABCFavoritMono-Regular.otf and /dev/null differ diff --git a/packages/tokens/assets/fonts/ABCFavoritMono-Regular.woff b/packages/tokens/assets/fonts/ABCFavoritMono-Regular.woff deleted file mode 100644 index 0010c1aef..000000000 Binary files a/packages/tokens/assets/fonts/ABCFavoritMono-Regular.woff and /dev/null differ diff --git a/packages/tokens/assets/fonts/Inter-Bold.woff2 b/packages/tokens/assets/fonts/Inter-Bold.woff2 new file mode 100644 index 000000000..2846f29cc Binary files /dev/null and b/packages/tokens/assets/fonts/Inter-Bold.woff2 differ diff --git a/packages/tokens/assets/fonts/Inter-BoldItalic.otf b/packages/tokens/assets/fonts/Inter-BoldItalic.otf deleted file mode 100644 index be8a3d3c9..000000000 Binary files a/packages/tokens/assets/fonts/Inter-BoldItalic.otf and /dev/null differ diff --git a/packages/tokens/assets/fonts/Inter-BoldItalic.woff2 b/packages/tokens/assets/fonts/Inter-BoldItalic.woff2 new file mode 100644 index 000000000..0b1fe8e12 Binary files /dev/null and b/packages/tokens/assets/fonts/Inter-BoldItalic.woff2 differ diff --git a/packages/tokens/assets/fonts/Inter-Medium.otf b/packages/tokens/assets/fonts/Inter-Medium.otf deleted file mode 100644 index 01b0b4ae6..000000000 Binary files a/packages/tokens/assets/fonts/Inter-Medium.otf and /dev/null differ diff --git a/packages/tokens/assets/fonts/Inter-Medium.woff2 b/packages/tokens/assets/fonts/Inter-Medium.woff2 new file mode 100644 index 000000000..f92498a2e Binary files /dev/null and b/packages/tokens/assets/fonts/Inter-Medium.woff2 differ diff --git a/packages/tokens/assets/fonts/Inter-MediumItalic.otf b/packages/tokens/assets/fonts/Inter-MediumItalic.otf deleted file mode 100644 index abd98779d..000000000 Binary files a/packages/tokens/assets/fonts/Inter-MediumItalic.otf and /dev/null differ diff --git a/packages/tokens/assets/fonts/Inter-MediumItalic.woff2 b/packages/tokens/assets/fonts/Inter-MediumItalic.woff2 new file mode 100644 index 000000000..0e3019f4a Binary files /dev/null and b/packages/tokens/assets/fonts/Inter-MediumItalic.woff2 differ diff --git a/packages/tokens/assets/fonts/Inter-Regular.otf b/packages/tokens/assets/fonts/Inter-Regular.otf deleted file mode 100644 index e94fa4541..000000000 Binary files a/packages/tokens/assets/fonts/Inter-Regular.otf and /dev/null differ diff --git a/packages/tokens/assets/fonts/Inter-Regular.woff2 b/packages/tokens/assets/fonts/Inter-Regular.woff2 new file mode 100644 index 000000000..6c2b6893d Binary files /dev/null and b/packages/tokens/assets/fonts/Inter-Regular.woff2 differ diff --git a/packages/tokens/assets/fonts/Inter-SemiBold.otf b/packages/tokens/assets/fonts/Inter-SemiBold.otf deleted file mode 100644 index 23294024c..000000000 Binary files a/packages/tokens/assets/fonts/Inter-SemiBold.otf and /dev/null differ diff --git a/packages/tokens/assets/fonts/Inter-SemiBold.woff2 b/packages/tokens/assets/fonts/Inter-SemiBold.woff2 new file mode 100644 index 000000000..611e90c95 Binary files /dev/null and b/packages/tokens/assets/fonts/Inter-SemiBold.woff2 differ diff --git a/packages/tokens/assets/fonts/Inter-SemiBoldItalic.otf b/packages/tokens/assets/fonts/Inter-SemiBoldItalic.otf deleted file mode 100644 index 2137d6533..000000000 Binary files a/packages/tokens/assets/fonts/Inter-SemiBoldItalic.otf and /dev/null differ diff --git a/packages/tokens/assets/fonts/Inter-SemiBoldItalic.woff2 b/packages/tokens/assets/fonts/Inter-SemiBoldItalic.woff2 new file mode 100644 index 000000000..545685bd2 Binary files /dev/null and b/packages/tokens/assets/fonts/Inter-SemiBoldItalic.woff2 differ diff --git a/packages/tokens/package.json b/packages/tokens/package.json index e6f2f736f..27139fae8 100644 --- a/packages/tokens/package.json +++ b/packages/tokens/package.json @@ -1,7 +1,7 @@ { "name": "@hopper-ui/tokens", "author": "Workleap", - "version": "1.1.0", + "version": "2.0.0", "description": "The tokens package.", "license": "Apache-2.0", "repository": { diff --git a/packages/tokens/src/style-dictionary/config.ts b/packages/tokens/src/style-dictionary/config.ts index cf8f3da88..1ce7c1d82 100644 --- a/packages/tokens/src/style-dictionary/config.ts +++ b/packages/tokens/src/style-dictionary/config.ts @@ -21,9 +21,6 @@ export const fontsConfig = { "type": "font" } }, - "options": { - "fontPathPrefix": "./" - } } ], "actions": ["copy_assets"] diff --git a/packages/tokens/src/style-dictionary/format/font-face.ts b/packages/tokens/src/style-dictionary/format/font-face.ts index 8c09058cf..6104dbefb 100644 --- a/packages/tokens/src/style-dictionary/format/font-face.ts +++ b/packages/tokens/src/style-dictionary/format/font-face.ts @@ -1,7 +1,7 @@ import type { Dictionary, Options, TransformedToken } from "style-dictionary"; export function fontFace ({ dictionary, options }: { dictionary: Dictionary; options: Options }) { - const fontPathPrefix = options.fontPathPrefix || "../"; + const fontPathPrefix = options.fontPathPrefix || ""; const tokens = dictionary.allTokens; // https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src diff --git a/packages/tokens/src/tokens/asset/fonts.tokens.json b/packages/tokens/src/tokens/asset/fonts.tokens.json index ed2c732ae..5d2eb7545 100644 --- a/packages/tokens/src/tokens/asset/fonts.tokens.json +++ b/packages/tokens/src/tokens/asset/fonts.tokens.json @@ -5,19 +5,19 @@ "normal": { "410": { "value": "assets/fonts/Inter-Regular", - "formats": ["otf"] + "formats": ["woff2"] }, "505": { "value": "assets/fonts/Inter-Medium", - "formats": ["otf"] + "formats": ["woff2"] }, "590": { "value": "assets/fonts/Inter-SemiBold", - "formats": ["otf"] + "formats": ["woff2"] }, "690": { "value": "assets/fonts/Inter-Bold", - "formats": ["otf"] + "formats": ["woff2"] } } }, @@ -25,7 +25,7 @@ "normal": { "400": { "value": "assets/fonts/ABCFavoritMono-Regular", - "formats": ["otf", "woff", "woff2"] + "formats": ["woff2"] } } }, @@ -33,15 +33,15 @@ "normal": { "410": { "value": "assets/fonts/ABCFavorit-Regular", - "formats": ["otf", "woff", "woff2"] + "formats": ["woff2"] }, "580": { "value": "assets/fonts/ABCFavorit-Medium", - "formats": ["otf", "woff", "woff2"] + "formats": ["woff2"] }, "680": { "value": "assets/fonts/ABCFavorit-Bold", - "formats": ["otf", "woff", "woff2"] + "formats": ["woff2"] } } }