@doan-labs/peek 1.0.0 → 2.0.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 +64 -1
- package/dist/bloc.d.ts +2 -0
- package/dist/core.d.ts +9 -0
- package/dist/draw.d.ts +24 -2
- package/dist/identity.d.ts +4 -1
- package/dist/identity.js +22 -2
- package/dist/index.d.ts +1 -7
- package/dist/index.js +719 -142
- package/dist/peek.svelte +75 -0
- package/dist/peek.svelte.d.ts +5 -0
- package/dist/svelte-peek.d.ts +14 -0
- package/dist/svelte-peek.js +2205 -0
- package/dist/svelte.d.ts +3 -0
- package/dist/svelte.js +1650 -0
- package/dist/svg.d.ts +3 -1
- package/dist/svg.js +737 -166
- package/dist/tables.d.ts +67 -1
- package/dist/vue.d.ts +17 -0
- package/dist/vue.js +2302 -0
- package/package.json +30 -5
- package/src/bloc.ts +326 -0
- package/src/core.ts +39 -0
- package/src/draw.ts +522 -109
- package/src/identity.ts +11 -0
- package/src/index.ts +1 -26
- package/src/peek.svelte +75 -0
- package/src/peek.svelte.d.ts +5 -0
- package/src/peek.tsx +1 -1
- package/src/svelte-peek.ts +18 -0
- package/src/svelte.ts +3 -0
- package/src/svg.ts +30 -2
- package/src/tables.ts +74 -2
- package/src/vue.ts +133 -0
package/dist/tables.d.ts
CHANGED
|
@@ -210,6 +210,59 @@ export declare const COLORS: {
|
|
|
210
210
|
readonly deep: "#8FC7D1";
|
|
211
211
|
};
|
|
212
212
|
};
|
|
213
|
+
export declare const VARIANTS: readonly ["peek", "haze", "bloc"];
|
|
214
|
+
export type Variant = (typeof VARIANTS)[number];
|
|
215
|
+
/**
|
|
216
|
+
* Haze, transcribed from the Haze sheet (01.3). Each ink has a glow and a
|
|
217
|
+
* tint; a body is hazed by the tint of one of its two neighbors on the hue
|
|
218
|
+
* wheel, so the tint is never picked by hand.
|
|
219
|
+
*/
|
|
220
|
+
export declare const HAZE: {
|
|
221
|
+
readonly lavender: {
|
|
222
|
+
readonly tint: "#C8B1F5";
|
|
223
|
+
readonly glow: "#F2EDFD";
|
|
224
|
+
};
|
|
225
|
+
readonly fog: {
|
|
226
|
+
readonly tint: "#9EC3F2";
|
|
227
|
+
readonly glow: "#E6F1FF";
|
|
228
|
+
};
|
|
229
|
+
readonly clay: {
|
|
230
|
+
readonly tint: "#F4AE93";
|
|
231
|
+
readonly glow: "#FEECE5";
|
|
232
|
+
};
|
|
233
|
+
readonly mint: {
|
|
234
|
+
readonly tint: "#A3DAB5";
|
|
235
|
+
readonly glow: "#E5F5EA";
|
|
236
|
+
};
|
|
237
|
+
readonly butter: {
|
|
238
|
+
readonly tint: "#E1CC7A";
|
|
239
|
+
readonly glow: "#F4F0E0";
|
|
240
|
+
};
|
|
241
|
+
readonly rose: {
|
|
242
|
+
readonly tint: "#F0A9C4";
|
|
243
|
+
readonly glow: "#FDEAF1";
|
|
244
|
+
};
|
|
245
|
+
readonly aqua: {
|
|
246
|
+
readonly tint: "#85D3DC";
|
|
247
|
+
readonly glow: "#E0F5F7";
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
/** The hue wheel, warm to cool: a body's warm side is the entry before it. */
|
|
251
|
+
export declare const WHEEL: readonly ["clay", "butter", "mint", "aqua", "fog", "lavender", "rose"];
|
|
252
|
+
/**
|
|
253
|
+
* Bloc's strong inks, palette P2 of the Bloc sheet (02.4): the same hue at
|
|
254
|
+
* OKLCH L 0.72 and C 0.12, butter, mint and aqua held lighter so none goes
|
|
255
|
+
* olive. The strong ink fills the dark half and the trait.
|
|
256
|
+
*/
|
|
257
|
+
export declare const BLOC: {
|
|
258
|
+
readonly lavender: "#B093E5";
|
|
259
|
+
readonly fog: "#7BA8DF";
|
|
260
|
+
readonly clay: "#E38A66";
|
|
261
|
+
readonly mint: "#82CB9B";
|
|
262
|
+
readonly butter: "#E2CA6A";
|
|
263
|
+
readonly rose: "#DF84A8";
|
|
264
|
+
readonly aqua: "#5EC3CD";
|
|
265
|
+
};
|
|
213
266
|
/** Discrete anatomy. Each part reads every channel its feature owns. */
|
|
214
267
|
export declare const PARTS: {
|
|
215
268
|
readonly eyes: readonly ["oval", "bead", "ring"];
|
|
@@ -218,6 +271,19 @@ export declare const PARTS: {
|
|
|
218
271
|
readonly cheeks: readonly ["oval", "dots", "lines"];
|
|
219
272
|
readonly trait: readonly ["square", "fin", "ring", "dot", "peak"];
|
|
220
273
|
};
|
|
274
|
+
export declare const ACCESSORY_INK: {
|
|
275
|
+
readonly knot: "#E5412D";
|
|
276
|
+
};
|
|
277
|
+
/** Independent wardrobe slots. peek@1 picks none; callers can dress it. */
|
|
278
|
+
export declare const ACCESSORIES: {
|
|
279
|
+
readonly eyewear: readonly ["none", "glasses", "sunglasses"];
|
|
280
|
+
readonly headwear: readonly ["none", "bow", "cap", "sprout"];
|
|
281
|
+
readonly neckwear: readonly ["none", "tie"];
|
|
282
|
+
};
|
|
283
|
+
export type Eyewear = (typeof ACCESSORIES.eyewear)[number];
|
|
284
|
+
export type Headwear = (typeof ACCESSORIES.headwear)[number];
|
|
285
|
+
export type Neckwear = (typeof ACCESSORIES.neckwear)[number];
|
|
286
|
+
export type AccessorySlot = keyof typeof ACCESSORIES;
|
|
221
287
|
export type Face = keyof typeof FACES;
|
|
222
288
|
export type Color = keyof typeof COLORS;
|
|
223
289
|
export type Part = keyof typeof PARTS;
|
|
@@ -226,7 +292,7 @@ export type Brows = (typeof PARTS.brows)[number];
|
|
|
226
292
|
export type Mouth = (typeof PARTS.mouth)[number];
|
|
227
293
|
export type Cheeks = (typeof PARTS.cheeks)[number];
|
|
228
294
|
export type Trait = (typeof PARTS.trait)[number];
|
|
229
|
-
export type Axis = 'face' | 'color' | Part;
|
|
295
|
+
export type Axis = 'face' | 'color' | Part | AccessorySlot;
|
|
230
296
|
/** How much of each list a version may pick from. Append-only too. */
|
|
231
297
|
export declare const VERSIONS: Record<number, Record<Axis, number>>;
|
|
232
298
|
export declare const LATEST = 1;
|
package/dist/vue.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Gaze } from './draw.js';
|
|
2
|
+
import { type PeekOptions } from './svg.js';
|
|
3
|
+
export * from './core.js';
|
|
4
|
+
export type PeekProps = Omit<PeekOptions, 'gaze' | 'id'> & {
|
|
5
|
+
name: string;
|
|
6
|
+
/** x and y in -1..1, or 'pointer' to follow the pointer (animate only). */
|
|
7
|
+
gaze?: Gaze | 'pointer';
|
|
8
|
+
/** Bring it to life after mount. Off under prefers-reduced-motion. */
|
|
9
|
+
animate?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const Peek: import("vue").DefineSetupFnComponent<PeekProps, {}, {}, Omit<PeekOptions, "id" | "gaze"> & {
|
|
12
|
+
name: string;
|
|
13
|
+
/** x and y in -1..1, or 'pointer' to follow the pointer (animate only). */
|
|
14
|
+
gaze?: Gaze | "pointer";
|
|
15
|
+
/** Bring it to life after mount. Off under prefers-reduced-motion. */
|
|
16
|
+
animate?: boolean;
|
|
17
|
+
} & {}, import("vue").PublicProps>;
|