Skip to content
laranailPublic

About

Every Unicode emoji as a fluent, typed PHP catalogue with conversion between every form.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

174 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laranail/emojis

Version Tests Static analysis License MIT

The version badge reads the GitHub tag: the family resolves through VCS repositories, not Packagist, so there is no registry listing to show.

Every Unicode emoji, and 7,000 special characters, as a fluent, typed PHP catalogue — render and convert between emoji, text, ASCII, emoticon, shortcode, image and escaped forms, for web and CLI, with a Laravel layer.

PHP ^8.4.1 || ^8.5. The core runs without booting Laravel; the Laravel layer targets Laravel ^13.0.

Install

Add the laranail VCS repositories to your root composer.json (see installation), then:

composer require laranail/emojis:^0.1

Blade and Livewire need nothing else: the built picker ships inside the Composer package. For the picker in your own JavaScript build, @laranail/emojis-picker (the vanilla picker and its React adapter) is published to GitHub Packages while npm publishing is blocked (npm/cli#9969). GitHub Packages asks for a token even for a public package, so add a GitHub token with read:packages to the project's .npmrc:

@laranail:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
npm install @laranail/emojis-picker@^0.9

The JavaScript package versions independently of the Composer package, which is why that constraint is not ^0.1. Registry versions are immutable, so a package cannot follow a tag that moves: 0.8.2 is the newest published build, and the Composer package's moving v0.1.0 does not publish a JavaScript version at all. The picker's code is the same in both.

See installing from GitHub Packages.

Quick start guide and usage

Getting started

The service provider and the Emojis facade are auto-discovered, so nothing is required. Publish the config only to change a default, then check the install:

php artisan vendor:publish --tag=laranail::emojis-config
php artisan laranail::package-tools.doctor

Usage

use Simtabi\Laranail\Emojis\Facades\Emojis;

Emojis::text('Ship it :rocket: :)')->withEmoticons()->toEmoji(); // "Ship it 🚀 🙂"
Emojis::text('Ship it 🚀')->toAscii();                          // "Ship it :rocket:"
Emojis::strip('Great work 🎉👏🏽');        // "Great work "
Emojis::search('cat');                    // 🐈 😹 😼 🐱 … ranked

The getting started guide walks through the rest; everything else is under Documentation.

Documentation

Hosted at https://opensource.simtabi.com/documentation/laranail/emojis/.

Guides

Reference

  • Catalogue and lookups — Emojis, Emoji, EmojiId, flags, skin tones
  • Querying and search — Query, ranked localized search
  • Text conversion — TextConverter, every option and inspection method
  • Emoticons — every ASCII smiley recognised, and the emoji it converts to
  • Emoji list — every emoji by group, with its name, shortcode and version
  • Images — image sets, fit (padding removal), a verified local copy, your own images, SVG sanitising
  • Symbols — 7,354 special characters: arrows, currency, maths, letters, hieroglyphs
  • Status tags — [OK], [WARN], [FAIL] and 75 more, the emoji each stands for, and Mode::Tag
  • Styles — the stylesheet: inline, link or @use the SCSS; tokens; the Vite build
  • Terminal output — Mode::Auto, width and truncation
  • Localisation — shipped locales and fallback
  • Kaomoji — text faces by group
  • Security and safety — sanitising hidden payloads, emoji policies
  • Japanese emoji — carrier emoji, the Japanese collection, names
  • Extending — custom emoji, shortcodes, emoticons, image sets, macros
  • Laravel integration — facade, helper, Blade, casts, rules, commands
  • Emoji picker — search, tabs, recents, skin tones and keyboard support, as Blade, Livewire, React or a plain ES module
  • HTTP API — nine read-only JSON endpoints, off by default: emoji, picker payload, symbols, kaomoji, tags
  • Data sources — where every field comes from, what we check against, the weekly refresh
  • Licences — the third-party data notices

Recipes

Contributing & security

See CONTRIBUTING.md. Report vulnerabilities privately to security@simtabi.com — see SECURITY.md.

License

MIT — see LICENSE. The generated data carries the Unicode, MIT and Apache-2.0 notices in docs/licences.md.

About

Every Unicode emoji as a fluent, typed PHP catalogue with conversion between every form.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages