{"id":24539071,"url":"https://github.com/harshproj/punt_partners-assignment-","last_synced_at":"2025-03-16T03:32:14.904Z","repository":{"id":246391918,"uuid":"820760964","full_name":"HarshProj/Punt_Partners-assignment-","owner":"HarshProj","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-28T04:17:46.000Z","size":330,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T16:14:48.762Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://font-analyzer.vercel.app","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/HarshProj.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":"2024-06-27T06:07:44.000Z","updated_at":"2024-06-28T04:17:49.000Z","dependencies_parsed_at":"2024-06-27T19:17:31.300Z","dependency_job_id":"b64793cc-0258-4939-b11d-6e1d5b3f4354","html_url":"https://github.com/HarshProj/Punt_Partners-assignment-","commit_stats":null,"previous_names":["harshproj/punt_partners-assignment-"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarshProj%2FPunt_Partners-assignment-","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarshProj%2FPunt_Partners-assignment-/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarshProj%2FPunt_Partners-assignment-/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarshProj%2FPunt_Partners-assignment-/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HarshProj","download_url":"https://codeload.github.com/HarshProj/Punt_Partners-assignment-/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822312,"owners_count":20353496,"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":"2025-01-22T16:14:53.746Z","updated_at":"2025-03-16T03:32:14.876Z","avatar_url":"https://github.com/HarshProj.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Steps to Implement the Text Editor\n\n## Project Setup\n\nCreate a new React + TypeScript project.\nInstall necessary dependencies: react, react-dom, @types/react, @types/react-dom, axios for API calls, and styled-components for styling.\n## Component Structure\n\nApp.tsx: Main component to hold the editor and settings.\nHome.tsx:this component hold the text editor\n## Fetching Google Fonts Data\n\nUse the provided JSON file to map font names to their variants and URLs.\n## State Management\n\nUse useState to manage the text, selected font family, weight, and italic state.\nUse useEffect for auto-saving and loading from localStorage.\n## Implementing Auto-Save\n\nSave the text, font family, and selected variant in localStorage on every change.\nLoad the saved data from localStorage on component mount.\n## Handling Font Variants\n\nUpdate the font weight and italic options based on the selected font family.\nHandle the logic to select the closest available variant if the exact one is not available.\nStyling\n\nApply the selected font family, weight, and italic style to the text area using inline styles or styled-components.\n## Error Handling\n\nHandle invalid font variants gracefully.\nEnsure the application does not crash with invalid data from localStorage.\n\n# Error Handling and Improvements\n## Invalid Font Variants\n\nValidate the font variant before applying it.\nFallback to the closest available variant if the exact one is not available.\n## Future Improvements\n\nIntegrate with a persistent backend.\nImprove the UI design.\nAdd more comprehensive unit tests.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshproj%2Fpunt_partners-assignment-","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharshproj%2Fpunt_partners-assignment-","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshproj%2Fpunt_partners-assignment-/lists"}