{"id":15643207,"url":"https://github.com/colebemis/figjam-live-code-block","last_synced_at":"2025-04-30T10:11:48.650Z","repository":{"id":41746246,"uuid":"419586730","full_name":"colebemis/figjam-live-code-block","owner":"colebemis","description":"Turn FigJam into a collaborative JavaScript canvas","archived":false,"fork":false,"pushed_at":"2021-11-16T18:43:37.000Z","size":5444,"stargazers_count":65,"open_issues_count":1,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-30T10:11:43.118Z","etag":null,"topics":["figjam","figjam-plugin","figjam-widget","figma","figma-plugin"],"latest_commit_sha":null,"homepage":"https://www.figma.com/community/widget/1034005547769330556","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/colebemis.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}},"created_at":"2021-10-21T04:59:32.000Z","updated_at":"2025-03-09T21:00:24.000Z","dependencies_parsed_at":"2022-08-30T11:32:31.372Z","dependency_job_id":null,"html_url":"https://github.com/colebemis/figjam-live-code-block","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colebemis%2Ffigjam-live-code-block","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colebemis%2Ffigjam-live-code-block/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colebemis%2Ffigjam-live-code-block/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colebemis%2Ffigjam-live-code-block/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/colebemis","download_url":"https://codeload.github.com/colebemis/figjam-live-code-block/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251683355,"owners_count":21626953,"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":["figjam","figjam-plugin","figjam-widget","figma","figma-plugin"],"created_at":"2024-10-03T11:59:28.034Z","updated_at":"2025-04-30T10:11:48.594Z","avatar_url":"https://github.com/colebemis.png","language":"TypeScript","readme":"# FigJam Live Code Block Widget\n\nTurn FigJam into a collaborative JavaScript canvas\n\n![demo](assets/demo.gif)\n\nCould be used for:\n\n- Exploring APIs\n- Teaching\n- Debugging\n- Pair programming\n- Code review\n- Technical interviews\n- ???\n\nFound a creative use for this widget? Tell me about it on Twitter ([@colebemis](https://twitter.com/colebemis))\n\n## Installation\n\nhttps://www.figma.com/community/widget/1034005547769330556\n\n## Global variables\n\nEvery live code block has access to the following variables:\n\n| Name                   | Type       | Description                                                                                         |\n| ---------------------- | ---------- | --------------------------------------------------------------------------------------------------- |\n| `fetch()`              | `function` | [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/fetch)                                  |\n| `fetchJson()`          | `function` | A convenient wrapper around `fetch()` specifically for fetching JSON data                           |\n| `Math`                 | `object`   | [MDN docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math)   |\n| `Array`                | `object`   | [MDN docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)  |\n| `Object`               | `object`   | [MDN docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) |\n\n## Local development\n\n1. Clone the repository\n\n   ```shell\n   git clone https://github.com/colebemis/figjam-javascript-repl.git\n   cd figjam-javascript-repl\n   ```\n\n1. Install the dependencies\n\n   ```shell\n   yarn\n   ```\n\n1. Run local development scripts\n\n   ```shell\n   yarn start\n   ```\n\n1. Open the [Figma desktop app](https://www.figma.com/downloads/)\n\n1. Inside a FigJam file, go to `Menu \u003e Widgets \u003e Development \u003e Import widget from manifest...`\n\n1. Select `/path/to/figjam-javascript-repl/manifest.json`\n\n1. Add the widget to the canvas by selecting `Menu \u003e Widgets \u003e Developement \u003e JavaScript REPL` or search for `JavaScript REPL` in the quick actions bar (`⌘ /`)\n\n## Prior art\n\n- [natto.dev](https://natto.dev/) by [@\\_paulshen](https://twitter.com/_paulshen)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolebemis%2Ffigjam-live-code-block","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolebemis%2Ffigjam-live-code-block","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolebemis%2Ffigjam-live-code-block/lists"}