{"id":21387509,"url":"https://github.com/nju33/hai","last_synced_at":"2025-07-31T13:40:26.664Z","repository":{"id":57131334,"uuid":"74877668","full_name":"nju33/hai","owner":"nju33","description":":hand: A small conversation library that happens at hand","archived":false,"fork":false,"pushed_at":"2017-03-18T07:04:35.000Z","size":5089,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-22T13:02:41.052Z","etag":null,"topics":["dialog","javascript","library"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@nju33/hai","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nju33.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-27T09:09:52.000Z","updated_at":"2023-04-11T15:19:33.000Z","dependencies_parsed_at":"2022-08-31T00:01:45.670Z","dependency_job_id":null,"html_url":"https://github.com/nju33/hai","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nju33%2Fhai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nju33%2Fhai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nju33%2Fhai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nju33%2Fhai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nju33","download_url":"https://codeload.github.com/nju33/hai/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235119470,"owners_count":18938810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dialog","javascript","library"],"created_at":"2024-11-22T12:13:25.236Z","updated_at":"2025-01-23T00:14:34.175Z","avatar_url":"https://github.com/nju33.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e\u003cimg src=\"https://github.com/nju33/hai/blob/master/images/icon_32x32@2x.png?raw=true\" width=30\u003e\u0026nbsp;Hai\u003c/h1\u003e\n\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo) [![Build Status](https://travis-ci.org/nju33/hai.svg?branch=master)](https://travis-ci.org/nju33/hai) ![Dependencies Status](https://david-dm.org/nju33/hai.svg)\n\n✋ A small conversation library that happens at hand\n\n\u003cimg src=\"https://github.com/nju33/hai/raw/master/screenshot.gif?raw=true\" alt=\"Hai\" width=\"300\"\u003e\n\n## Install, or Download\n\n### npm\n\n```sh\n$ npm i -S @nju33/hai\n```\n\n### yarn\n\n```sh\n$ yarn add @nju33/hai\n```\n\n### bower\n\n```sh\n$ bower i -S hai\n```\n\n### Download\n\nAccess to [releases page](https://github.com/nju33/hai/releases).\nThen, download the latest version.\n\n## Usage\n\n### Bandler\n\n\u003e (e.g.) webpack, browserify, rollup...\n\n```js\n// es\nimport Hai from '@nju33/hai';\n// common\nconst Hai = require('@nju33/hai');\n```\n\n### Browser\n\n```html\n\u003cscript src=\"/path/to/hai.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e// Your JS code.\u003c/script\u003e\n```\n\n## API\n\n### `hai = new Hai(talks)`\n\nCreate an instance of Hai that Contains information about talk elements or callbacks. It can be used by passing it to openWith.\n\n### `Hai.config`\n\n### `Hai.config.theme`\n\nDark(default) or light.\n\n#### `talk.name`\n\nUse for prefix of callback name.\n\n#### `talk.message`\n\nWhat I'd like to talk about here.\n\n#### `talk.convenient`\n\n##### `talk.convenient.type`\n\nVarious types. (e.g. `text`, `input`, `radio`, `checkbox`)  \nNote that property values that you have to pass depend on type change\n\n###### `type: text`\n\nPlease write the text you want displayed in the `text` property. This is used when you want to display longer text.\n\n###### `type: radio` or `type: checkbox`\n\nPlease write the text you want displayed in the `items` property. Use this if you want to give the client choices.\n\nThis is the only difference.\n\n- `radio`  \n  Select only one.\n- `checkbox`  \n  Multiple selection.\n\nTODO....\n\n##### `type: input`\n\nTODO...\n\n#### `hai.open`\n\nTODO...\n\n`hai.open.then(answers =\u003e ...)`;\n\n## Related\n\n- [vue-hai](https://github.com/nju33/vue-hai)\n- [react-hai](https://github.com/nju33/react-hai)\n\n## LICENSE\n\nThe MIT License (MIT)\n\nCopyright (c) 2016 nju33\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnju33%2Fhai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnju33%2Fhai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnju33%2Fhai/lists"}