pictoguys 0.1.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/LICENSE +21 -0
- package/README.md +397 -0
- package/dist/character-DAS3IMm1.d.cts +141 -0
- package/dist/character-DAS3IMm1.d.ts +141 -0
- package/dist/chunk-2W2JD54I.js +21 -0
- package/dist/chunk-74VFD4AY.js +109 -0
- package/dist/chunk-MHPZBNYL.js +359 -0
- package/dist/chunk-RSKU5HRZ.js +18 -0
- package/dist/core.cjs +409 -0
- package/dist/core.d.cts +36 -0
- package/dist/core.d.ts +36 -0
- package/dist/core.js +3 -0
- package/dist/index.cjs +536 -0
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -0
- package/dist/react.cjs +504 -0
- package/dist/react.d.cts +20 -0
- package/dist/react.d.ts +20 -0
- package/dist/react.js +3 -0
- package/dist/rng.cjs +24 -0
- package/dist/rng.d.cts +4 -0
- package/dist/rng.d.ts +4 -0
- package/dist/rng.js +1 -0
- package/package.json +76 -0
package/dist/core.d.cts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { c as CharInput, d as Character, b as CharConfig, j as gradient } from './character-DAS3IMm1.cjs';
|
|
2
|
+
export { A as AnimEvent, a as AnimName, B as BGS, C as COLORS, e as ComposeArgs, D as DEFAULT_TUNING, E as EyeKind, M as Mode, O as OneOrMany, P as PREFIXES, f as PalEntry, R as Resolved, S as SHAPES, g as SvgOptions, T as Tuning, h as buildPalette, i as compose, r as resolve } from './character-DAS3IMm1.cjs';
|
|
3
|
+
export { hashSeed, mulberry32 } from './rng.cjs';
|
|
4
|
+
|
|
5
|
+
/** Create a picto from a seed, a string, or an explicit config object. */
|
|
6
|
+
declare function character(input?: CharInput): Character;
|
|
7
|
+
interface Preset {
|
|
8
|
+
/** Make a picto with the preset baked in, plus a per-call seed (or a config object to add more locks). */
|
|
9
|
+
character(input?: CharInput): Character;
|
|
10
|
+
/** The constraints this preset locks in. */
|
|
11
|
+
readonly config: CharConfig;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Lock in some constraints once (brand color, a fixed shape, allowed sets...) and
|
|
15
|
+
* stamp out many pictos that all obey them. Per-call values win over the preset.
|
|
16
|
+
*
|
|
17
|
+
* const brand = picto.preset({ color: '#19c37d' })
|
|
18
|
+
* brand.character(userId) // brand body, everything else random per user
|
|
19
|
+
* brand.character({ seed: userId, mode: 'mono' }) // ...and also lock the mode
|
|
20
|
+
*/
|
|
21
|
+
declare function preset(base: CharConfig): Preset;
|
|
22
|
+
declare const picto: {
|
|
23
|
+
character: typeof character;
|
|
24
|
+
preset: typeof preset;
|
|
25
|
+
gradient: typeof gradient;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
interface Parts {
|
|
29
|
+
bodies: Record<string, string>;
|
|
30
|
+
eyes: Record<string, string>;
|
|
31
|
+
eyebrows: Record<string, string>;
|
|
32
|
+
backgrounds: Record<string, string>;
|
|
33
|
+
}
|
|
34
|
+
declare const PARTS: Parts;
|
|
35
|
+
|
|
36
|
+
export { CharConfig, CharInput, Character, PARTS, type Parts, type Preset, character, gradient, picto, preset };
|
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { c as CharInput, d as Character, b as CharConfig, j as gradient } from './character-DAS3IMm1.js';
|
|
2
|
+
export { A as AnimEvent, a as AnimName, B as BGS, C as COLORS, e as ComposeArgs, D as DEFAULT_TUNING, E as EyeKind, M as Mode, O as OneOrMany, P as PREFIXES, f as PalEntry, R as Resolved, S as SHAPES, g as SvgOptions, T as Tuning, h as buildPalette, i as compose, r as resolve } from './character-DAS3IMm1.js';
|
|
3
|
+
export { hashSeed, mulberry32 } from './rng.js';
|
|
4
|
+
|
|
5
|
+
/** Create a picto from a seed, a string, or an explicit config object. */
|
|
6
|
+
declare function character(input?: CharInput): Character;
|
|
7
|
+
interface Preset {
|
|
8
|
+
/** Make a picto with the preset baked in, plus a per-call seed (or a config object to add more locks). */
|
|
9
|
+
character(input?: CharInput): Character;
|
|
10
|
+
/** The constraints this preset locks in. */
|
|
11
|
+
readonly config: CharConfig;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Lock in some constraints once (brand color, a fixed shape, allowed sets...) and
|
|
15
|
+
* stamp out many pictos that all obey them. Per-call values win over the preset.
|
|
16
|
+
*
|
|
17
|
+
* const brand = picto.preset({ color: '#19c37d' })
|
|
18
|
+
* brand.character(userId) // brand body, everything else random per user
|
|
19
|
+
* brand.character({ seed: userId, mode: 'mono' }) // ...and also lock the mode
|
|
20
|
+
*/
|
|
21
|
+
declare function preset(base: CharConfig): Preset;
|
|
22
|
+
declare const picto: {
|
|
23
|
+
character: typeof character;
|
|
24
|
+
preset: typeof preset;
|
|
25
|
+
gradient: typeof gradient;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
interface Parts {
|
|
29
|
+
bodies: Record<string, string>;
|
|
30
|
+
eyes: Record<string, string>;
|
|
31
|
+
eyebrows: Record<string, string>;
|
|
32
|
+
backgrounds: Record<string, string>;
|
|
33
|
+
}
|
|
34
|
+
declare const PARTS: Parts;
|
|
35
|
+
|
|
36
|
+
export { CharConfig, CharInput, Character, PARTS, type Parts, type Preset, character, gradient, picto, preset };
|
package/dist/core.js
ADDED