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
|
@@ -16145,7 +16145,7 @@ interface CssFromDefnOption {
|
|
|
16145
16145
|
*
|
|
16146
16146
|
* converts a `CssDefinition` into a CSS string
|
|
16147
16147
|
*/
|
|
16148
|
-
declare function cssFromDefinition<T extends CssDefinition$1, O extends CssFromDefnOption>(defn: T, opt?: O): string;
|
|
16148
|
+
declare function cssFromDefinition<T extends CssDefinition$1 | undefined, O extends CssFromDefnOption>(defn: T, opt?: O): string;
|
|
16149
16149
|
declare function defineCss<T extends CssDefinition$1>(defn: T): {
|
|
16150
16150
|
defn: T;
|
|
16151
16151
|
} & (<S extends string>(selector?: S) => string);
|
|
@@ -4744,10 +4744,21 @@ ${frameToCss(frames)}
|
|
|
4744
4744
|
};
|
|
4745
4745
|
}
|
|
4746
4746
|
function cssFromDefinition(defn, opt) {
|
|
4747
|
+
if (isUndefined(defn)) {
|
|
4748
|
+
return "";
|
|
4749
|
+
}
|
|
4747
4750
|
const inline = isDefined(opt?.inline) ? opt.inline : true;
|
|
4748
4751
|
const indent = isString(opt?.indent) ? opt.indent : "";
|
|
4749
4752
|
const nextDefn = inline ? " " : "\n";
|
|
4750
|
-
return Object.keys(defn).map(
|
|
4753
|
+
return Object.keys(defn).map(
|
|
4754
|
+
(key) => {
|
|
4755
|
+
const val = ensureTrailing(
|
|
4756
|
+
defn[key],
|
|
4757
|
+
";"
|
|
4758
|
+
);
|
|
4759
|
+
return `${indent}${key}: ${val}`;
|
|
4760
|
+
}
|
|
4761
|
+
).join(nextDefn);
|
|
4751
4762
|
}
|
|
4752
4763
|
function defineCss(defn) {
|
|
4753
4764
|
const fn2 = (selector) => {
|