From b0dab4be1406066a2054179e6f257fbf08e84985 Mon Sep 17 00:00:00 2001 From: Amelia Wattenberger Date: Tue, 6 Dec 2022 11:36:03 -0500 Subject: [PATCH 1/2] clean up block config --- blocks.config.json | 130 +++++++++++++++++++-------------------------- package.json | 2 +- yarn.lock | 8 +-- 3 files changed, 60 insertions(+), 80 deletions(-) diff --git a/blocks.config.json b/blocks.config.json index 5d80bc4..6f4d90b 100644 --- a/blocks.config.json +++ b/blocks.config.json @@ -2,8 +2,8 @@ { "type": "file", "id": "code-block", - "title": "Code block", - "description": "A basic code block", + "title": "Code", + "description": "Read & edit code", "sandbox": false, "entry": "blocks/file-blocks/code/index.tsx", "matches": ["*"], @@ -11,9 +11,9 @@ }, { "type": "file", - "id": "excalidraw-block", - "title": "Drawing block", - "description": "A whiteboard tool", + "id": "excalidraw", + "title": "Excalidraw diagram", + "description": "View and edit Excalidraw diagrams", "sandbox": false, "entry": "blocks/file-blocks/excalidraw/index.tsx", "matches": ["*.excalidraw"], @@ -21,9 +21,9 @@ }, { "type": "file", - "id": "html-block", - "title": "HTML block", - "description": "View HTML content", + "id": "html", + "title": "HTML", + "description": "View basic HTML content", "sandbox": false, "entry": "blocks/file-blocks/html.tsx", "matches": ["*.html", "*.svelte"], @@ -31,9 +31,9 @@ }, { "type": "file", - "id": "css-block", - "title": "Styleguide block", - "description": "View selectors in a css file", + "id": "css", + "title": "CSS Styleguide", + "description": "View CSS styles in an example styleguide", "sandbox": false, "entry": "blocks/file-blocks/css.tsx", "matches": ["*.css"], @@ -41,9 +41,9 @@ }, { "type": "file", - "id": "image-block", - "title": "Image block", - "description": "View images", + "id": "image", + "title": "Image", + "description": "View PNG, JPG, GIF, and SVG images", "sandbox": false, "entry": "blocks/file-blocks/image.tsx", "matches": ["*.png", "*.jpg", "*.jpeg", "*.gif", "*.svg"], @@ -51,9 +51,9 @@ }, { "type": "file", - "id": "json-block", - "title": "Object explorer", - "description": "An interactive view of JSON objects", + "id": "json", + "title": "JSON explorer", + "description": "An interactive view of JSON data", "sandbox": false, "entry": "blocks/file-blocks/json.tsx", "matches": [ @@ -69,7 +69,7 @@ }, { "type": "file", - "id": "geojson-block", + "id": "geojson", "title": "GeoJSON explorer", "description": "View & edit GeoJSON data", "sandbox": false, @@ -79,9 +79,9 @@ }, { "type": "file", - "id": "3d-model-block", - "title": "3D block", - "description": "A block for 3d files", + "id": "3d-model", + "title": "3D model", + "description": "View 3D models", "sandbox": false, "entry": "blocks/file-blocks/3d-files.tsx", "matches": ["*.gltf", "*.glb"], @@ -89,9 +89,9 @@ }, { "type": "file", - "id": "flat-block", - "title": "Flat data block", - "description": "A block for flat data files", + "id": "flat", + "title": "Spreadsheet", + "description": "View & edit CSV and YAML files in a spreadsheet", "sandbox": false, "entry": "blocks/file-blocks/flat.tsx", "matches": ["*.csv", "*.yml", "*.yaml"], @@ -99,19 +99,9 @@ }, { "type": "file", - "id": "simple-poll-block", - "title": "Poll block", - "description": "View simple polls beautifully", - "sandbox": false, - "entry": "blocks/file-blocks/poll.tsx", - "matches": ["*.json"], - "example_path": "https://github.com/githubnext/blocks-tutorial/blob/main/poll.json" - }, - { - "type": "file", - "id": "chart-block", - "title": "Chart block", - "description": "An interactive chart block", + "id": "chart", + "title": "Chart", + "description": "Visualize CSV data in a few different chart types", "sandbox": false, "entry": "blocks/file-blocks/charts/index.tsx", "matches": ["*.csv"], @@ -120,8 +110,8 @@ { "type": "file", "id": "markdown-block", - "title": "Markdown block", - "description": "View and edit Markdown content", + "title": "Markdown", + "description": "View and edit Markdown content, with the ability to embed other blocks", "sandbox": false, "entry": "blocks/file-blocks/markdown-edit/index.tsx", "matches": ["*.md", "*.markdown", "*.mdx", "*"], @@ -129,9 +119,9 @@ }, { "type": "file", - "id": "sandbox-block", - "title": "JS Sandbox block", - "description": "Execute Javascript code", + "id": "sandbox", + "title": "JS Sandbox", + "description": "Run JavaScript code in a sandbox", "sandbox": false, "entry": "blocks/file-blocks/sandbox/index.tsx", "matches": ["*.js", "*.ts", "*.tsx", "*.jsx"], @@ -139,19 +129,9 @@ }, { "type": "file", - "id": "use-case-block", - "title": "Blocks use case", - "description": "View Blocks use case writeups", - "sandbox": false, - "entry": "blocks/file-blocks/use-case/index.tsx", - "matches": ["*.md", "*.mdx"], - "example_path": "https://github.com/githubnext/blocks-tutorial/blob/main/README.md" - }, - { - "type": "file", - "id": "react-feedback-block", + "id": "react-feedback", "title": "React component feedback", - "description": "Give feedback on a React component", + "description": "View & give feedback on a React component", "sandbox": false, "entry": "blocks/file-blocks/annotate-react/index.tsx", "matches": ["*.jsx", "*.tsx"], @@ -159,9 +139,9 @@ }, { "type": "file", - "id": "sentence-encoder-block", - "title": "Sentence encoder block", - "description": "Experiment with your sentence-encoder", + "id": "sentence-encoder", + "title": "Sentence encoder", + "description": "Experiment with a sentence-encoder", "sandbox": false, "entry": "blocks/file-blocks/sentence-encoder.tsx", "matches": ["*.json"], @@ -169,9 +149,9 @@ }, { "type": "file", - "id": "processing-block", - "title": "Processing block", - "description": "Run your p5.js sketches", + "id": "processing", + "title": "p5.js", + "description": "Run a p5.js sketch", "sandbox": true, "entry": "blocks/file-blocks/processing.tsx", "matches": ["*.js"], @@ -179,8 +159,8 @@ }, { "type": "file", - "id": "summarize-block", - "title": "Summarize block", + "id": "summarize", + "title": "Summarize", "description": "Summarize parts of a file using ML", "sandbox": false, "entry": "blocks/file-blocks/summarize/index.tsx", @@ -189,8 +169,8 @@ }, { "type": "file", - "id": "explain-block", - "title": "Explain block", + "id": "explain", + "title": "Explain", "description": "Explain parts of a file using ML", "sandbox": false, "entry": "blocks/file-blocks/explain/index.tsx", @@ -199,8 +179,8 @@ }, { "type": "file", - "id": "edit-block", - "title": "Edit code", + "id": "edit", + "title": "Edit code with ML", "description": "Edit code by prompting a Machine Learning model", "sandbox": false, "entry": "blocks/file-blocks/edit/index.tsx", @@ -209,7 +189,7 @@ }, { "type": "file", - "id": "edit-and-preview-block", + "id": "edit-and-preview", "title": "Edit with Preview", "description": "Edit code side-by-side with a preview", "sandbox": false, @@ -219,34 +199,34 @@ }, { "type": "folder", - "id": "minimap-block", + "id": "minimap", "title": "Minimap", - "description": "A visualization of your folders and files", + "description": "Visualize your folders and files in a minimap", "sandbox": false, "entry": "blocks/folder-blocks/minimap/index.tsx", "example_path": "https://github.com/githubnext/blocks-tutorial" }, { "type": "folder", - "id": "overview-block", + "id": "overview", "title": "Overview", - "description": "An overview of a folder: including README, license, and recent activity", + "description": "View an overview of a folder: including README, license, and recent activity", "sandbox": false, "entry": "blocks/folder-blocks/overview/index.tsx", "example_path": "https://github.com/githubnext/blocks-tutorial" }, { "type": "folder", - "id": "dashboard-block", + "id": "dashboard", "title": "Dashboard", - "description": "A dashboard of Blocks", + "description": "View other blocks in a dashboard view", "sandbox": false, "entry": "blocks/folder-blocks/dashboard/index.tsx", "example_path": "https://github.com/githubnext/blocks-tutorial" }, { "type": "folder", - "id": "code-tour-block", + "id": "code-tour", "title": "Code Tour", "description": "Create documented tours of your code", "sandbox": false, @@ -255,7 +235,7 @@ }, { "type": "folder", - "id": "infinite-canvas-block", + "id": "infinite-canvas", "title": "Infinite Canvas", "description": "View and annotate your files in an infinite canvas", "sandbox": false, diff --git a/package.json b/package.json index aeaf0e2..15b6386 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "@excalidraw/excalidraw": "^0.10.0", "@fullstackio/cq": "^6.0.9", "@fullstackio/remark-cq": "^6.1.2", - "@githubnext/blocks": "^2.1.1", + "@githubnext/blocks": "^2.2.0", "@githubocto/flat-ui": "^0.14.1", "@lezer/highlight": "^1.0.0", "@lezer/markdown": "^1.0.1", diff --git a/yarn.lock b/yarn.lock index e455831..f7d45e3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -910,10 +910,10 @@ unist-util-visit "^1.0.0" uuid "^3.3.2" -"@githubnext/blocks@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@githubnext/blocks/-/blocks-2.1.1.tgz#73c65f2ff3d75b2fb8203fdf8cc1e3083e7c1a4e" - integrity sha512-53YsSBZRagNRjbaRRlUe9E47Vz20YPx+ZxsB9TuUjdzmnI4h4WzewJprk/L2sjNh9WcVMVCtKNB6lQGA9A6Hbw== +"@githubnext/blocks@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@githubnext/blocks/-/blocks-2.2.0.tgz#e060b8718621fd7917f4dca4c68d178d9e7b93b8" + integrity sha512-as89UwPi3tQPYDjaAmRKYa/lndUH6ZW9gcZIuXiUnGWSpzn6qZyQTMA2NNpm7sjy9nOy6mtw3RYGt/EfJeIqdw== dependencies: "@loadable/component" "^5.15.0" "@octokit/openapi-types" "^11.2.0" From a63cadd69b372a5e0f646fb014b98d836bd7549a Mon Sep 17 00:00:00 2001 From: Amelia Wattenberger Date: Tue, 6 Dec 2022 11:38:36 -0500 Subject: [PATCH 2/2] remove "sandbox" from configs --- blocks.config.json | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/blocks.config.json b/blocks.config.json index 6f4d90b..ff54fdd 100644 --- a/blocks.config.json +++ b/blocks.config.json @@ -4,7 +4,6 @@ "id": "code-block", "title": "Code", "description": "Read & edit code", - "sandbox": false, "entry": "blocks/file-blocks/code/index.tsx", "matches": ["*"], "example_path": "https://github.com/githubnext/blocks-tutorial/blob/main/Aside.jsx" @@ -14,7 +13,6 @@ "id": "excalidraw", "title": "Excalidraw diagram", "description": "View and edit Excalidraw diagrams", - "sandbox": false, "entry": "blocks/file-blocks/excalidraw/index.tsx", "matches": ["*.excalidraw"], "example_path": "https://github.com/githubnext/blocks-tutorial/blob/main/drawing.excalidraw" @@ -24,7 +22,6 @@ "id": "html", "title": "HTML", "description": "View basic HTML content", - "sandbox": false, "entry": "blocks/file-blocks/html.tsx", "matches": ["*.html", "*.svelte"], "example_path": "https://github.com/githubnext/blocks-tutorial/blob/main/photos.html" @@ -34,7 +31,6 @@ "id": "css", "title": "CSS Styleguide", "description": "View CSS styles in an example styleguide", - "sandbox": false, "entry": "blocks/file-blocks/css.tsx", "matches": ["*.css"], "example_path": "https://github.com/githubnext/blocks-tutorial/blob/main/global.css" @@ -44,7 +40,6 @@ "id": "image", "title": "Image", "description": "View PNG, JPG, GIF, and SVG images", - "sandbox": false, "entry": "blocks/file-blocks/image.tsx", "matches": ["*.png", "*.jpg", "*.jpeg", "*.gif", "*.svg"], "example_path": "https://github.com/pmndrs/react-spring/blob/HEAD/assets/projects/aragon.png?raw=true" @@ -54,7 +49,6 @@ "id": "json", "title": "JSON explorer", "description": "An interactive view of JSON data", - "sandbox": false, "entry": "blocks/file-blocks/json.tsx", "matches": [ "*.json", @@ -72,7 +66,6 @@ "id": "geojson", "title": "GeoJSON explorer", "description": "View & edit GeoJSON data", - "sandbox": false, "entry": "blocks/file-blocks/geojson.tsx", "matches": ["*.geo.json", "*.geojson"], "example_path": "https://github.com/d3/d3-geo/blob/main/package.json" @@ -82,7 +75,6 @@ "id": "3d-model", "title": "3D model", "description": "View 3D models", - "sandbox": false, "entry": "blocks/file-blocks/3d-files.tsx", "matches": ["*.gltf", "*.glb"], "example_path": "https://github.com/githubnext/blocks-tutorial/blob/main/avocado.glb" @@ -92,7 +84,6 @@ "id": "flat", "title": "Spreadsheet", "description": "View & edit CSV and YAML files in a spreadsheet", - "sandbox": false, "entry": "blocks/file-blocks/flat.tsx", "matches": ["*.csv", "*.yml", "*.yaml"], "example_path": "https://github.com/githubnext/blocks-tutorial/blob/main/data.csv" @@ -102,7 +93,6 @@ "id": "chart", "title": "Chart", "description": "Visualize CSV data in a few different chart types", - "sandbox": false, "entry": "blocks/file-blocks/charts/index.tsx", "matches": ["*.csv"], "example_path": "https://github.com/the-pudding/data/blob/master/pockets/measurements.csv" @@ -112,7 +102,6 @@ "id": "markdown-block", "title": "Markdown", "description": "View and edit Markdown content, with the ability to embed other blocks", - "sandbox": false, "entry": "blocks/file-blocks/markdown-edit/index.tsx", "matches": ["*.md", "*.markdown", "*.mdx", "*"], "example_path": "https://github.com/githubnext/blocks-tutorial/blob/main/README.md" @@ -122,7 +111,6 @@ "id": "sandbox", "title": "JS Sandbox", "description": "Run JavaScript code in a sandbox", - "sandbox": false, "entry": "blocks/file-blocks/sandbox/index.tsx", "matches": ["*.js", "*.ts", "*.tsx", "*.jsx"], "example_path": "https://github.com/githubnext/blocks-tutorial/blob/main/README.md" @@ -132,7 +120,6 @@ "id": "react-feedback", "title": "React component feedback", "description": "View & give feedback on a React component", - "sandbox": false, "entry": "blocks/file-blocks/annotate-react/index.tsx", "matches": ["*.jsx", "*.tsx"], "example_path": "https://github.com/githubnext/blocks-tutorial/blob/main/Aside.jsx" @@ -142,7 +129,6 @@ "id": "sentence-encoder", "title": "Sentence encoder", "description": "Experiment with a sentence-encoder", - "sandbox": false, "entry": "blocks/file-blocks/sentence-encoder.tsx", "matches": ["*.json"], "example_path": "https://github.com/githubnext/blocks-tutorial/blob/main/queries.json" @@ -162,7 +148,6 @@ "id": "summarize", "title": "Summarize", "description": "Summarize parts of a file using ML", - "sandbox": false, "entry": "blocks/file-blocks/summarize/index.tsx", "matches": ["*.js", "*.ts", "*.tsx", "*.jsx"], "example_path": "https://github.com/mattdesl/canvas-sketch/blob/master/lib/save.js" @@ -172,7 +157,6 @@ "id": "explain", "title": "Explain", "description": "Explain parts of a file using ML", - "sandbox": false, "entry": "blocks/file-blocks/explain/index.tsx", "matches": ["*.js", "*.ts", "*.tsx", "*.jsx", "*.rb", "*.py"], "example_path": "https://github.com/mattdesl/canvas-sketch/blob/master/lib/save.js" @@ -182,7 +166,6 @@ "id": "edit", "title": "Edit code with ML", "description": "Edit code by prompting a Machine Learning model", - "sandbox": false, "entry": "blocks/file-blocks/edit/index.tsx", "matches": ["*"], "example_path": "https://github.com/githubnext/blocks-tutorial/blob/main/processing-sketch.js" @@ -192,7 +175,6 @@ "id": "edit-and-preview", "title": "Edit with Preview", "description": "Edit code side-by-side with a preview", - "sandbox": false, "entry": "blocks/file-blocks/edit-and-preview/index.tsx", "matches": ["*"], "example_path": "https://github.com/githubnext/blocks-tutorial/blob/main/README.md" @@ -202,7 +184,6 @@ "id": "minimap", "title": "Minimap", "description": "Visualize your folders and files in a minimap", - "sandbox": false, "entry": "blocks/folder-blocks/minimap/index.tsx", "example_path": "https://github.com/githubnext/blocks-tutorial" }, @@ -211,7 +192,6 @@ "id": "overview", "title": "Overview", "description": "View an overview of a folder: including README, license, and recent activity", - "sandbox": false, "entry": "blocks/folder-blocks/overview/index.tsx", "example_path": "https://github.com/githubnext/blocks-tutorial" }, @@ -220,7 +200,6 @@ "id": "dashboard", "title": "Dashboard", "description": "View other blocks in a dashboard view", - "sandbox": false, "entry": "blocks/folder-blocks/dashboard/index.tsx", "example_path": "https://github.com/githubnext/blocks-tutorial" }, @@ -229,7 +208,6 @@ "id": "code-tour", "title": "Code Tour", "description": "Create documented tours of your code", - "sandbox": false, "entry": "blocks/folder-blocks/code-tour/index.tsx", "example_path": "https://github.com/githubnext/blocks-tutorial" }, @@ -238,7 +216,6 @@ "id": "infinite-canvas", "title": "Infinite Canvas", "description": "View and annotate your files in an infinite canvas", - "sandbox": false, "entry": "blocks/folder-blocks/infinite-canvas/index.tsx", "example_path": "https://github.com/githubnext/blocks-tutorial" }