inferred-types 0.55.11 → 0.55.13

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.
@@ -5704,6 +5704,8 @@ interface CssAlignProperties {
5704
5704
  "align-items"?: CssAlignItems;
5705
5705
  /** [Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/align-self) */
5706
5706
  "align-self"?: CssAlignSelf;
5707
+ /** [Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align) */
5708
+ "vertical-align"?: "baseline" | "top" | "middle" | "bottom" | "sub" | "text-top";
5707
5709
  }
5708
5710
 
5709
5711
  type Cascade<T extends readonly string[], TResult extends string = ""> = [] extends T ? TResult : Cascade<AfterFirst<T>, `${TResult}${First<T> | ""}`>;
@@ -6715,7 +6717,9 @@ type CssDefinition = {
6715
6717
  "z-index"?: Suggest<`${number}` | "auto" | CssGlobal>;
6716
6718
  /** [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/zoom) */
6717
6719
  "zoom"?: Suggest<`${number}` | `${number}%` | "normal" | "reset" | CssGlobal>;
6718
- } & CssBorderProperties & CssBackgroundProperties & CssAbsolutionPositioningProperties & CssOffsetProperties & CssBreakProperties & CssBoxProperties & CssTextProperties & CssStrokeProperties & CssJustifyProperties & CssAlignProperties & CssPlaceProperties & CssAnimationProperties & CssMarginProperties & CssPaddingProperties & CssOutlineProperties & CssOverflowProperties & CssOffsetProperties & CssTransformProperties & CssFontProperties;
6720
+ } & CssBorderProperties & CssBackgroundProperties & CssAbsolutionPositioningProperties & CssOffsetProperties & CssBreakProperties & CssBoxProperties & CssTextProperties & CssStrokeProperties & CssJustifyProperties & CssAlignProperties & CssPlaceProperties & CssAnimationProperties & CssMarginProperties & CssPaddingProperties & CssOutlineProperties & CssOverflowProperties & CssOffsetProperties & CssTransformProperties & CssFontProperties & {
6721
+ [key: string]: string;
6722
+ };
6719
6723
 
6720
6724
  type CssFontFamily = `"${string}"` | "serif" | "san-serif" | "monospace" | "cursive" | "fantasy" | "system-ui" | "ui-serif" | "ui-sans-serif" | "ui-monospace" | "ui-rounded" | "emoji" | "math" | "fansong";
6721
6725
  type CssFontFeatureSetting = "normal" | "liga" | "tnum" | "smcp";
@@ -12046,7 +12050,7 @@ interface CssFromDefnOption {
12046
12050
  *
12047
12051
  * converts a `CssDefinition` into a CSS string
12048
12052
  */
12049
- declare function cssFromDefinition<T extends CssDefinition, O extends CssFromDefnOption>(defn: T, opt?: O): string;
12053
+ declare function cssFromDefinition<T extends CssDefinition | undefined, O extends CssFromDefnOption>(defn: T, opt?: O): string;
12050
12054
  declare function defineCss<T extends CssDefinition>(defn: T): {
12051
12055
  defn: T;
12052
12056
  } & (<S extends string>(selector?: S) => string);
@@ -2194,10 +2194,21 @@ ${frameToCss(frames)}
2194
2194
 
2195
2195
  // src/css/cssFromDefinition.ts
2196
2196
  function cssFromDefinition(defn, opt) {
2197
+ if (isUndefined(defn)) {
2198
+ return "";
2199
+ }
2197
2200
  const inline = isDefined(opt?.inline) ? opt.inline : true;
2198
2201
  const indent = isString(opt?.indent) ? opt.indent : "";
2199
2202
  const nextDefn = inline ? " " : "\n";
2200
- return Object.keys(defn).map((key) => `${indent}${key}: ${ensureTrailing(defn[key], ";")}`).join(nextDefn);
2203
+ return Object.keys(defn).map(
2204
+ (key) => {
2205
+ const val = ensureTrailing(
2206
+ defn[key],
2207
+ ";"
2208
+ );
2209
+ return `${indent}${key}: ${val}`;
2210
+ }
2211
+ ).join(nextDefn);
2201
2212
  }
2202
2213
  function defineCss(defn) {
2203
2214
  const fn2 = (selector) => {