tailwindcss-opentype
Advanced tools
Comparing version 0.5.0 to 1.0.0
# tailwindcss-opentype | ||
## 1.0.0 — 2022-03-25 | ||
#### 💣 Breaking changes | ||
- Drop support for legacy AOT mode in order to support v3 [#87](https://github.com/stormwarning/tailwindcss-opentype/pull/87) | ||
Plugin no longer supports v1, may still work in v2 as long as JIT mode is enabled. | ||
## 0.5.0 — 2022-03-24 | ||
@@ -4,0 +12,0 @@ |
@@ -35,3 +35,2 @@ 'use strict'; | ||
addUtilities = _ref.addUtilities, | ||
config = _ref.config, | ||
matchUtilities = _ref.matchUtilities, | ||
@@ -109,33 +108,25 @@ theme = _ref.theme, | ||
if (config('mode', '') === 'jit') { | ||
addBase({ | ||
'@defaults font-feature-settings': _extends({ | ||
'--ot-sups': '"sups" 0', | ||
'--ot-subs': '"subs" 0', | ||
'--ot-sinf': '"sinf" 0', | ||
'--ot-hlig': '"hlig" 0' | ||
}, stylisticSetsDefaults, { | ||
'--ot-features': ['var(--ot-sups)', 'var(--ot-subs)', 'var(--ot-sinf)', 'var(--ot-hlig)'].concat(stylisticSetsProperties).join(', ') | ||
}) | ||
}); | ||
} | ||
addBase({ | ||
'@defaults font-feature-settings': _extends({ | ||
'--ot-sups': '"sups" 0', | ||
'--ot-subs': '"subs" 0', | ||
'--ot-sinf': '"sinf" 0', | ||
'--ot-hlig': '"hlig" 0' | ||
}, stylisticSetsDefaults, { | ||
'--ot-features': ['var(--ot-sups)', 'var(--ot-subs)', 'var(--ot-sinf)', 'var(--ot-hlig)'].concat(stylisticSetsProperties).join(', ') | ||
}) | ||
}); | ||
addUtilities({ | ||
'.font-features': config('mode', '') === 'jit' ? JIT_FONT_FEATURE_DEFAULTS : { | ||
'font-feature-settings': ['var(--ot-sups, "sups" 0)', 'var(--ot-subs, "subs" 0)', 'var(--ot-sinf, "sinf" 0)', 'var(--ot-hlig, "hlig" 0)'].concat(Object.values(stylisticSetsValues).map(function (tag) { | ||
return "var(--ot-" + tag + ", \"" + tag + "\" 0)"; | ||
})).join(', ') | ||
}, | ||
'.sups': _extends({ | ||
'--ot-sups': '"sups" 1' | ||
}, config('mode', '') === 'jit' ? JIT_FONT_FEATURE_DEFAULTS : {}), | ||
}, JIT_FONT_FEATURE_DEFAULTS), | ||
'.subs': _extends({ | ||
'--ot-subs': '"subs" 1' | ||
}, config('mode', '') === 'jit' ? JIT_FONT_FEATURE_DEFAULTS : {}), | ||
}, JIT_FONT_FEATURE_DEFAULTS), | ||
'.sinf': _extends({ | ||
'--ot-sinf': '"sinf" 1' | ||
}, config('mode', '') === 'jit' ? JIT_FONT_FEATURE_DEFAULTS : {}), | ||
}, JIT_FONT_FEATURE_DEFAULTS), | ||
'.hlig': _extends({ | ||
'--ot-hlig': '"hlig" 1' | ||
}, config('mode', '') === 'jit' ? JIT_FONT_FEATURE_DEFAULTS : {}) | ||
}, JIT_FONT_FEATURE_DEFAULTS) | ||
}, variants('fontFeatureSettings', [])); | ||
@@ -146,3 +137,3 @@ matchUtilities({ | ||
return _extends((_extends2 = {}, _extends2["--ot-" + value] = "\"" + value + "\" 1", _extends2), config('mode', '') === 'jit' ? JIT_FONT_FEATURE_DEFAULTS : {}); | ||
return _extends((_extends2 = {}, _extends2["--ot-" + value] = "\"" + value + "\" 1", _extends2), JIT_FONT_FEATURE_DEFAULTS); | ||
} | ||
@@ -149,0 +140,0 @@ }, { |
@@ -1,2 +0,2 @@ | ||
"use strict";var t,a=(t=require("tailwindcss/plugin"))&&"object"==typeof t&&"default"in t?t.default:t;function s(){return(s=Object.assign||function(t){for(var a=1;a<arguments.length;a++){var s=arguments[a];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(t[n]=s[n])}return t}).apply(this,arguments)}var n={"@defaults font-feature-settings":{},"font-feature-settings":"var(--ot-features)"};module.exports=a.withOptions((function(){return function(t){var a,o=t.addBase,i=t.addUtilities,r=t.config,e=t.matchUtilities,l=t.theme,u=t.variants;i({".kerning":{"font-kerning":"auto"},".kerning-normal":{"font-kerning":"normal"},".kerning-none":{"font-kerning":"none"}},u("fontVariantLigatures",[])),i({".common-ligatures, .no-common-ligatures, .discretionary-ligatures, .no-discretionary-ligatures, .contextual, .no-contextual":{"--ot-liga":"var(--tw-empty, /*!*/)","--ot-dlig":"var(--tw-empty, /*!*/)","--ot-calt":"var(--tw-empty, /*!*/)","font-variant-ligatures":"var(--ot-liga) var(--ot-dlig) var(--ot-calt)"},".common-ligatures":{"--ot-liga":"common-ligatures"},".no-common-ligatures":{"--ot-liga":"no-common-ligatures"},".discretionary-ligatures":{"--ot-dlig":"discretionary-ligatures"},".no-discretionary-ligatures":{"--ot-dlig":"no-discretionary-ligatures"},".contextual":{"--ot-calt":"contextual"},".no-contextual":{"--ot-calt":"no-contextual"}},u("fontVariantLigatures",[])),i({".small-caps":{"font-variant-caps":"small-caps"},".all-small-caps":{"font-variant-caps":"all-small-caps"},".titling-caps":{"font-variant-caps":"titling-caps"}},u("fontVariantCaps",[])),i({".historical-forms":{"font-variant-alternates":"historical-forms"}},u("fontVariantAlternates",[]));for(var c=null!=(a=l("stylisticSets",{"01":"ss01","02":"ss02","03":"ss03","04":"ss04"}))?a:{},f=Object.values(c).map((function(t){return"var(--ot-"+t+")"})),g={},v=0,m=Object.values(c);v<m.length;v++){var p=m[v];g["--ot-"+p]='"'+p+'" 0'}"jit"===r("mode","")&&o({"@defaults font-feature-settings":s({"--ot-sups":'"sups" 0',"--ot-subs":'"subs" 0',"--ot-sinf":'"sinf" 0',"--ot-hlig":'"hlig" 0'},g,{"--ot-features":["var(--ot-sups)","var(--ot-subs)","var(--ot-sinf)","var(--ot-hlig)"].concat(f).join(", ")})}),i({".font-features":"jit"===r("mode","")?n:{"font-feature-settings":['var(--ot-sups, "sups" 0)','var(--ot-subs, "subs" 0)','var(--ot-sinf, "sinf" 0)','var(--ot-hlig, "hlig" 0)'].concat(Object.values(c).map((function(t){return"var(--ot-"+t+', "'+t+'" 0)'}))).join(", ")},".sups":s({"--ot-sups":'"sups" 1'},"jit"===r("mode","")?n:{}),".subs":s({"--ot-subs":'"subs" 1'},"jit"===r("mode","")?n:{}),".sinf":s({"--ot-sinf":'"sinf" 1'},"jit"===r("mode","")?n:{}),".hlig":s({"--ot-hlig":'"hlig" 1'},"jit"===r("mode","")?n:{})},u("fontFeatureSettings",[])),e({ss:function(t){var a;return s(((a={})["--ot-"+t]='"'+t+'" 1',a),"jit"===r("mode","")?n:{})}},{values:c})}})); | ||
"use strict";var t,a=(t=require("tailwindcss/plugin"))&&"object"==typeof t&&"default"in t?t.default:t;function n(){return(n=Object.assign||function(t){for(var a=1;a<arguments.length;a++){var n=arguments[a];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t}).apply(this,arguments)}var s={"@defaults font-feature-settings":{},"font-feature-settings":"var(--ot-features)"};module.exports=a.withOptions((function(){return function(t){var a,o=t.addBase,i=t.addUtilities,r=t.matchUtilities,e=t.theme,l=t.variants;i({".kerning":{"font-kerning":"auto"},".kerning-normal":{"font-kerning":"normal"},".kerning-none":{"font-kerning":"none"}},l("fontVariantLigatures",[])),i({".common-ligatures, .no-common-ligatures, .discretionary-ligatures, .no-discretionary-ligatures, .contextual, .no-contextual":{"--ot-liga":"var(--tw-empty, /*!*/)","--ot-dlig":"var(--tw-empty, /*!*/)","--ot-calt":"var(--tw-empty, /*!*/)","font-variant-ligatures":"var(--ot-liga) var(--ot-dlig) var(--ot-calt)"},".common-ligatures":{"--ot-liga":"common-ligatures"},".no-common-ligatures":{"--ot-liga":"no-common-ligatures"},".discretionary-ligatures":{"--ot-dlig":"discretionary-ligatures"},".no-discretionary-ligatures":{"--ot-dlig":"no-discretionary-ligatures"},".contextual":{"--ot-calt":"contextual"},".no-contextual":{"--ot-calt":"no-contextual"}},l("fontVariantLigatures",[])),i({".small-caps":{"font-variant-caps":"small-caps"},".all-small-caps":{"font-variant-caps":"all-small-caps"},".titling-caps":{"font-variant-caps":"titling-caps"}},l("fontVariantCaps",[])),i({".historical-forms":{"font-variant-alternates":"historical-forms"}},l("fontVariantAlternates",[]));for(var u=null!=(a=e("stylisticSets",{"01":"ss01","02":"ss02","03":"ss03","04":"ss04"}))?a:{},c=Object.values(u).map((function(t){return"var(--ot-"+t+")"})),g={},f=0,v=Object.values(u);f<v.length;f++){var p=v[f];g["--ot-"+p]='"'+p+'" 0'}o({"@defaults font-feature-settings":n({"--ot-sups":'"sups" 0',"--ot-subs":'"subs" 0',"--ot-sinf":'"sinf" 0',"--ot-hlig":'"hlig" 0'},g,{"--ot-features":["var(--ot-sups)","var(--ot-subs)","var(--ot-sinf)","var(--ot-hlig)"].concat(c).join(", ")})}),i({".sups":n({"--ot-sups":'"sups" 1'},s),".subs":n({"--ot-subs":'"subs" 1'},s),".sinf":n({"--ot-sinf":'"sinf" 1'},s),".hlig":n({"--ot-hlig":'"hlig" 1'},s)},l("fontFeatureSettings",[])),r({ss:function(t){var a;return n(((a={})["--ot-"+t]='"'+t+'" 1',a),s)}},{values:u})}})); | ||
//# sourceMappingURL=tailwindcss-opentype.cjs.production.min.js.map |
{ | ||
"name": "tailwindcss-opentype", | ||
"version": "0.5.0", | ||
"version": "1.0.0", | ||
"description": "Tailwind CSS utility classes for advanced typographic features.", | ||
@@ -54,3 +54,3 @@ "keywords": [ | ||
"@navith/tailwindcss-plugin-author-types": "1.8.1-0.1", | ||
"@tailwindcss/typography": "0.4.1", | ||
"@tailwindcss/typography": "0.5.2", | ||
"@typescript-eslint/eslint-plugin": "4.31.2", | ||
@@ -77,3 +77,3 @@ "@typescript-eslint/parser": "4.31.2", | ||
"remark-slug": "6.1.0", | ||
"tailwindcss": "2.2.7", | ||
"tailwindcss": "3.0.23", | ||
"tsdx": "0.14.1", | ||
@@ -85,3 +85,3 @@ "tslib": "2.3.0", | ||
"peerDependencies": { | ||
"tailwindcss": ">= 1.5" | ||
"tailwindcss": ">= 3" | ||
}, | ||
@@ -88,0 +88,0 @@ "engines": { |
@@ -21,4 +21,9 @@ # tailwindcss-opentype | ||
## Related | ||
[✂️ tailwindcss-capsize](https://github.com/stormwarning/tailwindcss-capsize) — Utility classes for trimming leading whitespace. | ||
[npm-url]: https://www.npmjs.com/package/tailwindcss-opentype | ||
[npm-img]: https://img.shields.io/npm/v/tailwindcss-opentype.svg?style=flat-square | ||
[npm-dls]: https://img.shields.io/npm/dt/tailwindcss-opentype.svg?style=flat-square |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
29
27035
153