{"id":24379712,"url":"https://github.com/y-js/y-element","last_synced_at":"2025-10-29T03:45:15.347Z","repository":{"id":58228972,"uuid":"70156012","full_name":"y-js/y-element","owner":"y-js","description":"Polymer Web Component for sharing data with Yjs","archived":false,"fork":false,"pushed_at":"2017-06-21T14:10:18.000Z","size":5571,"stargazers_count":9,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-12T17:16:18.371Z","etag":null,"topics":["polymer","yjs"],"latest_commit_sha":null,"homepage":"http://y-js.org/y-element/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/y-js.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-06T13:22:02.000Z","updated_at":"2019-10-19T00:17:25.000Z","dependencies_parsed_at":"2022-08-31T09:20:44.046Z","dependency_job_id":null,"html_url":"https://github.com/y-js/y-element","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/y-js/y-element","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-js%2Fy-element","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-js%2Fy-element/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-js%2Fy-element/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-js%2Fy-element/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/y-js","download_url":"https://codeload.github.com/y-js/y-element/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-js%2Fy-element/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265042128,"owners_count":23702455,"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":["polymer","yjs"],"created_at":"2025-01-19T07:18:53.219Z","updated_at":"2025-10-29T03:45:10.302Z","avatar_url":"https://github.com/y-js.png","language":"HTML","readme":"# \\\u003cy-element\\\u003e\n\n\u003e Polymer Web Component for sharing data with [Yjs](https://github.com/y-js/yjs/). Perform data-binding on shared data!\n\n[Read the docs](http://y-js.org/y-element/) to get started!\n\nThis repository contains four elements:\n\n* [y-element](//y-js.org/y-element/components/y-element/#y-element) - Configures the database and connector information\n* [y-map](//y-js.org/y-element/components/y-element/#y-map) - Creates a map type. It exports the data as a shared javascript object\n* [y-array](//y-js.org/y-element/components/y-element/#y-array) - Creates an array type. It exports the data as a shared javascript array\n* [y-type](//y-js.org/y-element/components/y-element/#y-type) - Configuration for any Yjs type. It exports the Yjs type\n\n\n##### Simple Yjs example in Javascript\n```\nY({\n  db: {\n    name: 'memory'\n  },\n  connector: {\n    name: 'websockets-client',\n    room: 'example'\n  },\n  share: {\n    map: 'Map'\n  }\n}).then(function (y) {\n  y.share.map // is the shared map type\n})\n```\n\n##### Same example in Polymer\n```\n\u003cy-element\n  db-name=\"memory\"\n  connector-name=\"websockets-client\"\n  connector-room=\"example\"\u003e\n  \u003cy-map name=\"map\" data=\"{{myMap}}\"\u003e\u003c/y-map\u003e\n\u003c/y-element\u003e\n```\n\n### Before you start\nBefore you start remember to install all y-* modules you want to use.\nIn particular you need to install a connector (e.g. `y-websockets-client`), and\na database adapter (e.g. `y-memory`).\n\n```\nbower i --save y-element yjs y-map y-array y-memory y-websockets-client\n```\n\n\u0026lt;y-element\u0026gt;@\u003e2.0.0 no longer supports automatic module finding. You need to explicitly include all y-* modules!\n\n```html\n\u003cscript src=\"../bower_components/yjs/y.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"../bower_components/y-map/y-map.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"../bower_components/y-array/y-array.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"../bower_components/y-memory/y-memory.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"../bower_components/y-websockets-client/y-websockets-client.js\"\u003e\u003c/script\u003e\n\n\u003clink rel=\"import\" href=\"../bower_components/y-element/y-element.html\"\u003e\n```\n\n## Contribute\nIssues and Pull requests are very much welcome. If you want to help out you can also contribute to the docs ;) This project was build with [Polymer CLI](https://www.npmjs.com/package/polymer-cli) v0.16. Make sure the tests are still running ;)\n\n## License\ny-element is licensed under the [MIT License](./LICENSE).\n\n\u003cyjs@dbis.rwth-aachen.de\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fy-js%2Fy-element","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fy-js%2Fy-element","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fy-js%2Fy-element/lists"}