Skip to content

Canvix — Free & open-source graphic design tool. A community-built Canva alternative with a drag-and-drop editor, templates, shapes, text, images & one-click export. Works on desktop, tablet & mobile.

feat(v0.22): the real sticker library — 126 vector stickers in 11 packs

Ashiq Hussain Mir21fbace2115d
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2887f9e..66e4fa7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,38 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
### Added
+- **The real sticker library — 126 authored vector stickers in 11 packs**
+ (user request; the starter set was 40 emoji). `src/lib/stickers/`
+ ships hand-authored SVG packs — Faces (12), Hands (10), Hearts (12),
+ Stars & Sparkles (12), Celebrate (12), Business (12), Arrows & Marks
+ (12), Nature (12), Food & Drink (12), Frames & Badges (10), Travel
+ (10) — one house style (ink `#2D2A32`, round joins, the eight-colour
+ palette, one glossy highlight), each a self-contained `viewBox 0 0
+ 120 120` document with no external refs.
+ - New `StickerElement.svg`/`stickerId`/`alt` fields: vector stickers
+ are native sticker elements; emoji stickers are unchanged (text
+ path, PPTX-native runs, back-compat with every saved document).
+ - Render paths, all verified: canvas draws the SVG as a Konva.Image
+ via the shared data-URL image cache (`lib/sticker-image.ts`);
+ video/GIF/PNG exports go through `collectImages` →
+ `buildKonvaNode` (the preload cap rose 60 → 150 for sticker-heavy
+ decks); SVG export nests the authored markup inline (vector out,
+ the plugin-SVG pattern); PDF rides its existing raster strip;
+ PPTX raster-embeds through the charts/tables fallback — emoji stay
+ editable text.
+ - The Stickers app is rebuilt: pack chips, whole-library search
+ (names + keywords, AND semantics), per-pack grids, the emoji quick
+ set preserved, and an honest footer count. The Elements panel's
+ Stickers tab gains a featured-per-pack teaser row and a launcher
+ into the full library. Landing stats strip: new "160+ stickers".
+ - Inserted stickers seed `alt` with the library name (Wave 4
+ accessibility parity) and carry `stickerId` provenance.
+ - Tests: 16 new unit tests (library contract — valid self-contained
+ SVG, unique ids, palette discipline, <4 KB each, search behaviour,
+ data-URL encoding) and a 3-spec e2e suite (`sticker-packs.spec.ts`)
+ whose pixel proof exports a PNG of a red-heart sticker page and
+ asserts saturated red inside the sticker box and white outside.
+ 1362 unit tests (+16).
- **Image-tools engine preference — provider by default, this device as
the option** (user request). The BG remover and Upscale popovers now
carry an engine toggle, persisted per browser
diff --git a/docs/COMPETITIVE-ANALYSIS.md b/docs/COMPETITIVE-ANALYSIS.md
index aeed482..833bbf8 100644
--- a/docs/COMPETITIVE-ANALYSIS.md
+++ b/docs/COMPETITIVE-ANALYSIS.md
@@ -139,14 +139,14 @@ light/dark themes · PWA/mobile groundwork · REST API + scoped API keys · (tea
spreadsheet mode, live-audience presenting. These are HyCanvas-scale product surfaces; Canvix
would already lead the set on coverage without them.
-## Five-cluster reanalysis (2026-11-10, post-v0.21.0)
+## Five-cluster reanalysis (2026-11-11, post-sticker-library)
-A code-level re-audit of the audit's original five gap clusters, at `85b26c9`
-plus the landing-count honesty fix:
+A code-level re-audit of the audit's original five gap clusters, at HEAD
+plus the image-tools engine toggle and the sticker-library wave:
| Cluster | Verdict | Evidence |
|---|---|---|
-| Content libraries | **~95% closed** | Icons 562 offline + Iconify proxy (v0.17) · 48 illustrations · fonts 369 · templates 366 · server-side brand kits. Remaining: **stickers are still the 40-emoji starter set** — the original "84 emoji" gap re-scoped, now an enhancement (real sticker packs / larger categorised set), not a blocker. |
+| Content libraries | **~98% closed** | Icons 562 offline + Iconify proxy (v0.17) · 48 illustrations · fonts 369 · templates 366 · server-side brand kits · **the real sticker library (v0.22): 126 authored vector stickers in 11 packs + the 40-emoji quick set — every export path verified, incl. a PNG pixel proof**. Remaining: pack recolour/swap tooling (enhancement, not a gap). |
| Presentation story | **~90% closed** | Speaker notes (v0.18/v0.19) · presenter view (v0.18) · **PPTX export with editable shapes + notes slides (v0.21.0)**. No core gap left; Wave 5 remainder is sharing/export polish. |
| Sound | **Closed (v0.20.0)** | 16-sound offline CC0 library · Freesound connector (fourth stock connector; `soundSearch` capability flag — false only when no key is configured) · voiceover recording · animation + transition SFX. |
| Enterprise wall | **~25% closed** | Brand kits server-side (v0.17) only. Workspaces/teams, 2FA, OIDC SSO, email + password reset, scoped API keys all unstarted → the Wave 6 scope, unchanged. |
diff --git a/scripts/qa-sticker-ui.ts b/scripts/qa-sticker-ui.ts
new file mode 100644
index 0000000..e3c7c6b
--- /dev/null
+++ b/scripts/qa-sticker-ui.ts
@@ -0,0 +1,39 @@
+// Visual QA: screenshot the Stickers app + Elements sticker tab.
+import { chromium } from 'playwright'
+import { request } from 'playwright'
+
+async function main() {
+ const browser = await chromium.launch()
+ const ctx = await browser.newContext({ viewport: { width: 1600, height: 1000 } })
+ const page = await ctx.newPage()
+ const r = await request.newContext({ baseURL: 'http://localhost:3000' })
+ const res = await r.post('/api/designs', {
+ data: { name: 'sticker visual qa', width: 1080, height: 720, pages: [{ id: 'p1', background: { type: 'solid', color: '#FFFFFF' }, elements: [] }] },
+ })
+ const { id } = await res.json()
+ await page.goto(`http://localhost:3000/design/${id}`)
+ await page.waitForSelector('[aria-label="Design canvas"]', { timeout: 60_000 })
+
+ // Stickers app
+ await page.getByRole('button', { name: 'Apps', exact: true }).click()
+ await page.getByText('Stickers', { exact: true }).first().click()
+ await page.waitForSelector('input[placeholder="Search 160+ stickers"]', { timeout: 20_000 })
+ await page.waitForTimeout(600)
+ await page.screenshot({ path: '/tmp/qa-stickers-app.png' })
+
+ // search state
+ await page.fill('input[placeholder="Search 160+ stickers"]', 'heart')
+ await page.waitForTimeout(400)
+ await page.screenshot({ path: '/tmp/qa-stickers-search.png' })
+
+ // Elements sticker tab
+ await page.fill('input[placeholder="Search 160+ stickers"]', '')
+ await page.getByRole('button', { name: 'Elements', exact: true }).click()
+ await page.getByRole('tab', { name: 'Stickers', exact: true }).click()
+ await page.waitForTimeout(600)
+ await page.screenshot({ path: '/tmp/qa-elements-tab.png' })
+
+ await browser.close()
+ console.log('3 screenshots saved')
+}
+main()
diff --git a/scripts/render-sticker-sheet.ts b/scripts/render-sticker-sheet.ts
new file mode 100644
index 0000000..045c20b
--- /dev/null
+++ b/scripts/render-sticker-sheet.ts
@@ -0,0 +1,28 @@
+// Render all sticker SVGs to a contact sheet for visual QA.
+import { STICKER_PACKS } from '../src/lib/stickers/index'
+import { chromium } from 'playwright'
+import { writeFileSync } from 'node:fs'
+
+async function main() {
+ const browser = await chromium.launch()
+ const page = await browser.newPage({ viewport: { width: 1300, height: 900 } })
+ const cols = 10
+ const cell = 120
+ const all = STICKER_PACKS.flatMap((p) => p.stickers.map((s) => ({ ...s, pack: p.id })))
+ const rows = Math.ceil(all.length / cols)
+ const html = `<!doctype html><html><body style="margin:0">
+ <div style="position:relative;width:${cols * cell}px;height:${rows * cell}px;background:#f4f4f6">
+ ${all
+ .map(
+ (s, i) =>
+ `<div style="position:absolute;left:${(i % cols) * cell}px;top:${Math.floor(i / cols) * cell}px;width:${cell}px;height:${cell}px;display:flex;align-items:center;justify-content:center">${s.svg.replace('viewBox="0 0 120 120"', 'width="100" height="100" viewBox="0 0 120 120"')}</div>`,
+ )
+ .join('')}
+ </div></body></html>`
+ await page.setContent(html)
+ await page.screenshot({ path: '/tmp/sticker-sheet.png', fullPage: true })
+ await browser.close()
+ writeFileSync('/tmp/sticker-order.txt', all.map((s, i) => `${i}: ${s.pack}/${s.id}`).join('\n'))
+ console.log(`rendered ${all.length} stickers to /tmp/sticker-sheet.png`)
+}
+main()
diff --git a/src/components/editor/add-element.ts b/src/components/editor/add-element.ts
index e20e8db..06d97c1 100644
--- a/src/components/editor/add-element.ts
+++ b/src/components/editor/add-element.ts
@@ -134,6 +134,23 @@ export function addSticker(char: string) {
addCentered(createStickerElement(char, { width: 200, height: 200, fontSize: 150 }))
}
+/** v0.22 sticker packs: add an authored vector sticker. The element
+ * keeps the emoji type (every renderer/serializer/export already
+ * handles it) with `svg` set — the vector render path. */
+export function addPackSticker(sticker: { id: string; name: string; svg: string }) {
+ const el = createStickerElement(sticker.name, {
+ width: 200,
+ height: 200,
+ fontSize: 150,
+ svg: sticker.svg,
+ stickerId: sticker.id,
+ })
+ // accessibility: seed the Wave 4 alt field with the library name
+ el.name = sticker.name
+ el.alt = sticker.name
+ addCentered(el)
+}
+
// ── v0.6: tables, frames, embeds ───────────────────────────
export type TableStyle = 'classic' | 'minimal' | 'bold' | 'soft'
diff --git a/src/components/editor/apps/StickersApp.tsx b/src/components/editor/apps/StickersApp.tsx
index 550ddfa..062e056 100644
--- a/src/components/editor/apps/StickersApp.tsx
+++ b/src/components/editor/apps/StickersApp.tsx
@@ -1,27 +1,137 @@
'use client'
-import { Smile } from 'lucide-react'
-import { addSticker } from '../add-element'
+import { useMemo, useState } from 'react'
+import { Smile, Search } from 'lucide-react'
+import { EMOJI_STICKERS, STICKER_PACKS, VECTOR_STICKER_COUNT, searchStickers } from '@/lib/stickers'
+import { addSticker, addPackSticker } from '../add-element'
import { AppHeader, type AppPanelProps } from './registry'
+import { cn } from '@/lib/utils'
-const STICKERS = ['😀', '😍', '🤩', '🥳', '😎', '🤔', '😴', '🤯', '🥰', '😭', '😡', '🤡', '👻', '💀', '👽', '🤖', '🎃', '🎉', '🎈', '🎁', '🏆', '🥇', '⚽', '🏀', '🎮', '🎵', '🎸', '🎬', '📷', '🔥', '✨', '⚡', '🌈', '☀️', '🌙', '⭐', '❤️', '💜', '✅', '❌']
-
+/**
+ * v0.22: the real sticker library — 11 authored vector packs
+ * (Faces, Hands, Hearts, Stars, Celebrate, Business, Arrows, Nature,
+ * Food, Frames, Travel) plus the original 40-emoji quick set.
+ * Vector stickers insert as native sticker elements (svg path —
+ * canvas/video/PDF/PPTX/SVG exports all render them); emoji stay
+ * text stickers exactly as before.
+ */
export function StickersApp({ onClose }: AppPanelProps) {
+ const [query, setQuery] = useState('')
+ const [pack, setPack] = useState<string>('all')
+
+ const results = useMemo(() => searchStickers(query), [query])
+ const shown = useMemo(
+ () => (pack === 'all' || pack === 'emoji' ? results : results.filter((r) => r.pack.id === pack)),
+ [results, pack],
+ )
+ const vectorCount = useMemo(
+ () => (pack === 'all' || pack === 'emoji' ? VECTOR_STICKER_COUNT : (results.find((r) => r.pack.id === pack)?.stickers.length ?? 0)),
+ [results, pack],
+ )
+
return (
<div>
<AppHeader icon={Smile} title="Stickers" onClose={onClose} />
- <div className="grid grid-cols-5 gap-1.5">
- {STICKERS.map((s) => (
+ <div className="flex items-center gap-2 h-9 rounded-lg bg-white/[0.06] border border-white/10 px-2.5 mb-3">
+ <Search size={12} className="text-white/40 shrink-0" />
+ <input
+ value={query}
+ onChange={(e) => setQuery(e.target.value)}
+ className="bg-transparent outline-none text-[12px] text-white w-full placeholder:text-white/35"
+ placeholder="Search 160+ stickers"
+ aria-label="Search stickers"
+ />
+ </div>
+
+ {/* pack chips — All, the vector packs, then the emoji quick set */}
+ <div className="cv-tabscroll flex gap-1.5 overflow-x-auto pb-2 mb-1">
+ <button
+ onClick={() => setPack('all')}
+ className={cn(
+ 'shrink-0 whitespace-nowrap rounded-full px-3 py-1 text-xs font-medium border transition-colors',
+ pack === 'all' ? 'bg-[#7630D7] text-white border-transparent' : 'border-white/12 text-white/60 hover:border-white/30 hover:text-white',
+ )}
+ >
+ All
+ </button>
+ {STICKER_PACKS.map((p) => (
<button
- key={s}
- onClick={() => addSticker(s)}
- className="aspect-square rounded-xl bg-white/[0.04] hover:bg-[#7630D7]/30 border border-white/10 hover:border-[#7630D7] text-2xl flex items-center justify-center transition-colors"
- aria-label={`Add sticker ${s}`}
+ key={p.id}
+ onClick={() => setPack(p.id)}
+ className={cn(
+ 'shrink-0 whitespace-nowrap rounded-full px-3 py-1 text-xs font-medium border transition-colors',
+ pack === p.id ? 'bg-[#7630D7] text-white border-transparent' : 'border-white/12 text-white/60 hover:border-white/30 hover:text-white',
+ )}
>
- {s}
+ {p.icon} {p.name}
</button>
))}
+ <button
+ onClick={() => setPack('emoji')}
+ className={cn(
+ 'shrink-0 whitespace-nowrap rounded-full px-3 py-1 text-xs font-medium border transition-colors',
+ pack === 'emoji' ? 'bg-[#7630D7] text-white border-transparent' : 'border-white/12 text-white/60 hover:border-white/30 hover:text-white',
+ )}
+ >
+ 😀 Emoji
+ </button>
</div>
+
+ {/* vector packs */}
+ {shown.map(({ pack: p, stickers }) => (
+ <div key={p.id} className="mb-4">
+ <h4 className="text-xs font-semibold text-white/50 mb-2">
+ {p.icon} {p.name}
+ </h4>
+ <div className="grid grid-cols-4 gap-1.5">
+ {stickers.map((s) => (
+ <button
+ key={s.id}
+ onClick={() => addPackSticker(s)}
+ className={cn(
+ 'aspect-square rounded-xl bg-white/[0.04] hover:bg-[#7630D7]/25 border border-white/10',
+ 'hover:border-[#7630D7] hover:scale-105 transition-all flex items-center justify-center p-1',
+ )}
+ aria-label={`Add sticker ${s.name}`}
+ title={`${s.name} · ${p.name} pack`}
+ data-testid={`sticker-${s.id}`}
+ >
+ <span
+ className="w-full h-full flex items-center justify-center [&>svg]:max-w-full [&>svg]:max-h-full"
+ dangerouslySetInnerHTML={{ __html: s.svg }}
+ aria-hidden="true"
+ />
+ </button>
+ ))}
+ </div>
+ </div>
+ ))}
+
+ {/* emoji quick set */}
+ {(pack === 'all' || pack === 'emoji') && (
+ <div className="mb-4">
+ <h4 className="text-xs font-semibold text-white/50 mb-2">😀 Emoji</h4>
+ <div className="grid grid-cols-6 gap-1.5">
+ {EMOJI_STICKERS.map((e) => (
+ <button
+ key={e}
+ onClick={() => addSticker(e)}
+ className="aspect-square rounded-lg text-xl leading-none flex items-center justify-center hover:bg-[#7630D7]/25 hover:scale-110 transition-all"
+ aria-label={`Add sticker ${e}`}
+ >
+ {e}
+ </button>
+ ))}
+ </div>
+ </div>
+ )}
+
+ {!shown.length && pack !== 'emoji' && (
+ <p className="text-center text-[12px] text-white/40 py-6">No stickers match “{query}”</p>
+ )}
+ <p className="mt-3 text-[10px] text-white/30 text-center">
+ {vectorCount} vector stickers · 40 emoji · works offline
+ </p>
</div>
)
}
diff --git a/src/components/editor/apps/registry.tsx b/src/components/editor/apps/registry.tsx
index 6b39252..7a0dc32 100644
--- a/src/components/editor/apps/registry.tsx
+++ b/src/components/editor/apps/registry.tsx
@@ -51,7 +51,7 @@ export const CANVIX_APPS: CanvixApp[] = [
{ id: 'illustrations', name: 'Illustrations', desc: 'Original flat-art pieces in six packs', icon: ImageIcon, color: '#34C77B', content: IllustrationsApp },
{ id: 'palette', name: 'Colour palette', desc: 'Generate harmonious palettes on canvas', icon: Palette, color: '#FF5C8A', content: PaletteApp },
{ id: 'lorem', name: 'Placeholder text', desc: 'Lorem ipsum & real-feel filler copy', icon: Type, color: '#FFD166', content: LoremApp },
- { id: 'stickers', name: 'Stickers', desc: 'Emoji stickers & reactions', icon: Smile, color: '#F97316', content: StickersApp },
+ { id: 'stickers', name: 'Stickers', desc: '160+ stickers — 11 vector packs + emoji', icon: Smile, color: '#F97316', content: StickersApp },
]
/** shared small header shown inside an open app */
diff --git a/src/components/editor/canvas/element-node.tsx b/src/components/editor/canvas/element-node.tsx
index 8a586ab..a43be23 100644
--- a/src/components/editor/canvas/element-node.tsx
+++ b/src/components/editor/canvas/element-node.tsx
@@ -32,6 +32,7 @@ import { CurvedTextNode, EmbedNode, FrameNode, TableNode, type TableCellRef } fr
import { PluginNode } from './PluginNode'
import { ChartNode } from './chart-node'
import { isMaskShape, maskPolygon, polygonPoints, starPointsEx, stretchPts, tracePts, type MaskShape } from '@/lib/shapes'
+import { stickerDataUrl } from '@/lib/sticker-image'
import { fitFontSize } from '@/lib/text-fit'
import { layoutListLines } from '@/lib/list-text'
@@ -302,6 +303,15 @@ function textEffectProps(t: TextElement): Record<string, string | number> {
}
}
+/** v0.22 sticker packs: an authored vector sticker drawn as a cached
+ * bitmap. The SVG rides the same data-URL image cache photos use
+ * (decode once per markup string, app-wide); until decode finishes
+ * Konva paints nothing — a blank frame at most on first add. */
+function StickerVectorNode({ el, common }: { el: StickerElement; common: Record<string, unknown> }) {
+ const image = useLoadedImage(el.svg ? stickerDataUrl(el.svg) : undefined)
+ return <KonvaImage {...common} image={image ?? undefined} width={el.width} height={el.height} />
+}
+
/** image with Konva filters (brightness / contrast / saturation).
* v0.18 (Wave 3): optional shape mask — the image clips to a polygon
* (lib/shapes.ts) drawn into the Group's clipShapeFunc, so filters,
@@ -956,6 +966,10 @@ function ElementNodeImpl({ element: el, interactive, hiding, hideCell, registerN
case 'sticker': {
const sk = el as StickerElement
+ // v0.22: authored vector stickers draw as a cached bitmap
+ // (data-URL SVG → useLoadedImage — the photo pipeline); emoji
+ // stickers stay on the text path below
+ if (sk.svg) return <StickerVectorNode el={sk} common={common} />
return <Text {...common} text={sk.char} fontSize={sk.fontSize} fontFamily="'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif" width={sk.width} height={sk.height} align="center" />
}
diff --git a/src/components/editor/panels/ElementsPanel.tsx b/src/components/editor/panels/ElementsPanel.tsx
index baf36c2..9d1c239 100644
--- a/src/components/editor/panels/ElementsPanel.tsx
+++ b/src/components/editor/panels/ElementsPanel.tsx
@@ -3,8 +3,10 @@
import { useMemo, useState } from 'react'
import { Square, Circle, Triangle, Star, Minus, ArrowRight, MoveHorizontal, Search, Hexagon, Frame, Youtube, MapPin, Link2 } from 'lucide-react'
import { GRAPHICS, STICKER_GROUPS } from '@/lib/editor-utils'
+import { EMOJI_STICKERS, STICKER_PACKS, VECTOR_STICKER_COUNT } from '@/lib/stickers'
import { polygonPoints, starPointsEx, ptsToSvg } from '@/lib/shapes'
-import { addChart, addEmbed, addFrame, addGraphic, addLine, addPolygon, addShape, addStarVariant, addSticker, addTable, type TableStyle } from '../add-element'
+import { addChart, addEmbed, addFrame, addGraphic, addLine, addPolygon, addShape, addStarVariant, addSticker, addPackSticker, addTable, type TableStyle } from '../add-element'
+import { useEditorStore } from '@/store/editor-store'
import { cn } from '@/lib/utils'
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'
import { FRAME_SHAPES, type ChartKind } from '@/lib/types'
@@ -17,6 +19,12 @@ function GraphicIcon({ path }: { path: string }) {
)
}
+/** v0.22: one hero sticker per pack for the Elements-panel teaser row */
+const FEATURED_STICKERS = STICKER_PACKS.map((p) => {
+ const s = p.stickers[0]
+ return { ...s, packName: p.name }
+}).filter((s) => !!s.svg)
+
/** v0.18 (Wave 3): native polygon / star tiles — the SAME geometry the
* canvas and the SVG exporter draw (lib/shapes.ts), so the palette
* preview is always honest. */
@@ -269,6 +277,32 @@ export function ElementsPanel() {
</TabsContent>
<TabsContent value="stickers" className="flex-1 overflow-y-auto cv-scroll-dark p-4 mt-0">
+ {/* v0.22: the vector pack library — featured row + full-library launcher */}
+ <h4 className="text-xs font-semibold text-white/50 mb-2">Sticker packs</h4>
+ <div className="grid grid-cols-4 gap-1.5 mb-3">
+ {FEATURED_STICKERS.map((s) => (
+ <button
+ key={s.id}
+ onClick={() => addPackSticker(s)}
+ className="aspect-square rounded-xl bg-white/[0.04] hover:bg-[#7630D7]/25 border border-white/10 hover:border-[#7630D7] hover:scale-105 transition-all flex items-center justify-center p-1"
+ aria-label={`Add sticker ${s.name}`}
+ title={`${s.name} — from the ${s.packName} pack`}
+ >
+ <span
+ className="w-full h-full flex items-center justify-center [&>svg]:max-w-full [&>svg]:max-h-full"
+ dangerouslySetInnerHTML={{ __html: s.svg }}
+ aria-hidden="true"
+ />
+ </button>
+ ))}
+ </div>
+ <button
+ onClick={() => useEditorStore.getState().setPanel('apps')}
+ className="w-full mb-5 h-9 rounded-lg border border-[#7630D7]/50 text-[12px] font-semibold text-white/85 hover:bg-[#7630D7]/25 transition-colors"
+ >
+ Browse all {VECTOR_STICKER_COUNT + EMOJI_STICKERS.length} stickers in apps →
+ </button>
+
{STICKER_GROUPS.map((group) => (
<div key={group.name} className="mb-5">
<h4 className="text-xs font-semibold text-white/50 mb-2">{group.name}</h4>
diff --git a/src/components/landing/Landing.tsx b/src/components/landing/Landing.tsx
index edbf1ab..8c2c9b3 100644
--- a/src/components/landing/Landing.tsx
+++ b/src/components/landing/Landing.tsx
@@ -207,11 +207,12 @@ export function Landing() {
{/* ── Stats strip ── */}
<section className="border-y border-black/5 bg-[#FAFAFC]">
- <div className="mx-auto max-w-7xl px-4 sm:px-6 py-10 grid grid-cols-2 sm:grid-cols-4 gap-6 text-center">
+ <div className="mx-auto max-w-7xl px-4 sm:px-6 py-10 grid grid-cols-2 sm:grid-cols-5 gap-6 text-center">
{[
['MIT', 'license'],
['369', 'fonts'],
['366', 'templates'],
+ ['160+', 'stickers'],
['562+', 'icons'],
].map(([num, label]) => (
<div key={label}>
diff --git a/src/lib/pptx/slide-mapper.ts b/src/lib/pptx/slide-mapper.ts
index c3133aa..310737a 100644
--- a/src/lib/pptx/slide-mapper.ts
+++ b/src/lib/pptx/slide-mapper.ts
@@ -555,7 +555,12 @@ export async function mapSlide(
} else if (el.type === 'line') {
xml = lineXml(el as LineElement, id)
} else if (el.type === 'sticker') {
- xml = stickerXml(el as StickerElement, id)
+ // v0.22: emoji stickers stay native text runs; authored vector
+ // stickers ride the raster path (buildKonvaNode draws the
+ // preloaded SVG bitmap — same as charts/tables fallbacks)
+ const sk = el as StickerElement
+ if (sk.svg) native = false
+ else xml = stickerXml(sk, id)
} else if (el.type === 'image') {
xml = await imageXml(el as ImageElement, id, ctx, imageRels)
} else if (el.type === 'group') {
diff --git a/src/lib/sticker-image.ts b/src/lib/sticker-image.ts
new file mode 100644
index 0000000..15cfe08
--- /dev/null
+++ b/src/lib/sticker-image.ts
@@ -0,0 +1,52 @@
+// ─────────────────────────────────────────────────────────────
+// Sticker SVG → HTMLImageElement cache (v0.22 sticker packs).
+//
+// The canvas (element-node) and the export pipeline
+// (video-export's collectImages/buildKonvaNode) both draw vector
+// stickers as Konva.Image bitmaps. Both need the same
+// data-URL → HTMLImageElement, so it lives here once.
+//
+// The module-level Map is keyed by the exact SVG markup — the
+// library is finite (~130 authored strings), so it never grows
+// unbounded. In Node (SSR pass) there is no Image; loaders simply
+// never resolve to an entry and callers degrade gracefully.
+// ─────────────────────────────────────────────────────────────
+
+/** Encode authored SVG markup as a data URL (works for <img>,
+ * Image() and every export path; no base64 round-trip needed). */
+export function stickerDataUrl(svg: string): string {
+ return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}`
+}
+
+const cache = new Map<string, HTMLImageElement>()
+const pending = new Map<string, Promise<HTMLImageElement | null>>()
+
+/** Load a sticker's bitmap, cached. Resolves null when the browser
+ * can't decode the SVG (or in non-browser environments). */
+export function loadStickerImage(svg: string): Promise<HTMLImageElement | null> {
+ const hit = cache.get(svg)
+ if (hit) return Promise.resolve(hit)
+ const inflight = pending.get(svg)
+ if (inflight) return inflight
+ const p = new Promise<HTMLImageElement | null>((resolve) => {
+ if (typeof Image === 'undefined') {
+ resolve(null)
+ return
+ }
+ const img = new Image()
+ img.onload = () => {
+ cache.set(svg, img)
+ resolve(img)
+ }
+ img.onerror = () => resolve(null)
+ img.src = stickerDataUrl(svg)
+ })
+ pending.set(svg, p)
+ return p
+}
+
+/** Synchronous cache probe — the canvas path uses this on render
+ * and subscribes to the async load for the paint-after-decode. */
+export function getCachedStickerImage(svg: string): HTMLImageElement | undefined {
+ return cache.get(svg)
+}
diff --git a/src/lib/stickers.test.ts b/src/lib/stickers.test.ts
new file mode 100644
index 0000000..d9619b4
--- /dev/null
+++ b/src/lib/stickers.test.ts
@@ -0,0 +1,138 @@
+import { describe, expect, it } from 'vitest'
+import {
+ EMOJI_STICKERS,
+ STICKER_PACKS,
+ VECTOR_STICKER_COUNT,
+ findSticker,
+ searchStickers,
+} from './stickers'
+import { stickerDataUrl } from './sticker-image'
+
+// ── v0.22 sticker packs: the library contract ────────────────
+// These tests pin the invariants every renderer relies on:
+// valid self-contained SVG, unique ids, sane sizes, a working
+// search, and the emoji back-compat set.
+
+const all = STICKER_PACKS.flatMap((p) => p.stickers)
+
+describe('sticker packs — library shape', () => {
+ it('ships at least 10 packs with at least 8 stickers each', () => {
+ expect(STICKER_PACKS.length).toBeGreaterThanOrEqual(10)
+ for (const p of STICKER_PACKS) {
+ expect(p.stickers.length).toBeGreaterThanOrEqual(8)
+ expect(p.id).toMatch(/^[a-z]+$/)
+ expect(p.name.length).toBeGreaterThan(2)
+ expect(p.icon.length).toBeGreaterThan(0)
+ }
+ })
+
+ it('ships at least 120 authored vector stickers', () => {
+ expect(VECTOR_STICKER_COUNT).toBeGreaterThanOrEqual(120)
+ expect(all.length).toBe(VECTOR_STICKER_COUNT)
+ })
+
+ it('has unique sticker ids across the whole library', () => {
+ const ids = all.map((s) => s.id)
+ expect(new Set(ids).size).toBe(ids.length)
+ })
+
+ it('keeps the 40-emoji starter set unchanged (back-compat)', () => {
+ expect(EMOJI_STICKERS.length).toBe(40)
+ expect(EMOJI_STICKERS).toContain('😀')
+ expect(EMOJI_STICKERS).toContain('❌')
+ })
+})
+
+describe('sticker packs — SVG validity', () => {
+ it('every svg is a self-contained 120×120 viewBox document', () => {
+ for (const s of all) {
+ expect(s.svg.startsWith('<svg '), `${s.id}: opening tag`).toBe(true)
+ expect(s.svg.endsWith('</svg>'), `${s.id}: closing tag`).toBe(true)
+ expect(s.svg).toContain('viewBox="0 0 120 120"')
+ expect(s.svg).toContain('xmlns="http://www.w3.org/2000/svg"')
+ }
+ })
+
+ it('every svg carries drawable content (paths/shapes/text)', () => {
+ for (const s of all) {
+ const drawable = /<(path|circle|rect|ellipse|polygon|text|line|g)\b/.test(s.svg)
+ expect(drawable, `${s.id}: has drawable elements`).toBe(true)
+ }
+ })
+
+ it('never references external resources or scripts', () => {
+ for (const s of all) {
+ expect(s.svg, `${s.id}: no href`).not.toMatch(/href\s*=/i)
+ expect(s.svg, `${s.id}: no script`).not.toMatch(/<script/i)
+ // url(#id) internal refs are fine; url(anything-else) is external
+ const external = s.svg.match(/url\((?!#)[^)]*\)/g) ?? []
+ expect(external, `${s.id}: external url() refs`).toHaveLength(0)
+ expect(s.svg, `${s.id}: no external css`).not.toMatch(/@import/i)
+ }
+ })
+
+ it('uses only the house palette hexes (consistency contract)', () => {
+ const allowed = new Set([
+ '#FF6B6B', '#FFD93D', '#6BCB77', '#4D96FF', '#B983FF', '#FF9F45',
+ '#FF7BAC', '#FFFFFF', '#2D2A32', '#FFC24B', '#8A5A3B', '#2D3A5C',
+ '#D9C7A7', '#B8860B', '#FFF6D9',
+ ])
+ for (const s of all) {
+ const hexes = s.svg.match(/#[0-9A-Fa-f]{6}\b/g) ?? []
+ for (const h of hexes) {
+ expect(allowed.has(h.toUpperCase()), `${s.id}: off-palette ${h}`).toBe(true)
+ }
+ }
+ })
+
+ it('keeps markup under 4 KB per sticker (picker loads the whole library)', () => {
+ for (const s of all) {
+ expect(s.svg.length, `${s.id}: ${s.svg.length} bytes`).toBeLessThan(4096)
+ }
+ })
+})
+
+describe('sticker packs — search', () => {
+ it('empty query returns every pack in full', () => {
+ const r = searchStickers('')
+ expect(r.length).toBe(STICKER_PACKS.length)
+ expect(r.reduce((n, x) => n + x.stickers.length, 0)).toBe(VECTOR_STICKER_COUNT)
+ })
+
+ it('finds by sticker name, keyword and pack name', () => {
+ expect(searchStickers('coffee').flatMap((r) => r.stickers).map((s) => s.id)).toContain('food-coffee')
+ expect(searchStickers('valentine').flatMap((r) => r.stickers).map((s) => s.id)).toContain('hearts-arrow')
+ expect(searchStickers('travel').length).toBeGreaterThan(0)
+ })
+
+ it('multi-term queries are ANDed', () => {
+ const r = searchStickers('red heart').flatMap((x) => x.stickers)
+ expect(r.map((s) => s.id)).toContain('hearts-red')
+ expect(r.some((s) => s.id === 'hearts-blue')).toBe(false)
+ })
+
+ it('unknown queries return nothing', () => {
+ expect(searchStickers('zzz-not-a-sticker')).toHaveLength(0)
+ })
+})
+
+describe('sticker packs — lookups', () => {
+ it('findSticker resolves ids and rejects unknowns', () => {
+ expect(findSticker('faces-grin')?.name).toBeTruthy()
+ expect(findSticker('nope-nope')).toBeUndefined()
+ })
+})
+
+describe('sticker-image — data URL encoding', () => {
+ it('encodes as a utf-8 SVG data URL (no base64 round-trip)', () => {
+ const url = stickerDataUrl('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120"><circle cx="60" cy="60" r="10"/></svg>')
+ expect(url.startsWith('data:image/svg+xml;charset=utf-8,')).toBe(true)
+ expect(decodeURIComponent(url.slice(url.indexOf(',') + 1))).toContain('<circle')
+ })
+
+ it('is deterministic — same markup, same URL (cache keys hold)', () => {
+ const a = stickerDataUrl('<svg>a</svg>')
+ const b = stickerDataUrl('<svg>a</svg>')
+ expect(a).toBe(b)
+ })
+})
diff --git a/src/lib/stickers/arrows.ts b/src/lib/stickers/arrows.ts
new file mode 100644
index 0000000..a341540
--- /dev/null
+++ b/src/lib/stickers/arrows.ts
@@ -0,0 +1,129 @@
+import type { StickerPack } from './index'
+
+// Arrows, pointers and attention marks.
+const INK = '#2D2A32'
+const SKIN = '#FFC24B'
+const svg = (inner: string) =>
+ `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120">${inner}</svg>`
+
+export const ARROWS_PACK: StickerPack = {
+ id: 'arrows',
+ name: 'Arrows & Marks',
+ icon: '➡️',
+ stickers: [
+ {
+ id: 'arrows-curve-right',
+ name: 'Curved arrow',
+ keywords: ['arrow', 'curve', 'right', 'point', 'direction'],
+ svg: svg(
+ `<path d="M16 92 Q16 40 72 40" fill="none" stroke="#FF6B6B" stroke-width="9" stroke-linecap="round"/>` +
+ `<path d="M60 24 L88 40 L60 56 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>`,
+ ),
+ },
+ {
+ id: 'arrows-curve-down',
+ name: 'Curved arrow down',
+ keywords: ['arrow', 'down', 'curve', 'below', 'direction'],
+ svg: svg(
+ `<path d="M24 20 Q88 20 88 70" fill="none" stroke="#4D96FF" stroke-width="9" stroke-linecap="round"/>` +
+ `<path d="M72 60 L88 88 L104 60 Z" fill="#4D96FF" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>`,
+ ),
+ },
+ {
+ id: 'arrows-hand-pointer',
+ name: 'Hand pointer',
+ keywords: ['hand', 'pointer', 'click', 'here', 'note'],
+ svg: svg(
+ // one closed silhouette: index finger up, three knuckles curled
+ `<path d="M42 108 Q30 108 30 94 L30 62 Q30 52 40 52 Q46 52 47 58 L47 30 Q47 18 57 18 Q67 18 67 30 L67 52 Q68 46 75 46 Q82 46 83 53 L83 56 Q84 51 91 51 Q98 51 98 59 L98 64 Q99 60 105 61 Q112 62 112 71 L112 92 Q112 108 98 108 Z" fill="${SKIN}" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M47 34 Q47 26 57 26" fill="none" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" opacity="0.6"/>`,
+ ),
+ },
+ {
+ id: 'arrows-highlight',
+ name: 'Highlight mark',
+ keywords: ['highlight', 'marker', 'underline', 'important', 'note'],
+ svg: svg(
+ `<rect x="18" y="48" width="84" height="22" rx="6" fill="#FFD93D" stroke="${INK}" stroke-width="3"/>` +
+ `<path d="M24 70 L20 84 L32 70 M52 70 L48 84 L60 70 M80 70 L76 84 L88 70" fill="#FFD93D" stroke="${INK}" stroke-width="2.5" stroke-linejoin="round"/>`,
+ ),
+ },
+ {
+ id: 'arrows-circle-mark',
+ name: 'Circle mark',
+ keywords: ['circle', 'mark', 'focus', 'highlight', 'annotate'],
+ svg: svg(
+ // a bold ~330° ring with a clear overlap — the hand-drawn look
+ `<path d="M78 18 Q104 28 102 58 Q100 88 70 98 Q38 108 22 82 Q8 58 22 34 Q34 12 62 14" fill="none" stroke="#FF6B6B" stroke-width="11" stroke-linecap="round"/>` +
+ `<path d="M58 14 Q68 14 78 18" fill="none" stroke="#FF6B6B" stroke-width="11" stroke-linecap="round" opacity="0.55"/>`,
+ ),
+ },
+ {
+ id: 'arrows-check',
+ name: 'Check burst',
+ keywords: ['check', 'done', 'yes', 'correct', 'complete', 'ok'],
+ svg: svg(
+ `<path d="M60 8 L74 26 L96 22 L96 44 L114 60 L96 76 L96 98 L74 94 L60 112 L46 94 L24 98 L24 76 L6 60 L24 44 L24 22 L46 26 Z" fill="#6BCB77" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M40 60 L54 74 L82 44" fill="none" stroke="#FFFFFF" stroke-width="9" stroke-linecap="round" stroke-linejoin="round"/>`,
+ ),
+ },
+ {
+ id: 'arrows-cross',
+ name: 'Cross mark',
+ keywords: ['cross', 'no', 'wrong', 'error', 'cancel', 'fail'],
+ svg: svg(
+ `<circle cx="60" cy="60" r="46" fill="#FF6B6B" stroke="${INK}" stroke-width="3.5"/>` +
+ `<path d="M42 42 L78 78 M78 42 L42 78" stroke="#FFFFFF" stroke-width="10" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'arrows-question',
+ name: 'Question mark',
+ keywords: ['question', 'help', 'faq', 'unknown', 'confused'],
+ svg: svg(
+ `<circle cx="60" cy="60" r="46" fill="#4D96FF" stroke="${INK}" stroke-width="3.5"/>` +
+ `<text x="60" y="78" text-anchor="middle" font-family="Arial, sans-serif" font-size="52" font-weight="bold" fill="#FFFFFF">?</text>`,
+ ),
+ },
+ {
+ id: 'arrows-exclaim',
+ name: 'Exclamation',
+ keywords: ['exclamation', 'attention', 'alert', 'warning', 'important'],
+ svg: svg(
+ `<circle cx="60" cy="60" r="46" fill="#FF9F45" stroke="${INK}" stroke-width="3.5"/>` +
+ `<rect x="52" y="28" width="16" height="42" rx="8" fill="#FFFFFF"/>` +
+ `<circle cx="60" cy="86" r="9" fill="#FFFFFF"/>`,
+ ),
+ },
+ {
+ id: 'arrows-pin',
+ name: 'Pin',
+ keywords: ['pin', 'location', 'map', 'here', 'place', 'marker'],
+ svg: svg(
+ `<path d="M60 108 C 60 108 26 70 26 46 C 26 28 40 14 60 14 C 80 14 94 28 94 46 C 94 70 60 108 60 108 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<circle cx="60" cy="46" r="14" fill="#FFFFFF" stroke="${INK}" stroke-width="3"/>`,
+ ),
+ },
+ {
+ id: 'arrows-tag',
+ name: 'Price tag',
+ keywords: ['tag', 'price', 'label', 'sale', 'offer'],
+ svg: svg(
+ `<path d="M20 52 L52 20 L100 20 L100 68 L68 100 Q60 108 52 100 L20 68 Q12 60 20 52 Z" fill="#FFD93D" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<circle cx="84" cy="36" r="7" fill="#FFFFFF" stroke="${INK}" stroke-width="3"/>` +
+ `<path d="M40 60 L56 44 M46 70 L62 54" stroke="${INK}" stroke-width="4" stroke-linecap="round" opacity="0.55"/>`,
+ ),
+ },
+ {
+ id: 'arrows-banner',
+ name: 'Ribbon banner',
+ keywords: ['banner', 'ribbon', 'label', 'title', 'header'],
+ svg: svg(
+ `<path d="M14 40 L34 52 L14 64 Z" fill="#B983FF" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<path d="M106 40 L86 52 L106 64 Z" fill="#B983FF" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<path d="M30 38 L90 38 L100 52 L90 66 L30 66 L20 52 Z" fill="#B983FF" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M42 46 L78 46 M42 58 L78 58" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" opacity="0.7"/>`,
+ ),
+ },
+ ],
+}
diff --git a/src/lib/stickers/business.ts b/src/lib/stickers/business.ts
new file mode 100644
index 0000000..d04c355
--- /dev/null
+++ b/src/lib/stickers/business.ts
@@ -0,0 +1,156 @@
+import type { StickerPack } from './index'
+
+// Business & productivity accents.
+const INK = '#2D2A32'
+const svg = (inner: string) =>
+ `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120">${inner}</svg>`
+
+export const BUSINESS_PACK: StickerPack = {
+ id: 'business',
+ name: 'Business',
+ icon: '💼',
+ stickers: [
+ {
+ id: 'business-chart-up',
+ name: 'Growth chart',
+ keywords: ['growth', 'chart', 'up', 'sales', 'analytics', 'progress'],
+ svg: svg(
+ `<rect x="16" y="16" width="88" height="88" rx="10" fill="#FFFFFF" stroke="${INK}" stroke-width="3.5"/>` +
+ `<path d="M28 88 L48 66 L62 76 L92 40" fill="none" stroke="#6BCB77" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>` +
+ `<path d="M78 40 L92 40 L92 54" fill="none" stroke="#6BCB77" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>` +
+ `<circle cx="48" cy="66" r="4" fill="#6BCB77" stroke="${INK}" stroke-width="2"/>` +
+ `<circle cx="62" cy="76" r="4" fill="#6BCB77" stroke="${INK}" stroke-width="2"/>` +
+ `<circle cx="92" cy="40" r="4" fill="#6BCB77" stroke="${INK}" stroke-width="2"/>`,
+ ),
+ },
+ {
+ id: 'business-bars',
+ name: 'Bar chart',
+ keywords: ['bars', 'chart', 'data', 'stats', 'report'],
+ svg: svg(
+ `<rect x="16" y="16" width="88" height="88" rx="10" fill="#FFFFFF" stroke="${INK}" stroke-width="3.5"/>` +
+ `<rect x="30" y="66" width="14" height="26" rx="3" fill="#4D96FF" stroke="${INK}" stroke-width="2.5"/>` +
+ `<rect x="52" y="50" width="14" height="42" rx="3" fill="#4D96FF" stroke="${INK}" stroke-width="2.5"/>` +
+ `<rect x="74" y="34" width="14" height="58" rx="3" fill="#6BCB77" stroke="${INK}" stroke-width="2.5"/>`,
+ ),
+ },
+ {
+ id: 'business-target',
+ name: 'Target hit',
+ keywords: ['target', 'goal', 'aim', 'success', 'dart'],
+ svg: svg(
+ `<circle cx="56" cy="64" r="42" fill="#FF6B6B" stroke="${INK}" stroke-width="3.5"/>` +
+ `<circle cx="56" cy="64" r="28" fill="#FFFFFF" stroke="${INK}" stroke-width="3"/>` +
+ `<circle cx="56" cy="64" r="14" fill="#FF6B6B" stroke="${INK}" stroke-width="3"/>` +
+ `<path d="M56 64 L100 20" stroke="${INK}" stroke-width="5" stroke-linecap="round"/>` +
+ `<path d="M92 20 L102 18 L100 28" fill="none" stroke="#FFD93D" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>`,
+ ),
+ },
+ {
+ id: 'business-rocket',
+ name: 'Rocket launch',
+ keywords: ['rocket', 'launch', 'startup', 'growth', 'ship'],
+ svg: svg(
+ `<path d="M60 10 C 74 24 80 44 80 64 L40 64 C 40 44 46 24 60 10 Z" fill="#FFFFFF" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<circle cx="60" cy="42" r="10" fill="#4D96FF" stroke="${INK}" stroke-width="3"/>` +
+ `<path d="M40 58 L26 82 L42 76 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<path d="M80 58 L94 82 L78 76 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<path d="M52 64 L52 78 L60 92 L68 78 L68 64 Z" fill="#FFD93D" stroke="#FF9F45" stroke-width="3" stroke-linejoin="round"/>` +
+ `<path d="M56 92 L60 106 L64 92" fill="#FF9F45" stroke="#FF9F45" stroke-width="2" stroke-linejoin="round"/>`,
+ ),
+ },
+ {
+ id: 'business-bulb',
+ name: 'Idea lightbulb',
+ keywords: ['idea', 'bulb', 'light', 'inspiration', 'think'],
+ svg: svg(
+ `<circle cx="60" cy="50" r="32" fill="#FFD93D" stroke="${INK}" stroke-width="3.5"/>` +
+ `<path d="M46 74 L46 86 Q46 92 52 92 L68 92 Q74 92 74 86 L74 74" fill="#FFD93D" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<rect x="48" y="92" width="24" height="8" rx="3" fill="#B983FF" stroke="${INK}" stroke-width="3"/>` +
+ `<rect x="51" y="102" width="18" height="6" rx="3" fill="#B983FF" stroke="${INK}" stroke-width="2.5"/>` +
+ `<path d="M60 34 L60 54 M52 44 L68 44" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>` +
+ `<path d="M28 28 L34 32 M92 28 L86 32 M22 54 L30 54 M98 54 L90 54" stroke="#FF9F45" stroke-width="3.5" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'business-briefcase',
+ name: 'Briefcase',
+ keywords: ['briefcase', 'work', 'job', 'office', 'business'],
+ svg: svg(
+ `<rect x="14" y="38" width="92" height="56" rx="10" fill="#B983FF" stroke="${INK}" stroke-width="3.5"/>` +
+ `<path d="M44 38 L44 28 Q44 22 50 22 L70 22 Q76 22 76 28 L76 38" fill="none" stroke="${INK}" stroke-width="3.5" stroke-linecap="round"/>` +
+ `<rect x="14" y="56" width="92" height="12" fill="#FFFFFF" opacity="0.25"/>` +
+ `<rect x="52" y="54" width="16" height="14" rx="3" fill="#FFD93D" stroke="${INK}" stroke-width="3"/>`,
+ ),
+ },
+ {
+ id: 'business-handshake',
+ name: 'Handshake',
+ keywords: ['handshake', 'deal', 'partnership', 'agree', 'contract'],
+ svg: svg(
+ `<rect x="10" y="52" width="24" height="18" rx="6" fill="#4D96FF" stroke="${INK}" stroke-width="3"/>` +
+ `<rect x="86" y="52" width="24" height="18" rx="6" fill="#4D96FF" stroke="${INK}" stroke-width="3"/>` +
+ `<path d="M30 56 L48 44 L64 52 L80 44 L90 56 L76 72 L64 62 L52 72 Z" fill="#FFC24B" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M48 44 L56 54 M64 52 L58 60" stroke="${INK}" stroke-width="2.5" stroke-linecap="round" opacity="0.5"/>`,
+ ),
+ },
+ {
+ id: 'business-search',
+ name: 'Search',
+ keywords: ['search', 'find', 'magnifier', 'research', 'seo'],
+ svg: svg(
+ `<circle cx="52" cy="50" r="30" fill="#FFFFFF" stroke="#4D96FF" stroke-width="8"/>` +
+ `<circle cx="52" cy="50" r="30" fill="none" stroke="${INK}" stroke-width="3.5"/>` +
+ `<path d="M74 72 L100 98" stroke="#4D96FF" stroke-width="14" stroke-linecap="round"/>` +
+ `<path d="M74 72 L100 98" stroke="${INK}" stroke-width="4" opacity="0.35" stroke-linecap="round"/>` +
+ `<path d="M40 38 Q46 32 54 34" stroke="#4D96FF" stroke-width="4" stroke-linecap="round" fill="none"/>`,
+ ),
+ },
+ {
+ id: 'business-calendar',
+ name: 'Calendar check',
+ keywords: ['calendar', 'date', 'schedule', 'event', 'plan'],
+ svg: svg(
+ `<rect x="18" y="24" width="84" height="78" rx="10" fill="#FFFFFF" stroke="${INK}" stroke-width="3.5"/>` +
+ `<rect x="18" y="24" width="84" height="20" rx="10" fill="#4D96FF" stroke="${INK}" stroke-width="3.5"/>` +
+ `<rect x="34" y="14" width="8" height="18" rx="4" fill="${INK}"/>` +
+ `<rect x="78" y="14" width="8" height="18" rx="4" fill="${INK}"/>` +
+ `<path d="M38 62 L54 78 L84 48" fill="none" stroke="#6BCB77" stroke-width="7" stroke-linecap="round" stroke-linejoin="round"/>`,
+ ),
+ },
+ {
+ id: 'business-money',
+ name: 'Money bag',
+ keywords: ['money', 'cash', 'bag', 'profit', 'revenue', 'funding'],
+ svg: svg(
+ `<path d="M44 30 L76 30 L84 44 Q104 74 88 92 Q74 106 60 106 Q46 106 32 92 Q16 74 36 44 Z" fill="#6BCB77" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M46 30 Q60 22 74 30" fill="none" stroke="${INK}" stroke-width="3.5" stroke-linecap="round"/>` +
+ `<text x="60" y="80" text-anchor="middle" font-family="Arial, sans-serif" font-size="30" font-weight="bold" fill="#FFFFFF">$</text>`,
+ ),
+ },
+ {
+ id: 'business-coins',
+ name: 'Coin stack',
+ keywords: ['coins', 'money', 'savings', 'stack', 'funding'],
+ svg: svg(
+ `<ellipse cx="60" cy="88" rx="34" ry="12" fill="#FFD93D" stroke="${INK}" stroke-width="3"/>` +
+ `<ellipse cx="60" cy="72" rx="34" ry="12" fill="#FFD93D" stroke="${INK}" stroke-width="3"/>` +
+ `<ellipse cx="60" cy="56" rx="34" ry="12" fill="#FFD93D" stroke="${INK}" stroke-width="3"/>` +
+ `<ellipse cx="60" cy="40" rx="34" ry="12" fill="#FFD93D" stroke="${INK}" stroke-width="3"/>` +
+ `<text x="60" y="45" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#B8860B">$</text>`,
+ ),
+ },
+ {
+ id: 'business-medal',
+ name: 'Award medal',
+ keywords: ['medal', 'award', 'winner', 'first', 'prize', 'quality'],
+ svg: svg(
+ `<path d="M40 12 L56 48 L44 54 L28 18 Z" fill="#4D96FF" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<path d="M80 12 L64 48 L76 54 L92 18 Z" fill="#4D96FF" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<circle cx="60" cy="76" r="28" fill="#FFD93D" stroke="${INK}" stroke-width="3.5"/>` +
+ `<circle cx="60" cy="76" r="19" fill="none" stroke="#FF9F45" stroke-width="3"/>` +
+ `<text x="60" y="83" text-anchor="middle" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#B8860B">1</text>`,
+ ),
+ },
+ ],
+}
diff --git a/src/lib/stickers/celebrate.ts b/src/lib/stickers/celebrate.ts
new file mode 100644
index 0000000..e35ed5e
--- /dev/null
+++ b/src/lib/stickers/celebrate.ts
@@ -0,0 +1,222 @@
+import type { StickerPack } from './index'
+
+// Celebrations — party, birthday, congrats.
+const INK = '#2D2A32'
+const svg = (inner: string) =>
+ `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120">${inner}</svg>`
+const confetti = (seed: number): string => {
+ const colors = ['#FF6B6B', '#FFD93D', '#6BCB77', '#4D96FF', '#B983FF', '#FF9F45', '#FF7BAC']
+ let out = ''
+ for (let i = 0; i < 9; i++) {
+ const x = 14 + ((seed * 37 + i * 89) % 88)
+ const y = 12 + ((seed * 53 + i * 61) % 92)
+ const c = colors[(seed + i) % colors.length]
+ const big = i % 3 === 0
+ out +=
+ i % 2 === 0
+ ? `<rect x="${x}" y="${y}" width="${big ? 15 : 11}" height="${big ? 9 : 7}" rx="2.5" fill="${c}" stroke="${INK}" stroke-width="2" transform="rotate(${(seed * 23 + i * 41) % 70 - 35} ${x} ${y})"/>`
+ : `<circle cx="${x}" cy="${y}" r="${big ? 6 : 4}" fill="${c}" stroke="${INK}" stroke-width="2"/>`
+ }
+ return out
+}
+
+export const CELEBRATE_PACK: StickerPack = {
+ id: 'celebrate',
+ name: 'Celebrate',
+ icon: '🎉',
+ stickers: [
+ {
+ id: 'celebrate-popper',
+ name: 'Party popper',
+ keywords: ['party', 'popper', 'confetti', 'celebrate', 'new year'],
+ svg: svg(
+ `<path d="M18 102 L44 52 L52 106 Z" fill="#FF9F45" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M30 84 L46 60" stroke="${INK}" stroke-width="2.5" stroke-linecap="round"/>` +
+ star(66, 44, 16, '#FFD93D', 3) +
+ `<path d="M56 24 L62 14 M76 66 L88 70 M64 64 L70 76" stroke="#FF6B6B" stroke-width="4" stroke-linecap="round"/>` +
+ `<circle cx="88" cy="34" r="5" fill="#4D96FF" stroke="${INK}" stroke-width="2"/>` +
+ `<circle cx="52" cy="36" r="4" fill="#6BCB77" stroke="${INK}" stroke-width="2"/>` +
+ `<circle cx="96" cy="56" r="4" fill="#B983FF" stroke="${INK}" stroke-width="2"/>` +
+ sparkle(84, 16, 7, '#FF7BAC', 1.8),
+ ),
+ },
+ {
+ id: 'celebrate-balloon',
+ name: 'Red balloon',
+ keywords: ['balloon', 'party', 'birthday', 'red'],
+ svg: svg(
+ `<path d="M60 14 C 78 14 88 28 88 44 C 88 62 72 78 60 78 C 48 78 32 62 32 44 C 32 28 42 14 60 14 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3.5"/>` +
+ `<ellipse cx="48" cy="34" rx="8" ry="12" fill="#FFFFFF" opacity="0.4" transform="rotate(-18 48 34)"/>` +
+ `<path d="M56 78 L54 86 L66 86 L64 78" fill="#FF6B6B" stroke="${INK}" stroke-width="2.5" stroke-linejoin="round"/>` +
+ `<path d="M60 86 Q52 96 60 106 Q68 96 60 86" fill="none" stroke="${INK}" stroke-width="2.5" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'celebrate-balloons',
+ name: 'Balloon bunch',
+ keywords: ['balloons', 'party', 'bunch', 'birthday', 'colorful'],
+ svg: svg(
+ `<path d="M38 26 C 50 26 56 36 56 47 C 56 60 45 71 38 71 C 31 71 20 60 20 47 C 20 36 26 26 38 26 Z" fill="#4D96FF" stroke="${INK}" stroke-width="3"/>` +
+ `<path d="M84 20 C 96 20 102 30 102 41 C 102 54 91 65 84 65 C 77 65 66 54 66 41 C 66 30 72 20 84 20 Z" fill="#FFD93D" stroke="${INK}" stroke-width="3"/>` +
+ `<path d="M60 42 C 72 42 78 52 78 63 C 78 76 67 87 60 87 C 53 87 42 76 42 63 C 42 52 48 42 60 42 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3"/>` +
+ `<path d="M38 71 L52 100 M84 65 L66 100 M60 87 L60 100" stroke="${INK}" stroke-width="2.5" fill="none" stroke-linecap="round"/>` +
+ `<path d="M52 100 Q60 108 68 100" fill="none" stroke="${INK}" stroke-width="3" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'celebrate-confetti',
+ name: 'Confetti burst',
+ keywords: ['confetti', 'burst', 'party', 'scattered'],
+ svg: svg(
+ // a cannon fan: pieces radiate from the bottom-left corner
+ `<path d="M8 112 Q28 92 58 78" fill="none" stroke="#FF9F45" stroke-width="7" stroke-linecap="round"/>` +
+ `<path d="M8 112 Q40 104 74 100" fill="none" stroke="#6BCB77" stroke-width="7" stroke-linecap="round"/>` +
+ `<g>${(
+ [
+ ['rect', 52, 40, -35, '#FF6B6B'], ['circle', 78, 34, 7, '#FFD93D'],
+ ['rect', 96, 58, 25, '#4D96FF'], ['circle', 70, 66, 6, '#B983FF'],
+ ['rect', 46, 70, 15, '#6BCB77'], ['circle', 100, 20, 5, '#FF7BAC'],
+ ['rect', 82, 84, -20, '#FF9F45'], ['circle', 58, 54, 5, '#4D96FF'],
+ ['rect', 66, 90, 40, '#FFD93D'], ['circle', 92, 76, 4, '#FF6B6B'],
+ ['rect', 34, 56, -55, '#B983FF'], ['circle', 108, 40, 4, '#6BCB77'],
+ ] as [string, number, number, number, string][]
+ )
+ .map(([k, x, y, r, c]) =>
+ k === 'rect'
+ ? `<rect x="${x}" y="${y}" width="15" height="10" rx="3" fill="${c}" stroke="${INK}" stroke-width="2" transform="rotate(${r} ${x} ${y})"/>`
+ : `<circle cx="${x}" cy="${y}" r="${r}" fill="${c}" stroke="${INK}" stroke-width="2"/>`,
+ )
+ .join('')}</g>`,
+ ),
+ },
+ {
+ id: 'celebrate-cake',
+ name: 'Birthday cake',
+ keywords: ['cake', 'birthday', 'party', 'candle'],
+ svg: svg(
+ `<rect x="22" y="58" width="76" height="40" rx="8" fill="#FF7BAC" stroke="${INK}" stroke-width="3.5"/>` +
+ `<path d="M22 70 Q30 62 38 70 Q46 78 54 70 Q62 62 70 70 Q78 78 86 70 Q90 66 98 70 L98 62 L22 62 Z" fill="#FFFFFF" stroke="${INK}" stroke-width="2.5"/>` +
+ `<rect x="56" y="36" width="8" height="22" fill="#4D96FF" stroke="${INK}" stroke-width="2.5"/>` +
+ `<path d="M60 14 C 66 18 66 26 60 30 C 54 26 54 18 60 14 Z" fill="#FFD93D" stroke="#FF9F45" stroke-width="2"/>` +
+ `<path d="M36 84 L44 84 M56 84 L64 84 M76 84 L84 84" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" opacity="0.7"/>`,
+ ),
+ },
+ {
+ id: 'celebrate-champagne',
+ name: 'Champagne toast',
+ keywords: ['champagne', 'toast', 'cheers', 'drink', 'new year'],
+ svg: svg(
+ // two solid coupe glasses clinking — filled bodies, chunky stems
+ `<path d="M26 16 L54 16 L50 34 Q42 44 30 34 Z" fill="#FFFFFF" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M32 42 L34 44 Q40 48 46 44 L48 42" fill="none" stroke="${INK}" stroke-width="3" stroke-linecap="round"/>` +
+ `<path d="M40 46 L40 62 Q40 70 32 74 L48 74 Q40 70 40 62 Z" fill="#FFFFFF" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<path d="M66 16 L94 16 L90 34 Q82 44 70 34 Z" fill="#FFFFFF" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M72 42 L74 44 Q80 48 86 44 L88 42" fill="none" stroke="${INK}" stroke-width="3" stroke-linecap="round"/>` +
+ `<path d="M80 46 L80 62 Q80 70 72 74 L88 74 Q80 70 80 62 Z" fill="#FFFFFF" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<path d="M28 24 Q32 20 38 22 M70 22 Q76 20 80 24" fill="none" stroke="#FFD93D" stroke-width="4" stroke-linecap="round"/>` +
+ `<path d="M54 30 L66 30" stroke="#FF6B6B" stroke-width="5" stroke-linecap="round"/>` +
+ `<circle cx="60" cy="8" r="4" fill="#FFD93D" stroke="${INK}" stroke-width="2"/>` +
+ `<circle cx="44" cy="6" r="3" fill="#4D96FF" stroke="${INK}" stroke-width="2"/>` +
+ `<circle cx="76" cy="6" r="3" fill="#6BCB77" stroke="${INK}" stroke-width="2"/>`,
+ ),
+ },
+ {
+ id: 'celebrate-gift',
+ name: 'Gift box',
+ keywords: ['gift', 'present', 'box', 'birthday', 'surprise'],
+ svg: svg(
+ `<rect x="22" y="46" width="76" height="52" rx="6" fill="#4D96FF" stroke="${INK}" stroke-width="3.5"/>` +
+ `<rect x="22" y="46" width="76" height="16" rx="6" fill="#4D96FF" stroke="${INK}" stroke-width="3.5"/>` +
+ `<rect x="52" y="46" width="16" height="52" fill="#FFD93D" stroke="${INK}" stroke-width="3"/>` +
+ `<path d="M60 46 C 44 40 40 26 50 24 C 58 22 60 34 60 46 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<path d="M60 46 C 76 40 80 26 70 24 C 62 22 60 34 60 46 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>`,
+ ),
+ },
+ {
+ id: 'celebrate-ribbon',
+ name: 'Ribbon bow',
+ keywords: ['ribbon', 'bow', 'gift', 'decoration'],
+ svg: svg(
+ `<path d="M60 58 C 44 40 20 40 20 56 C 20 72 44 72 60 58 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M60 58 C 76 40 100 40 100 56 C 100 72 76 72 60 58 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M60 58 C 50 74 46 92 54 102 Q60 108 66 102 C 74 92 70 74 60 58 Z" fill="#FF7BAC" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<circle cx="60" cy="58" r="8" fill="#FFD93D" stroke="${INK}" stroke-width="3"/>`,
+ ),
+ },
+ {
+ id: 'celebrate-streamers',
+ name: 'Streamers',
+ keywords: ['streamers', 'party', 'decoration', 'ribbon'],
+ svg: svg(
+ // two clean hanging ribbons with a wavy tail — readable at any size
+ `<path d="M24 8 L44 8 Q40 34 48 58 Q52 72 42 92 L30 92 Q38 72 34 58 Q28 34 24 8 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<path d="M76 8 L96 8 Q92 34 100 58 Q104 72 94 92 L82 92 Q90 72 86 58 Q80 34 76 8 Z" fill="#4D96FF" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<path d="M24 8 L44 8 M76 8 L96 8" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>` +
+ confetti(11) +
+ confetti(5),
+ ),
+ },
+ {
+ id: 'celebrate-fireworks',
+ name: 'Fireworks',
+ keywords: ['fireworks', 'new year', 'night', 'celebration'],
+ svg: svg(
+ `<g>${Array.from({ length: 3 }, (_, k) => {
+ const cx = [44, 84, 62][k]
+ const cy = [44, 56, 92][k]
+ const col = ['#FFD93D', '#FF6B6B', '#4D96FF'][k]
+ return Array.from({ length: 8 }, (_, i) => {
+ const a = (Math.PI / 4) * i
+ const x1 = cx + 12 * Math.cos(a)
+ const y1 = cy + 12 * Math.sin(a)
+ const x2 = cx + (k === 2 ? 18 : 24) * Math.cos(a)
+ const y2 = cy + (k === 2 ? 18 : 24) * Math.sin(a)
+ return `<path d="M${x1.toFixed(1)} ${y1.toFixed(1)} L${x2.toFixed(1)} ${y2.toFixed(1)}" stroke="${col}" stroke-width="${k === 2 ? 3 : 4.5}" stroke-linecap="round"/>`
+ }).join('')
+ }).join('')}</g>`,
+ ),
+ },
+ {
+ id: 'celebrate-horn',
+ name: 'Party horn',
+ keywords: ['horn', 'blower', 'party', 'noise'],
+ svg: svg(
+ `<path d="M16 96 Q14 84 26 82 L58 74 L64 98 L32 104 Q18 106 16 96 Z" fill="#FF9F45" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M60 78 Q84 62 96 40 Q102 30 96 24 Q90 18 82 24 Q64 38 58 68 Z" fill="#FFD93D" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M74 62 Q86 50 92 38 M68 70 Q80 58 88 46" fill="none" stroke="${INK}" stroke-width="2" opacity="0.4"/>` +
+ star(102, 18, 8, '#FF6B6B', 2) + sparkle(50, 34, 8, '#B983FF', 2),
+ ),
+ },
+ {
+ id: 'celebrate-congrats',
+ name: 'Congrats badge',
+ keywords: ['congrats', 'congratulations', 'badge', 'winner', 'well done'],
+ svg: svg(
+ `<circle cx="60" cy="60" r="46" fill="#6BCB77" stroke="${INK}" stroke-width="3.5"/>` +
+ `<circle cx="60" cy="60" r="36" fill="none" stroke="#FFFFFF" stroke-width="3" stroke-dasharray="6 5"/>` +
+ `<text x="60" y="54" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#FFFFFF">WELL</text>` +
+ `<text x="60" y="72" text-anchor="middle" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#FFFFFF">DONE</text>` +
+ `<path d="M42 78 L36 98 L48 90 L60 98 L56 78" fill="#FFD93D" stroke="${INK}" stroke-width="2.5" stroke-linejoin="round"/>`,
+ ),
+ },
+ ],
+}
+
+function star(cx: number, cy: number, r: number, fill: string, sw: number): string {
+ const pts: string[] = []
+ for (let i = 0; i < 10; i++) {
+ const rr = i % 2 === 0 ? r : r * 0.42
+ const a = (Math.PI / 5) * i - Math.PI / 2
+ pts.push(`${(cx + rr * Math.cos(a)).toFixed(1)},${(cy + rr * Math.sin(a)).toFixed(1)}`)
+ }
+ return `<polygon points="${pts.join(' ')}" fill="${fill}" stroke="${INK}" stroke-width="${sw}" stroke-linejoin="round"/>`
+}
+
+function sparkle(cx: number, cy: number, r: number, fill: string, sw: number): string {
+ const q = r * 0.22
+ return (
+ `<path d="M${cx} ${cy - r} Q ${cx + q} ${cy - q} ${cx + r} ${cy} Q ${cx + q} ${cy + q} ${cx} ${cy + r} ` +
+ `Q ${cx - q} ${cy + q} ${cx - r} ${cy} Q ${cx - q} ${cy - q} ${cx} ${cy - r} Z" ` +
+ `fill="${fill}" stroke="${INK}" stroke-width="${sw}" stroke-linejoin="round"/>`
+ )
+}
diff --git a/src/lib/stickers/faces.ts b/src/lib/stickers/faces.ts
new file mode 100644
index 0000000..1a2882e
--- /dev/null
+++ b/src/lib/stickers/faces.ts
@@ -0,0 +1,174 @@
+import type { StickerPack } from './index'
+
+// Glossy vector faces — the house style: base circle at (60,64) r46,
+// ink #2D2A32, glossy highlight top-left, mouth/eyes per expression.
+const INK = '#2D2A32'
+const base = (fill: string, extra = '') =>
+ `<circle cx="60" cy="64" r="46" fill="${fill}" stroke="${INK}" stroke-width="3.5"/>` +
+ `<ellipse cx="42" cy="38" rx="12" ry="8" fill="#FFFFFF" opacity="0.35" transform="rotate(-25 42 38)"/>${extra}`
+const svg = (inner: string) =>
+ `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120">${inner}</svg>`
+const eye = (x: number, y: number, r = 4.5) =>
+ `<circle cx="${x}" cy="${y}" r="${r}" fill="${INK}"/>`
+
+export const FACES_PACK: StickerPack = {
+ id: 'faces',
+ name: 'Faces',
+ icon: '😄',
+ stickers: [
+ {
+ id: 'faces-grin',
+ name: 'Big grin',
+ keywords: ['happy', 'smile', 'grin', 'joy'],
+ svg: svg(
+ base('#FFD93D') +
+ eye(44, 58) + eye(76, 58) +
+ `<path d="M40 76 Q60 96 80 76" fill="none" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>` +
+ `<path d="M46 80 Q60 90 74 80" fill="#FFFFFF" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>`,
+ ),
+ },
+ {
+ id: 'faces-wink',
+ name: 'Wink',
+ keywords: ['wink', 'cheeky', 'playful'],
+ svg: svg(
+ base('#FFD93D') +
+ eye(44, 58) +
+ `<path d="M68 58 Q76 52 84 58" fill="none" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>` +
+ `<path d="M46 78 Q60 88 74 78" fill="none" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'faces-cool',
+ name: 'Cool shades',
+ keywords: ['cool', 'sunglasses', 'smug', 'swagger'],
+ svg: svg(
+ base('#FFD93D') +
+ `<path d="M32 52 L88 52 L84 68 Q76 76 66 72 L62 62 L58 62 L54 72 Q44 76 36 68 Z" fill="${INK}" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<path d="M46 80 Q60 90 74 80" fill="none" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'faces-love',
+ name: 'In love',
+ keywords: ['love', 'hearts', 'eyes', 'crush'],
+ svg: svg(
+ base('#FFD93D') +
+ heartEye(44, 58) + heartEye(76, 58) +
+ `<path d="M48 80 Q60 90 72 80" fill="none" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'faces-laugh',
+ name: 'Laughing hard',
+ keywords: ['laugh', 'lol', 'tears', 'hilarious'],
+ svg: svg(
+ base('#FFD93D') +
+ `<path d="M38 70 Q38 52 52 52 Q66 52 66 70 Z" fill="#2D2A32"/>` +
+ `<path d="M54 70 Q60 78 66 70" fill="none" stroke="${INK}" stroke-width="3" stroke-linecap="round"/>` +
+ `<path d="M34 46 Q28 54 30 62" fill="none" stroke="#4D96FF" stroke-width="4" stroke-linecap="round"/>` +
+ `<path d="M86 46 Q92 54 90 62" fill="none" stroke="#4D96FF" stroke-width="4" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'faces-sleepy',
+ name: 'Sleepy',
+ keywords: ['sleep', 'tired', 'zzz', 'bored', 'nap'],
+ svg: svg(
+ base('#FFD93D') +
+ `<path d="M36 58 Q44 52 52 58" fill="none" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>` +
+ `<path d="M68 58 Q76 52 84 58" fill="none" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>` +
+ `<ellipse cx="60" cy="82" rx="8" ry="6" fill="${INK}"/>` +
+ `<text x="72" y="34" font-family="Arial, sans-serif" font-size="18" font-weight="bold" fill="${INK}">z</text>` +
+ `<text x="86" y="20" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="${INK}">z</text>`,
+ ),
+ },
+ {
+ id: 'faces-angry',
+ name: 'Angry',
+ keywords: ['angry', 'mad', 'rage', 'furious'],
+ svg: svg(
+ base('#FF6B6B') +
+ `<path d="M34 48 L52 56" fill="none" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>` +
+ `<path d="M86 48 L68 56" fill="none" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>` +
+ eye(46, 62) + eye(74, 62) +
+ `<path d="M44 84 Q60 74 76 84" fill="none" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>` +
+ `<path d="M52 88 L54 96 M60 86 L60 96 M68 88 L66 96" stroke="${INK}" stroke-width="3" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'faces-surprised',
+ name: 'Surprised',
+ keywords: ['wow', 'surprise', 'shocked', 'amazed'],
+ svg: svg(
+ base('#FFD93D') +
+ eye(44, 56, 6) + eye(76, 56, 6) +
+ `<ellipse cx="60" cy="82" rx="11" ry="13" fill="${INK}"/>`,
+ ),
+ },
+ {
+ id: 'faces-thinking',
+ name: 'Thinking',
+ keywords: ['think', 'hmm', 'idea', 'ponder'],
+ svg: svg(
+ base('#FFD93D') +
+ eye(44, 58) + eye(76, 58) +
+ `<path d="M48 82 Q58 78 66 82" fill="none" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>` +
+ `<path d="M88 42 Q100 40 96 52 Q92 62 82 58" fill="#FFD93D" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<circle cx="93" cy="66" r="4" fill="${INK}"/>`,
+ ),
+ },
+ {
+ id: 'faces-starstruck',
+ name: 'Starstruck',
+ keywords: ['star', 'eyes', 'amazed', 'fan', 'awesome'],
+ svg: svg(
+ base('#FFD93D') +
+ starEye(44, 58) + starEye(76, 58) +
+ `<path d="M44 80 Q60 94 76 80" fill="none" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'faces-sad',
+ name: 'Sad',
+ keywords: ['sad', 'cry', 'down', 'unhappy', 'sob'],
+ svg: svg(
+ base('#4D96FF') +
+ `<path d="M36 54 Q44 48 52 54" fill="none" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>` +
+ `<path d="M68 54 Q76 48 84 54" fill="none" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>` +
+ eye(44, 64) + eye(76, 64) +
+ `<path d="M46 88 Q60 76 74 88" fill="none" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>` +
+ `<path d="M42 70 Q38 82 40 92" fill="none" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" opacity="0.9"/>` +
+ `<path d="M78 70 Q82 82 80 92" fill="none" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" opacity="0.9"/>`,
+ ),
+ },
+ {
+ id: 'faces-goofy',
+ name: 'Goofy tongue',
+ keywords: ['silly', 'goofy', 'tongue', 'cheeky', 'meme'],
+ svg: svg(
+ base('#FFD93D') +
+ eye(44, 56) + eye(76, 56) +
+ `<path d="M42 74 Q60 92 78 74 Z" fill="#2D2A32" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<path d="M52 82 Q60 102 70 84 Q62 88 52 82 Z" fill="#FF7BAC" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>`,
+ ),
+ },
+ ],
+}
+
+function heartEye(x: number, y: number): string {
+ return (
+ `<path d="M${x} ${y + 8} C ${x - 10} ${y - 2} ${x - 4} ${y - 10} ${x} ${y - 4} C ${x + 4} ${y - 10} ${x + 10} ${y - 2} ${x} ${y + 8} Z" ` +
+ `fill="#FF6B6B" stroke="${INK}" stroke-width="2.5" stroke-linejoin="round"/>`
+ )
+}
+
+function starEye(x: number, y: number): string {
+ const pts: string[] = []
+ for (let i = 0; i < 10; i++) {
+ const r = i % 2 === 0 ? 10 : 4
+ const a = (Math.PI / 5) * i - Math.PI / 2
+ pts.push(`${(x + r * Math.cos(a)).toFixed(1)},${(y + r * Math.sin(a)).toFixed(1)}`)
+ }
+ return `<polygon points="${pts.join(' ')}" fill="#FFD93D" stroke="${INK}" stroke-width="2.5" stroke-linejoin="round"/>`
+}
diff --git a/src/lib/stickers/food.ts b/src/lib/stickers/food.ts
new file mode 100644
index 0000000..c9b08bb
--- /dev/null
+++ b/src/lib/stickers/food.ts
@@ -0,0 +1,162 @@
+import type { StickerPack } from './index'
+
+// Food & drink.
+const INK = '#2D2A32'
+const svg = (inner: string) =>
+ `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120">${inner}</svg>`
+
+export const FOOD_PACK: StickerPack = {
+ id: 'food',
+ name: 'Food & Drink',
+ icon: '🍕',
+ stickers: [
+ {
+ id: 'food-coffee',
+ name: 'Coffee cup',
+ keywords: ['coffee', 'cup', 'morning', 'caffeine', 'espresso', 'cafe'],
+ svg: svg(
+ `<path d="M24 42 L88 42 L82 96 Q81 104 72 104 L40 104 Q31 104 30 96 Z" fill="#FFFFFF" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M84 50 Q106 52 102 68 Q98 84 78 82" fill="none" stroke="${INK}" stroke-width="3.5" stroke-linecap="round"/>` +
+ `<path d="M36 54 L80 54 L76 90 Q75 96 68 96 L46 96 Q39 96 38 90 Z" fill="#8A5A3B"/>` +
+ `<path d="M46 30 Q44 22 50 18 M62 30 Q60 22 66 18 M78 30 Q76 22 82 18" fill="none" stroke="#B983FF" stroke-width="3.5" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'food-pizza',
+ name: 'Pizza slice',
+ keywords: ['pizza', 'slice', 'italian', 'food', 'cheese'],
+ svg: svg(
+ `<path d="M60 12 L96 92 Q60 108 24 92 Z" fill="#FFD93D" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M60 12 L96 92 Q78 100 60 102 Z" fill="#FF9F45" opacity="0.5"/>` +
+ `<path d="M30 88 L90 88" stroke="#FF6B6B" stroke-width="6" stroke-linecap="round"/>` +
+ `<circle cx="52" cy="56" r="6" fill="#FF6B6B" stroke="${INK}" stroke-width="2"/>` +
+ `<circle cx="68" cy="72" r="6" fill="#FF6B6B" stroke="${INK}" stroke-width="2"/>` +
+ `<circle cx="48" cy="76" r="5" fill="#FF6B6B" stroke="${INK}" stroke-width="2"/>`,
+ ),
+ },
+ {
+ id: 'food-donut',
+ name: 'Donut',
+ keywords: ['donut', 'doughnut', 'sweet', 'dessert', 'sprinkles'],
+ svg: svg(
+ `<circle cx="60" cy="62" r="44" fill="#FFC24B" stroke="${INK}" stroke-width="3.5"/>` +
+ `<path d="M60 18 Q88 18 100 44 Q106 62 96 80 Q84 100 60 102 Q32 100 22 76 Q14 56 26 38 Q38 18 60 18 Z" fill="#FF7BAC" opacity="0.85"/>` +
+ `<circle cx="60" cy="62" r="15" fill="#FFFFFF" stroke="${INK}" stroke-width="3.5"/>` +
+ `<g stroke-width="3" stroke-linecap="round">${[
+ ['#FFFFFF', 36, 42], ['#4D96FF', 60, 30], ['#6BCB77', 84, 44],
+ ['#FFD93D', 90, 70], ['#FFFFFF', 76, 92], ['#B983FF', 50, 96],
+ ['#4D96FF', 30, 72], ['#FF6B6B', 32, 58],
+ ].map(([c, x, y]) => `<path d="M${x} ${y} l8 -4" stroke="${c}"/>`).join('')}</g>`,
+ ),
+ },
+ {
+ id: 'food-burger',
+ name: 'Burger',
+ keywords: ['burger', 'hamburger', 'fast food', 'snack'],
+ svg: svg(
+ `<path d="M22 52 Q22 20 60 20 Q98 20 98 52 L22 52 Z" fill="#FFC24B" stroke="${INK}" stroke-width="3.5"/>` +
+ `<path d="M22 52 L98 52 Q100 60 92 62 L28 62 Q20 60 22 52 Z" fill="#6BCB77" stroke="${INK}" stroke-width="3"/>` +
+ `<path d="M26 62 L94 62 L90 74 L30 74 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<path d="M28 74 L92 74 Q98 76 98 84 Q98 96 86 96 L34 96 Q22 96 22 84 Q22 76 28 74 Z" fill="#FFC24B" stroke="${INK}" stroke-width="3.5"/>` +
+ `<circle cx="44" cy="34" r="2.5" fill="#FF9F45"/><circle cx="62" cy="30" r="2.5" fill="#FF9F45"/><circle cx="78" cy="36" r="2.5" fill="#FF9F45"/>`,
+ ),
+ },
+ {
+ id: 'food-avocado',
+ name: 'Avocado',
+ keywords: ['avocado', 'green', 'healthy', 'toast', 'guacamole'],
+ svg: svg(
+ `<path d="M60 14 C 80 14 94 34 94 58 C 94 84 78 106 60 106 C 42 106 26 84 26 58 C 26 34 40 14 60 14 Z" fill="#6BCB77" stroke="${INK}" stroke-width="3.5"/>` +
+ `<path d="M60 28 C 74 28 82 42 82 58 C 82 76 71 92 60 92 C 49 92 38 76 38 58 C 38 42 46 28 60 28 Z" fill="#FFD93D"/>` +
+ `<ellipse cx="60" cy="62" rx="14" ry="18" fill="#8A5A3B" stroke="${INK}" stroke-width="3"/>`,
+ ),
+ },
+ {
+ id: 'food-strawberry',
+ name: 'Strawberry',
+ keywords: ['strawberry', 'berry', 'fruit', 'red', 'summer'],
+ svg: svg(
+ `<path d="M60 34 C 78 34 94 46 94 66 C 94 88 74 104 60 104 C 46 104 26 88 26 66 C 26 46 42 34 60 34 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3.5"/>` +
+ `<g stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" opacity="0.85">${[
+ 'M46 56 l0 7 M42 59 l8 0', 'M68 56 l0 7 M64 59 l8 0', 'M56 78 l0 7 M52 81 l8 0',
+ 'M78 72 l0 6 M75 75 l6 0', 'M38 74 l0 6 M35 77 l6 0',
+ ].map((d) => `<path d="${d}"/>`).join('')}</g>` +
+ `<path d="M38 34 Q60 18 82 34 Q70 44 60 42 Q50 44 38 34 Z" fill="#6BCB77" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<path d="M60 34 L60 14 M60 20 Q52 12 46 16 M60 20 Q68 12 74 16" fill="none" stroke="#6BCB77" stroke-width="3.5" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'food-boba',
+ name: 'Boba tea',
+ keywords: ['boba', 'bubble tea', 'milk tea', 'drink', 'tapioca'],
+ svg: svg(
+ `<path d="M32 40 L88 40 L80 104 Q79 110 72 110 L48 110 Q41 110 40 104 Z" fill="#D9C7A7" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M34 56 L86 56 L80 104 Q79 110 72 110 L48 110 Q41 110 40 104 Z" fill="#B983FF" opacity="0.55"/>` +
+ `<circle cx="50" cy="98" r="6" fill="#2D2A32"/><circle cx="66" cy="102" r="6" fill="#2D2A32"/><circle cx="58" cy="90" r="6" fill="#2D2A32"/>` +
+ `<path d="M64 36 L86 8 M72 36 L94 12" stroke="#FF6B6B" stroke-width="7" stroke-linecap="round"/>` +
+ `<path d="M30 40 L90 40 L89 48 L31 48 Z" fill="#FFFFFF" stroke="${INK}" stroke-width="3"/>`,
+ ),
+ },
+ {
+ id: 'food-icecream',
+ name: 'Ice cream',
+ keywords: ['ice cream', 'cone', 'summer', 'dessert', 'sweet'],
+ svg: svg(
+ `<circle cx="44" cy="42" r="20" fill="#FF7BAC" stroke="${INK}" stroke-width="3.5"/>` +
+ `<circle cx="76" cy="42" r="20" fill="#FFFFFF" stroke="${INK}" stroke-width="3.5"/>` +
+ `<circle cx="60" cy="28" r="20" fill="#FFC24B" stroke="${INK}" stroke-width="3.5"/>` +
+ `<circle cx="60" cy="14" r="5" fill="#FF6B6B" stroke="${INK}" stroke-width="2.5"/>` +
+ `<path d="M36 58 L60 112 L84 58 Z" fill="#FFC24B" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M44 66 L64 96 M52 62 L72 92 M60 60 L78 88" stroke="#FF9F45" stroke-width="2.5" opacity="0.7"/>`,
+ ),
+ },
+ {
+ id: 'food-cupcake',
+ name: 'Cupcake',
+ keywords: ['cupcake', 'dessert', 'sweet', 'bakery', 'birthday'],
+ svg: svg(
+ `<path d="M30 58 Q30 30 60 30 Q90 30 90 58 Z" fill="#FF7BAC" stroke="${INK}" stroke-width="3.5"/>` +
+ `<path d="M40 58 Q36 42 48 40 Q54 30 62 38 Q72 30 74 44 Q84 46 80 58 Z" fill="#FFFFFF" opacity="0.5"/>` +
+ `<circle cx="60" cy="24" r="6" fill="#FF6B6B" stroke="${INK}" stroke-width="2.5"/>` +
+ `<path d="M30 58 L90 58 L84 106 Q83 112 76 112 L44 112 Q37 112 36 106 Z" fill="#FFD93D" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M42 58 L46 112 M60 58 L60 112 M78 58 L74 112" stroke="#FF9F45" stroke-width="3" opacity="0.7"/>`,
+ ),
+ },
+ {
+ id: 'food-sushi',
+ name: 'Sushi roll',
+ keywords: ['sushi', 'japanese', 'maki', 'food', 'rice'],
+ svg: svg(
+ `<circle cx="60" cy="62" r="44" fill="#2D2A32"/>` +
+ `<circle cx="60" cy="62" r="36" fill="#FFFFFF"/>` +
+ `<circle cx="60" cy="62" r="22" fill="#FF9F45"/>` +
+ `<circle cx="60" cy="62" r="12" fill="#FF6B6B" stroke="#2D2A32" stroke-width="2"/>` +
+ `<g stroke="#2D2A32" stroke-width="2.5"><path d="M52 34 l4 8 M68 36 l-2 8 M38 48 l8 4 M84 52 l-8 4 M36 70 l8 -2 M40 86 l6 -6 M80 84 l-5 -6 M86 68 l-8 1"/></g>`,
+ ),
+ },
+ {
+ id: 'food-taco',
+ name: 'Taco',
+ keywords: ['taco', 'mexican', 'food', 'snack'],
+ svg: svg(
+ `<path d="M16 76 Q16 34 60 34 Q104 34 104 76 Q104 86 94 84 Q60 74 26 84 Q16 86 16 76 Z" fill="#FFC24B" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M24 72 Q24 44 60 44 Q96 44 96 72 Q60 64 24 72 Z" fill="#6BCB77" stroke="${INK}" stroke-width="3"/>` +
+ `<circle cx="44" cy="56" r="6" fill="#FF6B6B" stroke="${INK}" stroke-width="2"/>` +
+ `<circle cx="64" cy="52" r="6" fill="#FF6B6B" stroke="${INK}" stroke-width="2"/>` +
+ `<circle cx="80" cy="58" r="5" fill="#FF6B6B" stroke="${INK}" stroke-width="2"/>` +
+ `<path d="M22 80 L26 92 M40 82 L42 94 M60 82 L60 96 M80 82 L78 94 M98 80 L94 92" stroke="#FF9F45" stroke-width="3" stroke-linecap="round" opacity="0.8"/>`,
+ ),
+ },
+ {
+ id: 'food-lemon',
+ name: 'Lemon',
+ keywords: ['lemon', 'citrus', 'fruit', 'yellow', 'fresh'],
+ svg: svg(
+ `<ellipse cx="60" cy="64" rx="42" ry="34" fill="#FFD93D" stroke="${INK}" stroke-width="3.5" transform="rotate(-18 60 64)"/>` +
+ `<ellipse cx="60" cy="64" rx="30" ry="22" fill="none" stroke="#FF9F45" stroke-width="3" transform="rotate(-18 60 64)"/>` +
+ `<path d="M96 40 L106 30 M100 46 L112 42" stroke="#6BCB77" stroke-width="4" stroke-linecap="round"/>` +
+ `<ellipse cx="46" cy="52" rx="8" ry="5" fill="#FFFFFF" opacity="0.45" transform="rotate(-25 46 52)"/>`,
+ ),
+ },
+ ],
+}
diff --git a/src/lib/stickers/frames.ts b/src/lib/stickers/frames.ts
new file mode 100644
index 0000000..eb6194d
--- /dev/null
+++ b/src/lib/stickers/frames.ts
@@ -0,0 +1,117 @@
+import type { StickerPack } from './index'
+
+// Frames, badges and labels — the "sticker with a word on it" set.
+const INK = '#2D2A32'
+const svg = (inner: string) =>
+ `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120">${inner}</svg>`
+const F = 'font-family="Arial, sans-serif" font-weight="bold"'
+
+export const FRAMES_PACK: StickerPack = {
+ id: 'frames',
+ name: 'Frames & Badges',
+ icon: '🏅',
+ stickers: [
+ {
+ id: 'frames-new',
+ name: 'NEW burst',
+ keywords: ['new', 'burst', 'label', 'launch', 'fresh'],
+ svg: svg(
+ `<path d="M60 6 L74 22 L96 16 L98 38 L116 48 L102 62 L114 80 L92 84 L90 106 L70 98 L56 112 L46 94 L24 98 L28 76 L10 64 L26 50 L20 28 L42 30 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<text x="60" y="68" text-anchor="middle" ${F} font-size="26" fill="#FFFFFF">NEW</text>`,
+ ),
+ },
+ {
+ id: 'frames-sale',
+ name: 'SALE tag',
+ keywords: ['sale', 'discount', 'tag', 'offer', 'deal', 'promo'],
+ svg: svg(
+ `<path d="M58 12 L108 12 L108 62 Q108 70 100 70 L34 70 Q24 70 18 62 L12 54 L58 12 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round" transform="rotate(8 60 40)"/>` +
+ `<circle cx="94" cy="28" r="6" fill="#FFFFFF" stroke="${INK}" stroke-width="2.5" transform="rotate(8 60 40)"/>` +
+ `<text x="62" y="52" text-anchor="middle" ${F} font-size="26" fill="#FFFFFF" transform="rotate(8 60 40)">SALE</text>`,
+ ),
+ },
+ {
+ id: 'frames-hot',
+ name: 'HOT badge',
+ keywords: ['hot', 'flame', 'trending', 'popular', 'badge'],
+ svg: svg(
+ `<circle cx="60" cy="66" r="42" fill="#FF9F45" stroke="${INK}" stroke-width="3.5"/>` +
+ `<path d="M60 22 C 66 34 78 38 76 52 C 84 46 86 40 84 34 C 94 44 96 60 88 72 C 80 84 68 90 60 90 C 48 90 38 82 36 70 C 34 60 40 54 46 48 C 44 56 48 60 52 60 C 46 44 54 32 60 22 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<text x="60" y="102" text-anchor="middle" ${F} font-size="14" fill="#FFFFFF">HOT!</text>`,
+ ),
+ },
+ {
+ id: 'frames-star-badge',
+ name: 'Star badge',
+ keywords: ['badge', 'star', 'award', 'premium', 'quality'],
+ svg: svg(
+ `<path d="M60 8 L78 26 L104 24 L102 50 L118 66 L102 82 L104 108 L78 106 L60 116 L42 106 L16 108 L18 82 L2 66 L18 50 L16 24 L42 26 Z" fill="#FFD93D" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<text x="60" y="72" text-anchor="middle" ${F} font-size="20" fill="#2D2A32">TOP</text>`,
+ ),
+ },
+ {
+ id: 'frames-laurel',
+ name: 'Laurel wreath',
+ keywords: ['laurel', 'wreath', 'award', 'winner', 'classic'],
+ svg: svg(
+ `<g fill="#6BCB77" stroke="${INK}" stroke-width="2.5">${[
+ 'M34 100 Q16 84 18 56 Q20 34 34 22 Q28 44 32 62 Q34 80 44 92 Z',
+ 'M86 100 Q104 84 102 56 Q100 34 86 22 Q92 44 88 62 Q86 80 76 92 Z',
+ 'M28 58 q-8 -4 -8 -12 q8 2 10 10 z', 'M92 58 q8 -4 8 -12 q-8 2 -10 10 z',
+ 'M32 78 q-9 -2 -11 -10 q9 0 12 8 z', 'M88 78 q9 -2 11 -10 q-9 0 -12 8 z',
+ ].map((d) => `<path d="${d}"/>`).join('')}</g>` +
+ `<text x="60" y="66" text-anchor="middle" ${F} font-size="22" fill="#2D2A32">Nº1</text>`,
+ ),
+ },
+ {
+ id: 'frames-scalloped',
+ name: 'Scalloped frame',
+ keywords: ['frame', 'scallop', 'circle', 'decorative', 'border'],
+ svg: svg(
+ `<g fill="#FF7BAC" stroke="${INK}" stroke-width="3">${Array.from({ length: 12 }, (_, i) => {
+ const a = (Math.PI / 6) * i - Math.PI / 2
+ const cx = 60 + 38 * Math.cos(a)
+ const cy = 60 + 38 * Math.sin(a)
+ return `<circle cx="${cx.toFixed(1)}" cy="${cy.toFixed(1)}" r="13"/>`
+ }).join('')}</g>` +
+ `<circle cx="60" cy="60" r="36" fill="#FFFFFF" opacity="0.3"/>`,
+ ),
+ },
+ {
+ id: 'frames-dashed-circle',
+ name: 'Dashed circle frame',
+ keywords: ['circle', 'dashed', 'frame', 'outline', 'minimal'],
+ svg: svg(
+ `<circle cx="60" cy="60" r="48" fill="none" stroke="#4D96FF" stroke-width="9" stroke-dasharray="14 9"/>` +
+ `<circle cx="60" cy="60" r="30" fill="none" stroke="#FFD93D" stroke-width="5" stroke-dasharray="6 8"/>`,
+ ),
+ },
+ {
+ id: 'frames-quote',
+ name: 'Quote marks',
+ keywords: ['quote', 'quotation', 'testimonial', 'review', 'cite'],
+ svg: svg(
+ `<path d="M28 72 Q22 44 44 28 L52 38 Q38 48 38 62 L50 62 L50 84 L28 84 Z" fill="#4D96FF" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<path d="M70 72 Q64 44 86 28 L94 38 Q80 48 80 62 L92 62 L92 84 L70 84 Z" fill="#4D96FF" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>`,
+ ),
+ },
+ {
+ id: 'frames-label-blank',
+ name: 'Blank label',
+ keywords: ['label', 'blank', 'name', 'tag', 'write'],
+ svg: svg(
+ `<path d="M14 44 L44 44 L60 26 L76 44 L106 44 L106 78 L76 78 L60 96 L44 78 L14 78 Z" fill="#FFFFFF" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M28 56 L64 56 M28 66 L56 66" stroke="#B983FF" stroke-width="4" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'frames-verified',
+ name: 'Verified badge',
+ keywords: ['verified', 'check', 'trust', 'official', 'badge'],
+ svg: svg(
+ `<path d="M60 8 L76 20 L96 16 L100 36 L116 46 L106 64 L112 84 L92 88 L80 104 L60 96 L40 104 L28 88 L8 84 L14 64 L4 46 L20 36 L24 16 L44 20 Z" fill="#4D96FF" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M40 60 L54 74 L82 46" fill="none" stroke="#FFFFFF" stroke-width="9" stroke-linecap="round" stroke-linejoin="round"/>`,
+ ),
+ },
+ ],
+}
diff --git a/src/lib/stickers/hands.ts b/src/lib/stickers/hands.ts
new file mode 100644
index 0000000..e50da4e
--- /dev/null
+++ b/src/lib/stickers/hands.ts
@@ -0,0 +1,120 @@
+import type { StickerPack } from './index'
+
+// Hand gestures — solid mitten style, one closed silhouette per
+// gesture, cuff OVERLAPS the wrist (no detached chunks).
+const INK = '#2D2A32'
+const SKIN = '#FFC24B'
+const svg = (inner: string) =>
+ `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120">${inner}</svg>`
+
+/** the sleeve — drawn UNDER the hand, overlapping the wrist */
+function cuff(x: number, y: number, w: number, h: number): string {
+ return `<rect x="${x}" y="${y}" width="${w}" height="${h}" rx="9" fill="#4D96FF" stroke="${INK}" stroke-width="3"/>`
+}
+
+export const HANDS_PACK: StickerPack = {
+ id: 'hands',
+ name: 'Hands',
+ icon: '👋',
+ stickers: [
+ {
+ id: 'hands-thumbs-up',
+ name: 'Thumbs up',
+ keywords: ['like', 'ok', 'approve', 'yes', 'good'],
+ svg: svg(
+ cuff(28, 62, 64, 22) +
+ `<path d="M34 78 L34 50 Q34 30 46 26 L50 24 Q58 22 58 34 L58 44 L84 44 Q94 44 94 55 Q94 66 84 66 L58 66 L58 78 Q58 86 50 86 L42 86 Q34 86 34 78 Z" fill="${SKIN}" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M44 34 Q44 28 49 27" fill="none" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" opacity="0.6"/>`,
+ ),
+ },
+ {
+ id: 'hands-thumbs-down',
+ name: 'Thumbs down',
+ keywords: ['dislike', 'no', 'bad', 'reject', 'down'],
+ svg: svg(
+ cuff(28, 36, 64, 22) +
+ `<path d="M34 42 L34 70 Q34 90 46 94 L50 96 Q58 98 58 86 L58 76 L84 76 Q94 76 94 65 Q94 54 84 54 L58 54 L58 42 Q58 34 50 34 L42 34 Q34 34 34 42 Z" fill="${SKIN}" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M44 62 Q44 68 49 69" fill="none" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" opacity="0.6"/>`,
+ ),
+ },
+ {
+ id: 'hands-peace',
+ name: 'Peace sign',
+ keywords: ['peace', 'victory', 'two', 'fingers'],
+ svg: svg(
+ cuff(38, 76, 44, 20) +
+ `<path d="M46 82 L38 44 Q36 24 48 22 Q58 20 60 38 L62 48 L66 32 Q69 16 79 20 Q88 24 84 44 L76 72 Q72 84 62 88 Q52 90 46 82 Z" fill="${SKIN}" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M52 34 Q52 26 57 25" fill="none" stroke="#FFFFFF" stroke-width="2.5" stroke-linecap="round" opacity="0.6"/>`,
+ ),
+ },
+ {
+ id: 'hands-ok',
+ name: 'OK sign',
+ keywords: ['ok', 'perfect', 'circle', 'fine'],
+ svg: svg(
+ cuff(36, 76, 48, 20) +
+ `<path d="M60 22 Q80 22 80 40 Q80 50 70 56 L66 58 Q76 66 74 76 Q72 88 60 88 Q48 88 46 76 Q44 66 54 58 L50 56 Q40 50 40 40 Q40 22 60 22 Z" fill="${SKIN}" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<circle cx="60" cy="38" r="9" fill="#FFFFFF" opacity="0.4"/>`,
+ ),
+ },
+ {
+ id: 'hands-wave',
+ name: 'Waving hand',
+ keywords: ['hello', 'hi', 'wave', 'welcome', 'bye'],
+ svg: svg(
+ cuff(32, 78, 56, 20) +
+ `<path d="M38 80 Q32 60 36 44 Q38 34 45 37 Q50 40 49 48 L51 48 Q50 32 58 30 Q66 28 66 42 L68 42 Q68 28 76 28 Q83 28 82 44 L83 46 Q86 36 93 39 Q99 42 96 56 Q92 72 82 82 Q72 92 54 90 Q43 88 38 80 Z" fill="${SKIN}" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M44 20 L48 10 M62 16 L62 6 M80 20 L84 10" stroke="#4D96FF" stroke-width="4" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'hands-clap',
+ name: 'Clapping hands',
+ keywords: ['clap', 'applause', 'bravo', 'praise'],
+ svg: svg(
+ cuff(26, 70, 56, 20) +
+ `<path d="M34 74 Q28 56 32 42 Q34 33 41 36 Q46 39 45 46 L52 42 Q50 30 58 28 Q66 26 66 38 L74 36 Q74 26 82 27 Q89 28 87 42 Q84 58 76 70 Q68 80 54 80 Q42 80 34 74 Z" fill="${SKIN}" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M44 18 L50 8 M64 14 L66 4 M84 20 L90 12" stroke="#FFD93D" stroke-width="4.5" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'hands-point-right',
+ name: 'Pointing right',
+ keywords: ['point', 'right', 'look', 'direction', 'here'],
+ svg: svg(
+ cuff(22, 60, 52, 22) +
+ `<path d="M32 76 L32 48 Q32 40 40 40 L88 40 Q100 40 100 53 Q100 66 88 66 L56 66 L56 76 Q56 84 48 84 L40 84 Q32 84 32 76 Z" fill="${SKIN}" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<circle cx="46" cy="53" r="3" fill="${INK}"/>`,
+ ),
+ },
+ {
+ id: 'hands-point-up',
+ name: 'Pointing up',
+ keywords: ['point', 'up', 'tip', 'idea', 'note'],
+ svg: svg(
+ cuff(36, 78, 48, 20) +
+ `<path d="M48 84 L48 36 Q48 14 60 14 Q72 14 72 36 L72 52 L80 52 Q88 52 88 62 Q88 72 80 72 L72 72 L72 84 Q72 92 64 92 L56 92 Q48 92 48 84 Z" fill="${SKIN}" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<circle cx="60" cy="28" r="3" fill="${INK}"/>`,
+ ),
+ },
+ {
+ id: 'hands-muscle',
+ name: 'Flexed muscle',
+ keywords: ['strong', 'muscle', 'flex', 'power', 'gym'],
+ svg: svg(
+ cuff(30, 70, 44, 22) +
+ `<path d="M42 84 Q30 80 30 66 Q30 48 48 42 Q57 39 61 46 L68 38 Q77 27 87 36 Q97 46 89 60 L83 70 Q77 88 60 92 Q49 94 42 84 Z" fill="${SKIN}" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M62 56 Q70 52 75 58" fill="none" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" opacity="0.6"/>`,
+ ),
+ },
+ {
+ id: 'hands-raise',
+ name: 'Raised hand',
+ keywords: ['raise', 'stop', 'high', 'five', 'hand'],
+ svg: svg(
+ cuff(34, 78, 52, 20) +
+ `<path d="M40 82 Q36 62 38 46 Q39 37 45 37 Q51 37 51 46 L51 42 Q51 30 58 30 Q65 30 65 42 L65 46 Q65 35 72 35 Q79 35 79 47 L79 58 Q88 60 88 71 Q88 86 75 92 Q60 96 48 92 Q42 90 40 82 Z" fill="${SKIN}" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>`,
+ ),
+ },
+ ],
+}
diff --git a/src/lib/stickers/hearts.ts b/src/lib/stickers/hearts.ts
new file mode 100644
index 0000000..6fa5099
--- /dev/null
+++ b/src/lib/stickers/hearts.ts
@@ -0,0 +1,107 @@
+import type { StickerPack } from './index'
+
+// Hearts — the universal accent set. Each heart is the same hero
+// path, recoloured; special hearts (arrow, broken, sparkles) add
+// their own geometry on top.
+const INK = '#2D2A32'
+const svg = (inner: string) =>
+ `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120">${inner}</svg>`
+
+/** classic heart centered at (60,62), width ~72 + glossy highlight */
+function heart(fill: string): string {
+ return (
+ heartAt(60, 62, 46, fill) +
+ `<ellipse cx="38" cy="36" rx="10" ry="7" fill="#FFFFFF" opacity="0.4" transform="rotate(-30 38 36)"/>`
+ )
+}
+
+/** a heart centered at (cx,cy) with half-width s — the shared hero shape */
+function heartAt(cx: number, cy: number, s: number, fill: string, sw = 3.5): string {
+ const b = (n: number) => n.toFixed(1)
+ return (
+ `<path d="M${b(cx)} ${b(cy + s)} C ${b(cx - s * 0.65)} ${b(cy + s * 0.39)} ${b(cx - s)} ${b(cy + 0.04 * s)} ${b(cx - s)} ${b(cy - 0.35 * s)} ` +
+ `C ${b(cx - s)} ${b(cy - 0.7 * s)} ${b(cx - s * 0.74)} ${b(cy - 0.92 * s)} ${b(cx - s * 0.43)} ${b(cy - 0.92 * s)} ` +
+ `C ${b(cx - s * 0.22)} ${b(cy - 0.92 * s)} ${b(cx - s * 0.07)} ${b(cy - 0.8 * s)} ${b(cx)} ${b(cy - 0.57 * s)} ` +
+ `C ${b(cx + s * 0.07)} ${b(cy - 0.8 * s)} ${b(cx + s * 0.22)} ${b(cy - 0.92 * s)} ${b(cx + s * 0.43)} ${b(cy - 0.92 * s)} ` +
+ `C ${b(cx + s * 0.74)} ${b(cy - 0.92 * s)} ${b(cx + s)} ${b(cy - 0.7 * s)} ${b(cx + s)} ${b(cy - 0.35 * s)} ` +
+ `C ${b(cx + s)} ${b(cy + 0.04 * s)} ${b(cx + s * 0.65)} ${b(cy + s * 0.39)} ${b(cx)} ${b(cy + s)} Z" ` +
+ `fill="${fill}" stroke="${INK}" stroke-width="${sw}" stroke-linejoin="round"/>`
+ )
+}
+
+export const HEARTS_PACK: StickerPack = {
+ id: 'hearts',
+ name: 'Hearts',
+ icon: '❤️',
+ stickers: [
+ { id: 'hearts-red', name: 'Red heart', keywords: ['love', 'red', 'valentine', 'like'], svg: svg(heart('#FF6B6B')) },
+ { id: 'hearts-pink', name: 'Pink heart', keywords: ['love', 'pink', 'cute', 'sweet'], svg: svg(heart('#FF7BAC')) },
+ { id: 'hearts-purple', name: 'Purple heart', keywords: ['love', 'purple', 'violet'], svg: svg(heart('#B983FF')) },
+ { id: 'hearts-blue', name: 'Blue heart', keywords: ['love', 'blue', 'calm', 'friendship'], svg: svg(heart('#4D96FF')) },
+ { id: 'hearts-green', name: 'Green heart', keywords: ['love', 'green', 'eco', 'nature'], svg: svg(heart('#6BCB77')) },
+ { id: 'hearts-gold', name: 'Gold heart', keywords: ['love', 'gold', 'premium', 'best'], svg: svg(heart('#FFD93D')) },
+ {
+ id: 'hearts-rainbow',
+ name: 'Rainbow heart',
+ keywords: ['rainbow', 'pride', 'colorful', 'love'],
+ svg: svg(
+ `<defs><linearGradient id="hr" x1="0" y1="0" x2="1" y2="1">` +
+ `<stop offset="0" stop-color="#FF6B6B"/><stop offset="0.35" stop-color="#FFD93D"/>` +
+ `<stop offset="0.65" stop-color="#6BCB77"/><stop offset="1" stop-color="#4D96FF"/>` +
+ `</linearGradient></defs>` +
+ heart('url(#hr)'),
+ ),
+ },
+ {
+ id: 'hearts-arrow',
+ name: 'Heart with arrow',
+ keywords: ['cupid', 'arrow', 'valentine', 'shot'],
+ svg: svg(
+ heart('#FF6B6B') +
+ `<path d="M20 96 L96 22" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>` +
+ `<path d="M84 20 L98 20 L98 34" fill="none" stroke="${INK}" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>` +
+ `<path d="M26 88 L14 88 L14 100" fill="none" stroke="${INK}" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>` +
+ `<path d="M96 22 L88 18 M96 22 L92 30" stroke="#FF6B6B" stroke-width="3" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'hearts-broken',
+ name: 'Broken heart',
+ keywords: ['sad', 'broken', 'breakup', 'heartbreak'],
+ svg: svg(
+ `<path d="M60 30 L48 18 C 34 18 22 28 22 44 C 22 62 38 82 60 100 L60 30 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M60 30 L72 18 C 86 18 98 28 98 44 C 98 62 82 82 60 100 L60 30 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M60 30 L52 44 L62 54 L54 68 L60 82" fill="none" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" opacity="0.85"/>`,
+ ),
+ },
+ {
+ id: 'hearts-sparkle',
+ name: 'Sparkling heart',
+ keywords: ['sparkle', 'shine', 'love', 'glitter'],
+ svg: svg(
+ heart('#FF6B6B') +
+ `<path d="M92 30 L96 22 L100 30 L108 34 L100 38 L96 46 L92 38 L84 34 Z" fill="#FFD93D" stroke="${INK}" stroke-width="2.5" stroke-linejoin="round"/>` +
+ `<path d="M18 66 L21 60 L24 66 L30 69 L24 72 L21 78 L18 72 L12 69 Z" fill="#FFD93D" stroke="${INK}" stroke-width="2.5" stroke-linejoin="round"/>`,
+ ),
+ },
+ {
+ id: 'hearts-cluster',
+ name: 'Hearts cluster',
+ keywords: ['many', 'cluster', 'love', 'float'],
+ svg: svg(
+ heartAt(52, 34, 30, '#FF6B6B', 3) +
+ heartAt(80, 72, 24, '#FF7BAC', 3) +
+ heartAt(36, 88, 17, '#B983FF', 2.5),
+ ),
+ },
+ {
+ id: 'hearts-banner',
+ name: 'Heart banner',
+ keywords: ['banner', 'ribbon', 'love', 'label'],
+ svg: svg(
+ heart('#FF6B6B') +
+ `<path d="M6 56 L24 56 M96 56 L114 56" stroke="${INK}" stroke-width="5" stroke-linecap="round"/>`,
+ ),
+ },
+ ],
+}
diff --git a/src/lib/stickers/index.ts b/src/lib/stickers/index.ts
new file mode 100644
index 0000000..a21430d
--- /dev/null
+++ b/src/lib/stickers/index.ts
@@ -0,0 +1,107 @@
+// ─────────────────────────────────────────────────────────────
+// Canvix sticker packs (v0.22 — the real-sticker-library wave).
+//
+// The starter set was 40 emoji text stickers. This module is the
+// real library: hand-authored vector sticker packs, each sticker a
+// self-contained SVG (viewBox 0 0 120 120, presentation attributes
+// only — no external refs, no scripts, no CSS classes) rendered
+// natively on the canvas, exported inline into SVG files, and
+// raster-embedded into PPTX/PDF/PNG/video through the shared
+// collectImages preload — the same pipeline photos ride.
+//
+// The emoji starter set stays (back-compat: documents in the wild
+// hold emoji StickerElements, and the text path is untouched).
+//
+// Style guide every pack follows (so the library reads as ONE
+// product, not 11 clip-art folders):
+// • outline ink #2D2A32, width 3.5 on hero shapes / 3 on details
+// • round caps + joins everywhere
+// • palette red #FF6B6B · yellow #FFD93D · green #6BCB77
+// blue #4D96FF · purple #B983FF · orange #FF9F45
+// pink #FF7BAC · white #FFFFFF
+// • one glossy highlight ellipse (white, 0.35) on curved heroes
+// ─────────────────────────────────────────────────────────────
+
+/** One authored vector sticker. */
+export interface PackSticker {
+ /** stable id — `pack-shortid-name`, unique across the library */
+ id: string
+ /** human name shown in tooltips / saved as element alt text */
+ name: string
+ /** lowercase search terms (matched by the picker's search box) */
+ keywords: string[]
+ /** the self-contained SVG markup (viewBox 0 0 120 120) */
+ svg: string
+}
+
+/** A themed pack of stickers. */
+export interface StickerPack {
+ id: string
+ name: string
+ /** the chip icon in the picker (an emoji glyph — meta-UI, not content) */
+ icon: string
+ stickers: PackSticker[]
+}
+
+import { FACES_PACK } from './faces'
+import { HANDS_PACK } from './hands'
+import { HEARTS_PACK } from './hearts'
+import { STARS_PACK } from './stars'
+import { CELEBRATE_PACK } from './celebrate'
+import { BUSINESS_PACK } from './business'
+import { ARROWS_PACK } from './arrows'
+import { NATURE_PACK } from './nature'
+import { FOOD_PACK } from './food'
+import { FRAMES_PACK } from './frames'
+import { TRAVEL_PACK } from './travel'
+
+/** The authored vector packs, picker order. */
+export const STICKER_PACKS: StickerPack[] = [
+ FACES_PACK,
+ HANDS_PACK,
+ HEARTS_PACK,
+ STARS_PACK,
+ CELEBRATE_PACK,
+ BUSINESS_PACK,
+ ARROWS_PACK,
+ NATURE_PACK,
+ FOOD_PACK,
+ FRAMES_PACK,
+ TRAVEL_PACK,
+]
+
+/** Total authored vector stickers (excludes the emoji text set). */
+export const VECTOR_STICKER_COUNT = STICKER_PACKS.reduce((n, p) => n + p.stickers.length, 0)
+
+/** The emoji text stickers — the original starter set, kept as the
+ * quick "Emoji" tab. Rendered as text (Segoe UI Emoji et al.),
+ * native text runs in PPTX — exactly as before. */
+export const EMOJI_STICKERS: readonly string[] = [
+ '😀', '😍', '🤩', '🥳', '😎', '🤔', '😴', '🤯', '🥰', '😭',
+ '😡', '🤡', '👻', '💀', '👽', '🤖', '🎃', '🎉', '🎈', '🎁',
+ '🏆', '🥇', '⚽', '🏀', '🎮', '🎵', '🎸', '🎬', '📷', '🔥',
+ '✨', '⚡', '🌈', '☀️', '🌙', '⭐', '❤️', '💜', '✅', '❌',
+]
+
+/** Whole-library search across pack name, sticker name and keywords. */
+export function searchStickers(query: string): { pack: StickerPack; stickers: PackSticker[] }[] {
+ const q = query.trim().toLowerCase()
+ if (!q) return STICKER_PACKS.map((pack) => ({ pack, stickers: pack.stickers }))
+ const terms = q.split(/\s+/)
+ const hit = (s: PackSticker, packName: string): boolean => {
+ const hay = `${s.name} ${s.keywords.join(' ')} ${packName}`.toLowerCase()
+ return terms.every((t) => hay.includes(t))
+ }
+ return STICKER_PACKS.map((pack) => ({ pack, stickers: pack.stickers.filter((s) => hit(s, pack.name)) })).filter(
+ (r) => r.stickers.length > 0,
+ )
+}
+
+/** Find a sticker by id (library lookups, tests). */
+export function findSticker(id: string): PackSticker | undefined {
+ for (const p of STICKER_PACKS) {
+ const s = p.stickers.find((x) => x.id === id)
+ if (s) return s
+ }
+ return undefined
+}
diff --git a/src/lib/stickers/nature.ts b/src/lib/stickers/nature.ts
new file mode 100644
index 0000000..5baff91
--- /dev/null
+++ b/src/lib/stickers/nature.ts
@@ -0,0 +1,163 @@
+import type { StickerPack } from './index'
+
+// Nature — sun, sky, plants, weather.
+const INK = '#2D2A32'
+const svg = (inner: string) =>
+ `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120">${inner}</svg>`
+
+export const NATURE_PACK: StickerPack = {
+ id: 'nature',
+ name: 'Nature',
+ icon: '🌿',
+ stickers: [
+ {
+ id: 'nature-sun',
+ name: 'Sun',
+ keywords: ['sun', 'sunny', 'summer', 'weather', 'bright'],
+ svg: svg(
+ `<g>${Array.from({ length: 8 }, (_, i) => {
+ const a = (Math.PI / 4) * i
+ const x1 = 60 + 52 * Math.cos(a)
+ const y1 = 60 + 52 * Math.sin(a)
+ const x2 = 60 + 64 * Math.cos(a)
+ const y2 = 60 + 64 * Math.sin(a)
+ return `<path d="M${x1.toFixed(1)} ${y1.toFixed(1)} L${x2.toFixed(1)} ${y2.toFixed(1)}" stroke="#FF9F45" stroke-width="6" stroke-linecap="round"/>`
+ }).join('')}</g>` +
+ `<circle cx="60" cy="60" r="40" fill="#FFD93D" stroke="${INK}" stroke-width="3.5"/>` +
+ `<circle cx="48" cy="48" r="10" fill="#FFFFFF" opacity="0.35"/>`,
+ ),
+ },
+ {
+ id: 'nature-rainbow',
+ name: 'Rainbow',
+ keywords: ['rainbow', 'colorful', 'sky', 'pride', 'happy'],
+ svg: svg(
+ `<path d="M12 92 A48 48 0 0 1 108 92" fill="none" stroke="#FF6B6B" stroke-width="10" stroke-linecap="round"/>` +
+ `<path d="M24 92 A36 36 0 0 1 96 92" fill="none" stroke="#FF9F45" stroke-width="10" stroke-linecap="round"/>` +
+ `<path d="M36 92 A24 24 0 0 1 84 92" fill="none" stroke="#FFD93D" stroke-width="10" stroke-linecap="round"/>` +
+ `<path d="M48 92 A12 12 0 0 1 72 92" fill="none" stroke="#6BCB77" stroke-width="10" stroke-linecap="round"/>` +
+ `<path d="M10 92 L110 92" stroke="${INK}" stroke-width="3.5" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'nature-cloud',
+ name: 'Cloud',
+ keywords: ['cloud', 'sky', 'weather', 'soft', 'day'],
+ svg: svg(
+ `<path d="M30 82 Q14 82 14 68 Q14 56 26 54 Q26 36 44 36 Q52 24 68 28 Q84 30 86 46 Q102 46 104 62 Q105 78 88 80 Z" fill="#FFFFFF" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M36 90 Q40 100 34 106 M54 90 Q58 100 52 106 M72 90 Q76 100 70 106" fill="none" stroke="#4D96FF" stroke-width="4" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'nature-flower',
+ name: 'Flower',
+ keywords: ['flower', 'bloom', 'spring', 'daisy', 'plant'],
+ svg: svg(
+ `<g>${Array.from({ length: 6 }, (_, i) => {
+ const a = (Math.PI / 3) * i
+ const cx = 60 + 26 * Math.cos(a)
+ const cy = 56 + 26 * Math.sin(a)
+ return `<ellipse cx="${cx.toFixed(1)}" cy="${cy.toFixed(1)}" rx="15" ry="20" transform="rotate(${((a * 180) / Math.PI + 90).toFixed(1)} ${cx.toFixed(1)} ${cy.toFixed(1)})" fill="#FF7BAC" stroke="${INK}" stroke-width="3"/>`
+ }).join('')}</g>` +
+ `<circle cx="60" cy="56" r="13" fill="#FFD93D" stroke="${INK}" stroke-width="3"/>` +
+ `<path d="M60 78 L60 108 M60 90 Q76 86 78 74 M60 98 Q46 94 44 82" fill="none" stroke="#6BCB77" stroke-width="4.5" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'nature-tulip',
+ name: 'Tulip',
+ keywords: ['tulip', 'flower', 'spring', 'love', 'bloom'],
+ svg: svg(
+ `<path d="M38 44 Q38 20 52 20 Q58 20 60 28 Q62 20 68 20 Q82 20 82 44 Q82 60 60 62 Q38 60 38 44 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M60 62 L60 104" stroke="#6BCB77" stroke-width="5" stroke-linecap="round"/>` +
+ `<path d="M60 80 Q42 78 38 62 Q54 62 60 74 Z" fill="#6BCB77" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<path d="M60 88 Q78 86 82 70 Q66 70 60 82 Z" fill="#6BCB77" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>`,
+ ),
+ },
+ {
+ id: 'nature-leaf',
+ name: 'Leaf',
+ keywords: ['leaf', 'green', 'eco', 'nature', 'plant'],
+ svg: svg(
+ `<path d="M22 98 Q18 48 60 22 Q102 48 98 98 Q60 112 22 98 Z" fill="#6BCB77" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M60 30 L60 102 M60 52 Q46 48 40 38 M60 52 Q74 48 80 38 M60 72 Q46 68 40 58 M60 72 Q74 68 80 58 M60 90 Q48 86 42 78 M60 90 Q72 86 78 78" fill="none" stroke="${INK}" stroke-width="2.5" stroke-linecap="round" opacity="0.5"/>`,
+ ),
+ },
+ {
+ id: 'nature-tree',
+ name: 'Tree',
+ keywords: ['tree', 'forest', 'wood', 'park', 'plant'],
+ svg: svg(
+ `<rect x="52" y="66" width="16" height="38" rx="4" fill="#B983FF" stroke="${INK}" stroke-width="3"/>` +
+ `<circle cx="60" cy="44" r="30" fill="#6BCB77" stroke="${INK}" stroke-width="3.5"/>` +
+ `<circle cx="36" cy="58" r="18" fill="#6BCB77" stroke="${INK}" stroke-width="3.5"/>` +
+ `<circle cx="84" cy="58" r="18" fill="#6BCB77" stroke="${INK}" stroke-width="3.5"/>` +
+ `<ellipse cx="48" cy="34" rx="9" ry="6" fill="#FFFFFF" opacity="0.35" transform="rotate(-25 48 34)"/>`,
+ ),
+ },
+ {
+ id: 'nature-cactus',
+ name: 'Cactus',
+ keywords: ['cactus', 'desert', 'plant', 'succulent', 'mexico'],
+ svg: svg(
+ `<rect x="48" y="30" width="24" height="72" rx="12" fill="#6BCB77" stroke="${INK}" stroke-width="3.5"/>` +
+ `<path d="M48 60 Q30 60 30 44 Q30 34 40 34 Q48 34 48 46 Z" fill="#6BCB77" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M72 70 Q90 70 90 54 Q90 44 80 44 Q72 44 72 56 Z" fill="#6BCB77" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M56 44 L56 50 M64 56 L64 62 M56 72 L56 78" stroke="${INK}" stroke-width="2.5" stroke-linecap="round" opacity="0.5"/>` +
+ `<path d="M28 104 L92 104" stroke="#FF9F45" stroke-width="5" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'nature-moon',
+ name: 'Crescent moon',
+ keywords: ['moon', 'night', 'sleep', 'crescent', 'dark'],
+ svg: svg(
+ `<path d="M74 12 C 46 18 30 42 30 66 C 30 90 46 108 74 112 C 56 100 46 84 46 64 C 46 44 56 26 74 12 Z" fill="#FFD93D" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<circle cx="88" cy="34" r="3.5" fill="#FFFFFF"/>` +
+ `<circle cx="98" cy="66" r="2.5" fill="#FFFFFF"/>` +
+ `<circle cx="84" cy="94" r="3" fill="#FFFFFF"/>`,
+ ),
+ },
+ {
+ id: 'nature-snowflake',
+ name: 'Snowflake',
+ keywords: ['snow', 'snowflake', 'winter', 'cold', 'ice'],
+ svg: svg(
+ `<g stroke="#4D96FF" stroke-width="7" stroke-linecap="round">${Array.from({ length: 3 }, (_, i) => {
+ const a = (Math.PI / 3) * i
+ const x1 = 60 - 44 * Math.cos(a)
+ const y1 = 60 - 44 * Math.sin(a)
+ const x2 = 60 + 44 * Math.cos(a)
+ const y2 = 60 + 44 * Math.sin(a)
+ return `<path d="M${x1.toFixed(1)} ${y1.toFixed(1)} L${x2.toFixed(1)} ${y2.toFixed(1)}"/>`
+ }).join('')}</g>` +
+ `<g stroke="#4D96FF" stroke-width="5" stroke-linecap="round" fill="none">${[
+ 'M38 38 L28 28 M38 38 L26 42 M82 82 L92 92 M82 82 L94 78',
+ 'M82 38 L92 28 M82 38 L94 42 M38 82 L28 92 M38 82 L26 78',
+ 'M60 16 L52 8 M60 16 L68 8 M60 104 L52 112 M60 104 L68 112',
+ ].map((d) => `<path d="${d}"/>`).join('')}</g>` +
+ `<circle cx="60" cy="60" r="8" fill="#4D96FF"/>`,
+ ),
+ },
+ {
+ id: 'nature-drop',
+ name: 'Water drop',
+ keywords: ['drop', 'water', 'rain', 'blue', 'hydrate'],
+ svg: svg(
+ `<path d="M60 12 C 60 12 26 56 26 78 C 26 96 40 108 60 108 C 80 108 94 96 94 78 C 94 56 60 12 60 12 Z" fill="#4D96FF" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M44 76 Q44 90 56 94" fill="none" stroke="#FFFFFF" stroke-width="5" stroke-linecap="round" opacity="0.6"/>`,
+ ),
+ },
+ {
+ id: 'nature-mountains',
+ name: 'Mountains',
+ keywords: ['mountain', 'hiking', 'travel', 'outdoor', 'adventure'],
+ svg: svg(
+ `<path d="M10 96 L40 40 L58 68 L70 48 L110 96 Z" fill="#6BCB77" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M40 40 L52 60 L34 60 Z" fill="#FFFFFF" stroke="${INK}" stroke-width="2.5" stroke-linejoin="round"/>` +
+ `<path d="M70 48 L78 61 L62 61 Z" fill="#FFFFFF" stroke="${INK}" stroke-width="2.5" stroke-linejoin="round"/>` +
+ `<circle cx="92" cy="26" r="10" fill="#FFD93D" stroke="${INK}" stroke-width="3"/>`,
+ ),
+ },
+ ],
+}
diff --git a/src/lib/stickers/stars.ts b/src/lib/stickers/stars.ts
new file mode 100644
index 0000000..9c33968
--- /dev/null
+++ b/src/lib/stickers/stars.ts
@@ -0,0 +1,121 @@
+import type { StickerPack } from './index'
+
+// Stars, sparkles and shine marks.
+const INK = '#2D2A32'
+const svg = (inner: string) =>
+ `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120">${inner}</svg>`
+
+/** 5-point star polygon centered at (cx,cy), outer r, inner ~0.42r */
+function star(cx: number, cy: number, r: number, fill: string, sw = 3.5, rot = -90): string {
+ const pts: string[] = []
+ for (let i = 0; i < 10; i++) {
+ const rr = i % 2 === 0 ? r : r * 0.42
+ const a = ((Math.PI / 5) * i + (rot * Math.PI) / 180) as number
+ pts.push(`${(cx + rr * Math.cos(a)).toFixed(1)},${(cy + rr * Math.sin(a)).toFixed(1)}`)
+ }
+ return `<polygon points="${pts.join(' ')}" fill="${fill}" stroke="${INK}" stroke-width="${sw}" stroke-linejoin="round"/>`
+}
+
+/** 4-point sparkle (the "shine" diamond) */
+function sparkle(cx: number, cy: number, r: number, fill: string, sw = 3): string {
+ const q = r * 0.22
+ return (
+ `<path d="M${cx} ${cy - r} Q ${cx + q} ${cy - q} ${cx + r} ${cy} Q ${cx + q} ${cy + q} ${cx} ${cy + r} ` +
+ `Q ${cx - q} ${cy + q} ${cx - r} ${cy} Q ${cx - q} ${cy - q} ${cx} ${cy - r} Z" ` +
+ `fill="${fill}" stroke="${INK}" stroke-width="${sw}" stroke-linejoin="round"/>`
+ )
+}
+
+export const STARS_PACK: StickerPack = {
+ id: 'stars',
+ name: 'Stars & Sparkles',
+ icon: '⭐',
+ stickers: [
+ { id: 'stars-yellow', name: 'Yellow star', keywords: ['star', 'favorite', 'rate', 'yellow'], svg: svg(star(60, 62, 46, '#FFD93D') + `<path d="M44 44 L52 52" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" opacity="0.6"/>`) },
+ { id: 'stars-gold-badge', name: 'Gold star badge', keywords: ['gold', 'badge', 'award', 'star'], svg: svg(star(60, 60, 50, '#FF9F45', 4) + star(60, 60, 34, '#FFD93D', 3)) },
+ { id: 'stars-blue', name: 'Blue star', keywords: ['star', 'blue', 'review'], svg: svg(star(60, 62, 46, '#4D96FF')) },
+ { id: 'stars-pink', name: 'Pink star', keywords: ['star', 'pink', 'cute'], svg: svg(star(60, 62, 46, '#FF7BAC')) },
+ {
+ id: 'stars-sparkle',
+ name: 'Sparkle',
+ keywords: ['sparkle', 'shine', 'glitter', 'clean', 'new'],
+ svg: svg(sparkle(60, 62, 44, '#FFD93D', 3.5) + sparkle(98, 26, 14, '#FFD93D', 2.5) + sparkle(22, 96, 10, '#FFD93D', 2.5)),
+ },
+ {
+ id: 'stars-sparkle-pink',
+ name: 'Pink sparkles',
+ keywords: ['sparkle', 'pink', 'magic', 'glitter'],
+ svg: svg(sparkle(46, 48, 30, '#FF7BAC', 3) + sparkle(86, 76, 20, '#B983FF', 2.5) + sparkle(28, 92, 12, '#FF7BAC', 2)),
+ },
+ {
+ id: 'stars-shooting',
+ name: 'Shooting star',
+ keywords: ['shooting', 'comet', 'wish', 'night'],
+ svg: svg(
+ `<path d="M14 106 L44 76 M24 100 L54 70 M34 94 L64 64" stroke="#4D96FF" stroke-width="5" stroke-linecap="round"/>` +
+ star(74, 54, 26, '#FFD93D', 3.5) +
+ sparkle(100, 28, 12, '#FFFFFF', 2),
+ ),
+ },
+ {
+ id: 'stars-burst',
+ name: 'Star burst',
+ keywords: ['burst', 'boom', 'sale', 'attention', 'wow'],
+ svg: svg(
+ `<g>${Array.from({ length: 12 }, (_, i) => {
+ const a = (Math.PI / 6) * i
+ const x1 = 60 + 40 * Math.cos(a)
+ const y1 = 60 + 40 * Math.sin(a)
+ const x2 = 60 + 54 * Math.cos(a)
+ const y2 = 60 + 54 * Math.sin(a)
+ return `<path d="M${x1.toFixed(1)} ${y1.toFixed(1)} L${x2.toFixed(1)} ${y2.toFixed(1)}" stroke="#FF9F45" stroke-width="6" stroke-linecap="round"/>`
+ }).join('')}</g>` +
+ `<circle cx="60" cy="60" r="38" fill="#FFD93D" stroke="${INK}" stroke-width="3.5"/>` +
+ star(60, 60, 24, '#FF6B6B', 3),
+ ),
+ },
+ {
+ id: 'stars-night',
+ name: 'Night star',
+ keywords: ['night', 'moon', 'sleep', 'star', 'dark'],
+ svg: svg(
+ `<circle cx="60" cy="62" r="44" fill="#2D2A32"/>` +
+ star(60, 62, 30, '#FFD93D', 3) +
+ sparkle(94, 34, 9, '#FFFFFF', 1.8) +
+ sparkle(30, 88, 7, '#FFFFFF', 1.5) +
+ `<circle cx="90" cy="86" r="3" fill="#FFFFFF"/><circle cx="34" cy="34" r="2.5" fill="#FFFFFF"/>`,
+ ),
+ },
+ {
+ id: 'stars-wand',
+ name: 'Magic wand',
+ keywords: ['magic', 'wand', 'wizard', 'spell', 'ai'],
+ svg: svg(
+ `<path d="M20 100 L72 48" stroke="#B983FF" stroke-width="10" stroke-linecap="round"/>` +
+ `<path d="M20 100 L72 48" stroke="${INK}" stroke-width="3" stroke-linecap="round" opacity="0.25"/>` +
+ star(84, 36, 18, '#FFD93D', 3) +
+ sparkle(60, 24, 9, '#FF7BAC', 2) +
+ sparkle(104, 58, 8, '#4D96FF', 2) +
+ sparkle(88, 68, 6, '#FFD93D', 1.8),
+ ),
+ },
+ {
+ id: 'stars-rating',
+ name: 'Five stars',
+ keywords: ['rating', 'review', 'five', 'stars', 'score'],
+ svg: svg(
+ [14, 36, 58, 80, 102].map((x, i) => star(x, i % 2 === 0 ? 62 : 54, 11, '#FFD93D', 2.2)).join(''),
+ ),
+ },
+ {
+ id: 'stars-autograph',
+ name: 'Circled star',
+ keywords: ['circle', 'star', 'quality', 'premium', 'verified'],
+ svg: svg(
+ `<circle cx="60" cy="60" r="50" fill="#4D96FF" stroke="${INK}" stroke-width="3.5"/>` +
+ star(60, 60, 28, '#FFFFFF', 3) +
+ `<ellipse cx="42" cy="34" rx="10" ry="6" fill="#FFFFFF" opacity="0.3" transform="rotate(-25 42 34)"/>`,
+ ),
+ },
+ ],
+}
diff --git a/src/lib/stickers/travel.ts b/src/lib/stickers/travel.ts
new file mode 100644
index 0000000..8dae565
--- /dev/null
+++ b/src/lib/stickers/travel.ts
@@ -0,0 +1,130 @@
+import type { StickerPack } from './index'
+
+// Travel & everyday objects.
+const INK = '#2D2A32'
+const svg = (inner: string) =>
+ `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120">${inner}</svg>`
+
+export const TRAVEL_PACK: StickerPack = {
+ id: 'travel',
+ name: 'Travel',
+ icon: '✈️',
+ stickers: [
+ {
+ id: 'travel-plane',
+ name: 'Airplane',
+ keywords: ['plane', 'airplane', 'fly', 'travel', 'trip', 'flight'],
+ svg: svg(
+ `<path d="M14 62 Q12 54 22 52 L52 48 L74 18 Q78 12 84 14 Q90 16 86 26 L70 54 L96 58 Q104 60 102 68 Q100 74 92 74 L62 72 L44 98 Q40 104 34 102 Q28 100 32 92 L46 70 L24 68 Q16 68 14 62 Z" fill="#4D96FF" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M52 48 L72 22 Q74 18 78 17 L70 52 Z" fill="#FFFFFF" opacity="0.35"/>` +
+ `<circle cx="64" cy="42" r="4" fill="#FFFFFF"/>`,
+ ),
+ },
+ {
+ id: 'travel-pin',
+ name: 'Map pins',
+ keywords: ['pin', 'location', 'map', 'gps', 'here', 'meet'],
+ svg: svg(
+ `<path d="M40 56 C 40 44 32 36 32 26 C 32 14 42 6 52 6 C 62 6 70 14 70 26 C 70 36 62 44 62 56 Z" fill="none"/>` +
+ `<path d="M44 62 C 44 44 32 40 32 26 C 32 14 41 6 51 6 C 61 6 68 14 68 26 C 68 40 58 44 58 62 Q51 68 44 62 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<circle cx="51" cy="26" r="9" fill="#FFFFFF" stroke="${INK}" stroke-width="3"/>` +
+ `<path d="M78 84 C 78 74 70 70 70 60 C 70 51 77 45 85 45 C 93 45 100 51 100 60 C 100 70 92 74 92 84 Q85 89 78 84 Z" fill="#4D96FF" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<circle cx="85" cy="60" r="7" fill="#FFFFFF" stroke="${INK}" stroke-width="2.5"/>` +
+ `<path d="M51 62 L51 84 Q68 92 78 84" fill="none" stroke="${INK}" stroke-width="2.5" stroke-dasharray="4 4"/>`,
+ ),
+ },
+ {
+ id: 'travel-camera',
+ name: 'Camera',
+ keywords: ['camera', 'photo', 'picture', 'shoot', 'photography'],
+ svg: svg(
+ `<rect x="14" y="34" width="92" height="64" rx="12" fill="#4D96FF" stroke="${INK}" stroke-width="3.5"/>` +
+ `<rect x="44" y="22" width="32" height="14" rx="5" fill="#4D96FF" stroke="${INK}" stroke-width="3.5"/>` +
+ `<circle cx="60" cy="66" r="22" fill="#FFFFFF" stroke="${INK}" stroke-width="3.5"/>` +
+ `<circle cx="60" cy="66" r="13" fill="#2D2A32"/>` +
+ `<circle cx="55" cy="61" r="4" fill="#FFFFFF" opacity="0.8"/>` +
+ `<circle cx="92" cy="48" r="5" fill="#FFD93D" stroke="${INK}" stroke-width="2"/>`,
+ ),
+ },
+ {
+ id: 'travel-suitcase',
+ name: 'Suitcase',
+ keywords: ['suitcase', 'luggage', 'bag', 'travel', 'trip', 'pack'],
+ svg: svg(
+ `<rect x="20" y="36" width="80" height="66" rx="12" fill="#FF9F45" stroke="${INK}" stroke-width="3.5"/>` +
+ `<path d="M44 36 L44 24 Q44 18 50 18 L70 18 Q76 18 76 24 L76 36" fill="none" stroke="${INK}" stroke-width="3.5" stroke-linecap="round"/>` +
+ `<rect x="20" y="60" width="80" height="12" fill="#B983FF" stroke="${INK}" stroke-width="3"/>` +
+ `<rect x="54" y="54" width="12" height="24" rx="4" fill="#B983FF" stroke="${INK}" stroke-width="3"/>`,
+ ),
+ },
+ {
+ id: 'travel-passport',
+ name: 'Passport',
+ keywords: ['passport', 'document', 'travel', 'id', 'international'],
+ svg: svg(
+ `<rect x="28" y="14" width="64" height="92" rx="8" fill="#2D3A5C" stroke="${INK}" stroke-width="3.5"/>` +
+ `<circle cx="60" cy="44" r="16" fill="none" stroke="#FFD93D" stroke-width="3"/>` +
+ `<path d="M60 28 L64 36 L60 44 L56 36 Z" fill="#FFD93D"/>` +
+ `<path d="M50 68 L70 68 M46 78 L74 78 M50 88 L70 88" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" opacity="0.85"/>`,
+ ),
+ },
+ {
+ id: 'travel-compass',
+ name: 'Compass',
+ keywords: ['compass', 'navigate', 'direction', 'explore', 'north'],
+ svg: svg(
+ `<circle cx="60" cy="60" r="48" fill="#FFFFFF" stroke="${INK}" stroke-width="3.5"/>` +
+ `<path d="M74 46 L66 66 L46 74 L54 54 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3" stroke-linejoin="round"/>` +
+ `<circle cx="60" cy="60" r="4" fill="${INK}"/>` +
+ `<path d="M60 16 L63 24 M60 104 L57 96 M16 60 L24 57 M104 60 L96 63" stroke="${INK}" stroke-width="3" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'travel-beach',
+ name: 'Beach umbrella',
+ keywords: ['beach', 'umbrella', 'summer', 'vacation', 'sea'],
+ svg: svg(
+ `<path d="M60 12 Q20 18 14 52 Q38 40 60 46 Q82 40 106 52 Q100 18 60 12 Z" fill="#FF6B6B" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M36 26 L44 44 M60 14 L60 46 M84 26 L76 44" stroke="#FFFFFF" stroke-width="4" opacity="0.7"/>` +
+ `<path d="M56 46 Q54 84 44 104" fill="none" stroke="#8A5A3B" stroke-width="7" stroke-linecap="round"/>` +
+ `<path d="M16 106 Q60 96 104 106" fill="none" stroke="#4D96FF" stroke-width="5" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'travel-sunglasses',
+ name: 'Sunglasses',
+ keywords: ['sunglasses', 'glasses', 'summer', 'cool', 'style'],
+ svg: svg(
+ `<path d="M12 44 L108 44 L104 60 Q100 78 82 78 L66 78 Q58 78 57 68 L56 60 Q55 68 48 78 L38 78 Q20 78 16 60 Z" fill="#FF9F45" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M24 54 Q24 70 40 70 L60 70 Q64 54 56 52 L28 52 Q24 52 24 54 Z" fill="#2D2A32"/>` +
+ `<path d="M96 54 Q96 70 80 70 L66 70 Q62 54 70 52 L92 52 Q96 52 96 54 Z" fill="#2D2A32"/>` +
+ `<path d="M12 44 L4 36 M108 44 L116 36" stroke="${INK}" stroke-width="4" stroke-linecap="round"/>`,
+ ),
+ },
+ {
+ id: 'travel-map',
+ name: 'Map',
+ keywords: ['map', 'route', 'directions', 'travel', 'plan'],
+ svg: svg(
+ `<path d="M14 28 L44 16 L76 28 L106 16 L106 92 L76 104 L44 92 L14 104 Z" fill="#FFF6D9" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<path d="M44 16 L44 92 M76 28 L76 104" stroke="${INK}" stroke-width="2.5" opacity="0.4"/>` +
+ `<path d="M22 78 Q40 60 54 66 Q72 74 84 56 Q96 42 100 40" fill="none" stroke="#FF6B6B" stroke-width="4" stroke-dasharray="7 5" stroke-linecap="round"/>` +
+ `<circle cx="54" cy="66" r="6" fill="#4D96FF" stroke="#FFFFFF" stroke-width="2.5"/>` +
+ `<circle cx="100" cy="40" r="7" fill="#FF6B6B" stroke="#FFFFFF" stroke-width="2.5"/>`,
+ ),
+ },
+ {
+ id: 'travel-van',
+ name: 'Camper van',
+ keywords: ['van', 'camper', 'road trip', 'travel', 'adventure', 'car'],
+ svg: svg(
+ `<path d="M12 74 L12 44 Q12 36 20 36 L64 36 L84 58 L100 60 Q108 62 108 74 L108 84 L12 84 Z" fill="#FFFFFF" stroke="${INK}" stroke-width="3.5" stroke-linejoin="round"/>` +
+ `<rect x="20" y="44" width="30" height="18" rx="3" fill="#4D96FF" stroke="${INK}" stroke-width="2.5"/>` +
+ `<path d="M58 44 L72 58 L58 58 Z" fill="#4D96FF" opacity="0.6"/>` +
+ `<circle cx="34" cy="86" r="11" fill="#2D2A32" stroke="${INK}" stroke-width="3"/><circle cx="34" cy="86" r="4" fill="#FFFFFF"/>` +
+ `<circle cx="88" cy="86" r="11" fill="#2D2A32" stroke="${INK}" stroke-width="3"/><circle cx="88" cy="86" r="4" fill="#FFFFFF"/>` +
+ `<path d="M46 68 L64 68" stroke="#FF6B6B" stroke-width="3.5" stroke-linecap="round"/>`,
+ ),
+ },
+ ],
+}
diff --git a/src/lib/svg-export.ts b/src/lib/svg-export.ts
index dca7283..3114839 100644
--- a/src/lib/svg-export.ts
+++ b/src/lib/svg-export.ts
@@ -590,6 +590,19 @@ ${filt.overlay}` : image
const sk = el as StickerElement
const cx = sk.x + sk.width / 2
const cy = sk.y + sk.height / 2
+ // v0.22 sticker packs: authored vector stickers nest inline —
+ // the exported file stays vector (same approach as plugin SVGs)
+ if (sk.svg) {
+ const open = /^<svg[^>]*>/.exec(sk.svg)
+ const end = sk.svg.lastIndexOf('</svg>')
+ if (open && end > open[0].length) {
+ const inner = sk.svg.slice(open[0].length, end)
+ const attrs = open[0]
+ .slice(4, -1)
+ .replace(/\s(?:x|y|width|height)\s*=\s*(?:"[^"]*"|'[^']*')/g, '')
+ return ` <svg${attrs} x="${sk.x}" y="${sk.y}" width="${sk.width}" height="${sk.height}"${opacityAttr(sk)}${transformBase ? ` transform="rotate(${sk.rotation} ${cx} ${cy})"` : ''}>${inner}</svg>`
+ }
+ }
return ` <text x="${cx}" y="${cy}" text-anchor="middle" dominant-baseline="central" font-size="${sk.fontSize}" font-family="'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif"${opacityAttr(sk)}${transformBase ? ` transform="rotate(${sk.rotation} ${cx} ${cy})"` : ''}>${esc(sk.char)}</text>`
}
diff --git a/src/lib/types.ts b/src/lib/types.ts
index 1fca75d..3b63aa1 100644
--- a/src/lib/types.ts
+++ b/src/lib/types.ts
@@ -263,8 +263,22 @@ export interface ImageElement extends BaseElement {
export interface StickerElement extends BaseElement {
type: 'sticker'
- char: string // emoji glyph
+ char: string // emoji glyph (text stickers) or the pack sticker's name (vector stickers)
fontSize: number
+ /** v0.22: the authored SVG markup of a library sticker (vector
+ * path). Empty for emoji text stickers — those render as text
+ * runs (PPTX-native) exactly as before. When present, every
+ * renderer draws the SVG: canvas + video via the preloaded
+ * data-URL bitmap, SVG export nests it inline, PPTX/PDF embed
+ * the raster. The markup is authored in-repo (src/lib/stickers)
+ * — never user input. */
+ svg?: string
+ /** the library id (e.g. 'hearts-red') — provenance for future
+ * pack tooling (swap pack, recolour). Absent on emoji stickers. */
+ stickerId?: string
+ /** accessibility alt text (Wave 4 parity with images) — seeded
+ * with the library name on insert, user-editable after. */
+ alt?: string
}
/** A group nests child elements at their original page coordinates.
diff --git a/src/lib/video-export.ts b/src/lib/video-export.ts
index 5bf5080..23b99ff 100644
--- a/src/lib/video-export.ts
+++ b/src/lib/video-export.ts
@@ -28,6 +28,7 @@ import { beatEnvelopeAt, beatSourceOf } from '@/lib/media/beat-detect'
import { awaitRender, renderKey } from '@/lib/plugins/renderer-cache'
import { pageSize } from '@/lib/editor-utils'
import { isMaskShape, maskPolygon, polygonPoints, starPointsEx, stretchPts, tracePts } from '@/lib/shapes'
+import { stickerDataUrl } from '@/lib/sticker-image'
import { fitFontSize } from '@/lib/text-fit'
import { layoutListLines } from '@/lib/list-text'
import { WebMMuxer } from '@/lib/webm-muxer'
@@ -127,11 +128,16 @@ export async function collectImages(pages: PageData[]): Promise<Map<string, HTML
// a blocked thumb degrades to the tinted band (same as SVG export)
const t = el.kind === 'youtube' ? youtubeThumbUrl(el.url) : null
if (t) sources.push(t)
+ } else if (el.type === 'sticker' && el.svg) {
+ // v0.22 sticker packs: the authored SVG rides the same loader
+ sources.push(stickerDataUrl(el.svg))
} else if (el.type === 'group') walk(el.children)
}
}
for (const p of pages) walk(p.elements)
- const unique = [...new Set(sources)].slice(0, 60)
+ // v0.22: 60 → 150 — sticker-heavy decks stack many small SVG
+ // data-URLs (each decodes to a ~120px bitmap, cheap next to photos)
+ const unique = [...new Set(sources)].slice(0, 150)
await Promise.all(
unique.map(async (src) => {
const img = await loadImage(src)
@@ -575,6 +581,20 @@ export function buildKonvaNode(
}
case 'sticker': {
const sk = el
+ // v0.22 sticker packs: authored vector stickers draw as the
+ // preloaded data-URL bitmap (collectImages); emoji stay on text
+ if (sk.svg) {
+ const img = images.get(stickerDataUrl(sk.svg))
+ return new Konva.Image({
+ id: sk.id,
+ x: sk.x,
+ y: sk.y,
+ width: sk.width,
+ height: sk.height,
+ image: img,
+ rotation: sk.rotation ?? 0,
+ })
+ }
return new Konva.Text({
id: sk.id,
x: sk.x,
diff --git a/tests/e2e/sticker-packs.spec.ts b/tests/e2e/sticker-packs.spec.ts
new file mode 100644
index 0000000..6183847
--- /dev/null
+++ b/tests/e2e/sticker-packs.spec.ts
@@ -0,0 +1,212 @@
+import { test, expect, type APIRequestContext, type Page } from '@playwright/test'
+import sharp from 'sharp'
+
+/**
+ * v0.22 sticker packs — acceptance.
+ *
+ * The library that replaced the 40-emoji starter set must be real in
+ * the product, not just in the data module:
+ *
+ * 1. the Stickers app (Apps panel) lists the pack chips, search
+ * narrows them, and the emoji quick set survives at the bottom
+ * 2. clicking a vector sticker inserts a NATIVE sticker element —
+ * the document gains svg + stickerId + alt (the render paths:
+ * canvas Konva.Image, video buildKonvaNode, SVG nest, PDF raster
+ * strip, PPTX raster fallback)
+ * 3. THE PIXEL PROOF: a page whose only element is a red-heart
+ * sticker exports a PNG with saturated red pixels INSIDE the
+ * sticker's box and a white page around it — the SVG actually
+ * rasterized, not a placeholder or a blank
+ * 4. the Elements-panel sticker tab carries the teaser row and the
+ * launcher into the full app
+ *
+ * Register budget: ZERO — one anonymous design, API-created.
+ */
+
+const BASE = process.env.BASE_URL ?? 'http://localhost:3000'
+
+// the exact markup from src/lib/stickers/hearts.ts is imported at
+// runtime? No — e2e runs from the shipped bundle. We pin the id and
+// assert presence generically (svg/stickerId/alt), never the markup.
+
+async function createDesign(
+ request: APIRequestContext,
+ elements: unknown[],
+ name = 'v022 sticker acceptance',
+): Promise<string> {
+ const res = await request.post(`${BASE}/api/designs`, {
+ data: { name, width: 1080, height: 720, pages: [{ id: 'p1', background: { type: 'solid', color: '#FFFFFF' }, elements }] },
+ })
+ expect(res.status(), `create design: ${await res.text()}`).toBeLessThan(300)
+ return ((await res.json()) as { id: string }).id
+}
+
+async function openEditor(page: Page, designId: string): Promise<void> {
+ await page.goto(`/design/${designId}`)
+ await page.addStyleTag({ content: 'nextjs-portal { display: none !important; }' })
+ await expect(page.getByLabel('Design canvas')).toBeVisible({ timeout: 60_000 })
+}
+
+async function doc(page: Page, designId: string) {
+ const res = await page.request.get(`${BASE}/api/designs/${designId}`)
+ expect(res.status()).toBe(200)
+ return (await res.json()) as { pages: { elements: Record<string, any>[] }[] }
+}
+
+/** poll until the autosync lands the predicate (wave4 pattern) */
+async function waitForDoc(
+ page: Page,
+ designId: string,
+ predicate: (d: Awaited<ReturnType<typeof doc>>) => boolean,
+ what: string,
+ timeoutMs = 20_000,
+) {
+ const started = Date.now()
+ let last: Awaited<ReturnType<typeof doc>> | null = null
+ while (Date.now() - started < timeoutMs) {
+ last = await doc(page, designId)
+ if (predicate(last)) return last
+ await page.waitForTimeout(500)
+ }
+ throw new Error(`document never showed ${what} — last: ${JSON.stringify(last?.pages[0])?.slice(0, 300)}`)
+}
+
+test('the Stickers app: pack chips, search, emoji set, vector insert', async ({ page }) => {
+ test.setTimeout(120_000)
+ const errors: string[] = []
+ page.on('pageerror', (err) => errors.push(String(err)))
+
+ const designId = await createDesign(page.request, [])
+ await openEditor(page, designId)
+
+ // open the Apps panel → Stickers app (the wave4 openApp pattern)
+ await page.getByRole('button', { name: 'Apps', exact: true }).click()
+ await page.getByText('Stickers', { exact: true }).first().click()
+ await expect(page.getByPlaceholder('Search 160+ stickers')).toBeVisible({ timeout: 20_000 })
+
+ // 1. the pack chips: the vector packs + the emoji quick set
+ for (const chip of ['All', 'Faces', 'Hearts', 'Celebrate', 'Food', 'Emoji']) {
+ await expect(page.getByRole('button', { name: new RegExp(chip), exact: false }).first()).toBeVisible()
+ }
+
+ // 2. search narrows to the coffee sticker; clicking it inserts
+ await page.getByPlaceholder('Search 160+ stickers').fill('coffee')
+ const coffeeTile = page.getByTestId('sticker-food-coffee')
+ await expect(coffeeTile).toBeVisible({ timeout: 10_000 })
+ await coffeeTile.click()
+
+ const d = await waitForDoc(
+ page,
+ designId,
+ (x) => x.pages[0].elements.filter((e) => e.type === 'sticker').length === 1,
+ 'the coffee sticker',
+ )
+ const stickers = d.pages[0].elements.filter((e) => e.type === 'sticker')
+ expect(stickers[0].stickerId).toBe('food-coffee')
+ expect(typeof stickers[0].svg).toBe('string')
+ expect(stickers[0].svg).toContain('<svg')
+ expect(stickers[0].alt).toBe('Coffee cup')
+
+ // 3. clear search → the emoji quick set renders at the bottom
+ await page.getByPlaceholder('Search 160+ stickers').fill('')
+ await expect(page.getByLabel('Add sticker 😀').first()).toBeVisible({ timeout: 10_000 })
+
+ // 4. an emoji click still inserts the text-sticker path
+ await page.getByLabel('Add sticker 😀').first().click()
+ const d2 = await waitForDoc(
+ page,
+ designId,
+ (x) => x.pages[0].elements.filter((e) => e.type === 'sticker').length === 2,
+ 'the emoji sticker',
+ )
+ const stickers2 = d2.pages[0].elements.filter((e) => e.type === 'sticker')
+ const emojiOne = stickers2.find((s) => s.char === '😀')
+ expect(emojiOne, 'emoji sticker present').toBeTruthy()
+ expect(emojiOne!.svg, 'emoji stays on the text path (no svg)').toBeUndefined()
+
+ expect(errors, 'no page errors').toHaveLength(0)
+})
+
+test('pixel proof: a vector sticker really rasterizes into the PNG export', async ({ page }) => {
+ test.setTimeout(180_000)
+ const errors: string[] = []
+ page.on('pageerror', (err) => errors.push(String(err)))
+
+ // the ONLY element is a big red heart sticker dead-center
+ const designId = await createDesign(
+ page.request,
+ [
+ {
+ id: 'st1',
+ type: 'sticker',
+ x: 340,
+ y: 160,
+ width: 400,
+ height: 400,
+ rotation: 0,
+ opacity: 1,
+ locked: false,
+ visible: true,
+ char: 'Red heart',
+ fontSize: 300,
+ stickerId: 'hearts-red',
+ alt: 'Red heart',
+ svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120"><path d="M60 100 C 30 80 14 60 14 42 C 14 26 26 16 40 16 C 50 16 57 22 60 30 C 63 22 70 16 80 16 C 94 16 106 26 106 42 C 106 60 90 80 60 100 Z" fill="#FF6B6B" stroke="#2D2A32" stroke-width="3.5" stroke-linejoin="round"/></svg>',
+ },
+ ],
+ 'v022 sticker pixel proof',
+ )
+ await openEditor(page, designId)
+
+ // export PNG through the canonical dialog selectors
+ const downloadPromise = page.waitForEvent('download', { timeout: 120_000 })
+ await page.getByRole('button', { name: 'Download', exact: true }).click()
+ await page.getByRole('button', { name: /^PNG\b/ }).click()
+ await page.getByRole('button', { name: /Download 1 PNG/i }).click()
+ const download = await downloadPromise
+ expect(download.suggestedFilename()).toMatch(/\.png$/)
+
+ // the pixel proof: saturated red INSIDE the sticker box, white page outside
+ const png = sharp(await (await download.path())!)
+ const { data, info } = await png.raw().toBuffer({ resolveWithObject: true })
+ const px = (x: number, y: number) => {
+ const i = (y * info.width + x) * info.channels
+ return [data[i], data[i + 1], data[i + 2]]
+ }
+ // export scale: page 1080 wide → PNG info.width; sticker box maps proportionally
+ const sx = info.width / 1080
+ const cx = Math.round(540 * sx) // sticker centre
+ const cy = Math.round(280 * sx) // upper heart lobe
+ const [r, g, b] = px(cx, cy)
+ expect(r, `heart centre is red, got rgb(${r},${g},${b}) at ${info.width}px wide`).toBeGreaterThan(180)
+ expect(g).toBeLessThan(140)
+ expect(b).toBeLessThan(140)
+
+ // white margin (outside the sticker box, left edge)
+ const [mr, mg, mb] = px(Math.round(60 * sx), Math.round(360 * sx))
+ expect(mr + mg + mb, 'page margin stays white').toBeGreaterThan(720)
+
+ expect(errors, 'no page errors').toHaveLength(0)
+})
+
+test('the Elements sticker tab carries the pack teaser + launcher', async ({ page }) => {
+ test.setTimeout(120_000)
+ const designId = await createDesign(page.request, [], 'v022 elements tab teaser')
+ await openEditor(page, designId)
+
+ await page.getByRole('button', { name: 'Elements', exact: true }).click()
+ await page.getByRole('tab', { name: 'Stickers', exact: true }).click()
+
+ // the launcher names the full library
+ await expect(page.getByText(/Browse all \d+ stickers in apps/i)).toBeVisible({ timeout: 10_000 })
+
+ // a featured vector sticker tile inserts a real pack sticker
+ const first = page.locator('button[aria-label^="Add sticker"]').first()
+ await first.click()
+ await waitForDoc(
+ page,
+ designId,
+ (x) => x.pages[0].elements.some((e) => e.type === 'sticker' && typeof e.svg === 'string'),
+ 'a featured pack sticker',
+ )
+})