@vectoriox/iox-ui 5.56.0 → 5.56.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.
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@ export function presetDesign(
|
|
|
21
21
|
): DesignChoices | null {
|
|
22
22
|
const base = presetChoices(presetId);
|
|
23
23
|
if (!base) return null;
|
|
24
|
-
const motionInput: MotionInput = typeof input === '
|
|
24
|
+
const motionInput: MotionInput = typeof input === 'object' && input !== null ? input : { businessType: input as string | null };
|
|
25
25
|
const start = motionFor(motionInput, presetId, read);
|
|
26
26
|
return { ...base, scroll: start.scroll, animate: start.animate, between: start.between, ...kept };
|
|
27
27
|
}
|
|
@@ -35,7 +35,7 @@ export interface StartingDesign {
|
|
|
35
35
|
|
|
36
36
|
/** The look a business starts from: its best-ranked style (with the references' boost), at its defaults. */
|
|
37
37
|
export function startingDesign(input: (RankInput & MotionInput) | string | null, read: StyleRead | null = null): StartingDesign | null {
|
|
38
|
-
const rankInput: RankInput & MotionInput = typeof input === '
|
|
38
|
+
const rankInput: RankInput & MotionInput = typeof input === 'object' && input !== null ? input : { businessType: input as string | null };
|
|
39
39
|
const top = rankWithReferences(rankInput, read)[0];
|
|
40
40
|
const design = top ? presetDesign(top.id, rankInput, {}, read) : null;
|
|
41
41
|
if (!top || !design) return null;
|