stika-ui 0.1.0 → 0.1.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/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, CSSProperties, ComponentProps } from 'react';
3
3
 
4
- type Props$u = {
4
+ type Props$t = {
5
5
  /** "handle/slug@version", e.g. "david/cat@2". Pin a version; without one it follows the latest. */
6
6
  id: string;
7
7
  size?: number;
@@ -10,11 +10,13 @@ type Props$u = {
10
10
  color?: string;
11
11
  className?: string;
12
12
  alt?: string;
13
+ /** Trigger a 360° spin when clicked. */
14
+ spinOnClick?: boolean;
13
15
  /** Where the sticker API lives. Same origin by default. */
14
16
  baseUrl?: string;
15
17
  };
16
18
  /** Loads a community sticker at runtime. Renders nothing if it is missing or has been removed. */
17
- declare function CommunitySticker$1({ id, size, peel, rotate, color, className, alt, baseUrl, }: Props$u): react.JSX.Element | null;
19
+ declare function CommunitySticker$1({ id, size, peel, rotate, color, className, alt, spinOnClick, baseUrl, }: Props$t): react.JSX.Element | null;
18
20
 
19
21
  type StickerProps = {
20
22
  /** Accessible description of the sticker. */
@@ -45,12 +47,14 @@ type StickerProps = {
45
47
  color?: string;
46
48
  className?: string;
47
49
  style?: CSSProperties;
50
+ /** Allow clicking the sticker to trigger a 360° spin. */
51
+ spinOnClick?: boolean;
48
52
  };
49
53
  /** Wraps any art in a white die-cut border and soft shadow. */
50
- declare function Sticker({ alt, src, width, height, children, size, outline, outlineShape, peel, sheen, draggable, rotate, color, className, style, }: StickerProps): react.JSX.Element;
54
+ declare function Sticker({ alt, src, width, height, children, size, outline, outlineShape, peel, sheen, draggable, rotate, color, className, style, spinOnClick, }: StickerProps): react.JSX.Element;
51
55
 
52
- /** What the server stores and serves for a published sticker. Paths are generated by our editor, never uploaded SVG. */
53
- type StickerArt = {
56
+ type DrawingStickerArt = {
57
+ type?: "drawing";
54
58
  box: {
55
59
  x: number;
56
60
  y: number;
@@ -63,8 +67,20 @@ type StickerArt = {
63
67
  fill: string;
64
68
  }[];
65
69
  };
70
+ type SvgStickerArt = {
71
+ type: "svg";
72
+ box: {
73
+ x: number;
74
+ y: number;
75
+ width: number;
76
+ height: number;
77
+ };
78
+ outline: number;
79
+ svg: string;
80
+ };
81
+ type StickerArt = DrawingStickerArt | SvgStickerArt;
66
82
 
67
- type Props$t = {
83
+ type Props$s = {
68
84
  art: StickerArt;
69
85
  alt: string;
70
86
  size?: number;
@@ -72,69 +88,69 @@ type Props$t = {
72
88
  rotate?: number;
73
89
  color?: string;
74
90
  className?: string;
91
+ spinOnClick?: boolean;
75
92
  };
76
- /** Renders a published sticker from its stored art. Used by the gallery and by CommunitySticker. */
77
- declare function ArtSticker({ art, alt, size, peel, rotate, color, className }: Props$t): react.JSX.Element;
93
+ declare function ArtSticker({ art, alt, size, peel, rotate, color, className, spinOnClick, }: Props$s): react.JSX.Element;
78
94
 
79
95
  /**
80
96
  * PLACEHOLDER: pixel-grid vector trace of the orange laptop character.
81
97
  * Approximate (a few stray pixels near the laptop edge). Replace with your own art before launch.
82
98
  */
83
- type Props$s = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
84
- alt?: string;
85
- };
86
- declare function LaptopBuddy({ alt, outline, ...rest }: Props$s): react.JSX.Element;
87
-
88
99
  type Props$r = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
89
100
  alt?: string;
90
101
  };
91
- declare function KickDoodle({ alt, outline, ...rest }: Props$r): react.JSX.Element;
102
+ declare function LaptopBuddy({ alt, outline, ...rest }: Props$r): react.JSX.Element;
92
103
 
93
104
  type Props$q = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
94
105
  alt?: string;
95
106
  };
96
- declare function ChefBuddy({ alt, outline, ...rest }: Props$q): react.JSX.Element;
107
+ declare function KickDoodle({ alt, outline, ...rest }: Props$q): react.JSX.Element;
97
108
 
98
109
  type Props$p = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
99
110
  alt?: string;
100
111
  };
101
- declare function Orgy({ alt, outline, ...rest }: Props$p): react.JSX.Element;
112
+ declare function ChefBuddy({ alt, outline, ...rest }: Props$p): react.JSX.Element;
102
113
 
103
114
  type Props$o = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
104
115
  alt?: string;
105
116
  };
106
- declare function PopCat({ alt, outline, ...rest }: Props$o): react.JSX.Element;
117
+ declare function Orgy({ alt, outline, ...rest }: Props$o): react.JSX.Element;
107
118
 
108
119
  type Props$n = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
109
120
  alt?: string;
110
121
  };
111
- declare function SkateJesus({ alt, outline, ...rest }: Props$n): react.JSX.Element;
122
+ declare function PopCat({ alt, outline, ...rest }: Props$n): react.JSX.Element;
112
123
 
113
124
  type Props$m = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
114
125
  alt?: string;
115
126
  };
127
+ declare function SkateJesus({ alt, outline, ...rest }: Props$m): react.JSX.Element;
128
+
129
+ type Props$l = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
130
+ alt?: string;
131
+ };
116
132
  /** Original Red */
117
- declare function kyodoCat({ alt, ...rest }: Props$m): react.JSX.Element;
133
+ declare function kyodoCat({ alt, ...rest }: Props$l): react.JSX.Element;
118
134
  /** Sakura Pink */
119
- declare function KyodoCatPink({ alt, ...rest }: Props$m): react.JSX.Element;
135
+ declare function KyodoCatPink({ alt, ...rest }: Props$l): react.JSX.Element;
120
136
  /** Sunny Yellow */
121
- declare function KyodoCatYellow({ alt, ...rest }: Props$m): react.JSX.Element;
137
+ declare function KyodoCatYellow({ alt, ...rest }: Props$l): react.JSX.Element;
122
138
  /** Tangerine Orange */
123
- declare function KyodoCatOrange({ alt, ...rest }: Props$m): react.JSX.Element;
139
+ declare function KyodoCatOrange({ alt, ...rest }: Props$l): react.JSX.Element;
124
140
  /** Matcha Green */
125
- declare function KyodoCatGreen({ alt, ...rest }: Props$m): react.JSX.Element;
141
+ declare function KyodoCatGreen({ alt, ...rest }: Props$l): react.JSX.Element;
126
142
  /** Fresh Mint */
127
- declare function KyodoCatMint({ alt, ...rest }: Props$m): react.JSX.Element;
143
+ declare function KyodoCatMint({ alt, ...rest }: Props$l): react.JSX.Element;
128
144
  /** Sky Blue */
129
- declare function KyodoCatSky({ alt, ...rest }: Props$m): react.JSX.Element;
145
+ declare function KyodoCatSky({ alt, ...rest }: Props$l): react.JSX.Element;
130
146
  /** Cobalt Blue */
131
- declare function KyodoCatBlue({ alt, ...rest }: Props$m): react.JSX.Element;
147
+ declare function KyodoCatBlue({ alt, ...rest }: Props$l): react.JSX.Element;
132
148
  /** Grape Purple */
133
- declare function KyodoCatPurple({ alt, ...rest }: Props$m): react.JSX.Element;
149
+ declare function KyodoCatPurple({ alt, ...rest }: Props$l): react.JSX.Element;
134
150
  /** Midnight Black */
135
- declare function KyodoCatBlack({ alt, ...rest }: Props$m): react.JSX.Element;
151
+ declare function KyodoCatBlack({ alt, ...rest }: Props$l): react.JSX.Element;
136
152
  /** Cloud Silver-White */
137
- declare function KyodoCatWhite({ alt, ...rest }: Props$m): react.JSX.Element;
153
+ declare function KyodoCatWhite({ alt, ...rest }: Props$l): react.JSX.Element;
138
154
  declare const KyodoCats: {
139
155
  kyodoCat: typeof kyodoCat;
140
156
  KyodoCatPink: typeof KyodoCatPink;
@@ -149,10 +165,10 @@ declare const KyodoCats: {
149
165
  KyodoCatWhite: typeof KyodoCatWhite;
150
166
  };
151
167
 
152
- type Props$l = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
168
+ type Props$k = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
153
169
  alt?: string;
154
170
  };
155
- declare function Fire({ alt, outline, ...rest }: Props$l): react.JSX.Element;
171
+ declare function Fire({ alt, outline, ...rest }: Props$k): react.JSX.Element;
156
172
 
157
173
  declare function SoapHatCat({ alt, outline, ...rest }: {
158
174
  [x: string]: any;
@@ -243,65 +259,60 @@ declare function SmirkNerdCat({ alt, outline, ...rest }: {
243
259
  outline?: number | undefined;
244
260
  }): react.JSX.Element;
245
261
 
246
- type Props$k = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
247
- alt?: string;
248
- };
249
- declare function Clock({ alt, outline, ...rest }: Props$k): react.JSX.Element;
250
-
251
262
  type Props$j = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
252
263
  alt?: string;
253
264
  };
254
- declare function Discord({ alt, outline, ...rest }: Props$j): react.JSX.Element;
265
+ declare function Clock({ alt, outline, ...rest }: Props$j): react.JSX.Element;
255
266
 
256
267
  type Props$i = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
257
268
  alt?: string;
258
269
  };
259
- declare function CloseFolder({ alt, outline, ...rest }: Props$i): react.JSX.Element;
270
+ declare function Discord({ alt, outline, ...rest }: Props$i): react.JSX.Element;
260
271
 
261
272
  type Props$h = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
262
273
  alt?: string;
263
274
  };
264
- declare function LinkedIn({ alt, outline, ...rest }: Props$h): react.JSX.Element;
275
+ declare function CloseFolder({ alt, outline, ...rest }: Props$h): react.JSX.Element;
265
276
 
266
277
  type Props$g = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
267
278
  alt?: string;
268
279
  };
269
- declare function LocationPin({ alt, outline, ...rest }: Props$g): react.JSX.Element;
280
+ declare function LinkedIn({ alt, outline, ...rest }: Props$g): react.JSX.Element;
270
281
 
271
282
  type Props$f = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
272
283
  alt?: string;
273
284
  };
274
- declare function PointerHand({ alt, outline, ...rest }: Props$f): react.JSX.Element;
285
+ declare function LocationPin({ alt, outline, ...rest }: Props$f): react.JSX.Element;
275
286
 
276
287
  type Props$e = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
277
288
  alt?: string;
278
289
  };
279
- declare function Spotify({ alt, outline, ...rest }: Props$e): react.JSX.Element;
290
+ declare function PointerHand({ alt, outline, ...rest }: Props$e): react.JSX.Element;
280
291
 
281
292
  type Props$d = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
282
293
  alt?: string;
283
294
  };
284
- declare function LuffySmile({ alt, outline, ...rest }: Props$d): react.JSX.Element;
295
+ declare function Spotify({ alt, outline, ...rest }: Props$d): react.JSX.Element;
285
296
 
286
297
  type Props$c = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
287
298
  alt?: string;
288
299
  };
289
- declare function PsyduckSweat({ alt, outline, ...rest }: Props$c): react.JSX.Element;
300
+ declare function LuffySmile({ alt, outline, ...rest }: Props$c): react.JSX.Element;
290
301
 
291
302
  type Props$b = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
292
303
  alt?: string;
293
304
  };
294
- declare function SameShitLogo({ alt, outline, ...rest }: Props$b): react.JSX.Element;
305
+ declare function PsyduckSweat({ alt, outline, ...rest }: Props$b): react.JSX.Element;
295
306
 
296
307
  type Props$a = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
297
308
  alt?: string;
298
309
  };
299
- declare function Harrymohara({ alt, outline, ...rest }: Props$a): react.JSX.Element;
310
+ declare function SameShitLogo({ alt, outline, ...rest }: Props$a): react.JSX.Element;
300
311
 
301
312
  type Props$9 = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
302
313
  alt?: string;
303
314
  };
304
- declare function DilMeinModi({ alt, outline, ...rest }: Props$9): react.JSX.Element;
315
+ declare function Harrymohara({ alt, outline, ...rest }: Props$9): react.JSX.Element;
305
316
 
306
317
  type Props$8 = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children"> & {
307
318
  alt?: string;
@@ -348,6 +359,135 @@ type Props = Omit<StickerProps, "alt" | "src" | "width" | "height" | "children">
348
359
  };
349
360
  declare function FormulaOne({ alt, outline, ...rest }: Props): react.JSX.Element;
350
361
 
362
+ type BananaCatProps = Omit<ComponentProps<typeof Sticker>, "alt" | "width" | "height" | "children"> & {
363
+ alt?: string;
364
+ };
365
+ /**
366
+ * Pixel-art Banana Cat sticker (58x120 crisp pixel grid)
367
+ */
368
+ declare function BananaCat({ alt, outline, ...rest }: BananaCatProps): react.JSX.Element;
369
+
370
+ type TreeProps = Omit<ComponentProps<typeof Sticker>, "alt" | "width" | "height" | "children"> & {
371
+ alt?: string;
372
+ };
373
+ /**
374
+ * Row 1, Col 1: Tall Oval Pixel Tree (40x85)
375
+ */
376
+ declare function TreeTallOval({ alt, outline, ...rest }: TreeProps): react.JSX.Element;
377
+ /**
378
+ * Row 1, Col 2: Slim Cypress Pixel Tree (50x85)
379
+ */
380
+ declare function TreeSlimCypress({ alt, outline, ...rest }: TreeProps): react.JSX.Element;
381
+ /**
382
+ * Row 1, Col 3: Round Oak Pixel Tree with Berries (60x75)
383
+ */
384
+ declare function TreeRoundOak({ alt, outline, ...rest }: TreeProps): react.JSX.Element;
385
+ /**
386
+ * Row 2, Col 1: Narrow Tapered Pine Pixel Tree (40x85)
387
+ */
388
+ declare function TreeNarrowPine({ alt, outline, ...rest }: TreeProps): react.JSX.Element;
389
+ /**
390
+ * Row 2, Col 2: Square Canopy Pixel Tree (65x85)
391
+ */
392
+ declare function TreeSquareCanopy({ alt, outline, ...rest }: TreeProps): react.JSX.Element;
393
+ /**
394
+ * Row 2, Col 3: Compact Round Bush Pixel Tree (55x65)
395
+ */
396
+ declare function TreeCompactBush({ alt, outline, ...rest }: TreeProps): react.JSX.Element;
397
+ /**
398
+ * Row 3, Col 1: Lush Tall Oval Pixel Tree (55x90)
399
+ */
400
+ declare function TreeLushOval({ alt, outline, ...rest }: TreeProps): react.JSX.Element;
401
+ /**
402
+ * Row 3, Col 2: Twin-Canopy Bonsai Pixel Tree (70x75)
403
+ */
404
+ declare function TreeTwinCanopy({ alt, outline, ...rest }: TreeProps): react.JSX.Element;
405
+ /**
406
+ * Row 3, Col 3: Slender Spire Conifer Pixel Tree (50x85)
407
+ */
408
+ declare function TreeSlenderSpire({ alt, outline, ...rest }: TreeProps): react.JSX.Element;
409
+ declare const TREES: {
410
+ TreeTallOval: typeof TreeTallOval;
411
+ TreeSlimCypress: typeof TreeSlimCypress;
412
+ TreeRoundOak: typeof TreeRoundOak;
413
+ TreeCompactBush: typeof TreeCompactBush;
414
+ TreeNarrowPine: typeof TreeNarrowPine;
415
+ TreeSquareCanopy: typeof TreeSquareCanopy;
416
+ TreeLushOval: typeof TreeLushOval;
417
+ TreeTwinCanopy: typeof TreeTwinCanopy;
418
+ TreeSlenderSpire: typeof TreeSlenderSpire;
419
+ };
420
+
421
+ type LeopardProps = Omit<ComponentProps<typeof Sticker>, "alt" | "width" | "height" | "children"> & {
422
+ alt?: string;
423
+ };
424
+ declare function Leopard({ alt, outline, ...rest }: LeopardProps): react.JSX.Element;
425
+
426
+ type OstrichProps = Omit<ComponentProps<typeof Sticker>, "alt" | "width" | "height" | "children"> & {
427
+ alt?: string;
428
+ };
429
+ declare function Ostrich({ alt, outline, ...rest }: OstrichProps): react.JSX.Element;
430
+
431
+ type LionProps = Omit<ComponentProps<typeof Sticker>, "alt" | "width" | "height" | "children"> & {
432
+ alt?: string;
433
+ };
434
+ declare function Lion({ alt, outline, ...rest }: LionProps): react.JSX.Element;
435
+
436
+ type ElephantProps = Omit<ComponentProps<typeof Sticker>, "alt" | "width" | "height" | "children"> & {
437
+ alt?: string;
438
+ };
439
+ declare function Elephant({ alt, outline, ...rest }: ElephantProps): react.JSX.Element;
440
+
441
+ type GiraffeProps = Omit<ComponentProps<typeof Sticker>, "alt" | "width" | "height" | "children"> & {
442
+ alt?: string;
443
+ };
444
+ declare function Giraffe({ alt, outline, ...rest }: GiraffeProps): react.JSX.Element;
445
+
446
+ type ZebraProps = Omit<ComponentProps<typeof Sticker>, "alt" | "width" | "height" | "children"> & {
447
+ alt?: string;
448
+ };
449
+ declare function Zebra({ alt, outline, ...rest }: ZebraProps): react.JSX.Element;
450
+
451
+ type CrocodileProps = Omit<ComponentProps<typeof Sticker>, "alt" | "width" | "height" | "children"> & {
452
+ alt?: string;
453
+ };
454
+ declare function Crocodile({ alt, outline, ...rest }: CrocodileProps): react.JSX.Element;
455
+
456
+ type MonkeyProps = Omit<ComponentProps<typeof Sticker>, "alt" | "width" | "height" | "children"> & {
457
+ alt?: string;
458
+ };
459
+ declare function Monkey({ alt, outline, ...rest }: MonkeyProps): react.JSX.Element;
460
+
461
+ type BuffaloProps = Omit<ComponentProps<typeof Sticker>, "alt" | "width" | "height" | "children"> & {
462
+ alt?: string;
463
+ };
464
+ declare function Buffalo({ alt, outline, ...rest }: BuffaloProps): react.JSX.Element;
465
+
466
+ type AppBadgeProps = Omit<ComponentProps<typeof Sticker>, "alt" | "width" | "height" | "children"> & {
467
+ alt?: string;
468
+ };
469
+ declare function AppBadge({ alt, outline, ...rest }: AppBadgeProps): react.JSX.Element;
470
+
471
+ type ConeProps = Omit<ComponentProps<typeof Sticker>, "alt" | "width" | "height" | "children"> & {
472
+ alt?: string;
473
+ };
474
+ declare function Cone({ alt, outline, ...rest }: ConeProps): react.JSX.Element;
475
+
476
+ type BunnyProps = Omit<ComponentProps<typeof Sticker>, "alt" | "width" | "height" | "children"> & {
477
+ alt?: string;
478
+ };
479
+ declare function Bunny({ alt, outline, ...rest }: BunnyProps): react.JSX.Element;
480
+
481
+ type NazarProps = Omit<ComponentProps<typeof Sticker>, "alt" | "width" | "height" | "children"> & {
482
+ alt?: string;
483
+ };
484
+ declare function Nazar({ alt, outline, ...rest }: NazarProps): react.JSX.Element;
485
+
486
+ type CatSitProps = Omit<ComponentProps<typeof Sticker>, "alt" | "width" | "height" | "children"> & {
487
+ alt?: string;
488
+ };
489
+ declare function CatSit({ alt, outline, ...rest }: CatSitProps): react.JSX.Element;
490
+
351
491
  declare function CommunitySticker(props: ComponentProps<typeof CommunitySticker$1>): react.JSX.Element;
352
492
 
353
- export { AmongUsVent, ArtSticker, BuriBuriZaemon, CartoonEarth, ChefBuddy, Clock, CloseFolder, ComicBurst, CommunitySticker, DilMeinModi, Discord, FighterCat, Fire, FormulaOne, Harrymohara, KermitFire, KickDoodle, KyodoCats, LaptopBuddy, LinkedIn, LocationPin, LuffySmile, MonsterWhiteCan, NerdCatFinger, OmgBurst, OpenFolder, Orgy, PerryCool, PixelCrown, PixelCursor, PixelEarth, PointerHand, PopCat, PsyduckSweat, SameShitLogo, ScruffyWhiteCat, SkateJesus, SmirkNerdCat, SniffingCat, SoapHatCat, Spotify, Sticker, type StickerProps, Weekend };
493
+ export { AmongUsVent, AppBadge, ArtSticker, BananaCat, Buffalo, Bunny, BuriBuriZaemon, CartoonEarth, CatSit, ChefBuddy, Clock, CloseFolder, ComicBurst, CommunitySticker, Cone, Crocodile, Discord, Elephant, FighterCat, Fire, FormulaOne, Giraffe, Harrymohara, KermitFire, KickDoodle, KyodoCats, LaptopBuddy, Leopard, LinkedIn, Lion, LocationPin, LuffySmile, Monkey, MonsterWhiteCan, Nazar, NerdCatFinger, OmgBurst, OpenFolder, Orgy, Ostrich, PerryCool, PixelCrown, PixelCursor, PixelEarth, PointerHand, PopCat, PsyduckSweat, SameShitLogo, ScruffyWhiteCat, SkateJesus, SmirkNerdCat, SniffingCat, SoapHatCat, Spotify, Sticker, type StickerProps, TREES, Weekend, Zebra };