{"id":21458124,"url":"https://github.com/iofod/iofod-sdk","last_synced_at":"2025-07-15T01:31:05.822Z","repository":{"id":46583467,"uuid":"515418643","full_name":"iofod/iofod-sdk","owner":"iofod","description":"The iofod SDK provides developers with the ability to interact with the main iofod interface within the Web worker, enabling rapid development of iofod extensions through the SDK.","archived":false,"fork":false,"pushed_at":"2022-11-10T10:46:47.000Z","size":309,"stargazers_count":49,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T19:11:32.518Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iofod.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":"2022-07-19T03:17:18.000Z","updated_at":"2024-01-04T17:10:27.000Z","dependencies_parsed_at":"2023-01-22T13:16:21.014Z","dependency_job_id":null,"html_url":"https://github.com/iofod/iofod-sdk","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/iofod/iofod-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iofod%2Fiofod-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iofod%2Fiofod-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iofod%2Fiofod-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iofod%2Fiofod-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iofod","download_url":"https://codeload.github.com/iofod/iofod-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iofod%2Fiofod-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265385755,"owners_count":23756728,"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":[],"created_at":"2024-11-23T06:17:49.993Z","updated_at":"2025-07-15T01:31:05.498Z","avatar_url":"https://github.com/iofod.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iofod-sdk\n\nEnglish | [简体中文](./README_CN.md)\n\n[![Version](https://img.shields.io/github/package-json/v/iofod/iofod-sdk)](https://github.com/iofod/iofod-sdk/)\n[![NPM](https://img.shields.io/npm/v/iofod-sdk)](https://www.npmjs.com/package/iofod-sdk)\n[![Build Status](https://img.shields.io/github/workflow/status/iofod/iofod-sdk/build)](https://github.com/iofod/iofod-sdk/actions)\n[![License](https://img.shields.io/github/license/iofod/iofod-sdk)](https://github.com/iofod/iofod-sdk/blob/main/LICENSE.md)\n\nThe iofod SDK provides developers with the ability to interact with the main iofod interface within the Web worker, enabling rapid development of iofod extensions through the SDK. For detailed documentation please refer to: [Extension SDK](https://doc.iofod.com/#/en/9/02).\n\n## Development Preparation\n\nWe recommend using Node.js v16.15.0 for iofod extension development, which is the version we currently use for almost all of our extensions.\n\n### Installation\n\nyarn installation.\n\n```bash\nyarn add iofod-sdk -D\n```\n\nnpm install.\n\n```bash\nnpm install iofod-sdk -D\n```\n\n### Use\n\nIn a formal environment, the developer does not need to introduce additional SDK files, the expansion is automatically executed during initialization in iofod by loading the SDK and mounting it on the global variable PLUS.\n\nLocal development and debugging is recommended to use the SDK in this way:\n\n```js\nimport * as PLUS from 'iofod-sdk'\n```\n\n## Sample extensions\n\nAll extensions should have an initialisation entry **main** function, where the SDK initialisation and extension interface rendering is performed in the **main** function body.\n\nFor Example:\n\n```js\nexport async function main() {\n  await PLUS.init({\n    state: { ... },\n    version: '1.0.0'\n  });\n\n  await PLUS.render([...]);\n}\n```\n\n## Extension built-in components\n\nThe interface of the iofod extension is drawn and the extension interacts with the user via extension components. This can be found in the [Instructions for use](https://doc.iofod.com/#/en/9/03)\n\nBy combining the extension SDK and the built-in components, it is easy to develop an extension that takes advantage of the extension capabilities within iofod to provide more customisation and explore more possibilities for the project.\n\nFor Example:\n\n```js\nconst { Button } = PLUS.components\n\nexport async function main() {\n  await PLUS.init({\n    state: {\n      msg: 'click me!',\n      showMsg: false,\n    },\n    version: '1.0.0',\n  })\n\n  await PLUS.render([\n    Button('$msg', 'clickBinding'),\n    Text({\n      render: '$showMsg',\n      value: 'QAQ',\n    }),\n  ])\n}\n\nexport async function clickBinding(e) {\n  console.log(e)\n\n  PLUS.setState({\n    showMsg: true,\n  })\n}\n```\n\n## more\n\nFor more content, please read the [official documentation](https://doc.iofod.com/#/en/9/01) for more information. Templates and examples can be found in the official [Open Source Library](https://github.com/iofod/iofod-extensions).\n\n## License\n\n[BSD 3-Clause](https://github.com/iofod/iofod-sdk/blob/main/LICENSE.md)\n\nCopyright (c) 2022-present, iofod.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiofod%2Fiofod-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiofod%2Fiofod-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiofod%2Fiofod-sdk/lists"}