{"id":19217539,"url":"https://github.com/qq15725/vue-crdt","last_synced_at":"2025-05-13T00:10:21.882Z","repository":{"id":215043817,"uuid":"736127336","full_name":"qq15725/vue-crdt","owner":"qq15725","description":"CRDT in Vue.js","archived":false,"fork":false,"pushed_at":"2024-01-02T07:24:18.000Z","size":36,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-30T08:11:45.510Z","etag":null,"topics":["crdt","vue","yjs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/qq15725.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2023-12-27T04:06:40.000Z","updated_at":"2024-12-20T05:42:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"2cee269e-9181-4def-a3f1-5ef1c8c97f5b","html_url":"https://github.com/qq15725/vue-crdt","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"babb40ee58f8e0a5f268e520f0ee3f596b489621"},"previous_names":["qq15725/vue-crdt"],"tags_count":1,"template":false,"template_full_name":"qq15725/starter-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq15725%2Fvue-crdt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq15725%2Fvue-crdt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq15725%2Fvue-crdt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq15725%2Fvue-crdt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qq15725","download_url":"https://codeload.github.com/qq15725/vue-crdt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252299591,"owners_count":21725727,"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":["crdt","vue","yjs"],"created_at":"2024-11-09T14:22:43.769Z","updated_at":"2025-05-13T00:10:21.844Z","avatar_url":"https://github.com/qq15725.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eVue CRDT\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://unpkg.com/vue-crdt\"\u003e\n    \u003cimg src=\"https://img.shields.io/bundlephobia/minzip/vue-crdt\" alt=\"Minzip\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/vue-crdt\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/vue-crdt.svg\" alt=\"Version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/vue-crdt\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dm/vue-crdt\" alt=\"Downloads\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/qq15725/vue-crdt/issues\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/issues/qq15725/vue-crdt\" alt=\"Issues\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/qq15725/vue-crdt/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/l/vue-crdt.svg\" alt=\"License\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## 📦 Install\n\n```shell\nnpm i vue-crdt\n\n// peerDependencies\nnpm i yjs\n```\n\n\n## 🦄 Usage\n\n```ts\nimport { reactive, ref } from 'vue'\nimport { defineStore, useHistory } from 'vue-crdt'\n\nconst useEditorStore = defineStore(doc =\u003e {\n  // use y-webrtc\n  //\n  // new WebrtcProvider(\n  //  'your-room-name',\n  //  doc,\n  //  { password: 'optional-room-password' },\n  // )\n\n  return {\n    workspace: reactive({\n      pages: { a: 'b' },\n      activePage: null,\n    }),\n    width: ref(800),\n    height: ref(600),\n  }\n})\n\nconst { workspace, width, height } = useEditorStore()\n\nconst history = useHistory(workspace)\n\nworkspace.activePage = 123\nhistory.stopCapturing()\nworkspace.activePage = 456\nhistory.undo()\n\nconsole.log(workspace)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqq15725%2Fvue-crdt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqq15725%2Fvue-crdt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqq15725%2Fvue-crdt/lists"}