inferred-types 0.55.12 → 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.
- package/modules/inferred-types/dist/index.cjs +12 -1
- package/modules/inferred-types/dist/index.cjs.map +1 -1
- package/modules/inferred-types/dist/index.d.ts +1 -1
- package/modules/inferred-types/dist/index.js +12 -1
- package/modules/inferred-types/dist/index.js.map +1 -1
- package/modules/runtime/dist/index.cjs +12 -1
- package/modules/runtime/dist/index.cjs.map +1 -1
- package/modules/runtime/dist/index.d.ts +1 -1
- package/modules/runtime/dist/index.js +12 -1
- package/modules/runtime/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -12050,7 +12050,7 @@ interface CssFromDefnOption {
|
|
|
12050
12050
|
*
|
|
12051
12051
|
* converts a `CssDefinition` into a CSS string
|
|
12052
12052
|
*/
|
|
12053
|
-
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;
|
|
12054
12054
|
declare function defineCss<T extends CssDefinition>(defn: T): {
|
|
12055
12055
|
defn: T;
|
|
12056
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(
|
|
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) => {
|