{"id":15366824,"url":"https://github.com/ryota-ka/cycle-ink-driver","last_synced_at":"2025-04-15T12:31:21.130Z","repository":{"id":47771205,"uuid":"186125016","full_name":"ryota-ka/cycle-ink-driver","owner":"ryota-ka","description":"Ink driver for Cycle.js","archived":false,"fork":false,"pushed_at":"2024-10-10T16:59:13.000Z","size":89,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T20:12:05.848Z","etag":null,"topics":["cyclejs","ink"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/cycle-ink-driver","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryota-ka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-11T11:33:42.000Z","updated_at":"2024-10-10T16:59:10.000Z","dependencies_parsed_at":"2024-10-16T08:40:44.291Z","dependency_job_id":null,"html_url":"https://github.com/ryota-ka/cycle-ink-driver","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":0.07692307692307687,"last_synced_commit":"4d41ecc6850074363b008cde4ede8d3c4b728807"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryota-ka%2Fcycle-ink-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryota-ka%2Fcycle-ink-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryota-ka%2Fcycle-ink-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryota-ka%2Fcycle-ink-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryota-ka","download_url":"https://codeload.github.com/ryota-ka/cycle-ink-driver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248661496,"owners_count":21141449,"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":["cyclejs","ink"],"created_at":"2024-10-01T13:19:55.922Z","updated_at":"2025-04-15T12:31:21.110Z","avatar_url":"https://github.com/ryota-ka.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cycle-ink-driver\n\n[![npm](https://img.shields.io/npm/v/cycle-ink-driver.svg)](https://www.npmjs.com/package/cycle-ink-driver) [![CircleCI](https://circleci.com/gh/ryota-ka/cycle-ink-driver/tree/master.svg?style=shield)](https://circleci.com/gh/ryota-ka/cycle-ink-driver/tree/master)\n\n[Ink](https://github.com/vadimdemedes/ink) driver for [Cycle.js](https://cycle.js.org/)\n\n## Example\n\n```typescript\n/** @jsx createIncorporatedElement */\n\nimport { ReactSource } from '@cycle/react';\nimport { run } from '@cycle/run';\nimport { createIncorporatedElement, makeInkDriver } from 'cycle-ink-driver';\nimport { Box } from 'ink';\nimport TextInput from 'ink-text-input';\nimport { Stream } from 'xstream';\n\nconst sels = {\n  name: Symbol('name'),\n};\n\nfunction View({ name }: { name: string }): JSX.Element {\n  return (\n    \u003cBox flexDirection=\"column\"\u003e\n      \u003cBox\u003e\n        Name: \u003cTextInput sel={sels.name} value={name} onChange={() =\u003e {}} /\u003e\n      \u003c/Box\u003e\n      {'-'.repeat(20)}\n      \u003cBox\u003eHello {name}\u003c/Box\u003e\n    \u003c/Box\u003e\n  );\n}\n\nfunction main({ react }: { react: ReactSource }): { react: Stream\u003cJSX.Element\u003e } {\n  const name$ = react.select(sels.name).events('change').startWith('');\n\n  const view$ = name$.map((name) =\u003e View({ name }));\n\n  return {\n    react: view$,\n  };\n}\n\nconst drivers = {\n  react: makeInkDriver(),\n};\n\nrun(main, drivers);\n```\n\n![screencast](./docs/screencast.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryota-ka%2Fcycle-ink-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryota-ka%2Fcycle-ink-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryota-ka%2Fcycle-ink-driver/lists"}