morphico 0.3.0 → 0.5.0
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/README.md +98 -41
- package/dist/esm/all.js +50 -0
- package/dist/esm/clip.js +283 -0
- package/dist/esm/engine.js +25 -0
- package/dist/esm/face.js +153 -0
- package/dist/esm/geometry.js +459 -0
- package/dist/esm/icon.js +41 -0
- package/dist/esm/index.js +50 -0
- package/dist/esm/morph.js +107 -0
- package/dist/esm/roundness.js +37 -0
- package/dist/esm/sets/battery.js +87 -0
- package/dist/esm/sets/bell.js +101 -0
- package/dist/esm/sets/characters.js +43 -0
- package/dist/esm/sets/check-mark.js +74 -0
- package/dist/esm/sets/checkbox.js +91 -0
- package/dist/esm/sets/chevron.js +70 -0
- package/dist/esm/sets/condensed.js +137 -0
- package/dist/esm/sets/copy.js +87 -0
- package/dist/esm/sets/eye.js +105 -0
- package/dist/esm/sets/faces.js +482 -0
- package/dist/esm/sets/folder.js +112 -0
- package/dist/esm/sets/handwritten.js +136 -0
- package/dist/esm/sets/lock.js +75 -0
- package/dist/esm/sets/lucide.js +66 -0
- package/dist/esm/sets/media.js +109 -0
- package/dist/esm/sets/menu.js +84 -0
- package/dist/esm/sets/mic.js +102 -0
- package/dist/esm/sets/radio.js +84 -0
- package/dist/esm/sets/round.js +244 -0
- package/dist/esm/sets/shapes.js +455 -0
- package/dist/esm/sets/slim.js +148 -0
- package/dist/esm/sets/square.js +149 -0
- package/dist/esm/sets/theme.js +107 -0
- package/dist/esm/sets/toggle.js +73 -0
- package/dist/esm/sets/volume.js +89 -0
- package/dist/esm/sets/weather.js +691 -0
- package/dist/esm/sets/wifi.js +68 -0
- package/dist/esm/svg.js +31 -0
- package/dist/esm/text.js +88 -0
- package/dist/esm/types.js +3 -0
- package/dist/morphico.js +4033 -3380
- package/dist/types/{iconSets.d.ts → all.d.ts} +0 -2
- package/dist/types/clip.d.ts +6 -11
- package/dist/types/face.d.ts +27 -0
- package/dist/types/icon.d.ts +4 -9
- package/dist/types/index.d.ts +5 -3
- package/dist/types/roundness.d.ts +8 -0
- package/dist/types/sets/battery.d.ts +1 -1
- package/dist/types/sets/bell.d.ts +1 -1
- package/dist/types/sets/checkbox.d.ts +1 -1
- package/dist/types/sets/chevron.d.ts +1 -1
- package/dist/types/sets/condensed.d.ts +1 -1
- package/dist/types/sets/copy.d.ts +1 -1
- package/dist/types/sets/eye.d.ts +1 -1
- package/dist/types/sets/faces.d.ts +25 -0
- package/dist/types/sets/folder.d.ts +1 -1
- package/dist/types/sets/handwritten.d.ts +1 -1
- package/dist/types/sets/lock.d.ts +1 -1
- package/dist/types/sets/media.d.ts +1 -1
- package/dist/types/sets/menu.d.ts +1 -1
- package/dist/types/sets/mic.d.ts +1 -1
- package/dist/types/sets/radio.d.ts +1 -1
- package/dist/types/sets/round.d.ts +1 -1
- package/dist/types/sets/slim.d.ts +1 -1
- package/dist/types/sets/square.d.ts +1 -1
- package/dist/types/sets/theme.d.ts +1 -1
- package/dist/types/sets/toggle.d.ts +1 -1
- package/dist/types/sets/volume.d.ts +1 -1
- package/dist/types/sets/weather.d.ts +1 -1
- package/dist/types/sets/wifi.d.ts +1 -1
- package/dist/types/text.d.ts +8 -13
- package/package.json +95 -3
- package/dist/morphico.mjs +0 -4003
|
@@ -24,5 +24,3 @@ export declare const iconSets: {
|
|
|
24
24
|
battery: IconSet;
|
|
25
25
|
};
|
|
26
26
|
export type IconSetName = keyof typeof iconSets;
|
|
27
|
-
/** A set given by name or as a set object, optionally with sharper corners (`roundness` 0 = sharp … 1 = own). */
|
|
28
|
-
export declare const resolveIconSet: (set?: IconSetName | IconSet, roundness?: number) => IconSet;
|
package/dist/types/clip.d.ts
CHANGED
|
@@ -23,33 +23,28 @@ export interface ClipChanges {
|
|
|
23
23
|
roundness?: number;
|
|
24
24
|
/** `false` (default) = the whole shape shows; an outline = only a band along its edge (not animated). */
|
|
25
25
|
outline?: false | ClipOutline;
|
|
26
|
+
/** `true` = the other way round: the shape (or band) is a hole, the rest of the element shows (not animated). */
|
|
27
|
+
inverted?: boolean;
|
|
26
28
|
}
|
|
27
29
|
export interface ClipOptions extends ClipChanges, MorphOptions {
|
|
28
30
|
/** The shape set (default: the built-in shapes, based on Lucide). */
|
|
29
31
|
set?: IconSet;
|
|
30
|
-
/** The shape shown first (default `'circle'`). */
|
|
31
|
-
state?: string;
|
|
32
32
|
}
|
|
33
33
|
export interface ClipChangeOptions extends ClipChanges, MorphOptions {
|
|
34
34
|
/** Called when the change ends, with the same result the promise resolves to. */
|
|
35
35
|
onEnd?: (result: MorphResult) => void;
|
|
36
36
|
}
|
|
37
37
|
export interface Clip {
|
|
38
|
-
/** The shape shown, or being morphed to. */
|
|
39
|
-
readonly state: string;
|
|
40
38
|
/**
|
|
41
39
|
* Morphs to the shape `state` and animates the given changes along (move, resize, turn, roundness), or — called with
|
|
42
40
|
* only an object — animates those changes and keeps the shape. The promise resolves when it ends; an interrupted
|
|
43
|
-
* change resolves with `interrupted: true`. Without animation when the user prefers reduced motion
|
|
41
|
+
* change resolves with `interrupted: true`. Without animation when the user prefers reduced motion; `duration: 0`
|
|
42
|
+
* jumps (e.g. while a slider is dragged).
|
|
44
43
|
*/
|
|
45
44
|
to(state: string, options?: ClipChangeOptions): Promise<MorphResult>;
|
|
46
45
|
to(changes: ClipChangeOptions): Promise<MorphResult>;
|
|
47
|
-
/** Jumps (no animation), e.g. while a slider is dragged. Stops a running change (it resolves as interrupted). */
|
|
48
|
-
set(changes: ClipChanges & {
|
|
49
|
-
state?: string;
|
|
50
|
-
}): void;
|
|
51
46
|
/** Stops, removes the hidden <svg> and gives the element back its own clip-path / mask. */
|
|
52
47
|
destroy(): void;
|
|
53
48
|
}
|
|
54
|
-
/** Cuts `element` out by a morphing shape. */
|
|
55
|
-
export declare const clip: (element: HTMLElement | SVGElement, options?: ClipOptions) => Clip;
|
|
49
|
+
/** Cuts `element` out by a morphing shape, `init` first. */
|
|
50
|
+
export declare const clip: (element: HTMLElement | SVGElement, init: string, options?: ClipOptions) => Clip;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { MorphOptions, MorphResult } from './morph.js';
|
|
2
|
+
import type { FaceExpression } from './sets/faces.js';
|
|
3
|
+
export interface FaceOptions extends MorphOptions {
|
|
4
|
+
/** Color of the pupils (default `'white'`). Brows, eyes and mouth take the CSS `color`. */
|
|
5
|
+
pupilColor?: string;
|
|
6
|
+
/** Blink by itself every few seconds (default `true`). Off when the user prefers reduced motion. */
|
|
7
|
+
blink?: boolean;
|
|
8
|
+
/** CSS width and height of the face (default `'100%'`: it fills the element). */
|
|
9
|
+
size?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface FaceChangeOptions extends MorphOptions {
|
|
12
|
+
/** Called when the morph ends, with the same result the promise resolves to. */
|
|
13
|
+
onEnd?: (result: MorphResult) => void;
|
|
14
|
+
}
|
|
15
|
+
export interface Face {
|
|
16
|
+
/**
|
|
17
|
+
* Morphs to another expression. The promise resolves when the morph ends; an interrupted morph resolves with
|
|
18
|
+
* `interrupted: true`. Without animation when the user prefers reduced motion.
|
|
19
|
+
*/
|
|
20
|
+
to(state: FaceExpression, options?: FaceChangeOptions): Promise<MorphResult>;
|
|
21
|
+
/** Closes the eyes and opens them again, on top of the expression (none while asleep or with reduced motion). */
|
|
22
|
+
blink(): Promise<void>;
|
|
23
|
+
/** Stops everything and removes the face from the page. */
|
|
24
|
+
destroy(): void;
|
|
25
|
+
}
|
|
26
|
+
/** Adds a morphing face (an <svg>) to `element`, showing the expression `init` first. */
|
|
27
|
+
export declare const face: (element: Element, init: FaceExpression, options?: FaceOptions) => Face;
|
package/dist/types/icon.d.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import type { IconSetName } from './iconSets.js';
|
|
2
1
|
import type { MorphOptions, MorphResult } from './morph.js';
|
|
3
2
|
import type { StyleOptions } from './svg.js';
|
|
4
3
|
import type { IconSet } from './types.js';
|
|
5
4
|
export interface IconOptions extends MorphOptions, StyleOptions {
|
|
6
|
-
/**
|
|
7
|
-
set
|
|
5
|
+
/** The set, e.g. `digitsRound` from `'morphico/sets/round'` or `iconsWeather` from `'morphico/sets/weather'`. */
|
|
6
|
+
set: IconSet;
|
|
8
7
|
/** Corner roundness: 0 = sharp … 1 = the icon's own corners (default, also the maximum). Icon sets only. */
|
|
9
8
|
roundness?: number;
|
|
10
|
-
/** The state shown first (default: empty, `' '`). */
|
|
11
|
-
state?: string;
|
|
12
9
|
/** CSS width and height of the icon (default `'1em'`: it follows the font size). */
|
|
13
10
|
size?: string;
|
|
14
11
|
}
|
|
@@ -17,8 +14,6 @@ export interface ChangeOptions extends MorphOptions {
|
|
|
17
14
|
onEnd?: (result: MorphResult) => void;
|
|
18
15
|
}
|
|
19
16
|
export interface Icon {
|
|
20
|
-
/** The state shown, or being morphed to. */
|
|
21
|
-
readonly state: string;
|
|
22
17
|
/**
|
|
23
18
|
* Morphs to `state` (`'0'`…`'9'`, `'-'`, or `' '` for empty). The promise resolves when the morph ends;
|
|
24
19
|
* an interrupted morph resolves with `interrupted: true`. Without animation when the user prefers reduced motion.
|
|
@@ -27,5 +22,5 @@ export interface Icon {
|
|
|
27
22
|
/** Stops any morph and removes the icon from the page. */
|
|
28
23
|
destroy(): void;
|
|
29
24
|
}
|
|
30
|
-
/** Adds a morphing icon (an <svg>) to `element
|
|
31
|
-
export declare const icon: (element: Element, options
|
|
25
|
+
/** Adds a morphing icon (an <svg>) to `element`, showing `init` first (`''` or `' '` = empty). */
|
|
26
|
+
export declare const icon: (element: Element, init: string, options: IconOptions) => Icon;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
export { clip } from './clip.js';
|
|
2
2
|
export { easings } from './engine.js';
|
|
3
|
+
export { face } from './face.js';
|
|
3
4
|
export { icon } from './icon.js';
|
|
4
|
-
export {
|
|
5
|
+
export { faceExpressionNames } from './sets/faces.js';
|
|
5
6
|
export { text } from './text.js';
|
|
6
7
|
export type { Clip, ClipChangeOptions, ClipChanges, ClipOptions, ClipOutline, Length } from './clip.js';
|
|
7
8
|
export type { Easing } from './engine.js';
|
|
9
|
+
export type { Face, FaceChangeOptions, FaceOptions } from './face.js';
|
|
8
10
|
export type { ChangeOptions, Icon, IconOptions } from './icon.js';
|
|
9
|
-
export type { IconSetName } from './iconSets.js';
|
|
10
11
|
export type { EasingName, MorphOptions, MorphResult } from './morph.js';
|
|
12
|
+
export type { FaceExpression } from './sets/faces.js';
|
|
11
13
|
export type { StyleOptions } from './svg.js';
|
|
12
|
-
export type {
|
|
14
|
+
export type { Text, TextChangeOptions, TextOptions, TextResult } from './text.js';
|
|
13
15
|
export type { IconSet, TextLayout } from './types.js';
|
|
14
16
|
/** Package version, e.g. "0.1.0" (tools/build.ts replaces 'dev'). */
|
|
15
17
|
export declare const version: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IconSet } from './types.js';
|
|
2
|
+
/** The set, optionally with sharper corners (`roundness` 0 = sharp … 1 = its own). */
|
|
3
|
+
export declare const resolveIconSet: (iconSet: IconSet, roundness?: number) => IconSet;
|
|
4
|
+
/** The `set` option checked: a set object (names like `'weather'` were accepted before 0.5.0 — say what to do now). */
|
|
5
|
+
export declare const checkedIconSet: (set: unknown, functionName: string) => IconSet;
|
|
6
|
+
/** The second argument: what is shown first. Before 0.5.0 the options came second (with the first state inside) — say
|
|
7
|
+
* so instead of failing somewhere deeper. */
|
|
8
|
+
export declare const checkedInit: (init: unknown, functionName: string) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconsBattery: IconSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconsBell: IconSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconsCheckbox: IconSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconsChevron: IconSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const digitsCondensed: IconSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconsCopy: IconSet;
|
package/dist/types/sets/eye.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconsEye: IconSet;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Point } from '../types.js';
|
|
2
|
+
export declare const OUTLINE_POINTS = 24;
|
|
3
|
+
export declare const PIECE_NAMES: readonly ['leftBrow', 'rightBrow', 'leftEye', 'rightEye', 'leftPupil', 'rightPupil', 'mouth'];
|
|
4
|
+
type PieceName = typeof PIECE_NAMES[number];
|
|
5
|
+
/** One expression: the outline points of every piece. */
|
|
6
|
+
export type FacePieces = Record<PieceName, Point[]>;
|
|
7
|
+
export declare const faceExpressionNames: readonly ['normal', 'smiling', 'pleading', 'wonder', 'focused', 'fright', 'angry', 'asleep', 'sad', 'surprised', 'laughing', 'tired', 'wink-left', 'wink-right', 'suspicious', 'confused', 'smug', 'irritated', 'bored', 'curious', 'empathetic', 'guilty', 'worried', 'disappointed', 'ashamed', 'embarrassed', 'yearning', 'triumphant', 'proud', 'excited', 'scornful', 'disgusted'];
|
|
8
|
+
export type FaceExpression = typeof faceExpressionNames[number];
|
|
9
|
+
/** Every expression's pieces, built on first use (nothing runs at import). */
|
|
10
|
+
export declare const faceExpressionPieces: () => Record<FaceExpression, FacePieces>;
|
|
11
|
+
export declare const interpolateFace: (from: FacePieces, to: FacePieces, progress: number) => FacePieces;
|
|
12
|
+
/** The face with its eyes partly closed: openness 1 = as drawn, 0 = shut to a flat slit (pupils gone). */
|
|
13
|
+
export declare const blinked: (face: FacePieces, openness: number) => FacePieces;
|
|
14
|
+
/** A smooth closed curve through the points: each handle points along the neighbours' chord and is a third of its own
|
|
15
|
+
* segment long (no loops where points sit close together, as at a band's round end). Empty for a hidden piece. */
|
|
16
|
+
export declare const smoothClosedPath: (points: Point[]) => string;
|
|
17
|
+
export interface FacePaths {
|
|
18
|
+
/** Brows, eyes and mouth (one colour). */
|
|
19
|
+
features: string;
|
|
20
|
+
/** Both eyes, to clip the pupils with. */
|
|
21
|
+
eyes: string;
|
|
22
|
+
pupils: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const facePaths: (face: FacePieces) => FacePaths;
|
|
25
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconsFolder: IconSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const digitsHandwritten: IconSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconsLock: IconSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconsMedia: IconSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconsMenu: IconSet;
|
package/dist/types/sets/mic.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconsMic: IconSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconsRadio: IconSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const digitsRound: IconSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const digitsSlim: IconSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const digitsSquare: IconSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconsTheme: IconSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconsToggle: IconSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconsVolume: IconSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconsWeather: IconSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconSet } from '../types.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconsWifi: IconSet;
|
package/dist/types/text.d.ts
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import type { IconSetName } from './iconSets.js';
|
|
2
1
|
import type { MorphOptions } from './morph.js';
|
|
3
2
|
import type { StyleOptions } from './svg.js';
|
|
4
3
|
import type { IconSet } from './types.js';
|
|
5
4
|
export interface TextOptions extends MorphOptions, StyleOptions {
|
|
6
|
-
/** A
|
|
7
|
-
set
|
|
8
|
-
/** The text shown first (default: empty). */
|
|
9
|
-
value?: string;
|
|
5
|
+
/** A digit set, e.g. `digitsRound` from `'morphico/sets/round'`. */
|
|
6
|
+
set: IconSet;
|
|
10
7
|
/** CSS height of the line (default `'1em'`: it follows the font size). */
|
|
11
8
|
size?: string;
|
|
12
9
|
/** Width of a digit cell in grid units, where a digit is 16 high (default: the set's own). */
|
|
@@ -17,25 +14,23 @@ export interface TextOptions extends MorphOptions, StyleOptions {
|
|
|
17
14
|
export interface TextResult {
|
|
18
15
|
/** The text the change was heading to. */
|
|
19
16
|
value: string;
|
|
20
|
-
/** `true` when a newer `
|
|
17
|
+
/** `true` when a newer `to()` (or `destroy()`) took over before every digit finished. */
|
|
21
18
|
interrupted: boolean;
|
|
22
19
|
}
|
|
23
|
-
export interface
|
|
20
|
+
export interface TextChangeOptions extends MorphOptions {
|
|
24
21
|
/** Called when every changed digit has finished, with the same result the promise resolves to. */
|
|
25
22
|
onEnd?: (result: TextResult) => void;
|
|
26
23
|
}
|
|
27
24
|
export interface Text {
|
|
28
|
-
/** The text shown, or being morphed to (after unsupported characters were removed). */
|
|
29
|
-
readonly value: string;
|
|
30
25
|
/**
|
|
31
|
-
*
|
|
26
|
+
* Morphs to `value`. Unsupported characters are removed first. If the length and every cell's width stay the same,
|
|
32
27
|
* the changed characters morph; otherwise the line is rebuilt without animation. Cells: digits, space and `-` are
|
|
33
28
|
* one width, `:` `.` `,` half of it, `/` 0.7 of it — so `5` ↔ `-` or `.` ↔ `,` morph, `5` ↔ `:` rebuilds.
|
|
34
29
|
* Pad with spaces (e.g. `String(count).padStart(3, ' ')`) to keep counters morphing.
|
|
35
30
|
*/
|
|
36
|
-
|
|
31
|
+
to(value: string, options?: TextChangeOptions): Promise<TextResult>;
|
|
37
32
|
/** Stops all morphs and removes the line from the page. */
|
|
38
33
|
destroy(): void;
|
|
39
34
|
}
|
|
40
|
-
/** Adds a line of morphing characters (a <span> of <svg> cells) to `element
|
|
41
|
-
export declare const text: (element: Element, options
|
|
35
|
+
/** Adds a line of morphing characters (a <span> of <svg> cells) to `element`, showing `init` first. */
|
|
36
|
+
export declare const text: (element: Element, init: string, options: TextOptions) => Text;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "morphico",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Morphing line-art icons: smooth SVG path transitions between digits and other states. No dependencies.",
|
|
5
5
|
"license": "MIT AND ISC",
|
|
6
6
|
"author": "Raycho Ivanov",
|
|
@@ -16,10 +16,102 @@
|
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
18
18
|
"types": "./dist/types/index.d.ts",
|
|
19
|
-
"default": "./dist/
|
|
19
|
+
"default": "./dist/esm/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./all": {
|
|
22
|
+
"types": "./dist/types/all.d.ts",
|
|
23
|
+
"default": "./dist/esm/all.js"
|
|
24
|
+
},
|
|
25
|
+
"./sets/round": {
|
|
26
|
+
"types": "./dist/types/sets/round.d.ts",
|
|
27
|
+
"default": "./dist/esm/sets/round.js"
|
|
28
|
+
},
|
|
29
|
+
"./sets/square": {
|
|
30
|
+
"types": "./dist/types/sets/square.d.ts",
|
|
31
|
+
"default": "./dist/esm/sets/square.js"
|
|
32
|
+
},
|
|
33
|
+
"./sets/condensed": {
|
|
34
|
+
"types": "./dist/types/sets/condensed.d.ts",
|
|
35
|
+
"default": "./dist/esm/sets/condensed.js"
|
|
36
|
+
},
|
|
37
|
+
"./sets/slim": {
|
|
38
|
+
"types": "./dist/types/sets/slim.d.ts",
|
|
39
|
+
"default": "./dist/esm/sets/slim.js"
|
|
40
|
+
},
|
|
41
|
+
"./sets/handwritten": {
|
|
42
|
+
"types": "./dist/types/sets/handwritten.d.ts",
|
|
43
|
+
"default": "./dist/esm/sets/handwritten.js"
|
|
44
|
+
},
|
|
45
|
+
"./sets/media": {
|
|
46
|
+
"types": "./dist/types/sets/media.d.ts",
|
|
47
|
+
"default": "./dist/esm/sets/media.js"
|
|
48
|
+
},
|
|
49
|
+
"./sets/menu": {
|
|
50
|
+
"types": "./dist/types/sets/menu.d.ts",
|
|
51
|
+
"default": "./dist/esm/sets/menu.js"
|
|
52
|
+
},
|
|
53
|
+
"./sets/checkbox": {
|
|
54
|
+
"types": "./dist/types/sets/checkbox.d.ts",
|
|
55
|
+
"default": "./dist/esm/sets/checkbox.js"
|
|
56
|
+
},
|
|
57
|
+
"./sets/radio": {
|
|
58
|
+
"types": "./dist/types/sets/radio.d.ts",
|
|
59
|
+
"default": "./dist/esm/sets/radio.js"
|
|
60
|
+
},
|
|
61
|
+
"./sets/folder": {
|
|
62
|
+
"types": "./dist/types/sets/folder.d.ts",
|
|
63
|
+
"default": "./dist/esm/sets/folder.js"
|
|
64
|
+
},
|
|
65
|
+
"./sets/theme": {
|
|
66
|
+
"types": "./dist/types/sets/theme.d.ts",
|
|
67
|
+
"default": "./dist/esm/sets/theme.js"
|
|
68
|
+
},
|
|
69
|
+
"./sets/weather": {
|
|
70
|
+
"types": "./dist/types/sets/weather.d.ts",
|
|
71
|
+
"default": "./dist/esm/sets/weather.js"
|
|
72
|
+
},
|
|
73
|
+
"./sets/eye": {
|
|
74
|
+
"types": "./dist/types/sets/eye.d.ts",
|
|
75
|
+
"default": "./dist/esm/sets/eye.js"
|
|
76
|
+
},
|
|
77
|
+
"./sets/volume": {
|
|
78
|
+
"types": "./dist/types/sets/volume.d.ts",
|
|
79
|
+
"default": "./dist/esm/sets/volume.js"
|
|
80
|
+
},
|
|
81
|
+
"./sets/toggle": {
|
|
82
|
+
"types": "./dist/types/sets/toggle.d.ts",
|
|
83
|
+
"default": "./dist/esm/sets/toggle.js"
|
|
84
|
+
},
|
|
85
|
+
"./sets/lock": {
|
|
86
|
+
"types": "./dist/types/sets/lock.d.ts",
|
|
87
|
+
"default": "./dist/esm/sets/lock.js"
|
|
88
|
+
},
|
|
89
|
+
"./sets/bell": {
|
|
90
|
+
"types": "./dist/types/sets/bell.d.ts",
|
|
91
|
+
"default": "./dist/esm/sets/bell.js"
|
|
92
|
+
},
|
|
93
|
+
"./sets/mic": {
|
|
94
|
+
"types": "./dist/types/sets/mic.d.ts",
|
|
95
|
+
"default": "./dist/esm/sets/mic.js"
|
|
96
|
+
},
|
|
97
|
+
"./sets/chevron": {
|
|
98
|
+
"types": "./dist/types/sets/chevron.d.ts",
|
|
99
|
+
"default": "./dist/esm/sets/chevron.js"
|
|
100
|
+
},
|
|
101
|
+
"./sets/copy": {
|
|
102
|
+
"types": "./dist/types/sets/copy.d.ts",
|
|
103
|
+
"default": "./dist/esm/sets/copy.js"
|
|
104
|
+
},
|
|
105
|
+
"./sets/wifi": {
|
|
106
|
+
"types": "./dist/types/sets/wifi.d.ts",
|
|
107
|
+
"default": "./dist/esm/sets/wifi.js"
|
|
108
|
+
},
|
|
109
|
+
"./sets/battery": {
|
|
110
|
+
"types": "./dist/types/sets/battery.d.ts",
|
|
111
|
+
"default": "./dist/esm/sets/battery.js"
|
|
20
112
|
}
|
|
21
113
|
},
|
|
22
|
-
"module": "./dist/
|
|
114
|
+
"module": "./dist/esm/index.js",
|
|
23
115
|
"types": "./dist/types/index.d.ts",
|
|
24
116
|
"jsdelivr": "./dist/morphico.js",
|
|
25
117
|
"unpkg": "./dist/morphico.js",
|