zss-engine 0.1.2 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,11 +4,9 @@ type ColorValue = Exclude<Property.Color, '-moz-initial'> | (string & {});
4
4
  type CSSColorProperty = Exclude<ColorValue, SystemColorKeyword>;
5
5
  type SystemColorKeyword = 'ActiveBorder' | 'ActiveCaption' | 'AppWorkspace' | 'Background' | 'ButtonFace' | 'ButtonHighlight' | 'ButtonShadow' | 'ButtonText' | 'CaptionText' | 'GrayText' | 'Highlight' | 'HighlightText' | 'InactiveBorder' | 'InactiveCaption' | 'InactiveCaptionText' | 'InfoBackground' | 'InfoText' | 'Menu' | 'MenuText' | 'Scrollbar' | 'ThreeDDarkShadow' | 'ThreeDFace' | 'ThreeDHighlight' | 'ThreeDLightShadow' | 'ThreeDShadow' | 'Window' | 'WindowFrame' | 'WindowText';
6
6
  type ExcludeMozInitial<T> = Exclude<T, '-moz-initial'>;
7
- type PropertiesWithoutMozInitial = {
8
- [K in keyof Properties]: ExcludeMozInitial<Properties[K]>;
9
- };
10
- type CSSProperties = Omit<PropertiesWithoutMozInitial, 'fontSize'> & {
11
- fontSize: PropertiesWithoutMozInitial['fontSize'] | number;
7
+ type CSSTypeProperties = Properties<number | (string & {})>;
8
+ type CSSProperties = {
9
+ [K in keyof CSSTypeProperties]: ExcludeMozInitial<CSSTypeProperties[K]>;
12
10
  };
13
11
  type BaseCSSProperties = {
14
12
  [K in keyof CSSProperties]: CSSProperties[K] | CSSVariableValue;
@@ -1,4 +1,4 @@
1
- export type VarsDefinition = Record<string, string | Record<string, string>>;
1
+ export type VarsDefinition = Record<string, string | number | Record<string, string | number>>;
2
2
  type CSSVariableKey = `--${string}`;
3
3
  export type CSSVariableValue = `var(${CSSVariableKey})`;
4
4
  type CSSVariableProperties = {
@@ -4,7 +4,7 @@ export const isServer = !isWindowDefined || !isDocumentDefined;
4
4
  export const isDevelopment = process.env.NODE_ENV === 'development';
5
5
  export const isDevAndTest = process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test';
6
6
  export const isDevServer = isDevelopment && isServer;
7
- const exception = ['line-height', 'font-weight', 'opacity', 'scale', 'z-index'];
7
+ const exception = ['line-height', 'font-weight', 'opacity', 'scale', 'z-index', 'column-count', 'order', 'orphans', 'widows'];
8
8
  export const applyCssValue = (value, cssProp) => {
9
9
  if (typeof value === 'number') {
10
10
  return exception.includes(cssProp) ? value.toString() : value + 'px';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zss-engine",
3
- "version": "0.1.2",
3
+ "version": "0.2.1",
4
4
  "description": "Zero-runtime Style Sheet Engine",
5
5
  "keywords": [
6
6
  "zero-runtime",