This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Migrating Capsize packages to be precompiled with Crackle, with a key change being Crackle now handles entry points instead of Preconstruct.
Other benefits include:
Modern module entry point syntax using the "exports" field with better tooling compatibility.
Improved types and better ESM and CJS compatibility
Better alignment between compiled code and module entry points
BREAKING CHANGES:
API changes
While technically a breaking change, consumers of Capsize's public APIs are not affected by this change.
If you are affected due to reaching into package internals, please get in touch and see if we can find a more maintainable approach.
TypeScript
TypeScript consumers should ensure they are using a compatible moduleResolution strategy in TSConfig — either node16, nodenext or bundler. This will ensure types are correctly resolved across the different module specifications.
Patch Changes
#164a308885 Thanks @michaeltaranto! - createFontStack: Append original fallback font name to the font stack
The fontFamily returned from createFontStack now includes the original fallback font name(s). These are appended to the end of the font stack in the case the preferred font and generated fallbacks are not available.
import lobster from '@capsizecss/metrics/lobster';
import arial from '@capsizecss/metrics/arial';
const { fontFamily } = createFontStack([lobster, arial]);
#164a308885 Thanks @michaeltaranto! - createFontStack: Quote font-family in @font-face declaration if needed
Previously, when using fontFaceFormat: 'styleObject', the generated fallback name was not quoted as necessary within the @font-face declaration.
This could cause issues if the font family name contained spaces or other characters that required quoting.
Migrating Capsize packages to be precompiled with Crackle, with a key change being Crackle now handles entry points instead of Preconstruct.
Other benefits include:
Modern module entry point syntax using the "exports" field with better tooling compatibility.
Improved types and better ESM and CJS compatibility
Better alignment between compiled code and module entry points
BREAKING CHANGES:
API changes
While technically a breaking change, consumers of Capsize's public APIs are not affected by this change.
If you are affected due to reaching into package internals, please get in touch and see if we can find a more maintainable approach.
TypeScript
TypeScript consumers should ensure they are using a compatible moduleResolution strategy in TSConfig — either node16, nodenext or bundler. This will ensure types are correctly resolved across the different module specifications.
The character frequency weightings used to calculate the xWidthAvg metrics were previously hard coded internally, and were an adaption from a frequency table from Wikipedia.
We now generate these weightings based on the abstracts from WikiNews articles.
This makes it possible to add support for languages that use non-latin unicode subsets, e.g. Thai, by adding the relevant abstract and generating the xAvgWidth based on the corresponding unicode subset range.
Will this change anything for consumers?
Given the updated xWidthAvg metrics are very close to the original hard coded values, we do not forsee any impact on consumers.
Even our CSS snapshot tests were unchanged, and they contain values rounded to 4 decimal places!
The result is either no or extremely minor changes to the generated fallback font CSS, with the benefit being this lays the ground work to support additional language subsets in the near future.
Migrating Capsize packages to be precompiled with Crackle, with a key change being Crackle now handles entry points instead of Preconstruct.
Other benefits include:
Modern module entry point syntax using the "exports" field with better tooling compatibility.
Improved types and better ESM and CJS compatibility
Better alignment between compiled code and module entry points
BREAKING CHANGES:
API changes
While technically a breaking change, consumers of Capsize's public APIs are not affected by this change.
If you are affected due to reaching into package internals, please get in touch and see if we can find a more maintainable approach.
TypeScript
TypeScript consumers should ensure they are using a compatible moduleResolution strategy in TSConfig — either node16, nodenext or bundler. This will ensure types are correctly resolved across the different module specifications.
Migrating Capsize packages to be precompiled with Crackle, with a key change being Crackle now handles entry points instead of Preconstruct.
Other benefits include:
Modern module entry point syntax using the "exports" field with better tooling compatibility.
Improved types and better ESM and CJS compatibility
Better alignment between compiled code and module entry points
BREAKING CHANGES:
API changes
While technically a breaking change, consumers of Capsize's public APIs are not affected by this change.
If you are affected due to reaching into package internals, please get in touch and see if we can find a more maintainable approach.
TypeScript
TypeScript consumers should ensure they are using a compatible moduleResolution strategy in TSConfig — either node16, nodenext or bundler. This will ensure types are correctly resolved across the different module specifications.
Upgrading to use Vanilla Extract's style composition API in favour of the long time deprecated composeStyles function.
There is no API change for Capsize consumers, but this change will require a peer dependency of vanilla-extract@1.4.0 or greater.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Releases
@capsizecss/core@4.0.0
Major Changes
#168
8819ff1
Thanks @mrm007! - Precompile Capsize packages with CrackleMigrating Capsize packages to be precompiled with Crackle, with a key change being Crackle now handles entry points instead of Preconstruct.
Other benefits include:
BREAKING CHANGES:
API changes
While technically a breaking change, consumers of Capsize's public APIs are not affected by this change. If you are affected due to reaching into package internals, please get in touch and see if we can find a more maintainable approach.
TypeScript
TypeScript consumers should ensure they are using a compatible
moduleResolution
strategy in TSConfig — eithernode16
,nodenext
orbundler
. This will ensure types are correctly resolved across the different module specifications.Patch Changes
#164
a308885
Thanks @michaeltaranto! - createFontStack: Append original fallback font name to the font stackThe
fontFamily
returned fromcreateFontStack
now includes the original fallback font name(s). These are appended to the end of the font stack in the case the preferred font and generated fallbacks are not available.Where
fontFamily
is now:#164
a308885
Thanks @michaeltaranto! - createFontStack: Quotefont-family
in@font-face
declaration if neededPreviously, when using
fontFaceFormat: 'styleObject'
, the generated fallback name was not quoted as necessary within the@font-face
declaration. This could cause issues if the font family name contained spaces or other characters that required quoting.@capsizecss/metrics@2.0.0
Major Changes
#168
8819ff1
Thanks @mrm007! - Precompile Capsize packages with CrackleMigrating Capsize packages to be precompiled with Crackle, with a key change being Crackle now handles entry points instead of Preconstruct.
Other benefits include:
BREAKING CHANGES:
API changes
While technically a breaking change, consumers of Capsize's public APIs are not affected by this change. If you are affected due to reaching into package internals, please get in touch and see if we can find a more maintainable approach.
TypeScript
TypeScript consumers should ensure they are using a compatible
moduleResolution
strategy in TSConfig — eithernode16
,nodenext
orbundler
. This will ensure types are correctly resolved across the different module specifications.Minor Changes
#167
193d5ec
Thanks @michaeltaranto! - xWidthAvg: Update character frequency weightings data sourceThe character frequency weightings used to calculate the
xWidthAvg
metrics were previously hard coded internally, and were an adaption from a frequency table from Wikipedia.We now generate these weightings based on the abstracts from WikiNews articles. This makes it possible to add support for languages that use non-latin unicode subsets, e.g. Thai, by adding the relevant abstract and generating the
xAvgWidth
based on the corresponding unicode subset range.Will this change anything for consumers?
Given the updated
xWidthAvg
metrics are very close to the original hard coded values, we do not forsee any impact on consumers. Even our CSS snapshot tests were unchanged, and they contain values rounded to 4 decimal places!The result is either no or extremely minor changes to the generated fallback font CSS, with the benefit being this lays the ground work to support additional language subsets in the near future.
@capsizecss/unpack@2.0.0
Major Changes
#168
8819ff1
Thanks @mrm007! - Precompile Capsize packages with CrackleMigrating Capsize packages to be precompiled with Crackle, with a key change being Crackle now handles entry points instead of Preconstruct.
Other benefits include:
BREAKING CHANGES:
API changes
While technically a breaking change, consumers of Capsize's public APIs are not affected by this change. If you are affected due to reaching into package internals, please get in touch and see if we can find a more maintainable approach.
TypeScript
TypeScript consumers should ensure they are using a compatible
moduleResolution
strategy in TSConfig — eithernode16
,nodenext
orbundler
. This will ensure types are correctly resolved across the different module specifications.@capsizecss/vanilla-extract@2.0.0
Major Changes
#168
8819ff1
Thanks @mrm007! - Precompile Capsize packages with CrackleMigrating Capsize packages to be precompiled with Crackle, with a key change being Crackle now handles entry points instead of Preconstruct.
Other benefits include:
BREAKING CHANGES:
API changes
While technically a breaking change, consumers of Capsize's public APIs are not affected by this change. If you are affected due to reaching into package internals, please get in touch and see if we can find a more maintainable approach.
TypeScript
TypeScript consumers should ensure they are using a compatible
moduleResolution
strategy in TSConfig — eithernode16
,nodenext
orbundler
. This will ensure types are correctly resolved across the different module specifications.#171
e73da2d
Thanks @michaeltaranto! - Drop support for Vanilla Extract below v1.4Upgrading to use Vanilla Extract's style composition API in favour of the long time deprecated
composeStyles
function. There is no API change for Capsize consumers, but this change will require a peer dependency ofvanilla-extract@1.4.0
or greater.Patch Changes
#168
8819ff1
Thanks @mrm007! - Fix ESM compatibility of generated CSS moduleWhen consumed via ESM, the generated CSS module had a bug which could result in missing Vanilla Extract file scopes.
Updated dependencies [
8819ff1
,a308885
,a308885
]: