{"id":18187770,"url":"https://github.com/websvg/deep-svg","last_synced_at":"2025-07-22T16:06:10.536Z","repository":{"id":57375471,"uuid":"244010587","full_name":"WebSVG/deep-svg","owner":"WebSVG","description":"Vanilla javascript and Web Component wrapper to make any svg zoom pan and deep link","archived":false,"fork":false,"pushed_at":"2023-03-18T17:18:47.000Z","size":608,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-04T15:11:37.993Z","etag":null,"topics":["mouse","pan","shadow-dom","svg","svg-animation","svg-filter-animation","svg-filters","vanilla-javascript-library","web-component","zoom"],"latest_commit_sha":null,"homepage":"https://websvg.github.io/deep-svg/","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/WebSVG.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-29T17:23:53.000Z","updated_at":"2023-07-15T18:23:16.000Z","dependencies_parsed_at":"2024-11-03T02:03:18.233Z","dependency_job_id":"e055bda6-2ecc-49ed-b620-d2207c26a6e8","html_url":"https://github.com/WebSVG/deep-svg","commit_stats":null,"previous_names":["networkgraphs/deep-svg"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WebSVG/deep-svg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebSVG%2Fdeep-svg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebSVG%2Fdeep-svg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebSVG%2Fdeep-svg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebSVG%2Fdeep-svg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebSVG","download_url":"https://codeload.github.com/WebSVG/deep-svg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebSVG%2Fdeep-svg/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266524893,"owners_count":23942834,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["mouse","pan","shadow-dom","svg","svg-animation","svg-filter-animation","svg-filters","vanilla-javascript-library","web-component","zoom"],"created_at":"2024-11-03T02:03:14.659Z","updated_at":"2025-07-22T16:06:10.483Z","avatar_url":"https://github.com/WebSVG.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deep-svg\nVanilla javascript and Web Component wrapper, using no dependencies for an svg pan zoom and deep linking. Interactions for making every text clickable and highlatable.\n[Deep Linking](https://en.wikipedia.org/wiki/Deep_linking) allows links winthin html pages, why not generalise this to the text inside svg and without having to edit the svg ?\nEach tspan is enriched with a click event, and the highlight function uses an animated svg filter.\n\n# Live Demo\nhttps://websvg.github.io/deep-svg/\n\n# Gif Demo\n\u003cimg src=\"./media/demo.gif\" width=500\u003e\n\n# Usage\n## as a web component\nNote that `html()` is a 3 line helper function and `/*html*/` helps lint the html text with the 'es6-string-html' plugin\n```javascript\nimport \"../src/index.js\";\n\nconst src = \"/demo/diagram.svg\"\nconst deep = html(document.body,/*html*/`\u003cdeep-svg id=\"id1\" src=${src} enable=\"true\" /\u003e`);\ndeep.addEventListener('text_click',onTextClick);\ndeep.highlightText(\"Rollup\");\n```\n\n## as a vanilla javascript module\n```javascript\nimport * as svgm from \"../src/js_comp.js\";\n\nlet svg = await svgm.createElement(document.body,{src:\"/demo/diagram.svg\",id:\"diagram_a\",enable:true});\nsvg.addEventListener('text_click',onTextClick);\nsvgm.highlightText(svg,\"Rollup\");\n```\n\n# SVG Filter Animation\nThe highlight is animated through a morphology filter to create a smooth effect. The `dialate` operator radius is animated before the Gaussian blur is applied to it.\n\n`Caution : This is vanilla javascript`. Note that the function `anim_wave()` is a generic function that can be placed in any section and starts animating the passed attribute patemeter.\n\n\u003cimg src=\"./media/svg_filters.png\"\u003e\n\n## References\n* https://developer.mozilla.org/en-US/docs/Web/SVG/Element/animate\n* https://www.w3.org/TR/SVG/animate.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebsvg%2Fdeep-svg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebsvg%2Fdeep-svg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebsvg%2Fdeep-svg/lists"}