New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ember-aviary

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-aviary

Ember addon to use the Aviary SDK.

  • 0.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by100%
Maintainers
2
Weekly downloads
 
Created
Source

ember-aviary

Build Status Ember Observer Score

ember-aviary is an easy way to add Aviary's web widget (feather) to your ember-cli project. The goal is to encapsulate everything in a simple Ember component. We welcome contributions!

For full documentation on Aviary's feather editor, see: https://developers.aviary.com/docs/web/setup-guide

Installation

npm install --save-dev ember-aviary

ember g ember-aviary

Setup

An Aviary api key is required to save images. You can set the api key in one of 3 ways:

  1. Set an AVIARY_API_KEY on ENV in config/environment. The ember-cli-dotenv addon is a safe and easy way to do this.

  2. A metatag of the form: <meta property="aviary:api_key" content="[AVIARY_API_KEY]" />

  3. Set a global AVIARY_API_KEY.

Usage

You can simply use the component helper in a template like so:

{{aviary-editor url=url image=image onSave="onSave" closeOnSave=closeOnSave}}

The only required inputs for the component are:

  • image or imageSelector - either the image element to be edited or its ID. (ie: get after the DOM has been loaded with $.('img'))
  • url - this is only required if the image to be edited is on a different host than the HTML page.

Optional inputs:

  • onSave - is a call back you can pass in as an action.
  • closeOnSave - boolean to close editing modal upon save. Defaults to false.
  • fileFormat - string that sets the file format that Aviary returns. Defaults to 'jpg'. Accepts 'png' or 'jpg'.

Forced crop presets force user into crop tool when editor is launched.

  • forceCropPresetLabel - string that sets the head text.
  • forceCropPresetSize - string which should be a ratio '2:1' or dimension '300x250' the image being edited will be cropped.
  • forceCropMessage - string with custom message for users above crop preset label.
  • tools - array to include editor tools for user to display. Defaults to 'all'.

If your project uses scss, you can load the default style and icon by adding:

@import 'ember-aviary';

Development Installation

  • git clone this repository
  • npm install
  • bower install

Running

Running Tests

  • ember test
  • ember test --server

Building

TODO

  • Add complete tests and dummy app.
  • Allow passing more options into the aviary-editor component based on all the capabilities of Aviary's API.

Contributors

Thanks to Plyfe for sponsoring initial development and open-sourcing. ember-aviary authors include: Danielle Adams, Ken Sin, Manolo Familia.

Keywords

FAQs

Package last updated on 21 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc