open-index/open-npm huggingface dataset:
npm package: @smartface/extension-utils
Description: Utils Extension for Smartface Native Framework
Author: Smartface
Latest version: 17.0.0

# Utility Extension from Smartface

[![NPM](https://img.shields.io/npm/v/@smartface/extension-utils?style=flat-square)](https://www.npmjs.com/package/@smartface/extension-utils)
[![Twitter: @Smartface_io](https://img.shields.io/badge/contact-@Smartface_io-blue.svg?style=flat)](https://twitter.com/smartface_io)
[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://raw.githubusercontent.com/smartface/sf-extension-utils/master/LICENSE)

An extension that various utility modules for Smartface Native Framework. You can check the documentation here: https://smartface.github.io/sf-extension-utils/

## Installation

You add add utils via following command:

```shell
yarn add @smartface/extension-utils
```

## How to use

Smartface Utility Extension behaves like a normal npm package. You require/import the packages and you can use your Smartface Application on stereoids!

Later in any file, import it with the path: `import "@smartface/extension-utils/lib/<moduleName>"` Such as:

- `import "@smartface/extension-utils/lib/color"`
- `import "@smartface/extension-utils/lib/pdf"`

### Import their default or normal exports

Some modules will only have one export, so they will be having default export. Before using any module, read their documentation for more information.
Example of default import:

- `import Table from "@smartface/extension-utils/lib/table"`

However, some others will have different export types. You can import them like:

- `import { createAttributedTexts, createAttributedStrings } from "@smartface/extension-utils/lib/html-to-text"`

### API

For each module api documentation is in separate file. Please visit [Utility API Documentation](https://smartface.github.io/sf-extension-utils/).

## Release

Steps to do before release:

- Make sure that the version is appropiate to semver guidelines. Use e.g. `yarn version --minor` to change version.

To publish a new release, create a pull request or push directly to the master with new version. The script will publish it automatically.

## Need Help?

Please [submit an issue](https://github.com/smartface/sf-extension-utils/issues) on GitHub and provide information about your problem.

## Support & Documentation & Useful Links

- [Guides](https://docs.smartface.io/)
- [API Docs](http://ref.smartface.io/)

## Code of Conduct

We are committed to making participation in this project a harassment-free experience for everyone, regardless of the level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
Please read and follow our [Code of Conduct](./CODE_OF_CONDUCT.md).

## License

This project is licensed under the terms of the MIT license. See the [LICENSE](./LICENSE) file. Within the scope of this license, all modifications to the source code, regardless of the fact that it is used commercially or not, shall be committed as a contribution back to this repository.
npm package: @smartface/extension-zoomable-imageview
Description: ZoomableImageView component for Smartface Native Framework
Author: Smartface
Latest version: 4.0.1

# ZoomableImageView Extension from Smartface

[![NPM](https://img.shields.io/npm/v/@smartface/extension-zoomable-imageview?style=flat-square)](https://www.npmjs.com/package/@smartface/extension-zoomable-imageview)
[![Twitter: @Smartface_io](https://img.shields.io/badge/contact-@Smartface_io-blue.svg?style=flat)](https://twitter.com/smartface_io)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/smartface/sf-extension-amce/blob/master/LICENSE)

An extension to ImageView component with Smartface Native Framework.

## Installation

ZoomableImageView Extension can be installed via npm easily from our public npm repository. Execute the command on scripts directory:

```
yarn add @smartface/extension-zoomable-imageview
```

## How to use

1. Create ZoomableImageView object and add to your page layout as child view.

```javascript
import ZoomableImageView from "@smartface/extension-zoomable-imageview";

let myZoomableImageView = new ZoomableImageView({
  width: 250,
  height: 250,
  animated: true, //  Gets/sets animation while zooming
});
myZoomableImageView.image = "images://smartface.png";
myZoomableImageView.minumumZoomScale = 0;
myZoomableImageView.android.mediumZoomScale = 5;
myZoomableImageView.maximumZoomScale = 10;
myZoomableImageView.zoomScale = 1;

myPage.layout.addChild(myZoomableImageView);
```

## Android

Android uses third party to give zooming ablity credits on [PhotoView](https://github.com/chrisbanes/PhotoView)

## API Documentation

Full api documentation is in wiki of this repository

## Need Help?

Please [submit an issue](https://github.com/smartface/sf-extension-zoomable-imageview/issues) on GitHub and provide information about your problem.

## Support & Documentation & Useful Links

- [Guides](https://docs.smartface.io)
- [API Docs](http://ref.smartface.io)

## Code of Conduct

We are committed to making participation in this project a harassment-free experience for everyone, regardless of the level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
Please read and follow our [Code of Conduct](./CODE_OF_CONDUCT.md).

## License

This project is licensed under the terms of the MIT license. See the [LICENSE](./LICENSE) file. Within the scope of this license, all modifications to the source code, regardless of the fact that it is used commercially or not, shall be committed as a contribution back to this repository.
npm package: @smartface/i18n
Description: Powerful internationalization module for Smartface based on i18next
Author: Alim Öncül
Latest version: 5.1.7

[![Twitter: @Smartface_io](https://img.shields.io/badge/contact-@Smartface_io-blue.svg?style=flat)](https://twitter.com/smartface_io)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/smartface/smartface-modules/blob/main/packages/i18n/LICENSE)

# i18n

## Intro

This module implements multi language support for Smartface applications.

### Getting started

Create language files like below, for detailed instructions you can check out https://www.i18next.com/overview/getting-started#basic-sample

en.ts

```ts
export default {
  helloWorld: "Hello World",
  welcomeUser: "Welcome {{user}}",
  keyWithCount_one: "{{count}} key",
  keyWithCount_other: "{{count}} keys"
};
```

tr.ts

```ts
export default {
  helloWorld: "Merhaba Dünya",
  welcomeUser: "Hoşgeldin {{user}}",
  keyWithCount_one: "{{count}} anahtar",
  keyWithCount_other: "{{count}} anahtarlar"
};
```

Initialize i18n instance

```ts
import i18n from "@smartface/i18n";
import System from "@smartface/native/device/system"

import en from "./en";
import tr from "./tr";

new i18n({
  lng: Device.language,
  debug: System.isEmulator,
  resources: {
    en: {
      translation: en
    },
    tr: {
      translation: tr
    }
  },
  fallbackLng: "en"
  // many options available
  // https://www.i18next.com/overview/configuration-options
});

//You can get formatted string like this
i18n.instance.t("helloWorld");
i18n.instance.t("welcomeUser", { user: "Smartface" });
i18n.instance.t("keyWithCount", { count: 0 });
i18n.instance.t("keyWithCount", { count: 1 });
i18n.instance.t("keyWithCount", { count: 5 });

//Change the language without app reload, it updates the instance
i18n.changeLanguage("tr");

//subscribe to locale changes
const unsubscribe = i18n.on('change', () => {
  console.log("subscribe trigger");
});

//this will unsubscribe
unsubscribe();
```