# meas-ui

> Measure UI for making PSD/SVG/HTML to be measurable

Latest version **0.5.2** (published 2018-09-26) · 0 weekly downloads

## Install

```sh
npm install meas-ui
pnpm add meas-ui
yarn add meas-ui
bun add meas-ui
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.2 |
| Published | 2018-09-26 |
| First published | 2018-09-17 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 16 |
| Unpacked size | 3.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | moyuyc |

## Links

- npm: https://www.npmjs.com/package/meas-ui
- npm.io page: https://npm.io/package/meas-ui

## Dependencies (16)

- [color](https://npm.io/package/color.md) ^3.0.0
- [zepto](https://npm.io/package/zepto.md) ^1.2.0
- [history](https://npm.io/package/history.md) ^4.7.2
- [prismjs](https://npm.io/package/prismjs.md) ^1.15.0
- [slugify](https://npm.io/package/slugify.md) ^1.3.1
- [tiny-i18n](https://npm.io/package/tiny-i18n.md) ^1.1.2
- [lodash.some](https://npm.io/package/lodash.some.md) ^4.6.0
- [rc-checkbox](https://npm.io/package/rc-checkbox.md) ^2.1.5
- [react-prism](https://npm.io/package/react-prism.md) ^4.3.2
- [html-measure](https://npm.io/package/html-measure.md) ^0.5.1
- [react-select](https://npm.io/package/react-select.md) ^2.0.0
- [worker-loader](https://npm.io/package/worker-loader.md) ^2.0.0
- [@moyuyc/psd-html](https://npm.io/package/@moyuyc/psd-html.md) ^0.5.2
- [lodash.kebabcase](https://npm.io/package/lodash.kebabcase.md) ^4.1.1
- [prefix-classname](https://npm.io/package/prefix-classname.md) ^1.0.1
- [@rcp/util.createmount](https://npm.io/package/@rcp/util.createmount.md) ^1.0.9

## Recent versions

- 0.5.2 (latest) — 2018-09-26
- 0.5.1 — 2018-09-24
- 0.4.2 — 2018-09-20
- 0.4.1 — 2018-09-20
- 0.3.4 — 2018-09-18
- 0.3.3 — 2018-09-18
- 0.3.2 — 2018-09-18
- 0.3.1 — 2018-09-18
- 0.3.0 — 2018-09-18
- 0.2.16 — 2018-09-18
- 0.2.15 — 2018-09-17
- 0.2.14 — 2018-09-17
- 0.2.13 — 2018-09-17
- 0.2.12 — 2018-09-17
- 0.2.9 — 2018-09-17
- … 3 more at https://npm.io/package/meas-ui/versions

## README

# meas-ui

[![NPM version](https://img.shields.io/npm/v/meas-ui.svg?style=flat-square)](https://www.npmjs.com/package/meas-ui)
[![NPM Downloads](https://img.shields.io/npm/dm/meas-ui.svg?style=flat-square&maxAge=43200)](https://www.npmjs.com/package/meas-ui)

> Measure UI for making PSD/SVG/HTML to be measurable

[Demo](https://imcuttle.github.io/measure)

![](https://i.loli.net/2018/09/24/5ba8ae0a7e1e7.png)

## Installation

```bash
npm install meas-ui react react-dom mobx@3 mobx-react@4 react-mobx-vm@^0.2.0
# or use yarn
yarn add meas-ui react react-dom mobx@3 mobx-react@4 react-mobx-vm@^0.2.0
```

## Usage

```javascript
// Commonjs
import MeasureUI from 'meas-ui'
// Umd (react / react / mobx / mobx-react / react-mobx-vm are packed)
import MeasureUI from 'meas-ui/dist/meas-ui.umd'
import 'meas-ui/dist/style.css'

MeasureUI.render(
  {
    pages: [
      {
        key: 'psd', // url
        title: 'My PSD',
        html: '<div>My PSD</div>' // or an async or a sync function that resolved html string
      }
    ],
    language: 'zh' // 'zh' or 'en'
  },
  window.root,
  () => {
    console.log('rendered')
  }
)
```

### Enable psd importing

- Import button supports psd file
- Drag file supports psd

![](https://i.loli.net/2018/09/24/5ba8aff4ab284.png)

- commonjs (webpack)
  ```bash
  npm install @moyuyc/psd-html
  ```

- umd
  ```html
  <html>
    <head>
      <script src="//unpkg.com/@moyuyc/psd-html"></script>
      <script src="//unpkg.com/meas-ui"></script>
    </head>
    <body>
      <script>
        MeasureUI.render(/* ... */)
      </script>
    </body>
  </html>
  ```

## Todo

- [ ] - zoom style has bug on firefox.

## Related

- [html-measure](../html-measure) - Pure measurable interaction written by React

## Authors

This library is written and maintained by imcuttle, [moyuyc95@gmail.com](mailto:moyuyc95@gmail.com).

## License

MIT

---
_Source: https://npm.io/package/meas-ui · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
