Skip to content

Commit

Permalink
Merge pull request #52 from joypixels/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
caseyahenson authored Oct 12, 2022
2 parents 21e8a88 + f82d6dc commit 386935f
Show file tree
Hide file tree
Showing 65 changed files with 21,083 additions and 13,651 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
.idea
.idea/
/.idea/
vendor/
composer.lock
node_modules/
/node_modules/
node_modules
package-lock.json
.sass-cache
lib/js/tests.html
*.pyc
Expand Down
10 changes: 2 additions & 8 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
We've teamed up with [JSDelivr](https://www.npmjs.com/settings/joypixels/packages) to provide a simple way to install these emoji on any javascript-enabled website. Add the following script and stylesheet links to the head of your webpage:

```
<script src="https://cdn.jsdelivr.net/npm/emoji-toolkit@6.6.0/lib/js/joypixels.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/emoji-toolkit@6.6.0/extras/css/joypixels.min.css"/>
<script src="https://cdn.jsdelivr.net/npm/emoji-toolkit@7.0.0/lib/js/joypixels.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/emoji-toolkit@7.0.0/extras/css/joypixels.min.css"/>
```

Quick installs can also be done using NPM and Bower (for the Javascript toolkit) or Composer (for the PHP toolkit). **If you wish to serve image assets locally you'll need to install [emoji-assets](https://www.github.com/joypixels/emoji-assets) and include the pngs and/or sprites into your project.** Many of our [demos](https://demos.joypixels.com/latest/) use assets locally simply by pointing the `imagePathPNG` variable to your local asset location.
Expand All @@ -14,12 +14,6 @@ Quick installs can also be done using NPM and Bower (for the Javascript toolkit)
> npm install emoji-toolkit
```

#### Bower
```
> bower install emoji-toolkit
```


#### Composer
```
$ composer require joypixels/emoji-toolkit
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,22 @@ A set of libraries to help users find and replace native system emojis with JoyP
- All libraries included here are available free under the MIT license.


## License to Use JoyPixels Images
## License to Use JoyPixels Images

### JoyPixels Version 4+
JoyPixels Version 4+ is available under the same licensing structure as Version 3. Please see below for more details.
JoyPixels Version 4+ is available under the same licensing structure as Version 3. Please see below for more details.

### JoyPixels Version 3+

JoyPixels launched version 3.0 in 2017, which has several licensing options available. PNG 32px, 64px, and 128px as well as 32px and 64px sprites are available for digital use, with attribution. See [https://www.joypixels.com/licenses/free](https://www.joypixels.com/licenses/free) for more information on usage and attribution requirements.
*Premium Licenses are available for larger PNG assets and SVG assets, for digital and print use (within budget constraints).* See [https://www.joypixels.com/licenses/premium](https://www.joypixels.com/licenses/premium) for more information or to obtain a Premium License.
JoyPixels launched version 3.0 in 2017, which has several licensing options available. PNG 32px, 64px, and 128px as well as 32px and 64px sprites are available for digital use, with attribution. See [https://www.joypixels.com/licenses/free](https://www.joypixels.com/licenses/free) for more information on usage and attribution requirements.

*Premium Licenses are available for larger PNG assets and SVG assets, for digital and print use (within budget constraints).* See [https://www.joypixels.com/licenses/premium](https://www.joypixels.com/licenses/premium) for more information or to obtain a Premium License.

For product/retail licensing, see our Enterprise License [https://www.joypixels.com/licenses/enterprise](https://www.joypixels.com/licenses/enterprise).
For product/retail licensing, see our Enterprise License [https://www.joypixels.com/licenses/enterprise](https://www.joypixels.com/licenses/enterprise).

### JoyPixels Version 2
### JoyPixels Version 2

JoyPixels version 2 is no longer supported or distributed. Please see [UPGRADE.md](UPGRADE.md) for instructions on upgrading from version 2 to version 3. Version 2 was bound by the [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).

JoyPixels version 2 is no longer supported or distributed. Please see [UPGRADE.md](UPGRADE.md) for instructions on upgrading from version 2 to version 3. Version 2 was bound by the [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).

## Installation
To install the JoyPixels/emoji-toolkit, please refer to the guide at [INSTALLATION.md](INSTALLATION.md). **Version 3 introduces many potentially-breaking changes.** Refer to the [UPGRADE.md](UPGRADE.md) documentation for more details.
Expand All @@ -43,6 +42,8 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md) for more info on contributing to t
## Usage
You'll find basic usage examples here in the [/examples/](examples/) directory, and links to usage demos in [USAGE.md](USAGE.md).

## Change Log
See the [releases page](https://github.com/joypixels/emoji-toolkit/releases) for information on what's new in the latest release.

## Information

Expand Down
26 changes: 2 additions & 24 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@

Both PHP and JavaScript libraries now have wider range of available properties. The following are available for both libraries.

- `emojiVersion` (str) - Used only to direct CDN path. This is a 2-digit version (e.g. '6.6'). Not recommended for usage below 3.0.0.
- `emojiVersion` (str) - Used only to direct CDN path. This is a 2-digit version (e.g. '7.0'). Not recommended for usage below 3.0.0.
- `emojiSize` (str) **Default: `32`** - Used only to direct CDN path for non-sprite PNG usage. Available options are '32', '64', and '128'.
- `imagePathPNG` (str) - Defaults to CDN (jsdelivr) path. Setting as alternate path overwrites `emojiSize` option.
- `fileExtension` (str) - Defaults to .png. Set to '.svg' if using premium assets (.svg) locally.
- `greedyMatch` (bool) **Default: `false`** - When `true`, matches non-fully-qualified Unicode values.
- `blacklistChars` (str) **Default: `''`** - Comma-separated list of characters that should not be replaced. For example, setting to `'#,*'` ensures pound and asterisk symbols are not replaced.
- `imageTitleTag` (bool) **Default: `true`** - When `false`, removes title attribute from <img> tag.
- `sprites` (bool) **Default: `false`** - When `true`, sprite markup will be used. Sprite CSS and PNG assets must be additionally included.
- `spriteSize` (str) **Default `32`** - Alternate size is `64`.
- `unicodeAlt` (bool) **Default `false`** - When `true`, sets unicode char as alt attribute for ability to copy image as unicode.
- `ascii` (bool) **Default `false`** - When `true`, matches ASCII characters (in `unicodeToImage` and `shortnameToImage` functions).
- `ascii` (bool) **Default `false`** - When `true`, matches ASCII characters (in `shortnameToImage` functions).
- `riskyMatchAscii` (bool) **Default `false`** - When `true`, matches ASCII characters not encapsulated by spaces. Can cause issues when matching (e.g. `C://filepath` or `<button>.</button>` both contain ASCII chars).


Expand All @@ -41,8 +40,6 @@ This demo shows you how to take input containing both native unicode emoji and s

### PHP Conversion

##### As of version 1.4.1 this library syntax has changed.

**[toShort\($str\)](https://demos.joypixels.com/latest/phptoshort.php)** - _native unicode -> shortnames_

This demo shows you how to take native unicode emoji input, such as that from your mobile device, and translate it to their corresponding shortnames. (we recommend this for database storage)
Expand All @@ -55,25 +52,6 @@ This demo shows you how to take input containing only shortnames and translate i

This demo shows you how to take input containing both native unicode emoji and shortnames, and translate it into JoyPixels images for display.


##### Note: As of version 1.4.1 the following implementation has been deprecated. It's included in the library for backwards compatibility but will be removed at a later date.

**[::toShort\($str\)](https://demos.joypixels.com/1.4.0/phptoshort.php)** - _native unicode -> shortnames_

This demo shows you how to take native unicode emoji input, such as that from your mobile device, and translate it to their corresponding shortnames. (we recommend this for database storage)

**[::shortnameToImage\($str\)](https://demos.joypixels.com/1.4.0/phpshortnametoimage.php)** - _shortname -> images_

This demo shows you how to take input containing only shortnames and translate it directly to JoyPixels images. (when displaying the unified input to clients)

**[::unicodeToImage\($str\)](https://demos.joypixels.com/1.4.0/phpunicodetoimage.php)** - _native unicode -> images_

This demo shows you how to take native unicode emoji input, such as that from your mobile device, and translate it directly to JoyPixels images. (would be great for a live editor preview)

**[::toImage\($str\)](https://demos.joypixels.com/1.4.0/phptoimage.php)** - _native unicode + shortnames -> images (mixed input)_

This demo shows you how to take input containing both native unicode emoji and shortnames, and translate it into JoyPixels images for display.

### Meteor Conversion

#### Template helpers
Expand Down
30 changes: 0 additions & 30 deletions bower.json

This file was deleted.

5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
},
"require-dev": {
"ext-intl": "*",
"phpunit/phpunit": "~4.6 || ~5.0",
"phpunit/phpunit": "^9.5",
"s9e/regexp-builder": "^2.0"
},
"scripts": {
"generate-regex": "php lib/php/utils/generateRegex.php"
"generate-regex": "php lib/php/utils/generateRegex.php",
"tests": "phpunit -c lib/php/phpunit.xml.dist"
}
}
2 changes: 1 addition & 1 deletion emoji.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion emoji_strategy.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions examples/OTHER.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions examples/PHP.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ If you've chosen to unify your inputted text so that it contains only shortnames
namespace JoyPixels;

// include the PHP library (if not autoloaded)
require('./../lib/php/autoload.php');
require __DIR__ . '/lib/php/autoload.php';

$client = new Client(new Ruleset());

Expand All @@ -36,14 +36,14 @@ if(isset($_POST['inputText'])) {
## toImage($str)
*Convert Native Unicode Emoji and Shortnames Directly to Images*

This function is simply a shorthand for **unicodeToImage($str)** and **shortnameToImage($str)**. First it will convert native unicode emoji directly to images and then convert any shortnames to images. This function can be useful to take mixed input and convert it directly to images if, for example, you have native unicode emoji stored in your database alongside shortnames.
This function is simply a shorthand for **shortnameToImage($str)**. First it will convert native unicode emoji directly to images and then convert any shortnames to images. This function can be useful to take mixed input and convert it directly to images if, for example, you have native unicode emoji stored in your database alongside shortnames.

**PHP Snippet**
```php
namespace JoyPixels;

// include the PHP library (if not autoloaded)
require('./../lib/php/autoload.php');
require __DIR__ . '/lib/php/autoload.php';

$client = new Client(new Ruleset());

Expand All @@ -70,7 +70,7 @@ Our recommendation is to unify all user inputted text by converting native unico
namespace JoyPixels;

// include the PHP library (if not autoloaded)
require('./../lib/php/autoload.php');
require __DIR__ . '/lib/php/autoload.php';

$client = new Client(new Ruleset());

Expand All @@ -91,7 +91,7 @@ If you'd like to convert shortnames back to native unicode emoji characters, you
namespace JoyPixels;

// include the PHP library (if not autoloaded)
require('./../lib/php/autoload.php');
require __DIR__ . '/lib/php/autoload.php';

$client = new Client(new Ruleset());

Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

To assist you in getting started with JoyPixels in your project, we've included examples of our core functionalities; primarily Javascript and PHP. Specific examples for other libraries like iOS and Android may be available within their library roots directories.

*See JAVASCIPT.md, PHP.md, and OTHER.md documents within this directory.*
*See JAVASCRIPT.md, PHP.md, and OTHER.md documents within this directory.*

----------

Expand Down
Loading

0 comments on commit 386935f

Please sign in to comment.