diff --git a/.github/workflows/playground.yml b/.github/workflows/playground.yml
new file mode 100644
index 0000000..ba9ad68
--- /dev/null
+++ b/.github/workflows/playground.yml
@@ -0,0 +1,63 @@
+name: Deploy Playground to GitHub Pages
+
+on:
+ # Runs on pushes targeting the `main` branch. Change this to `master` if you're
+ # using the `master` branch as the default branch.
+ push:
+ branches: [main]
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+permissions:
+ contents: read
+ pages: write
+ id-token: write
+
+# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
+# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
+concurrency:
+ group: pages
+ cancel-in-progress: false
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0 # Not needed if lastUpdated is not enabled
+ - uses: pnpm/action-setup@v3
+ with:
+ version: latest
+ - name: Setup Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: pnpm
+ - name: Setup Pages
+ uses: actions/configure-pages@v4
+ - name: Install dependencies
+ run: pnpm install
+ - name: Build package
+ run: pnpm build
+ - name: Build playground
+ run: BASE_URL="/identicons" pnpm --filter playground build
+ - name: Upload artifact
+ uses: actions/upload-pages-artifact@v3
+ with:
+ path: playground/dist
+
+ deploy:
+ environment:
+ name: github-pages
+ url: ${{ steps.deployment.outputs.page_url }}
+ needs: build
+ runs-on: ubuntu-latest
+ name: Deploy
+ steps:
+ - name: Deploy to GitHub Pages
+ id: deployment
+ uses: actions/deploy-pages@v4
diff --git a/.gitignore b/.gitignore
index c4b311b..335ffd1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,22 @@
+.cache
+.DS_Store
+.idea
+*.log
+*.tgz
+coverage
+dist
+lib-cov
+logs
node_modules
+temp
+
.DS_Store
-tmp
\ No newline at end of file
+.vite-ssg-dist
+.vite-ssg-temp
+*.local
+dist
+dist-ssr
+node_modules
+.idea/
+*.log
+cypress/downloads
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 0000000..5efa012
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,7 @@
+{
+ "recommendations": [
+ "Vue.volar",
+ "dbaeumer.vscode-eslint",
+ "EditorConfig.EditorConfig"
+ ]
+}
diff --git a/README.md b/README.md
index 5203417..62d16b3 100644
--- a/README.md
+++ b/README.md
@@ -8,8 +8,8 @@ The library is heavily optimized for performance.
[See the Identicons in action here.](https://nimiq.github.io/identicons/)
- [Installation](#installation)
- - [Browsers](#browsers)
- - [NodeJS](#nodejs)
+ - [Browsers](#browsers)
+ - [NodeJS](#nodejs)
- [Usage](#usage)
- [Demos](#demos)
@@ -62,37 +62,37 @@ All methods generating identicons are async and return promises.
Get a raw SVG text string:
```js
- const svg = await Identicons.svg(text)
+const svg = await Identicons.svg(text)
```
Get a SVG data url string (the one starting with `data:image/svg+xml;base64,...`),
which can be set as `img.src`:
```js
- const dataUrl = await Identicons.toDataUrl(text)
+const dataUrl = await Identicons.toDataUrl(text)
```
Render an identicon SVG into the DOM (only in browsers!):
```js
- await Identicons.render(text, element)
+await Identicons.render(text, element)
```
Get an `` DOM node (only in browsers!):
```js
- const img = await Identicons.image(text)
+const img = await Identicons.image(text)
```
You can generate a placeholder icon with these (sync) methods:
```js
- // Placeholder SVG:
- const svg = Identicons.placeholder(color = '#bbb', strokeWidth = 1)
- // Placeholder data url:
- const dataUrl = Identicons.placeholderToDataUrl(color = '#bbb', strokeWidth = 1)
- // Render placeholder SVG into `element`:
- Identicons.renderPlaceholder(element, color = '#bbb', strokeWidth = 1)
+// Placeholder SVG:
+const svg = Identicons.placeholder(color = '#bbb', strokeWidth = 1)
+// Placeholder data url:
+const dataUrl = Identicons.placeholderToDataUrl(color = '#bbb', strokeWidth = 1)
+// Render placeholder SVG into `element`:
+Identicons.renderPlaceholder(element, color = '#bbb', strokeWidth = 1)
```
## Demos
diff --git a/build.config.ts b/build.config.ts
new file mode 100644
index 0000000..9edc649
--- /dev/null
+++ b/build.config.ts
@@ -0,0 +1,30 @@
+import { defineBuildConfig } from 'unbuild'
+
+export default defineBuildConfig({
+ entries: [
+ {
+ input: 'src/index',
+ name: 'index',
+ builder: 'rollup',
+ },
+ {
+ input: 'src/index',
+ name: 'index.min',
+ builder: 'rollup',
+ },
+ ],
+ declaration: true,
+ clean: true,
+ rollup: {
+ emitCJS: true,
+ inlineDependencies: true,
+ esbuild: {
+ target: 'es2020',
+ platform: 'browser',
+ },
+ },
+ externals: [
+ 'node:*',
+ 'jiti',
+ ],
+})
diff --git a/builder.html b/builder.html
deleted file mode 100644
index ddec5fe..0000000
--- a/builder.html
+++ /dev/null
@@ -1,282 +0,0 @@
-
-
-
- 9&&(o=0);r===o||r===n;)++r>9&&(r=0);return{main:o,background:n,accent:r}};function indicesToRGB(o){return{main:colors[o.main],background:backgroundColors[o.background],accent:colors[o.accent]}}export function getBackgroundColorName(o){const n=makeHash(o),r=parseInt(n[2],10);return colorNames[r]};export const colors=["#FC8702","#D94432","#E9B213","#1A5493","#0582CA","#5961A8","#21BCA5","#FA7268","#88B04B","#795548"];export const backgroundColors=["#FC8702","#D94432","#E9B213","#1F2348","#0582CA","#5F4B8B","#21BCA5","#FA7268","#88B04B","#795548"];
-export const WordCatalog={color:colorNames,face:[["Cute","Whiskered","Proud","Purring","Straying","Meowing","Cat","Kitten","Tomcat"],["Playful","Comical","Clownish","Entertaining","Amusing","Clowning","Bubble-Nose","Jester","Clown"],["Shocked","Sad","Upset","Mourning","Sobbing","Grieving","Mourner","Griever","Lamenter"],["Cheeky","Insider","Sassy","Winking","Blinking","Twinkling","Winker","Emoji","Smiley"],["Thrifty","Frugal","Self-Made","Saving","Betting","Speculating","Risktaker","Moneymaker","Entrepreneur"],["Ghostly","Transilvanian","Undead","Nipping","Biting","Nibbling","Vampire","Dracula","Bloodsucker"],["Duckfaced","Short-Billed","Ducky","Chattering","Cackling","Quacking","Chick","Duck","Goose"],["Naughty","Ingenious","Mischievous","Crafting","Planning","Devising","Ringleader","Mastermind","Instigator"],["Impassioned","Amorous","Infatuated","Loving","Admiring","Desiring","Sweetheart","Romantic","Valentine"],["Stunned","Speechless","Breathless","Resetting","Regenerating","Rebooting","Phantasm","Phantom","Ghost"],["Mustached","Bearded","Trimmed","Grooming","Shaving","Trimming","Mustache","Barber","Beard"],["Studious","Four-Eyed","Nerdy","Learning","Reading","Studying","Nerd","Geek","Genius"],["One-Eyed","Monocular","Wide-Eyed","Eyeballing","Staring","Ogling","Odin","Cyclops","Monoid"],["Adorable","Tame","Fluffy","Snuggling","Cuddling","Romping","Panda","Bear","Cub"],["Tropical","Beaked","Exotic","Parroting","Chirping","Tweeting","Parrot","Parakeet","Tweety"],["Good-Nosed","Wallowed","Snouted","Oinking","Truffling","Scenting","Piglet","Boar","Hog"],["Eye-Patched","Gruff","Single-Eyed","Eye-Catching","Scowling","Frowning","Rover","McEyepatch","Buccaneer"],["Happy","Cheerful","Jolly","Chuckling","Giggling","Laughing","Laugher","Giggler","Bon-Vivant"],["Amazed","Impressed","Excited","Sparkling","Dazzling","Flashing","Starface","Fan","Wonderkid"],["Swaggy","Funky","Cool","Sunbathing","Chilling","Relaxing","Hipster","Fashionista","Celebrity"],["Funny","Goofy","Silly","Joking","Bantering","Quipping","Humorist","Jokester","Teaser"]],side:[["Astronomical","Artificial","Metallic","Transmitting","Orbiting","Connecting","Satellite","Cyborg","Drone"],["In-Love","Brave","Pierced","Braving","Defying","Enduring","Archer","Arrow","Cupid"],["Bavarian","Sober","Malty","Brewing","Sipping","Partying","Lager","Beer-Fan","Octoberfest"],["Protective","Punchy","Gloved","Boxing","Sparring","Slamming","Boxer","Champ","Hero"],["Horned","Spiky","Pointy","Braving","Ramming","Pricking","Viking","Corsair","Hunk"],["Pointy-Eared","Elfish","Puckish","Ear-Cocking","Listening","Sound-Sensing","Elf","Trekkie","Vulcan"],["Pincerlike","Protective","Scuttling","Pinching","Snatching","Squeezing","Crab","Lobster","Crawfish"],["Magical","Sorcerous","Foreseeing","Conjuring","Spell-Casting","Wizarding","Wizard","Healer","Sorcerer"],["Two-Petaled","Sustainable","Organic","Flowering","Flourishing","Blooming","Flower","Plant","Sprout"],["Sporty","Fit","Dynamic","Huddling","Quarterbacking","Tackling","Quarterback","Pigskin","Touchdown"],["Hungry","Eager","Craving","Dining","Feasting","Eating","Foodie","Connoisseur","Gourmet"],["Big-Eared","Bat-Eared","Keen-Eared","Ear-Lending","Overhearing","Ear-Wiggling","Listener","Monster-Ear","Hearer"],["Pumped","Ripped","Muscly","Weightlifting","Training","Iron-Pumping","Bodybuilder","Athlete","Muscleman"],["Talky","Chatty","Talkative","Calling","Dialing","Ringing","Self-Starter","Go-Getter","Hustler"],["Triumphant","Peaceful","Victorious","Selfie-Taking","Posing","Celebrating","Coolio","Winner","Champion"],["Athletic","Olympic","Competitive","Tiebreaking","Acing","Lobing","Ace","Tennis-Pro","Grand-Slam"],["Twiggy","Branchy","Leafy","Sprouting","Blossoming","Budding","Branches","Tree","Bush"],["Heavenly","Winged","Innocent","Flapping","Flying","Soaring","Angel","Bird","Guardian"],["Busy","Hands-Free","Productive","Multitasking","Optimizing","Consulting","Manager","Multitasker","Organizer"],["Marine","Maritime","Aquatic","Swimming","Fin-Waving","Diving","Shark","Fish","Whale"],["Hot","Piping","Steamy","Whistling","Boiling","Brewing","Teapot","Kettle","Pot"]],top:[["Bewigged","Uncombable","Curly","Hair-Dyeing","Blow-Drying","Shampooing","Toupee","Perm","Wig"],["Antenna-Headed","Connected","Alert","Transmitting","Signalling","Connecting","Alien","Martian","Beacon"],["Raw","Fresh","Ripe","Nourishing","Healthy","Refreshing","Pear","Apple","Fruit"],["Sun-Hatted","Sun-Shaded","Oriental","Gardening","Farming","Harvesting","Harvester","Fisherman","Farmer"],["Unbreakable","Untamed","Wild","Bone-Collecting","Meat-Loving","Roaming","Barbarian","Native","Caveman"],["Gastronomic","Culinary","Flavorful","Cooking","Baking","Frying","Chef","Cook","Foodie"],["Free","Outdoor","Country","Cattle-Driving","Lassoing","Rodeoing","Rancher","Cowboy","Herder"],["Oldfashioned","Sophisticated","Traditional","Hat-Wearing","Investigating","Distinguishing","Detective","Gentleman","Cavalier"],["Medical","Caring","Analytical","Examining","Healing","Curing","Doctor","Surgeon","Medic"],["Drippy","Sweaty","Wet","Exercising","Soaking","Dripping","Splash","Droplet","Raindrop"],["Legendary","Iconic","Fabulous","Rock'n'Rolling","Pompadouring","Imitating","Elvis","Rockabilly","Imitator"],["Holy","Sacred","Divine","Blessing","Divining","Forseeing","Saint","Spirit","Halo"],["Feathered","Indigenous","Tribal","Earth-Respecting","Feather-Wearing","Smoke-signaling","Pagan","Chief","Warrior"],["Regally","Princely","Stately","Ruling","Reigning","Commanding","Ruler","Monarch","Majesty"],["Wise","Powerful","Loyal","Counseling","Representing","Advising","Musketeer","Alchemist","Magician"],["Psychedelic","Edible","Trippy","Mesmerizing","Hypnotizing","Captivating","Mushroom","Spore","Fungus"],["Uniformed","Official","Dutiful","Serving","Patrolling","Protecting","Officer","Sarge","Deputee"],["Noble","Gracious","Royally","Charming","Dreaming","Inspiring","Princess","Empress","Queen"],["Edgy","Funky","Wicked","Nonconforming","Challenging","Stirring","Rebel","Maverick","Individualist "],["Fabulous","Mythical","Imaginary","Amazing","Fascinating","Enchanting","Unicorn","Chimera","Narwhal"],["Cold","Chilly","Winterly","Freezing","Quivering","Shivering","Beanie","Bobble","McBobbleHat"]],bottom:[["Lightweight","Fun","Floaty","Floating","Ascending","Rising","Balloon","Float","Aerostat"],["Four-Toed","Shoeless","Barefoot","Wandering","Hiking","Lumbering","Hobbit","Wanderer","Hiker"],["Clawed","Birdlike","Chirpy","Waddling","Clawing","Scraping","Birdman","Birdgirl","Claw"],["Elegant","Upscale","Classy","Impressive","Posing","Imposing","Royal","Lord","Aristocrat"],["Creepy","Uncanny","Monstrous","Crawling","Scuttling","Creeping","Spider","Spiderman","Tarantula"],["Fishtailed","Finned","Natant","Mermaiding","Bathing","Splashing","Mermaid","Ariel","Orca"],["Grounded","Leafy","Earthy","Growing","Gardening","Grass-rooting","Flower","Seedling","Groot"],["Rhythmic","Musical","Tuneful","Rocking","Jamming","Shredding","Musician","Guitarist","Rocker"],["Graceful","Heeled","Ladylike","Balancing","Modeling","Sashaying","Lady","Madame","Dame"],["Weightless","Zero-G","Anti-Gravity","Levitating","Floating","Hovering","Ghost","Levitator","Hover-Ball"],["Tentacled","Eight-Limbed","Tickly","Slithering","Sliding","Tickling","Octopus","Squid","Alien"],["Bulb-Shaped","Electric","Voltaic","Electrifying","Glowing","Energizing","Bulb","Socket","Luminary"],["Peg-Legged","One-Leg","Single-Shoed","Wobbling","Hobbling","Swaying","Pirate","Privateer","Veteran"],["Hyperactive","Active","Energetic","Jumping","Hopping","Skipping","Hopper","Go-Getter","Jumper"],["Freestyle","Fly","Skillful","Riding","Skateboarding","Kickflipping","Rider","Pro-Skater","Skateboarder"],["Old-school","Inline","Four-Wheel","Skating","Rolling","Coasting","Inliner","Skater","80s-Kid"],["Fast","Downhill","Alpine","Skiing","Gliding","Skidding","Skier","Ski-Instructor","Snow-Slider"],["Skilled","Quick","Nimble","Kicking","Dribbling","Scoring","Striker","Baller","Kicker"],["Springy","Jumpy","Bouncy","Surprising","Flipping","Trolling","Surprise","Gagster","Joker"],["Jaunty","Lively","Agile","Wandering","Strolling","Jogging","Nomad","Flaneur","Pilgrim"],["Wheeled","Fast","Mobile","Driving","Cruising","Drifting","Wheelie","Ride","Carriage"]]};WordCatalog.ADJECTIVE0=0,WordCatalog.ADJECTIVE1=1,WordCatalog.ADJECTIVE2=2,WordCatalog.VERB0=3,WordCatalog.VERB1=4,WordCatalog.VERB2=5,WordCatalog.NOUN0=6,WordCatalog.NOUN1=7,WordCatalog.NOUN2=8;
-export const WordDimensions={JJJHGF:45,BHGEIB:14,DEDCIG:24,CJEGBH:31,CADCIJ:40,BDAAEJ:24,EJCGGF:29,IEACEE:19,GGCCGD:33,BAAFIE:39,EIAAHE:34,CEFJBI:33,IDJJCI:42,HBBHGB:24,DFBBIB:40,CHECJH:26,ABHDIA:38,JAIIDE:20,BAHFAI:29,FFICAE:28,AAJBII:25,ADGFJE:37,FIJEAC:31,IHFCBB:34,BIFCFJ:32,AFDBGC:28,GECBAI:20,BEAADH:29,BAJDCI:30,JDHEHD:25,CDEGJC:40,FGDGIC:26,CACBFI:35,IHADDH:22,FFAEBB:17,JHJFCJ:37,CIGJGE:27,CGJCJB:34,BAJBHC:40,BIBCAI:34,IEECCJ:34,JAGDDE:34,HIEJHA:25,BFBIDA:41,JAGJJI:36,CIJCDH:37,IIHEAI:26,BGBFEF:27,AFIBIG:45,EIBJBE:30,CCDFHE:38,BHHJBD:33,JEIDEJ:18,CBGAFI:18,BJHCFF:37,EEBFBF:21,EAJJHA:25,BEACEE:32,GJEGHJ:40,FDEHCF:52,HFEGBA:26,DCGFDJ:33,AFJIIA:21,EHBEJG:36,HBJHEF:29,GHGBEG:28,CFDEDH:30,AEGBDJ:34,AGEBCJ:39,ECJGED:33,CDJECF:33,FFEEBD:26,IDAJGD:32,CEIJFB:26,HCFACB:31,EHDDIB:38,EAIBAH:35,CDJFCA:40,IBAHGG:19,IFBHGG:33,JGFFFG:23,BJAHEA:42,GEADIB:27,JHCFFF:47,IGIGJA:38,AEHCHF:34,EGGCGD:22,HCCFGA:34,IHJEII:40,HEBABG:37,HFDGED:51,ICAIGB:22,DEBJGH:36,IDBJCC:26,CABGFA:29,HFCFJB:32,CCEHCA:22,CBEJFD:19,AJHAFD:50,DCHIAE:27,AFIFHI:26,AJIJGD:42,BAFEDC:31,DCAAGJ:40,GIFCJI:17,EFIFFH:25,DIHEAA:36,FFFIID:46,DFJFBG:33,CJBBEE:51,IHJDFG:37,IBAEGF:35,AJEEBB:33,BIABDB:23,BIJBCG:34,EBAIFB:30,ICAHHI:45,BICDDA:24,HICHHD:35,BDIJCI:31,BGEDED:33,EJCHEC:33,JGBJAI:28,JJDEIC:38,HEDCAC:27,HIAFFF:34,FFAHEB:11,AGCJFD:25,AFCJBC:24,FICJAI:56,FGJIDG:44,FHEBDE:20,HGICHF:41,GBAAEA:51,FEAAFI:41,JEGACE:20,ABIAJD:45,IBIJAJ:29,BIICIJ:26,DCEAHE:34,BFJDFD:23,CHEIAC:25,FDHCDF:29,ECIIIJ:17,DBHIFJ:33,HDHACE:24,EBBJEH:23,JJCACD:27,JDIJEG:33,GJGBIA:19,IDAFCI:51,DAEHDE:46,EHFJDE:25,GDIFHE:22,HIHCFB:27,EHHJFG:27,EJBIDD:35,DCGFCB:29,EGBHBG:25,JDFJFB:22,DJHEDJ:23,BCHFGJ:29,IDCHCB:24,EBFCGB:28,GAIAJI:39,BHFIJA:30,IDFFDA:28,JDGCFE:31,HHEDEA:30,BAJEHD:19,EEBEHI:25,JDFCBE:22,FHHHEF:20,HIJEEA:31,GDAGEI:29,IFJDDE:28,ACDCHD:29,GCEJFI:27,HIFJCJ:34,FGAFFC:25,HDADIG:27,GGIBEB:31,ADAJGF:29,EFDEAH:31,IIGIEC:17,HEIBAA:33,JGEAJF:18,GCDIGB:41,JEBJCB:23,AFFCCI:28,AJEHHI:32,FIGFEJ:35,AGIBGD:14,IEAHJB:22,DJFEHJ:28,DBEHCI:26,AEAJIA:30,IAHGGI:35,DBGCCD:47,BHIAII:34,CHJHHF:36,DIBFEB:49,GEDIIJ:22,BGCDJB:24,DHDHAA:32,BFAGAH:15,EEJGJF:22,IIDJDJ:36,CCGBJH:31,BCIEHI:31,ABICJJ:32,DCIDIC:27,FEAIHG:36,GBDDEG:28,JFGHFJ:25,GBCAFC:23,GIEFIB:32,CIHIJI:30,CIFDCE:36,DDDCEB:28,GFCAIF:21,ECIJGA:25,AACBFJ:25,DDHAEG:24,GFCFFG:39,FCHAJG:26,HJDEIG:28,HAJACA:45,HCICCD:35,GHFAGC:49,DEBGIB:49,JAIDGI:29,FDGIJD:51,FJADBC:30,EDBADA:30,BJDHFA:22,FIJBFH:32,BFBBFJ:32,JGBDAJ:30,IHAABA:46,EIJEBH:40,DGCDCC:45,BCBEAC:24,JFAEJE:40,FEGAGG:32,HDEDHF:36,AJBIHD:21,CADHDC:19,GCIAAB:24,CFHICF:33,GDDEDC:37,JJGDJF:46,JECFDI:31,AHBDGA:34,GEJIEA:33,AHJCGF:41,FIIFHF:45,EFIDEF:36,ICEIHI:48,EAGBJG:34,HJHCBF:40,AJJAAB:25,DGHFFJ:35,AICBJD:31,HCBECA:44,AAHHFH:36,FCCBCC:36,HEHBEA:32,BDHCCB:42,CJEIJH:40,IBADFE:36,EJDJHI:51,IEAIJD:39,FEAGDB:39,FBJJAI:35,CEADFG:42,GIAIHG:32,IHDFGF:33,DHECHD:37,DGJAGB:31,GEICBG:35,JFBGBE:37,ICGCGH:26,CAAFFI:23,CHBAEE:33,IIBAGF:39,BAHJBB:23,FIBJJJ:33,CCHAJA:32,HBAJIB:34,CGJFCG:19,AACIBG:19,CAHIFA:26,HCBJBF:37,BEIJJD:40,FGFEIH:42,GDDBJD:39,BCDDFA:28,JGAHAD:25,CEEHGC:18,CABAGE:29,HEHEGB:28,BGBCEB:35,IAGACH:21,ECDIGB:22,HHHACE:38,AJFBIA:34,IGBGBC:34,CEJDED:25,GBAIEC:18,FJDFJC:15,AGIICH:30,GCEFBH:29,IACAID:23,EHBABH:35,AIFICJ:32,EAGHHA:35,BFGCDI:24,JHAHCB:34,ABCJAC:28,CDIDIF:48,JDHJFE:38,IFACAB:32,HBGGGF:29,JJDIAA:32,ICGJEH:33,DAJCFB:22,AIGFBA:18,AIIJJH:16,ADBAJJ:48,JBIEGH:20,IEIBGJ:45,JEBJJE:51,FCIBAJ:35,ABHFHI:36,DHIJIH:22,IFHFII:46,JBJBAB:40,FAHGAH:25,BCGDFG:32,ECDJFC:16,IABIBI:37,BCABJE:32,BAGDGC:36,GIBDHD:31,ADGEEG:27,EGGHGG:43,CEIDCH:32,DHAGBB:39,BFDFHG:27,GGACFI:36,CHAEHF:33,HCCEGJ:32,EBCJJA:33,CGCJDC:14,ABIBJE:42,CEEBDC:31,DHDFAG:23,FEFAJE:17,EGGEJH:44,IAJCII:28,JCDIIG:33,ADDCBG:28,FFAFHE:44,ACEFBD:34,DFFBDF:23,JCGAEI:23,GEGJIE:16,FDBCAH:24,JAGAED:37,FAABGA:35,GJCJFD:35,BDDCJI:31,IDAGEB:25,FCGFEA:50,BCEHHB:32,JBAFGA:29,EGGDBA:48,HHGHCH:31,HEAGJG:43,HJFBBC:31,GIJEAC:27,ABIIJJ:23,IGEBDF:28,EAHGEB:22,GFIDFI:28,HHEAGC:30,ICIHDH:30,BDGBFD:34,ADDAIG:25,HADDDE:24,AFCAEH:22,IECHII:34,JAFJEH:22,DFGGJD:21,FEAFHG:32,AFCFBF:29,DEGJFA:33,CEJAAB:22,DBHFHG:35,DEHIDH:45,IFACCE:38,AEBHGD:28,GAGBAB:26,ACDDBI:26,ACCDCB:33,HGADIG:38,EDBCBB:22,JJAAFG:27,IEBHJE:18,AAGJAF:28,CDIBGB:21,GHCJFG:24,BDBADF:37,EAIACJ:30,JEGHCC:24,IEJCGJ:27,FEIEEJ:20,DBGACA:49,GDHCHB:21,HGDHBE:29,JFGFGG:46,CDBIII:34,IFIJHH:58,DEIFEG:10,GHHFEB:27,FCEHBG:26,HGBBIF:36,AHAGHB:33,DFGBGH:38,JJHDIG:39,DJJADI:19,BAAFAA:29,HJACAD:34,CJDBGE:30,EICIFI:38,ICCEEG:41,ACCCII:36,HIABAC:51,HEJDDG:40,CCIEIF:28,DEBDEC:25,GIEJFA:32,EFGGAI:48,ACCFFC:45,GFAIFF:30,BGBBHE:37,ICBBIB:42,IDAIIG:36,GFGIAC:20,CGDGFH:25,GCJAHB:26,IGBHHJ:10,HGBFGC:33,GFHHEH:35,BJHGFH:59,DJHBBH:31,HECHGA:48,FIAFDJ:27,ACBAED:44,JJDHAA:28,CGJEGJ:22,EJFDIH:30,DEEDEH:25,HJGEED:33,JEGIGD:25,DHHBCG:25,GBJDEC:47,HCBCJA:33,AHEGEJ:38,GAFGED:39,ICGBCD:44,EBIEAF:46,DBFFGA:47,HJDAJG:51,FFEFDB:30,EEGHFE:47,AIJICB:26,IICHFD:31,FFDHHB:27,FIFEBB:26,JDBGDC:49,EJAAEF:31,CFEDFE:52,JJIFCH:45,AEBJDG:27,JIAGEG:43,FHFHFH:20,JJDAFE:26,FGDCGG:34,FCCDGH:26,CECHCB:27,AHDJED:29,AAFCFA:44,CHEAGI:27,IJJAJB:44,BCCHDD:33,BGHCJI:38,IEJAHA:50,EHGAGD:44,ABCCFB:24,BEBDCF:28,JCGEIJ:39,IICIIJ:29,BHFCCG:31,JFFCDB:45,JIJEJJ:45,DCAEDG:22,JBIIIA:26,ADFCBC:15,GJABIH:41,IAJFEA:46,GBCDFC:28,IBBEAJ:31,HGIDEB:37,EEJIFB:44,EFGHHG:32,JJIAFE:35,ICJHGI:16,AIAFAJ:19,FDGGFI:35,GJECJH:30,BADBIG:33,EFBFJF:33,FJDAHA:23,EHBEJF:30,EHADGA:22,HJBCAJ:16,BBFIGI:35,JJGGEJ:19,IGEJII:45,DIGJHF:40,GHFIEJ:46,GJDBDA:41,HHFJGH:40,JBIAFG:34,FIJBJA:42,HAFCDE:37,BJADHE:26,BGGFIB:33,BBIBGD:30,JJDCJC:40,HDHFFB:44,FCDHCI:24,FAIGCA:22,FEAJGI:16,HDDBEI:25,FJJACB:14,DGHDAB:24,CBFIJB:29,HGCFCF:36,FBGFCF:26,CJCJIC:26,ACDGHC:22,JEFIEE:13,BDGIGB:38,JJGDHB:48,FBAHIB:20,CGHJAD:46,CBEIED:48,CCFJHE:48,DBDEGE:28,GFJHED:20,IDIIHF:16,EGGHEI:66,JFIJJG:40,ADJIBI:19,IICECA:38,HIDAEE:30,EFIBDE:28,AHBCAJ:18,GGDDGC:21,CJBJAF:17,FCDGEG:41,EBJEGD:30,HCCCCI:41,IHBEDB:18,IEDDFD:22,GBHCBH:17,BGJHIJ:44,ABAICH:47,FJGIHF:30,DADBDH:31,DBCCGD:42,BECIGB:37,EFHDAC:40,DAABJA:27,FCICIJ:48,AIAEJD:35,CDBFDF:18,ADCFJF:60,AECCEE:48,IBIJHE:34,JJIGJH:38,CBDHJA:25,DAGJCJ:36,HIGDAJ:48,AAFFJI:32,BAEGGG:33,DJJGEF:31,AGICAG:27,BHDGCF:24,EJIBFH:18,IFEGBG:19,DCIACB:16,EECGGE:31,GBCDBB:30,GJDGFI:53,GFAHEH:34,DGAFFB:36,IJCHIG:32,FAJCGF:31,GGJJBD:26,IABCGF:50,IIAFFC:52,FAHHEH:40,CJJHIA:50,HGEAIA:49,EAJIFD:54,IEBIEJ:35,BEBADA:41,CGIGCB:31,GJGCEJ:29,AJBHHD:25,CJFAHC:38,FJDFEA:40,IGHHAC:29,HFFFCD:25,HEIAGF:26,JDAICA:32,EFDHAI:22,JDEEHI:25,FJJDDB:29,CJJFDI:16,ADADEB:38,CGCIFB:31,IIJHEJ:33,FJJDIC:26,FIEDIC:28,GGBCEA:35,IGJFJC:40,EDHDIB:22,JFAEAD:35,EIBBGI:53,FIICGC:56,ADBHAB:34,JCICDA:17,DEJDHD:39,JJDDIH:30,DEHAJC:17,JGBBJB:26,EEFJFF:24,IGBDAH:32,EDCFFD:31,EBBIBD:37,JCBDFG:20,BHBFBC:20,HJHBGG:18,FICBFB:38,AAIAIC:41,FBJGCC:21,CHHBAC:66,BFGDBC:65,IAFAGD:63,AIEBJD:25,BCJGIH:20,IHCGED:29,CICBAB:28,CFJDIH:30,JBIJFB:27,JIDECG:24,HHIAIJ:34,GFGEHA:51,CGHDII:20,EBGAGG:33,DEHJBE:30,JDGGBB:20,CAFHEG:34,CDBJCI:20,GCIBJA:42,GJHHDI:50,EGHABB:33,GIACGF:39,GCGCBA:37,IIFBCI:35,DDFFJH:44,JHBAHG:23,FBHHCG:24,BBACJC:48,GEHBBI:46,DDHCFG:44,DCDCEH:40,BEEIBE:22,HHDJGE:28,AFDFDF:40,JFFDBC:27,BDIHBJ:25,FCGGJD:29,BDCABF:36,CJAEDB:39,JICFEB:26,FFDBDA:23,GEIHGF:32,HFFHAG:22,CIABJI:33,GAFFIA:28,GIFHIE:37,GFDJFC:37,FEACFC:33,DIBHDD:32,FJBGJI:32,BAFCDG:25,JDFGAJ:19,HGIFBG:29,IGDFFF:58,CFHBHF:45,DGBGCD:28,EJCHIF:22,BGABGC:34,GEFFDA:48,FDGFHD:32,HIGBID:39,GBDHBH:34,IABHEF:44,BJJCBG:43,CICCGG:29,JFJIJH:32,DCJGEF:33,HHGBBI:17,CBEEBE:21,EEFBHJ:33,IEGDGC:32,ACDAIC:37,ICCCCJ:35,BGFFIF:26,JAGACI:27,EBIEAI:51};
\ No newline at end of file
diff --git a/dist/identicons.bundle.cjs.js b/dist/identicons.bundle.cjs.js
deleted file mode 100644
index 8230896..0000000
--- a/dist/identicons.bundle.cjs.js
+++ /dev/null
@@ -1,176 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.makeHash = makeHash;
-exports.hashToRGB = hashToRGB;
-exports.hashToIndices = hashToIndices;
-exports.getBackgroundColorName = getBackgroundColorName;
-exports.backgroundColors = exports.colors = exports.colorNames = exports.default = exports.IdenticonsAssets = void 0;
-const IdenticonsAssets = `
-
-
-`.replace(//g, 'symbol>').replace(/\n\n\n\n\n`;
- }
-
- static renderPlaceholder(t, e, a) {
- t.innerHTML = this.placeholder(e, a);
- }
-
- static placeholderToDataUrl(t, e) {
- return `data:image/svg+xml;base64,${this._btoa(this.placeholder(t, e))}`;
- }
-
- static async image(t) {
- const e = await this.toDataUrl(t),
- a = await this._loadImage(e);
- return a.style.width = "100%", a.style.height = "100%", a;
- }
-
- static async _svgTemplate(t, e, a, s, n, i, r) {
- return this._$svg((await this._$identicons(t, e, a, s, n, i, r)));
- }
-
- static async _$identicons(t, e, a, s, n, i, r) {
- const o = hashToRGB(t, e, r);
- return t = o.main, e = o.background, `\n\n\n\n${await this._generatePart("top", s)}\n${await this._generatePart("side", n)}\n${await this._generatePart("face", a)}\n${await this._generatePart("bottom", i)}\n`;
- }
-
- static _$svg(t) {
- const e = this._getRandomId();
-
- return ``;
- }
-
- static async _generatePart(t, e) {
- const a = await this._getAssets(),
- s = t + "_" + this._assetIndex(e, t),
- n = a.getElementById(s);
-
- return n ? n.innerHTML : "";
- }
-
- static _loadImage(t) {
- return new Promise((e, a) => {
- const s = document.createElement("img");
- s.addEventListener("load", t => e(s), {
- once: !0
- }), s.src = t;
- });
- }
-
- static async _getAssets() {
- return this._assetsPromise || (this._assetsPromise = new Promise(async function (t) {
- let e;
-
- if (e = "undefined" != typeof IdenticonsAssets ? IdenticonsAssets : await fetch(self.NIMIQ_IDENTICONS_SVG_PATH || Identicons.svgPath).then(t => t.text()), "function" != typeof DOMParser) {
- if ("undefined" == typeof module || !module.exports) throw new Error("No DOMParser available");
- global.DOMParser = require("dom-parser");
- }
-
- t(new DOMParser().parseFromString(e, "image/svg+xml"));
- }));
- }
-
- static _btoa(t) {
- if ("function" == typeof btoa) return btoa(t);
- if ("undefined" != typeof module && module.exports) return Buffer.from(t).toString("base64");
- throw new Error("No btoa or equivalent available");
- }
-
- static _assetIndex(t, e) {
- return (t = Number(t) % 21 + 1) < 10 && (t = "0" + t), t;
- }
-
- static _getRandomId() {
- return Math.floor(256 * Math.random());
- }
-
-} // @asset(/node_modules/@nimiq/identicons/dist/identicons.min.svg);
-
-
-exports.default = Identicons;
-Identicons.svgPath = "/node_modules/@nimiq/identicons/dist/identicons.min.svg";
-
-function makeHash(t) {
- const r = ("" + t.split("").map(t => Number(t.charCodeAt(0)) + 3).reduce((t, r) => t * (1 - t) * __chaosHash(r), .5)).split("").reduce((t, r) => r + t, "");
- return _padEnd(r.replace(".", r[5]).substr(4, 17), 13, r[5]);
-}
-
-;
-
-function __chaosHash(t) {
- let r = 1 / t;
-
- for (let t = 0; t < 100; t++) r = (1 - r) * r * 3.569956786876;
-
- return r;
-}
-
-function _padEnd(t, r, e) {
- if (String.prototype.padEnd) return t.padEnd(r, e);
-
- for (; t.length < r;) t += e;
-
- return t.substring(0, Math.max(t.length, r));
-}
-
-const colorNames = ["Orange", "Red", "Yellow", "Indigo", "Blue", "Purple", "Teal", "Pink", "Green", "Brown"];
-exports.colorNames = colorNames;
-
-function hashToRGB(o, n, r) {
- return indicesToRGB(hashToIndices(o, n, r));
-}
-
-;
-
-function hashToIndices(o, n, r) {
- for (o = parseInt(o, 10), n = parseInt(n, 10), r = parseInt(r, 10), o === n && ++o > 9 && (o = 0); r === o || r === n;) ++r > 9 && (r = 0);
-
- return {
- main: o,
- background: n,
- accent: r
- };
-}
-
-;
-
-function indicesToRGB(o) {
- return {
- main: colors[o.main],
- background: backgroundColors[o.background],
- accent: colors[o.accent]
- };
-}
-
-function getBackgroundColorName(o) {
- const n = makeHash(o),
- r = parseInt(n[2], 10);
- return colorNames[r];
-}
-
-;
-const colors = ["#FC8702", "#D94432", "#E9B213", "#1A5493", "#0582CA", "#5961A8", "#21BCA5", "#FA7268", "#88B04B", "#795548"];
-exports.colors = colors;
-const backgroundColors = ["#FC8702", "#D94432", "#E9B213", "#1F2348", "#0582CA", "#5F4B8B", "#21BCA5", "#FA7268", "#88B04B", "#795548"];
-exports.backgroundColors = backgroundColors;
\ No newline at end of file
diff --git a/dist/identicons.bundle.min.js b/dist/identicons.bundle.min.js
deleted file mode 100644
index 15767d6..0000000
--- a/dist/identicons.bundle.min.js
+++ /dev/null
@@ -1,11 +0,0 @@
-export const IdenticonsAssets = `
-
-
-`.replace(//g,'symbol>').replace(/
\n\n\n\n\n`}static renderPlaceholder(t,e,a){t.innerHTML=this.placeholder(e,a)}static placeholderToDataUrl(t,e){return`data:image/svg+xml;base64,${this._btoa(this.placeholder(t,e))}`}static async image(t){const e=await this.toDataUrl(t),a=await this._loadImage(e);return a.style.width="100%",a.style.height="100%",a}static async _svgTemplate(t,e,a,s,n,i,r){return this._$svg(await this._$identicons(t,e,a,s,n,i,r))}static async _$identicons(t,e,a,s,n,i,r){const o=hashToRGB(t,e,r);return t=o.main,e=o.background,`\n\n\n\n${await this._generatePart("top",s)}\n${await this._generatePart("side",n)}\n${await this._generatePart("face",a)}\n${await this._generatePart("bottom",i)}\n`}static _$svg(t){const e=this._getRandomId();return``}static async _generatePart(t,e){const a=await this._getAssets(),s=t+"_"+this._assetIndex(e,t),n=a.getElementById(s);return n?n.innerHTML:""}static _loadImage(t){return new Promise((e,a)=>{const s=document.createElement("img");s.addEventListener("load",t=>e(s),{once:!0}),s.src=t})}static async _getAssets(){return this._assetsPromise||(this._assetsPromise=new Promise(async function(t){let e;if(e="undefined"!=typeof IdenticonsAssets?IdenticonsAssets:await fetch(self.NIMIQ_IDENTICONS_SVG_PATH||Identicons.svgPath).then(t=>t.text()),"function"!=typeof DOMParser){if("undefined"==typeof module||!module.exports)throw new Error("No DOMParser available");global.DOMParser=require("dom-parser")}t((new DOMParser).parseFromString(e,"image/svg+xml"))}))}static _btoa(t){if("function"==typeof btoa)return btoa(t);if("undefined"!=typeof module&&module.exports)return Buffer.from(t).toString("base64");throw new Error("No btoa or equivalent available")}static _assetIndex(t,e){return(t=Number(t)%21+1)<10&&(t="0"+t),t}static _getRandomId(){return Math.floor(256*Math.random())}}
-// @asset(/node_modules/@nimiq/identicons/dist/identicons.min.svg);
-Identicons.svgPath="/node_modules/@nimiq/identicons/dist/identicons.min.svg";
-export function makeHash(t){const r=(""+t.split("").map(t=>Number(t.charCodeAt(0))+3).reduce((t,r)=>t*(1-t)*__chaosHash(r),.5)).split("").reduce((t,r)=>r+t,"");return _padEnd(r.replace(".",r[5]).substr(4,17),13,r[5])};function __chaosHash(t){let r=1/t;for(let t=0;t<100;t++)r=(1-r)*r*3.569956786876;return r}function _padEnd(t,r,e){if(String.prototype.padEnd)return t.padEnd(r,e);for(;t.length9&&(o=0);r===o||r===n;)++r>9&&(r=0);return{main:o,background:n,accent:r}};function indicesToRGB(o){return{main:colors[o.main],background:backgroundColors[o.background],accent:colors[o.accent]}}export function getBackgroundColorName(o){const n=makeHash(o),r=parseInt(n[2],10);return colorNames[r]};export const colors=["#FC8702","#D94432","#E9B213","#1A5493","#0582CA","#5961A8","#21BCA5","#FA7268","#88B04B","#795548"];export const backgroundColors=["#FC8702","#D94432","#E9B213","#1F2348","#0582CA","#5F4B8B","#21BCA5","#FA7268","#88B04B","#795548"];
\ No newline at end of file
diff --git a/dist/identicons.min.js b/dist/identicons.min.js
deleted file mode 100644
index 5b38094..0000000
--- a/dist/identicons.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-export default class Identicons{static async svg(t){const e=makeHash(t);return this._svgTemplate(e[0],e[2],e[3]+e[4],e[5]+e[6],e[7]+e[8],e[9]+e[10],e[11])}static async render(t,e){e.innerHTML=await this.svg(t)}static async toDataUrl(t){return`data:image/svg+xml;base64,${this._btoa(await this.svg(t,!0))}`}static placeholder(t="#bbb",e=1){return``}static renderPlaceholder(t,e,a){t.innerHTML=this.placeholder(e,a)}static placeholderToDataUrl(t,e){return`data:image/svg+xml;base64,${this._btoa(this.placeholder(t,e))}`}static async image(t){const e=await this.toDataUrl(t),a=await this._loadImage(e);return a.style.width="100%",a.style.height="100%",a}static async _svgTemplate(t,e,a,s,n,i,r){return this._$svg(await this._$identicons(t,e,a,s,n,i,r))}static async _$identicons(t,e,a,s,n,i,r){const o=hashToRGB(t,e,r);return t=o.main,e=o.background,`\n\n\n\n${await this._generatePart("top",s)}\n${await this._generatePart("side",n)}\n${await this._generatePart("face",a)}\n${await this._generatePart("bottom",i)}\n`}static _$svg(t){const e=this._getRandomId();return``}static async _generatePart(t,e){const a=await this._getAssets(),s=t+"_"+this._assetIndex(e,t),n=a.getElementById(s);return n?n.innerHTML:""}static _loadImage(t){return new Promise((e,a)=>{const s=document.createElement("img");s.addEventListener("load",t=>e(s),{once:!0}),s.src=t})}static async _getAssets(){return this._assetsPromise||(this._assetsPromise=new Promise(async function(t){let e;if(e="undefined"!=typeof IdenticonsAssets?IdenticonsAssets:await fetch(self.NIMIQ_IDENTICONS_SVG_PATH||Identicons.svgPath).then(t=>t.text()),"function"!=typeof DOMParser){if("undefined"==typeof module||!module.exports)throw new Error("No DOMParser available");global.DOMParser=require("dom-parser")}t((new DOMParser).parseFromString(e,"image/svg+xml"))}))}static _btoa(t){if("function"==typeof btoa)return btoa(t);if("undefined"!=typeof module&&module.exports)return Buffer.from(t).toString("base64");throw new Error("No btoa or equivalent available")}static _assetIndex(t,e){return(t=Number(t)%21+1)<10&&(t="0"+t),t}static _getRandomId(){return Math.floor(256*Math.random())}}
-// @asset(/node_modules/@nimiq/identicons/dist/identicons.min.svg);
-Identicons.svgPath="/node_modules/@nimiq/identicons/dist/identicons.min.svg";
-export function makeHash(t){const r=(""+t.split("").map(t=>Number(t.charCodeAt(0))+3).reduce((t,r)=>t*(1-t)*__chaosHash(r),.5)).split("").reduce((t,r)=>r+t,"");return _padEnd(r.replace(".",r[5]).substr(4,17),13,r[5])};function __chaosHash(t){let r=1/t;for(let t=0;t<100;t++)r=(1-r)*r*3.569956786876;return r}function _padEnd(t,r,e){if(String.prototype.padEnd)return t.padEnd(r,e);for(;t.length9&&(o=0);r===o||r===n;)++r>9&&(r=0);return{main:o,background:n,accent:r}};function indicesToRGB(o){return{main:colors[o.main],background:backgroundColors[o.background],accent:colors[o.accent]}}export function getBackgroundColorName(o){const n=makeHash(o),r=parseInt(n[2],10);return colorNames[r]};export const colors=["#FC8702","#D94432","#E9B213","#1A5493","#0582CA","#5961A8","#21BCA5","#FA7268","#88B04B","#795548"];export const backgroundColors=["#FC8702","#D94432","#E9B213","#1F2348","#0582CA","#5F4B8B","#21BCA5","#FA7268","#88B04B","#795548"];
\ No newline at end of file
diff --git a/dist/identicons.min.svg b/dist/identicons.min.svg
deleted file mode 100644
index 368123b..0000000
--- a/dist/identicons.min.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/eslint.config.js b/eslint.config.js
new file mode 100644
index 0000000..99495b0
--- /dev/null
+++ b/eslint.config.js
@@ -0,0 +1,10 @@
+// @ts-check
+import antfu from '@antfu/eslint-config'
+
+export default antfu(
+ {
+ type: 'lib',
+ ignores: ['playground'],
+ formatters: true,
+ },
+)
diff --git a/example1.png b/example1.png
deleted file mode 100644
index 10adbf4..0000000
Binary files a/example1.png and /dev/null differ
diff --git a/example2.png b/example2.png
deleted file mode 100644
index 27bdcb0..0000000
Binary files a/example2.png and /dev/null differ
diff --git a/gulpfile.js b/gulpfile.js
deleted file mode 100644
index 004722b..0000000
--- a/gulpfile.js
+++ /dev/null
@@ -1,149 +0,0 @@
-var gulp = require('gulp');
-var path = require('path');
-var svgmin = require('gulp-svgmin');
-var svgstore = require('gulp-svgstore');
-var cheerio = require('gulp-cheerio');
-var rename = require('gulp-rename');
-var uglify_es = require('uglify-es');
-var composer = require('gulp-uglify/composer');
-var uglify = composer(uglify_es, console);
-var concat = require('gulp-concat');
-var remove_code = require('gulp-remove-code');
-var babel = require('gulp-babel');
-var replace = require('gulp-replace');
-
-gulp.task('prepare-svg', function () {
- return gulp
- .src('src/svg/*/*.svg')
- // Minify SVG files
- .pipe(svgmin(function (file) {
- var prefix = path.basename(file.relative, path.extname(file.relative));
- return {
- plugins: [
- {
- removeAttrs: {
- attrs: ['viewBox']
- }
- },
- {
- mergePaths: true
- },
- {
- cleanupIDs: {
- prefix: prefix,
- minify: true
- }
- },
- ],
- };
- }))
- // Combine SVG files as symbols
- .pipe(svgstore({ inlineSvg: true }))
- // Remove unused tags
- .pipe(cheerio({
- run: function ($, file) {
- $('[fill="#0f0"]').attr('fill', 'currentColor');
- },
- parserOptions: {
- xmlMode: true
- }
- }))
- .pipe(rename('identicons.min.svg'))
- .pipe(gulp.dest('dist'));
-});
-
-gulp.task('prepare-identicons-js', function () {
- return gulp
- .src([
- 'src/js/identicons.js',
- 'src/js/hash.js',
- 'src/js/color-names.js',
- 'src/js/colors.js',
- ])
- .pipe(remove_code({ production: true }))
- .pipe(uglify({
- warnings: true,
- compress: {},
- mangle: true,
- output: {
- comments: /@asset/
- }
- }))
- .pipe(concat('identicons.min.js'))
- .pipe(gulp.dest('dist'));
-});
-
-gulp.task('prepare-name-js', function () {
- return gulp
- .src([
- 'src/js/name.js',
- 'src/js/hash.js',
- 'src/js/color-names.js',
- 'src/js/colors.js',
- 'src/js/word-catalog.js',
- 'src/js/word-dimensions.js',
- ])
- .pipe(remove_code({ production: true }))
- .pipe(uglify({
- warnings: true,
- compress: {},
- mangle: true,
- output: {
- comments: /@asset/
- }
- }))
- .pipe(concat('identicons-name.min.js'))
- .pipe(gulp.dest('dist'));
-});
-
-gulp.task('prepare-bundle', function () {
- return gulp.src(['src/js/svg.prefix.js', 'dist/identicons.min.svg'])
- .pipe(replace(//g, 'S>'))
- .pipe(replace(/
-
-
-
-
- Nimiq Identicons
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/mini.html b/mini.html
deleted file mode 100644
index 18e0879..0000000
--- a/mini.html
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
- Nimiq Identicons
-
-
-
-
-
-
-
-
-
-
diff --git a/package.json b/package.json
index f71b8a0..969dadb 100644
--- a/package.json
+++ b/package.json
@@ -1,35 +1,89 @@
{
"name": "@nimiq/identicons",
- "version": "1.6.2",
+ "type": "module",
+ "version": "2.0.0",
+ "packageManager": "pnpm@9.9.0",
"description": "Nimiq Identicons",
- "main": "dist/identicons.bundle.cjs.js",
- "module": "dist/identicons.bundle.min.js",
- "browser": "dist/identicons.min.js",
+ "license": "MIT",
+ "homepage": "https://github.com/nimiq/identicons#readme",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/nimiq/identicons.git"
+ },
+ "bugs": {
+ "url": "https://github.com/nimiq/identicons/issues"
+ },
+ "keywords": [
+ "identicons",
+ "nimiq"
+ ],
+ "sideEffects": false,
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "browser": "./dist/index.mjs",
+ "import": "./dist/index.mjs",
+ "require": "./dist/index.cjs"
+ }
+ },
+ "main": "./dist/index.mjs",
+ "module": "./dist/index.mjs",
+ "types": "./dist/index.d.ts",
+ "typesVersions": {
+ "*": {
+ "*": [
+ "./dist/*",
+ "./dist/index.d.ts"
+ ]
+ }
+ },
"files": [
"dist"
],
"scripts": {
- "test": "echo \"Error: no test specified\" && exit 1",
- "build": "gulp"
- },
- "author": "",
- "license": "ISC",
- "dependencies": {
- "dom-parser": "^0.1.5"
+ "build": "vite build",
+ "dev": "vite build --watch & pnpm --filter=./playground run dev",
+ "dev:pkg": "vite build --watch",
+ "dev:playground": "pnpm --filter=./playground run dev",
+ "lint": "eslint . && pnpm -C playground run lint",
+ "lint:fix": "eslint . --fix && pnpm -C playground run lint:fix",
+ "prepublishOnly": "nr build",
+ "release": "bumpp && npm publish",
+ "start": "esno src/index.ts",
+ "test": "vitest",
+ "typecheck": "tsc --noEmit --ignore",
+ "prepare": "simple-git-hooks",
+ "optimize-svg": "esno ./scripts/optimize-svgs.ts"
},
"devDependencies": {
- "@babel/core": "^7.2.2",
- "@babel/plugin-transform-modules-commonjs": "^7.2.0",
- "gulp": "^4.0.0",
- "gulp-babel": "^8.0.0",
- "gulp-cheerio": "^0.6.3",
- "gulp-concat": "^2.6.1",
- "gulp-remove-code": "^3.0.2",
- "gulp-rename": "^1.2.2",
- "gulp-replace": "^1.0.0",
- "gulp-svgmin": "^2.2.0",
- "gulp-svgstore": "^6.1.1",
- "gulp-uglify": "^3.0.0",
- "uglify-es": "^3.3.9"
+ "@antfu/eslint-config": "^3.3.2",
+ "@antfu/ni": "^0.23.0",
+ "@antfu/utils": "^0.7.10",
+ "@types/node": "^22.5.4",
+ "bumpp": "^9.5.2",
+ "consola": "^3.2.3",
+ "eslint": "^9.9.1",
+ "eslint-plugin-format": "^0.1.2",
+ "esno": "^4.7.0",
+ "lint-staged": "^15.2.10",
+ "pathe": "^1.1.2",
+ "pnpm": "^9.9.0",
+ "simple-git-hooks": "^2.11.1",
+ "svgo": "^3.3.2",
+ "tiny-glob": "^0.2.9",
+ "typescript": "^5.5.4",
+ "unbuild": "^2.0.0",
+ "vite": "^5.4.3",
+ "vite-plugin-dts": "^4.3.0",
+ "vitest": "^2.0.5"
+ },
+ "simple-git-hooks": {
+ "pre-commit": "pnpm lint-staged"
+ },
+ "lint-staged": {
+ "*": "eslint --fix ."
+ },
+ "directories": {
+ "test": "test"
}
}
diff --git a/playground/.editorconfig b/playground/.editorconfig
new file mode 100644
index 0000000..ecea360
--- /dev/null
+++ b/playground/.editorconfig
@@ -0,0 +1,6 @@
+[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue}]
+charset = utf-8
+indent_size = 2
+indent_style = space
+insert_final_newline = true
+trim_trailing_whitespace = true
diff --git a/playground/.gitignore b/playground/.gitignore
new file mode 100644
index 0000000..8ee54e8
--- /dev/null
+++ b/playground/.gitignore
@@ -0,0 +1,30 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+.DS_Store
+dist
+dist-ssr
+coverage
+*.local
+
+/cypress/videos/
+/cypress/screenshots/
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
+
+*.tsbuildinfo
diff --git a/playground/README.md b/playground/README.md
new file mode 100644
index 0000000..4d027d2
--- /dev/null
+++ b/playground/README.md
@@ -0,0 +1,39 @@
+# playground
+
+This template should help get you started developing with Vue 3 in Vite.
+
+## Recommended IDE Setup
+
+[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
+
+## Type Support for `.vue` Imports in TS
+
+TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
+
+## Customize configuration
+
+See [Vite Configuration Reference](https://vite.dev/config/).
+
+## Project Setup
+
+```sh
+pnpm install
+```
+
+### Compile and Hot-Reload for Development
+
+```sh
+pnpm dev
+```
+
+### Type-Check, Compile and Minify for Production
+
+```sh
+pnpm build
+```
+
+### Lint with [ESLint](https://eslint.org/)
+
+```sh
+pnpm lint
+```
diff --git a/playground/env.d.ts b/playground/env.d.ts
new file mode 100644
index 0000000..11f02fe
--- /dev/null
+++ b/playground/env.d.ts
@@ -0,0 +1 @@
+///
diff --git a/playground/eslint.config.js b/playground/eslint.config.js
new file mode 100644
index 0000000..05a0a74
--- /dev/null
+++ b/playground/eslint.config.js
@@ -0,0 +1,7 @@
+import antfu from '@antfu/eslint-config'
+
+export default antfu({
+ vue: true,
+ unocss: true,
+ formatters: true,
+})
diff --git a/playground/index.html b/playground/index.html
new file mode 100644
index 0000000..c94f028
--- /dev/null
+++ b/playground/index.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ Nimiq Identicons ESM
+
+
+
+
+
+
diff --git a/playground/package.json b/playground/package.json
new file mode 100644
index 0000000..5dcc97a
--- /dev/null
+++ b/playground/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "playground",
+ "type": "module",
+ "version": "0.0.0",
+ "private": true,
+ "scripts": {
+ "dev": "vite",
+ "build": "run-p type-check \"build-only {@}\" --",
+ "preview": "vite preview",
+ "build-only": "vite build",
+ "type-check": "vue-tsc --build --force",
+ "lint": "eslint .",
+ "lint:fix": "eslint . --fix"
+ },
+ "dependencies": {
+ "@nimiq/identicons": "workspace:*",
+ "@vueuse/core": "^11.1.0",
+ "identicons-legacy": "github:nimiq/identicons#master",
+ "radix-vue": "^1.9.8",
+ "vue": "^3.5.12"
+ },
+ "devDependencies": {
+ "@antfu/eslint-config": "^3.8.0",
+ "@iconify-json/nimiq": "https://pkg.pr.new/onmax/nimiq-ui/nimiq-icons@814b6a1",
+ "@tsconfig/node20": "^20.1.4",
+ "@types/node": "^22.8.1",
+ "@unocss/eslint-plugin": "^0.63.6",
+ "@unocss/preset-rem-to-px": "^0.63.6",
+ "@unocss/reset": "^0.63.6",
+ "@vitejs/plugin-vue": "^5.1.4",
+ "@vue/eslint-config-typescript": "^14.1.3",
+ "@vue/tsconfig": "^0.5.1",
+ "eslint": "^9.13.0",
+ "eslint-plugin-vue": "^9.29.1",
+ "nimiq-css": "^0.2.25",
+ "npm-run-all2": "^7.0.1",
+ "typescript": "~5.6.3",
+ "unocss": "^0.63.6",
+ "vite": "^5.4.10",
+ "vite-plugin-vue-devtools": "^7.5.4",
+ "vue-tsc": "^2.1.8"
+ }
+}
diff --git a/playground/public/assets/fonts/firacode-0336df1a.woff2 b/playground/public/assets/fonts/firacode-0336df1a.woff2
new file mode 100644
index 0000000..06b6f7a
Binary files /dev/null and b/playground/public/assets/fonts/firacode-0336df1a.woff2 differ
diff --git a/playground/public/assets/fonts/firacode-3c6ba0f0.woff2 b/playground/public/assets/fonts/firacode-3c6ba0f0.woff2
new file mode 100644
index 0000000..8bd4abb
Binary files /dev/null and b/playground/public/assets/fonts/firacode-3c6ba0f0.woff2 differ
diff --git a/playground/public/assets/fonts/firacode-43c3e27d.woff2 b/playground/public/assets/fonts/firacode-43c3e27d.woff2
new file mode 100644
index 0000000..00c8383
Binary files /dev/null and b/playground/public/assets/fonts/firacode-43c3e27d.woff2 differ
diff --git a/playground/public/assets/fonts/firacode-b759ebc4.woff2 b/playground/public/assets/fonts/firacode-b759ebc4.woff2
new file mode 100644
index 0000000..b8a2908
Binary files /dev/null and b/playground/public/assets/fonts/firacode-b759ebc4.woff2 differ
diff --git a/playground/public/assets/fonts/firacode-d87b9a37.woff2 b/playground/public/assets/fonts/firacode-d87b9a37.woff2
new file mode 100644
index 0000000..eb5b302
Binary files /dev/null and b/playground/public/assets/fonts/firacode-d87b9a37.woff2 differ
diff --git a/playground/public/assets/fonts/firacode-f7e13124.woff2 b/playground/public/assets/fonts/firacode-f7e13124.woff2
new file mode 100644
index 0000000..0d2103f
Binary files /dev/null and b/playground/public/assets/fonts/firacode-f7e13124.woff2 differ
diff --git a/playground/public/assets/fonts/mulish-021f3d3f.woff2 b/playground/public/assets/fonts/mulish-021f3d3f.woff2
new file mode 100644
index 0000000..ac5b08e
Binary files /dev/null and b/playground/public/assets/fonts/mulish-021f3d3f.woff2 differ
diff --git a/playground/public/assets/fonts/mulish-086a288a.woff2 b/playground/public/assets/fonts/mulish-086a288a.woff2
new file mode 100644
index 0000000..c1a1f42
Binary files /dev/null and b/playground/public/assets/fonts/mulish-086a288a.woff2 differ
diff --git a/playground/public/assets/fonts/mulish-0c042aff.woff2 b/playground/public/assets/fonts/mulish-0c042aff.woff2
new file mode 100644
index 0000000..c77ddfc
Binary files /dev/null and b/playground/public/assets/fonts/mulish-0c042aff.woff2 differ
diff --git a/playground/public/assets/fonts/mulish-1ac4d5c4.woff2 b/playground/public/assets/fonts/mulish-1ac4d5c4.woff2
new file mode 100644
index 0000000..c4e8366
Binary files /dev/null and b/playground/public/assets/fonts/mulish-1ac4d5c4.woff2 differ
diff --git a/playground/public/assets/fonts/mulish-4a683114.woff2 b/playground/public/assets/fonts/mulish-4a683114.woff2
new file mode 100644
index 0000000..64fb552
Binary files /dev/null and b/playground/public/assets/fonts/mulish-4a683114.woff2 differ
diff --git a/playground/public/assets/fonts/mulish-4fe8af2a.woff2 b/playground/public/assets/fonts/mulish-4fe8af2a.woff2
new file mode 100644
index 0000000..2c52a6f
Binary files /dev/null and b/playground/public/assets/fonts/mulish-4fe8af2a.woff2 differ
diff --git a/playground/public/assets/fonts/mulish-5d4af4fe.woff2 b/playground/public/assets/fonts/mulish-5d4af4fe.woff2
new file mode 100644
index 0000000..c5ebf0d
Binary files /dev/null and b/playground/public/assets/fonts/mulish-5d4af4fe.woff2 differ
diff --git a/playground/public/assets/fonts/mulish-747c2eb7.woff2 b/playground/public/assets/fonts/mulish-747c2eb7.woff2
new file mode 100644
index 0000000..58fbe2a
Binary files /dev/null and b/playground/public/assets/fonts/mulish-747c2eb7.woff2 differ
diff --git a/playground/public/assets/fonts/mulish-8f67bca7.woff2 b/playground/public/assets/fonts/mulish-8f67bca7.woff2
new file mode 100644
index 0000000..f6db743
Binary files /dev/null and b/playground/public/assets/fonts/mulish-8f67bca7.woff2 differ
diff --git a/playground/public/assets/fonts/mulish-99b0528e.woff2 b/playground/public/assets/fonts/mulish-99b0528e.woff2
new file mode 100644
index 0000000..d11322e
Binary files /dev/null and b/playground/public/assets/fonts/mulish-99b0528e.woff2 differ
diff --git a/playground/public/assets/fonts/mulish-a51b2cd0.woff2 b/playground/public/assets/fonts/mulish-a51b2cd0.woff2
new file mode 100644
index 0000000..79c5bdd
Binary files /dev/null and b/playground/public/assets/fonts/mulish-a51b2cd0.woff2 differ
diff --git a/playground/public/assets/fonts/mulish-a998f292.woff2 b/playground/public/assets/fonts/mulish-a998f292.woff2
new file mode 100644
index 0000000..ef6f8b8
Binary files /dev/null and b/playground/public/assets/fonts/mulish-a998f292.woff2 differ
diff --git a/playground/public/assets/fonts/mulish-d0c9a80d.woff2 b/playground/public/assets/fonts/mulish-d0c9a80d.woff2
new file mode 100644
index 0000000..b2bdb77
Binary files /dev/null and b/playground/public/assets/fonts/mulish-d0c9a80d.woff2 differ
diff --git a/playground/public/assets/fonts/mulish-df217072.woff2 b/playground/public/assets/fonts/mulish-df217072.woff2
new file mode 100644
index 0000000..fc88a4d
Binary files /dev/null and b/playground/public/assets/fonts/mulish-df217072.woff2 differ
diff --git a/playground/public/assets/fonts/mulish-fcf17f92.woff2 b/playground/public/assets/fonts/mulish-fcf17f92.woff2
new file mode 100644
index 0000000..fd71a88
Binary files /dev/null and b/playground/public/assets/fonts/mulish-fcf17f92.woff2 differ
diff --git a/playground/public/favicon.ico b/playground/public/favicon.ico
new file mode 100644
index 0000000..df36fcf
Binary files /dev/null and b/playground/public/favicon.ico differ
diff --git a/playground/src/App.vue b/playground/src/App.vue
new file mode 100644
index 0000000..72a1ce1
--- /dev/null
+++ b/playground/src/App.vue
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+ Nimiq Identicons Playground
+
+
+
+
+
+
+
+
+
+ New
+
+
+
+
+ {{ identiconSize }}kb
+
+
+
+ {{ identiconDuration }}ms
+
+
+
+
+
+
+ Legacy
+
+
+
+
+
+ {{ identiconLegacySize }}kb
+
+
+
+ {{ identiconLegacyDuration }}ms
+
+
+
+ Not sure how to fix this in production :/
+
+
+
+
+
+
+
+
diff --git a/playground/src/auto-imports.d.ts b/playground/src/auto-imports.d.ts
new file mode 100644
index 0000000..cc45760
--- /dev/null
+++ b/playground/src/auto-imports.d.ts
@@ -0,0 +1,600 @@
+/* eslint-disable */
+/* prettier-ignore */
+// @ts-nocheck
+// noinspection JSUnusedGlobalSymbols
+// Generated by unplugin-auto-import
+// biome-ignore lint: disable
+export {}
+declare global {
+ const EffectScope: typeof import('vue')['EffectScope']
+ const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
+ const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
+ const computed: typeof import('vue')['computed']
+ const computedAsync: typeof import('@vueuse/core')['computedAsync']
+ const computedEager: typeof import('@vueuse/core')['computedEager']
+ const computedInject: typeof import('@vueuse/core')['computedInject']
+ const computedWithControl: typeof import('@vueuse/core')['computedWithControl']
+ const controlledComputed: typeof import('@vueuse/core')['controlledComputed']
+ const controlledRef: typeof import('@vueuse/core')['controlledRef']
+ const createApp: typeof import('vue')['createApp']
+ const createEventHook: typeof import('@vueuse/core')['createEventHook']
+ const createGlobalState: typeof import('@vueuse/core')['createGlobalState']
+ const createInjectionState: typeof import('@vueuse/core')['createInjectionState']
+ const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn']
+ const createReusableTemplate: typeof import('@vueuse/core')['createReusableTemplate']
+ const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable']
+ const createTemplatePromise: typeof import('@vueuse/core')['createTemplatePromise']
+ const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn']
+ const customRef: typeof import('vue')['customRef']
+ const debouncedRef: typeof import('@vueuse/core')['debouncedRef']
+ const debouncedWatch: typeof import('@vueuse/core')['debouncedWatch']
+ const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
+ const defineComponent: typeof import('vue')['defineComponent']
+ const eagerComputed: typeof import('@vueuse/core')['eagerComputed']
+ const effectScope: typeof import('vue')['effectScope']
+ const extendRef: typeof import('@vueuse/core')['extendRef']
+ const getCurrentInstance: typeof import('vue')['getCurrentInstance']
+ const getCurrentScope: typeof import('vue')['getCurrentScope']
+ const h: typeof import('vue')['h']
+ const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
+ const inject: typeof import('vue')['inject']
+ const injectLocal: typeof import('@vueuse/core')['injectLocal']
+ const isDark: typeof import('./composables/dark')['isDark']
+ const isDefined: typeof import('@vueuse/core')['isDefined']
+ const isProxy: typeof import('vue')['isProxy']
+ const isReactive: typeof import('vue')['isReactive']
+ const isReadonly: typeof import('vue')['isReadonly']
+ const isRef: typeof import('vue')['isRef']
+ const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable']
+ const markRaw: typeof import('vue')['markRaw']
+ const nextTick: typeof import('vue')['nextTick']
+ const onActivated: typeof import('vue')['onActivated']
+ const onBeforeMount: typeof import('vue')['onBeforeMount']
+ const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
+ const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
+ const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
+ const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
+ const onClickOutside: typeof import('@vueuse/core')['onClickOutside']
+ const onDeactivated: typeof import('vue')['onDeactivated']
+ const onErrorCaptured: typeof import('vue')['onErrorCaptured']
+ const onKeyStroke: typeof import('@vueuse/core')['onKeyStroke']
+ const onLongPress: typeof import('@vueuse/core')['onLongPress']
+ const onMounted: typeof import('vue')['onMounted']
+ const onRenderTracked: typeof import('vue')['onRenderTracked']
+ const onRenderTriggered: typeof import('vue')['onRenderTriggered']
+ const onScopeDispose: typeof import('vue')['onScopeDispose']
+ const onServerPrefetch: typeof import('vue')['onServerPrefetch']
+ const onStartTyping: typeof import('@vueuse/core')['onStartTyping']
+ const onUnmounted: typeof import('vue')['onUnmounted']
+ const onUpdated: typeof import('vue')['onUpdated']
+ const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
+ const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
+ const preferredDark: typeof import('./composables/dark')['preferredDark']
+ const provide: typeof import('vue')['provide']
+ const provideLocal: typeof import('@vueuse/core')['provideLocal']
+ const reactify: typeof import('@vueuse/core')['reactify']
+ const reactifyObject: typeof import('@vueuse/core')['reactifyObject']
+ const reactive: typeof import('vue')['reactive']
+ const reactiveComputed: typeof import('@vueuse/core')['reactiveComputed']
+ const reactiveOmit: typeof import('@vueuse/core')['reactiveOmit']
+ const reactivePick: typeof import('@vueuse/core')['reactivePick']
+ const readonly: typeof import('vue')['readonly']
+ const ref: typeof import('vue')['ref']
+ const refAutoReset: typeof import('@vueuse/core')['refAutoReset']
+ const refDebounced: typeof import('@vueuse/core')['refDebounced']
+ const refDefault: typeof import('@vueuse/core')['refDefault']
+ const refThrottled: typeof import('@vueuse/core')['refThrottled']
+ const refWithControl: typeof import('@vueuse/core')['refWithControl']
+ const resolveComponent: typeof import('vue')['resolveComponent']
+ const resolveRef: typeof import('@vueuse/core')['resolveRef']
+ const resolveUnref: typeof import('@vueuse/core')['resolveUnref']
+ const shallowReactive: typeof import('vue')['shallowReactive']
+ const shallowReadonly: typeof import('vue')['shallowReadonly']
+ const shallowRef: typeof import('vue')['shallowRef']
+ const syncRef: typeof import('@vueuse/core')['syncRef']
+ const syncRefs: typeof import('@vueuse/core')['syncRefs']
+ const templateRef: typeof import('@vueuse/core')['templateRef']
+ const throttledRef: typeof import('@vueuse/core')['throttledRef']
+ const throttledWatch: typeof import('@vueuse/core')['throttledWatch']
+ const toRaw: typeof import('vue')['toRaw']
+ const toReactive: typeof import('@vueuse/core')['toReactive']
+ const toRef: typeof import('vue')['toRef']
+ const toRefs: typeof import('vue')['toRefs']
+ const toValue: typeof import('vue')['toValue']
+ const toggleDark: typeof import('./composables/dark')['toggleDark']
+ const triggerRef: typeof import('vue')['triggerRef']
+ const tryOnBeforeMount: typeof import('@vueuse/core')['tryOnBeforeMount']
+ const tryOnBeforeUnmount: typeof import('@vueuse/core')['tryOnBeforeUnmount']
+ const tryOnMounted: typeof import('@vueuse/core')['tryOnMounted']
+ const tryOnScopeDispose: typeof import('@vueuse/core')['tryOnScopeDispose']
+ const tryOnUnmounted: typeof import('@vueuse/core')['tryOnUnmounted']
+ const unref: typeof import('vue')['unref']
+ const unrefElement: typeof import('@vueuse/core')['unrefElement']
+ const until: typeof import('@vueuse/core')['until']
+ const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
+ const useAnimate: typeof import('@vueuse/core')['useAnimate']
+ const useArrayDifference: typeof import('@vueuse/core')['useArrayDifference']
+ const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery']
+ const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter']
+ const useArrayFind: typeof import('@vueuse/core')['useArrayFind']
+ const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex']
+ const useArrayFindLast: typeof import('@vueuse/core')['useArrayFindLast']
+ const useArrayIncludes: typeof import('@vueuse/core')['useArrayIncludes']
+ const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin']
+ const useArrayMap: typeof import('@vueuse/core')['useArrayMap']
+ const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce']
+ const useArraySome: typeof import('@vueuse/core')['useArraySome']
+ const useArrayUnique: typeof import('@vueuse/core')['useArrayUnique']
+ const useAsyncQueue: typeof import('@vueuse/core')['useAsyncQueue']
+ const useAsyncState: typeof import('@vueuse/core')['useAsyncState']
+ const useAttrs: typeof import('vue')['useAttrs']
+ const useBase64: typeof import('@vueuse/core')['useBase64']
+ const useBattery: typeof import('@vueuse/core')['useBattery']
+ const useBluetooth: typeof import('@vueuse/core')['useBluetooth']
+ const useBreakpoints: typeof import('@vueuse/core')['useBreakpoints']
+ const useBroadcastChannel: typeof import('@vueuse/core')['useBroadcastChannel']
+ const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation']
+ const useCached: typeof import('@vueuse/core')['useCached']
+ const useClipboard: typeof import('@vueuse/core')['useClipboard']
+ const useClipboardItems: typeof import('@vueuse/core')['useClipboardItems']
+ const useCloned: typeof import('@vueuse/core')['useCloned']
+ const useColorMode: typeof import('@vueuse/core')['useColorMode']
+ const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog']
+ const useCounter: typeof import('@vueuse/core')['useCounter']
+ const useCssModule: typeof import('vue')['useCssModule']
+ const useCssVar: typeof import('@vueuse/core')['useCssVar']
+ const useCssVars: typeof import('vue')['useCssVars']
+ const useCurrentElement: typeof import('@vueuse/core')['useCurrentElement']
+ const useCycleList: typeof import('@vueuse/core')['useCycleList']
+ const useDark: typeof import('@vueuse/core')['useDark']
+ const useDateFormat: typeof import('@vueuse/core')['useDateFormat']
+ const useDebounce: typeof import('@vueuse/core')['useDebounce']
+ const useDebounceFn: typeof import('@vueuse/core')['useDebounceFn']
+ const useDebouncedRefHistory: typeof import('@vueuse/core')['useDebouncedRefHistory']
+ const useDeviceMotion: typeof import('@vueuse/core')['useDeviceMotion']
+ const useDeviceOrientation: typeof import('@vueuse/core')['useDeviceOrientation']
+ const useDevicePixelRatio: typeof import('@vueuse/core')['useDevicePixelRatio']
+ const useDevicesList: typeof import('@vueuse/core')['useDevicesList']
+ const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
+ const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
+ const useDraggable: typeof import('@vueuse/core')['useDraggable']
+ const useDropZone: typeof import('@vueuse/core')['useDropZone']
+ const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
+ const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
+ const useElementHover: typeof import('@vueuse/core')['useElementHover']
+ const useElementSize: typeof import('@vueuse/core')['useElementSize']
+ const useElementVisibility: typeof import('@vueuse/core')['useElementVisibility']
+ const useEventBus: typeof import('@vueuse/core')['useEventBus']
+ const useEventListener: typeof import('@vueuse/core')['useEventListener']
+ const useEventSource: typeof import('@vueuse/core')['useEventSource']
+ const useEyeDropper: typeof import('@vueuse/core')['useEyeDropper']
+ const useFavicon: typeof import('@vueuse/core')['useFavicon']
+ const useFetch: typeof import('@vueuse/core')['useFetch']
+ const useFileDialog: typeof import('@vueuse/core')['useFileDialog']
+ const useFileSystemAccess: typeof import('@vueuse/core')['useFileSystemAccess']
+ const useFocus: typeof import('@vueuse/core')['useFocus']
+ const useFocusWithin: typeof import('@vueuse/core')['useFocusWithin']
+ const useFps: typeof import('@vueuse/core')['useFps']
+ const useFullscreen: typeof import('@vueuse/core')['useFullscreen']
+ const useGamepad: typeof import('@vueuse/core')['useGamepad']
+ const useGeolocation: typeof import('@vueuse/core')['useGeolocation']
+ const useHead: typeof import('@vueuse/head')['useHead']
+ const useI18n: typeof import('vue-i18n')['useI18n']
+ const useId: typeof import('vue')['useId']
+ const useIdle: typeof import('@vueuse/core')['useIdle']
+ const useImage: typeof import('@vueuse/core')['useImage']
+ const useInfiniteScroll: typeof import('@vueuse/core')['useInfiniteScroll']
+ const useIntersectionObserver: typeof import('@vueuse/core')['useIntersectionObserver']
+ const useInterval: typeof import('@vueuse/core')['useInterval']
+ const useIntervalFn: typeof import('@vueuse/core')['useIntervalFn']
+ const useKeyModifier: typeof import('@vueuse/core')['useKeyModifier']
+ const useLastChanged: typeof import('@vueuse/core')['useLastChanged']
+ const useLink: typeof import('vue-router/auto')['useLink']
+ const useLocalStorage: typeof import('@vueuse/core')['useLocalStorage']
+ const useMagicKeys: typeof import('@vueuse/core')['useMagicKeys']
+ const useManualRefHistory: typeof import('@vueuse/core')['useManualRefHistory']
+ const useMediaControls: typeof import('@vueuse/core')['useMediaControls']
+ const useMediaQuery: typeof import('@vueuse/core')['useMediaQuery']
+ const useMemoize: typeof import('@vueuse/core')['useMemoize']
+ const useMemory: typeof import('@vueuse/core')['useMemory']
+ const useModel: typeof import('vue')['useModel']
+ const useMounted: typeof import('@vueuse/core')['useMounted']
+ const useMouse: typeof import('@vueuse/core')['useMouse']
+ const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement']
+ const useMousePressed: typeof import('@vueuse/core')['useMousePressed']
+ const useMutationObserver: typeof import('@vueuse/core')['useMutationObserver']
+ const useNavigatorLanguage: typeof import('@vueuse/core')['useNavigatorLanguage']
+ const useNetwork: typeof import('@vueuse/core')['useNetwork']
+ const useNow: typeof import('@vueuse/core')['useNow']
+ const useObjectUrl: typeof import('@vueuse/core')['useObjectUrl']
+ const useOffsetPagination: typeof import('@vueuse/core')['useOffsetPagination']
+ const useOnline: typeof import('@vueuse/core')['useOnline']
+ const usePageLeave: typeof import('@vueuse/core')['usePageLeave']
+ const useParallax: typeof import('@vueuse/core')['useParallax']
+ const useParentElement: typeof import('@vueuse/core')['useParentElement']
+ const usePerformanceObserver: typeof import('@vueuse/core')['usePerformanceObserver']
+ const usePermission: typeof import('@vueuse/core')['usePermission']
+ const usePointer: typeof import('@vueuse/core')['usePointer']
+ const usePointerLock: typeof import('@vueuse/core')['usePointerLock']
+ const usePointerSwipe: typeof import('@vueuse/core')['usePointerSwipe']
+ const usePreferredColorScheme: typeof import('@vueuse/core')['usePreferredColorScheme']
+ const usePreferredContrast: typeof import('@vueuse/core')['usePreferredContrast']
+ const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark']
+ const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages']
+ const usePreferredReducedMotion: typeof import('@vueuse/core')['usePreferredReducedMotion']
+ const usePrevious: typeof import('@vueuse/core')['usePrevious']
+ const useRafFn: typeof import('@vueuse/core')['useRafFn']
+ const useRefHistory: typeof import('@vueuse/core')['useRefHistory']
+ const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver']
+ const useRoute: typeof import('vue-router')['useRoute']
+ const useRouter: typeof import('vue-router')['useRouter']
+ const useScreenOrientation: typeof import('@vueuse/core')['useScreenOrientation']
+ const useScreenSafeArea: typeof import('@vueuse/core')['useScreenSafeArea']
+ const useScriptTag: typeof import('@vueuse/core')['useScriptTag']
+ const useScroll: typeof import('@vueuse/core')['useScroll']
+ const useScrollLock: typeof import('@vueuse/core')['useScrollLock']
+ const useSeoMeta: typeof import('@vueuse/head')['useSeoMeta']
+ const useSessionStorage: typeof import('@vueuse/core')['useSessionStorage']
+ const useShare: typeof import('@vueuse/core')['useShare']
+ const useSlots: typeof import('vue')['useSlots']
+ const useSorted: typeof import('@vueuse/core')['useSorted']
+ const useSpeechRecognition: typeof import('@vueuse/core')['useSpeechRecognition']
+ const useSpeechSynthesis: typeof import('@vueuse/core')['useSpeechSynthesis']
+ const useStepper: typeof import('@vueuse/core')['useStepper']
+ const useStorage: typeof import('@vueuse/core')['useStorage']
+ const useStorageAsync: typeof import('@vueuse/core')['useStorageAsync']
+ const useStyleTag: typeof import('@vueuse/core')['useStyleTag']
+ const useSupported: typeof import('@vueuse/core')['useSupported']
+ const useSwipe: typeof import('@vueuse/core')['useSwipe']
+ const useTemplateRef: typeof import('vue')['useTemplateRef']
+ const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
+ const useTextDirection: typeof import('@vueuse/core')['useTextDirection']
+ const useTextSelection: typeof import('@vueuse/core')['useTextSelection']
+ const useTextareaAutosize: typeof import('@vueuse/core')['useTextareaAutosize']
+ const useThrottle: typeof import('@vueuse/core')['useThrottle']
+ const useThrottleFn: typeof import('@vueuse/core')['useThrottleFn']
+ const useThrottledRefHistory: typeof import('@vueuse/core')['useThrottledRefHistory']
+ const useTimeAgo: typeof import('@vueuse/core')['useTimeAgo']
+ const useTimeout: typeof import('@vueuse/core')['useTimeout']
+ const useTimeoutFn: typeof import('@vueuse/core')['useTimeoutFn']
+ const useTimeoutPoll: typeof import('@vueuse/core')['useTimeoutPoll']
+ const useTimestamp: typeof import('@vueuse/core')['useTimestamp']
+ const useTitle: typeof import('@vueuse/core')['useTitle']
+ const useToNumber: typeof import('@vueuse/core')['useToNumber']
+ const useToString: typeof import('@vueuse/core')['useToString']
+ const useToggle: typeof import('@vueuse/core')['useToggle']
+ const useTransition: typeof import('@vueuse/core')['useTransition']
+ const useUrlSearchParams: typeof import('@vueuse/core')['useUrlSearchParams']
+ const useUserMedia: typeof import('@vueuse/core')['useUserMedia']
+ const useUserStore: typeof import('./stores/user')['useUserStore']
+ const useVModel: typeof import('@vueuse/core')['useVModel']
+ const useVModels: typeof import('@vueuse/core')['useVModels']
+ const useVibrate: typeof import('@vueuse/core')['useVibrate']
+ const useVirtualList: typeof import('@vueuse/core')['useVirtualList']
+ const useWakeLock: typeof import('@vueuse/core')['useWakeLock']
+ const useWebNotification: typeof import('@vueuse/core')['useWebNotification']
+ const useWebSocket: typeof import('@vueuse/core')['useWebSocket']
+ const useWebWorker: typeof import('@vueuse/core')['useWebWorker']
+ const useWebWorkerFn: typeof import('@vueuse/core')['useWebWorkerFn']
+ const useWindowFocus: typeof import('@vueuse/core')['useWindowFocus']
+ const useWindowScroll: typeof import('@vueuse/core')['useWindowScroll']
+ const useWindowSize: typeof import('@vueuse/core')['useWindowSize']
+ const watch: typeof import('vue')['watch']
+ const watchArray: typeof import('@vueuse/core')['watchArray']
+ const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
+ const watchDebounced: typeof import('@vueuse/core')['watchDebounced']
+ const watchDeep: typeof import('@vueuse/core')['watchDeep']
+ const watchEffect: typeof import('vue')['watchEffect']
+ const watchIgnorable: typeof import('@vueuse/core')['watchIgnorable']
+ const watchImmediate: typeof import('@vueuse/core')['watchImmediate']
+ const watchOnce: typeof import('@vueuse/core')['watchOnce']
+ const watchPausable: typeof import('@vueuse/core')['watchPausable']
+ const watchPostEffect: typeof import('vue')['watchPostEffect']
+ const watchSyncEffect: typeof import('vue')['watchSyncEffect']
+ const watchThrottled: typeof import('@vueuse/core')['watchThrottled']
+ const watchTriggerable: typeof import('@vueuse/core')['watchTriggerable']
+ const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter']
+ const whenever: typeof import('@vueuse/core')['whenever']
+}
+// for type re-export
+declare global {
+ // @ts-ignore
+ export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
+ import('vue')
+}
+// for vue template auto import
+import { UnwrapRef } from 'vue'
+declare module 'vue' {
+ interface GlobalComponents {}
+ interface ComponentCustomProperties {
+ readonly EffectScope: UnwrapRef
+ readonly asyncComputed: UnwrapRef
+ readonly autoResetRef: UnwrapRef
+ readonly computed: UnwrapRef
+ readonly computedAsync: UnwrapRef
+ readonly computedEager: UnwrapRef
+ readonly computedInject: UnwrapRef
+ readonly computedWithControl: UnwrapRef
+ readonly controlledComputed: UnwrapRef
+ readonly controlledRef: UnwrapRef
+ readonly createApp: UnwrapRef
+ readonly createEventHook: UnwrapRef
+ readonly createGlobalState: UnwrapRef
+ readonly createInjectionState: UnwrapRef
+ readonly createReactiveFn: UnwrapRef
+ readonly createReusableTemplate: UnwrapRef
+ readonly createSharedComposable: UnwrapRef
+ readonly createTemplatePromise: UnwrapRef
+ readonly createUnrefFn: UnwrapRef
+ readonly customRef: UnwrapRef
+ readonly debouncedRef: UnwrapRef
+ readonly debouncedWatch: UnwrapRef
+ readonly defineAsyncComponent: UnwrapRef
+ readonly defineComponent: UnwrapRef
+ readonly eagerComputed: UnwrapRef
+ readonly effectScope: UnwrapRef
+ readonly extendRef: UnwrapRef
+ readonly getCurrentInstance: UnwrapRef
+ readonly getCurrentScope: UnwrapRef
+ readonly h: UnwrapRef
+ readonly ignorableWatch: UnwrapRef
+ readonly inject: UnwrapRef
+ readonly injectLocal: UnwrapRef
+ readonly isDark: UnwrapRef
+ readonly isDefined: UnwrapRef
+ readonly isProxy: UnwrapRef
+ readonly isReactive: UnwrapRef
+ readonly isReadonly: UnwrapRef
+ readonly isRef: UnwrapRef
+ readonly makeDestructurable: UnwrapRef
+ readonly markRaw: UnwrapRef
+ readonly nextTick: UnwrapRef
+ readonly onActivated: UnwrapRef
+ readonly onBeforeMount: UnwrapRef
+ readonly onBeforeRouteLeave: UnwrapRef
+ readonly onBeforeRouteUpdate: UnwrapRef
+ readonly onBeforeUnmount: UnwrapRef
+ readonly onBeforeUpdate: UnwrapRef
+ readonly onClickOutside: UnwrapRef
+ readonly onDeactivated: UnwrapRef
+ readonly onErrorCaptured: UnwrapRef
+ readonly onKeyStroke: UnwrapRef
+ readonly onLongPress: UnwrapRef
+ readonly onMounted: UnwrapRef
+ readonly onRenderTracked: UnwrapRef
+ readonly onRenderTriggered: UnwrapRef
+ readonly onScopeDispose: UnwrapRef
+ readonly onServerPrefetch: UnwrapRef
+ readonly onStartTyping: UnwrapRef
+ readonly onUnmounted: UnwrapRef
+ readonly onUpdated: UnwrapRef
+ readonly onWatcherCleanup: UnwrapRef
+ readonly pausableWatch: UnwrapRef
+ readonly preferredDark: UnwrapRef
+ readonly provide: UnwrapRef
+ readonly provideLocal: UnwrapRef
+ readonly reactify: UnwrapRef
+ readonly reactifyObject: UnwrapRef
+ readonly reactive: UnwrapRef
+ readonly reactiveComputed: UnwrapRef
+ readonly reactiveOmit: UnwrapRef
+ readonly reactivePick: UnwrapRef
+ readonly readonly: UnwrapRef
+ readonly ref: UnwrapRef
+ readonly refAutoReset: UnwrapRef
+ readonly refDebounced: UnwrapRef
+ readonly refDefault: UnwrapRef
+ readonly refThrottled: UnwrapRef
+ readonly refWithControl: UnwrapRef
+ readonly resolveComponent: UnwrapRef
+ readonly resolveRef: UnwrapRef
+ readonly resolveUnref: UnwrapRef
+ readonly shallowReactive: UnwrapRef
+ readonly shallowReadonly: UnwrapRef
+ readonly shallowRef: UnwrapRef
+ readonly syncRef: UnwrapRef
+ readonly syncRefs: UnwrapRef
+ readonly templateRef: UnwrapRef
+ readonly throttledRef: UnwrapRef
+ readonly throttledWatch: UnwrapRef
+ readonly toRaw: UnwrapRef
+ readonly toReactive: UnwrapRef
+ readonly toRef: UnwrapRef
+ readonly toRefs: UnwrapRef
+ readonly toValue: UnwrapRef
+ readonly toggleDark: UnwrapRef
+ readonly triggerRef: UnwrapRef
+ readonly tryOnBeforeMount: UnwrapRef
+ readonly tryOnBeforeUnmount: UnwrapRef
+ readonly tryOnMounted: UnwrapRef
+ readonly tryOnScopeDispose: UnwrapRef
+ readonly tryOnUnmounted: UnwrapRef
+ readonly unref: UnwrapRef
+ readonly unrefElement: UnwrapRef
+ readonly until: UnwrapRef
+ readonly useActiveElement: UnwrapRef
+ readonly useAnimate: UnwrapRef
+ readonly useArrayDifference: UnwrapRef
+ readonly useArrayEvery: UnwrapRef
+ readonly useArrayFilter: UnwrapRef
+ readonly useArrayFind: UnwrapRef
+ readonly useArrayFindIndex: UnwrapRef
+ readonly useArrayFindLast: UnwrapRef
+ readonly useArrayIncludes: UnwrapRef
+ readonly useArrayJoin: UnwrapRef
+ readonly useArrayMap: UnwrapRef
+ readonly useArrayReduce: UnwrapRef
+ readonly useArraySome: UnwrapRef
+ readonly useArrayUnique: UnwrapRef
+ readonly useAsyncQueue: UnwrapRef
+ readonly useAsyncState: UnwrapRef
+ readonly useAttrs: UnwrapRef
+ readonly useBase64: UnwrapRef
+ readonly useBattery: UnwrapRef
+ readonly useBluetooth: UnwrapRef
+ readonly useBreakpoints: UnwrapRef
+ readonly useBroadcastChannel: UnwrapRef
+ readonly useBrowserLocation: UnwrapRef
+ readonly useCached: UnwrapRef
+ readonly useClipboard: UnwrapRef
+ readonly useClipboardItems: UnwrapRef
+ readonly useCloned: UnwrapRef
+ readonly useColorMode: UnwrapRef
+ readonly useConfirmDialog: UnwrapRef
+ readonly useCounter: UnwrapRef
+ readonly useCssModule: UnwrapRef
+ readonly useCssVar: UnwrapRef
+ readonly useCssVars: UnwrapRef
+ readonly useCurrentElement: UnwrapRef
+ readonly useCycleList: UnwrapRef
+ readonly useDark: UnwrapRef
+ readonly useDateFormat: UnwrapRef
+ readonly useDebounce: UnwrapRef
+ readonly useDebounceFn: UnwrapRef
+ readonly useDebouncedRefHistory: UnwrapRef
+ readonly useDeviceMotion: UnwrapRef
+ readonly useDeviceOrientation: UnwrapRef
+ readonly useDevicePixelRatio: UnwrapRef
+ readonly useDevicesList: UnwrapRef
+ readonly useDisplayMedia: UnwrapRef
+ readonly useDocumentVisibility: UnwrapRef
+ readonly useDraggable: UnwrapRef
+ readonly useDropZone: UnwrapRef
+ readonly useElementBounding: UnwrapRef
+ readonly useElementByPoint: UnwrapRef
+ readonly useElementHover: UnwrapRef
+ readonly useElementSize: UnwrapRef
+ readonly useElementVisibility: UnwrapRef
+ readonly useEventBus: UnwrapRef
+ readonly useEventListener: UnwrapRef
+ readonly useEventSource: UnwrapRef
+ readonly useEyeDropper: UnwrapRef
+ readonly useFavicon: UnwrapRef
+ readonly useFetch: UnwrapRef
+ readonly useFileDialog: UnwrapRef
+ readonly useFileSystemAccess: UnwrapRef
+ readonly useFocus: UnwrapRef
+ readonly useFocusWithin: UnwrapRef
+ readonly useFps: UnwrapRef
+ readonly useFullscreen: UnwrapRef
+ readonly useGamepad: UnwrapRef
+ readonly useGeolocation: UnwrapRef
+ readonly useHead: UnwrapRef
+ readonly useI18n: UnwrapRef
+ readonly useId: UnwrapRef
+ readonly useIdle: UnwrapRef
+ readonly useImage: UnwrapRef
+ readonly useInfiniteScroll: UnwrapRef
+ readonly useIntersectionObserver: UnwrapRef
+ readonly useInterval: UnwrapRef
+ readonly useIntervalFn: UnwrapRef
+ readonly useKeyModifier: UnwrapRef
+ readonly useLastChanged: UnwrapRef
+ readonly useLink: UnwrapRef
+ readonly useLocalStorage: UnwrapRef
+ readonly useMagicKeys: UnwrapRef
+ readonly useManualRefHistory: UnwrapRef
+ readonly useMediaControls: UnwrapRef
+ readonly useMediaQuery: UnwrapRef
+ readonly useMemoize: UnwrapRef
+ readonly useMemory: UnwrapRef
+ readonly useModel: UnwrapRef
+ readonly useMounted: UnwrapRef
+ readonly useMouse: UnwrapRef
+ readonly useMouseInElement: UnwrapRef
+ readonly useMousePressed: UnwrapRef
+ readonly useMutationObserver: UnwrapRef
+ readonly useNavigatorLanguage: UnwrapRef
+ readonly useNetwork: UnwrapRef
+ readonly useNow: UnwrapRef
+ readonly useObjectUrl: UnwrapRef
+ readonly useOffsetPagination: UnwrapRef
+ readonly useOnline: UnwrapRef
+ readonly usePageLeave: UnwrapRef
+ readonly useParallax: UnwrapRef
+ readonly useParentElement: UnwrapRef
+ readonly usePerformanceObserver: UnwrapRef
+ readonly usePermission: UnwrapRef
+ readonly usePointer: UnwrapRef
+ readonly usePointerLock: UnwrapRef
+ readonly usePointerSwipe: UnwrapRef
+ readonly usePreferredColorScheme: UnwrapRef
+ readonly usePreferredContrast: UnwrapRef
+ readonly usePreferredDark: UnwrapRef
+ readonly usePreferredLanguages: UnwrapRef
+ readonly usePreferredReducedMotion: UnwrapRef
+ readonly usePrevious: UnwrapRef
+ readonly useRafFn: UnwrapRef
+ readonly useRefHistory: UnwrapRef
+ readonly useResizeObserver: UnwrapRef
+ readonly useRoute: UnwrapRef
+ readonly useRouter: UnwrapRef
+ readonly useScreenOrientation: UnwrapRef
+ readonly useScreenSafeArea: UnwrapRef
+ readonly useScriptTag: UnwrapRef
+ readonly useScroll: UnwrapRef
+ readonly useScrollLock: UnwrapRef
+ readonly useSeoMeta: UnwrapRef
+ readonly useSessionStorage: UnwrapRef
+ readonly useShare: UnwrapRef
+ readonly useSlots: UnwrapRef
+ readonly useSorted: UnwrapRef
+ readonly useSpeechRecognition: UnwrapRef
+ readonly useSpeechSynthesis: UnwrapRef
+ readonly useStepper: UnwrapRef
+ readonly useStorage: UnwrapRef
+ readonly useStorageAsync: UnwrapRef
+ readonly useStyleTag: UnwrapRef
+ readonly useSupported: UnwrapRef
+ readonly useSwipe: UnwrapRef
+ readonly useTemplateRef: UnwrapRef
+ readonly useTemplateRefsList: UnwrapRef
+ readonly useTextDirection: UnwrapRef
+ readonly useTextSelection: UnwrapRef
+ readonly useTextareaAutosize: UnwrapRef
+ readonly useThrottle: UnwrapRef
+ readonly useThrottleFn: UnwrapRef
+ readonly useThrottledRefHistory: UnwrapRef
+ readonly useTimeAgo: UnwrapRef