sandpack icon indicating copy to clipboard operation
sandpack copied to clipboard

feat: load csb data hook

Open DeMoorJasper opened this issue 3 years ago • 3 comments

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code

What kind of change does this pull request introduce?

Add a hook to load codesandbox data, mainly used for testing and quickly creating reproducibles

Closes CSB-3849

DeMoorJasper avatar Mar 25 '22 21:03 DeMoorJasper

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 8cb13cef9c9bbb6dfdbba3e63dc8957c7b8c771b:

Sandbox Source
Sandpack Blog Example 1 Configuration

codesandbox-ci[bot] avatar Mar 25 '22 21:03 codesandbox-ci[bot]

CSB-3849 useSandboxData Hook in sandpack, to fetch sandbox data from csb api

A simple hook to fetch sandbox data to be used in sandpack. Very useful for quickly creating/debugging new v2 sandboxes.

linear[bot] avatar Mar 25 '22 21:03 linear[bot]

Size changes

sandpack-react

Total base (gzip) Total current (gzip) +/-
161 kb 161 kb ⚠️ +79 bytes (+0.05%)
Details
Dependency name / file Base Current +/-
0 522 kb 522 kb ✅ 0 byte
main 480 kb 480 kb ⚠️ +226 bytes (+0.05%)
@codesandbox/sandpack-react 82 kb 82 kb ⚠️ +447 bytes (+0.53%)
@code-hike/classer 1 kb 1 kb ✅ 0 byte
@codesandbox/sandpack-client 12 kb 12 kb ✅ 0 byte
@stitches/core 16 kb 16 kb ✅ 0 byte
@codemirror/state 35 kb 35 kb ✅ 0 byte
@codemirror/view 167 kb 167 kb ✅ 0 byte
@codemirror/closebrackets 6 kb 6 kb ✅ 0 byte
@codemirror/matchbrackets 4 kb 4 kb ✅ 0 byte
@codemirror/commands 24 kb 24 kb ✅ 0 byte
@codemirror/comment 5 kb 5 kb ✅ 0 byte
@codemirror/gutter 10 kb 10 kb ✅ 0 byte
@codemirror/highlight 12 kb 12 kb ✅ 0 byte
@codemirror/history 9 kb 9 kb ✅ 0 byte
@react-hook/intersection-observer 2 kb 2 kb ✅ 0 byte
@codemirror/lang-css 11 kb 11 kb ✅ 0 byte
@codemirror/lang-javascript 6 kb 6 kb ✅ 0 byte
@codemirror/lang-html 15 kb 15 kb ✅ 0 byte
@codemirror/text 13 kb 13 kb ✅ 0 byte
style-mod 3 kb 3 kb ✅ 0 byte
@codemirror/rangeset 16 kb 16 kb ✅ 0 byte
w3c-keyname 2 kb 2 kb ✅ 0 byte
@lezer/common 34 kb 34 kb ✅ 0 byte
@codemirror/language 19 kb 19 kb ✅ 0 byte
@react-hook/passive-layout-effect 191 bytes 191 bytes ✅ 0 byte
@lezer/css 9 kb 9 kb ✅ 0 byte
@lezer/html 12 kb 12 kb ✅ 0 byte
@lezer/javascript 54 kb 54 kb ✅ 0 byte
@codemirror/autocomplete 34 kb 34 kb ✅ 0 byte
@lezer/lr 31 kb 31 kb ✅ 0 byte
@codemirror/tooltip 14 kb 14 kb ✅ 0 byte
lodash.isequal 18 kb 18 kb ✅ 0 byte
lz-string 9 kb 9 kb ✅ 0 byte
react-devtools-inline 823 kb 823 kb ✅ 0 byte
codesandbox-import-utils 3 kb 3 kb ✅ 0 byte
package-build-stats 487 bytes 487 bytes ✅ 0 byte
intersection-observer 13 kb 13 kb ✅ 0 byte
react-is 2 kb 2 kb ✅ 0 byte

sandpack-client

Total base (gzip) Total current (gzip) +/-
7 kb 7 kb ✅ 0 byte
Details
Dependency name / file Base Current +/-
main 21 kb 21 kb ✅ 0 byte
@codesandbox/sandpack-client 12 kb 12 kb ✅ 0 byte
codesandbox-import-utils 3 kb 3 kb ✅ 0 byte
lodash.isequal 18 kb 18 kb ✅ 0 byte
package-build-stats 487 bytes 487 bytes ✅ 0 byte

github-actions[bot] avatar Mar 25 '22 21:03 github-actions[bot]

This feature will land soon on the next major Sandpack release 🚀

danilowoz avatar Dec 19 '22 09:12 danilowoz