Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/codesandbox/sandpack
/ functions
Functions
600 in github.com/codesandbox/sandpack
⨍
Functions
600
◇
Types & classes
154
↓ 57 callers
Function
getSandpackStateFromProps
( props: SandpackProviderProps )
sandpack-react/src/utils/sandpackUtils.ts:34
↓ 40 callers
Function
useSandpack
()
sandpack-react/src/hooks/useSandpack.ts:22
↓ 32 callers
Function
useClassNames
()
sandpack-react/src/utils/classNames.tsx:24
↓ 26 callers
Function
createContext
()
sandpack-react/src/contexts/sandpackContext.test.tsx:14
↓ 25 callers
Function
renderComponent
( ComponentOrNode: FC<T> | ReactNode, props?: T )
website/codesandbox-theme-docs/src/utils/render.tsx:5
↓ 20 callers
Method
dispatch
(message: SandpackNodeMessage)
sandpack-client/src/clients/node/index.ts:427
↓ 20 callers
Method
listen
(_listener: ListenerFunction)
sandpack-client/src/clients/base.ts:64
↓ 18 callers
Function
getAmountOfListener
( /* eslint-disable @typescript-eslint/no-explicit-any */ instance: any, name = "client-id", ignoreGlo
sandpack-react/src/contexts/sandpackContext.test.tsx:27
↓ 18 callers
Function
getAmountOfListener
( instance: UseClientOperations, name = "client-id", ignoreGlobalListener = false )
sandpack-react/src/contexts/utils/useClient.test.ts:12
↓ 18 callers
Function
useConfig
()
website/codesandbox-theme-docs/src/contexts/config.tsx:27
↓ 16 callers
Function
normalizePath
(path: R)
sandpack-client/src/utils.ts:195
↓ 15 callers
Function
useBreakpoint
( breakpoint: keyof typeof media | string )
website/landing/components/common/useBreakpoint.ts:5
↓ 14 callers
Function
useClient
( { options, customSetup, teamId, sandboxId }, filesState )
sandpack-react/src/contexts/utils/useClient.ts:73
↓ 12 callers
Function
makePrimaryColor
(l)
website/codesandbox-theme-docs/tailwind.config.js:4
↓ 11 callers
Function
tokenize
(input: string)
sandpack-client/src/clients/node/taskManager.ts:57
↓ 10 callers
Function
classNameToken
(name: string)
sandpack-react/src/components/CodeEditor/utils.ts:84
↓ 10 callers
Method
dispatch
* Bundler communication
sandpack-client/src/clients/base.ts:60
↓ 9 callers
Function
set
(path: string[], value: unknown)
sandpack-react/src/components/Tests/utils.ts:82
↓ 9 callers
Function
useFiles
(props)
sandpack-react/src/contexts/utils/useFiles.ts:54
↓ 8 callers
Function
addPackageJSONIfNeeded
( files: SandpackBundlerFiles, dependencies?: Dependencies, devDependencies?: Dependencies, entry?: st
sandpack-client/src/utils.ts:40
↓ 8 callers
Function
nullthrows
(value?: T | null, err = "Value is nullish")
sandpack-client/src/utils.ts:14
↓ 8 callers
Function
resolveFile
( path: string, files: SandpackFiles )
sandpack-react/src/utils/sandpackUtils.ts:129
↓ 7 callers
Function
calculateNearestUniquePath
( currentPath: string, otherPaths: string[] )
sandpack-react/src/utils/stringUtils.ts:6
↓ 7 callers
Function
createError
(message: string)
sandpack-client/src/utils.ts:11
↓ 7 callers
Function
findStartScriptPackageJson
( packageJson: string )
sandpack-client/src/clients/node/client.utils.ts:50
↓ 7 callers
Method
update
(update: ViewUpdate)
sandpack-react/src/components/CodeEditor/highlightDecorators.ts:18
↓ 7 callers
Function
useActiveCode
()
sandpack-react/src/hooks/useActiveCode.ts:9
↓ 6 callers
Function
convertedFilesToBundlerFiles
( files?: SandpackFiles )
sandpack-react/src/utils/sandpackUtils.ts:250
↓ 6 callers
Function
fromPropsToModules
({ autoHiddenFiles, visibleFiles, files, prefixedPath, }: { prefixedPath: string; files: SandpackB
sandpack-react/src/components/FileExplorer/utils.ts:3
↓ 6 callers
Function
generateRandomId
()
sandpack-react/src/utils/stringUtils.ts:114
↓ 6 callers
Function
shallowEqual
(a: any[], b: any[])
sandpack-react/src/utils/array.ts:3
↓ 6 callers
Function
standardizeTheme
( inputTheme: SandpackThemeProp = "light" )
sandpack-react/src/styles/index.ts:77
↓ 6 callers
Function
updateFile
( pathOrFiles: string | SandpackFiles, code?: string, shouldUpdatePreview = true )
sandpack-react/src/contexts/utils/useFiles.ts:68
↓ 6 callers
Function
validateHtml
(content: FileContent)
sandpack-client/src/clients/static/utils.ts:33
↓ 5 callers
Function
createHeaderLink
( Tag: `h${2 | 3 | 4 | 5 | 6}`, context: { index: number } )
website/codesandbox-theme-docs/src/mdx-components.tsx:85
↓ 5 callers
Method
dispatch
(message: SandpackRuntimeMessage)
sandpack-client/src/clients/runtime/index.ts:396
↓ 5 callers
Function
flatMap
(as: A[], f: (a: A) => B[])
sandpack-react/src/components/Tests/utils.ts:78
↓ 5 callers
Function
useAppState
(props, files)
sandpack-react/src/contexts/utils/useAppState.ts:17
↓ 5 callers
Function
useMenu
()
website/codesandbox-theme-docs/src/contexts/menu.ts:14
↓ 5 callers
Function
useSandpackExample
()
website/landing/components/Intro/SandpackExample.tsx:42
↓ 4 callers
Method
dispatch
* Bundler communication
sandpack-client/src/clients/static/index.ts:225
↓ 4 callers
Function
escapeHtml
(unsafe: string)
sandpack-react/src/components/Tests/FormattedError.tsx:35
↓ 4 callers
Function
files
(full: boolean)
sandpack-react/src/components/Console/Console.stories.tsx:14
↓ 4 callers
Function
fromConsoleToString
( message: Message, references: Array<Message>, level = 0 )
sandpack-react/src/components/Console/utils/fromConsoleToString.ts:127
↓ 4 callers
Function
getFSRoute
(asPath: string, locale?: string | undefined)
website/codesandbox-theme-docs/src/utils/get-fs-route.ts:3
↓ 4 callers
Function
getFileName
(filePath: string)
sandpack-react/src/utils/stringUtils.ts:1
↓ 4 callers
Function
parseFromSandpackToJson
(code: string, key: string)
website/landing/components/Intro/Sections/Custom.tsx:173
↓ 4 callers
Function
splitTail
(as: A[])
sandpack-react/src/components/Tests/utils.ts:71
↓ 4 callers
Function
useSandpackTheme
()
sandpack-react/src/hooks/useSandpackTheme.ts:9
↓ 4 callers
Function
writeBuffer
(content: string | Uint8Array)
sandpack-client/src/clients/node/client.utils.ts:18
↓ 3 callers
Method
channelListen
(listener: ListenerFunction)
sandpack-client/src/clients/runtime/iframe-protocol.ts:95
↓ 3 callers
Method
cleanup
()
sandpack-client/src/clients/runtime/iframe-protocol.ts:35
↓ 3 callers
Method
destroy
()
sandpack-client/src/clients/base.ts:53
↓ 3 callers
Function
dispatchMessage
(url: string)
sandpack-client/src/clients/node/inject-scripts/historyListener.ts:14
↓ 3 callers
Function
generateBasedOnSimpleColors
(color, base)
website/theme/lib/generateTheme.js:4
↓ 3 callers
Function
getCodeMirrorPosition
( doc: Text, { line, column }: { line: number; column?: number } )
sandpack-react/src/components/CodeEditor/utils.ts:14
↓ 3 callers
Method
getFiles
()
sandpack-client/src/clients/runtime/index.ts:486
↓ 3 callers
Function
getGitIssueUrl
({ repository = "", title, labels, }: { repository?: string; title: string; labels?: string; })
website/codesandbox-theme-docs/src/utils/get-git-issue-url.ts:3
↓ 3 callers
Function
getItem
()
website/codesandbox-theme-docs/src/utils/normalize-pages.ts:242
↓ 3 callers
Method
getTypeId
()
sandpack-client/src/clients/runtime/file-resolver-protocol.ts:51
↓ 3 callers
Method
injectContentIntoHead
( content: FileContent, contentToInsert: string )
sandpack-client/src/clients/static/index.ts:102
↓ 3 callers
Function
listener
(event)
website/theme/hooks/useClickOutside.js:6
↓ 3 callers
Function
readBuffer
(content: string | Uint8Array)
sandpack-client/src/clients/node/client.utils.ts:26
↓ 3 callers
Method
updateSandbox
( _sandboxSetup = this.sandboxSetup, _isInitializationCompile?: boolean )
sandpack-client/src/clients/base.ts:46
↓ 3 callers
Function
useSandpackClient
( clientPropsOverride?: ClientPropsOverride )
sandpack-react/src/hooks/useSandpackClient.ts:32
↓ 3 callers
Function
useSandpackNavigation
( clientId?: string )
sandpack-react/src/hooks/useSandpackNavigation.ts:6
↓ 3 callers
Function
useSandpackShell
( clientId?: string )
sandpack-react/src/hooks/useSandpackShell.ts:6
↓ 2 callers
Function
addElement
(to: number, className: string)
sandpack-react/src/components/CodeEditor/useSyntaxHighlight.ts:19
↓ 2 callers
Method
compile
* It initializes the emulator and provide it with files, template and script to run
sandpack-client/src/clients/node/index.ts:91
↓ 2 callers
Function
createPackageJSON
( dependencies: Dependencies = {}, devDependencies: Dependencies = {}, entry = "/index.js" )
sandpack-client/src/utils.ts:23
↓ 2 callers
Function
ensureLength
(str: string, length: number)
sandpack-react/src/utils/useAsyncSandpackId.ts:46
↓ 2 callers
Function
extractErrorDetails
(msg: SandpackErrorMessage)
sandpack-client/src/utils.ts:101
↓ 2 callers
Function
fromBundlerFilesToFS
( files: SandpackBundlerFiles )
sandpack-client/src/clients/node/client.utils.ts:34
↓ 2 callers
Function
generateRandomId
()
sandpack-client/src/clients/node/client.utils.ts:11
↓ 2 callers
Function
getClient
()
sandpack-react/src/hooks/useSandpackClient.ts:54
↓ 2 callers
Function
getCodeMirrorLanguage
( extension: string, additionalLanguages: CustomLanguage[] )
sandpack-react/src/components/CodeEditor/utils.ts:210
↓ 2 callers
Function
getLanguageFromFile
( filePath: string | undefined, fileType: string | undefined, additionalLanguages: CustomLanguage[] )
sandpack-react/src/components/CodeEditor/utils.ts:167
↓ 2 callers
Function
getMessageFromError
(error: Error | string)
sandpack-client/src/clients/node/client.utils.ts:110
↓ 2 callers
Function
getRelativeCoordinates
( event: any, referenceElement: any )
website/landing/components/Intro/Sections/common.tsx:94
↓ 2 callers
Function
getSyntaxHighlight
(theme: SandpackTheme)
sandpack-react/src/components/CodeEditor/utils.ts:111
↓ 2 callers
Function
getTests
(block: Describe | Spec)
sandpack-react/src/components/Tests/utils.ts:8
↓ 2 callers
Function
getTheme
()
website/docs/src/components/Templates.jsx:17
↓ 2 callers
Function
gutterLineOffset
()
sandpack-react/src/components/CodeEditor/CodeMirror.tsx:437
↓ 2 callers
Function
isAlpha
(char: string)
sandpack-client/src/clients/node/taskManager.ts:5
↓ 2 callers
Function
isArgument
(char: string)
sandpack-client/src/clients/node/taskManager.ts:17
↓ 2 callers
Function
isCommand
(char: string)
sandpack-client/src/clients/node/taskManager.ts:1
↓ 2 callers
Function
isDarkColor
(color: string)
sandpack-react/src/utils/stringUtils.ts:81
↓ 2 callers
Function
isEmpty
(block: Spec | Describe)
sandpack-react/src/components/Tests/utils.ts:67
↓ 2 callers
Function
isEnvVar
(char: string)
sandpack-client/src/clients/node/taskManager.ts:25
↓ 2 callers
Function
isOperator
(char: string)
sandpack-client/src/clients/node/taskManager.ts:13
↓ 2 callers
Method
listen
(listener: ListenerFunction)
sandpack-client/src/clients/runtime/index.ts:414
↓ 2 callers
Method
listener
(listener: ListenerFunction)
sandpack-client/src/clients/event-emitter.ts:26
↓ 2 callers
Function
loadIndexes
(basePath: string, locale: string)
website/codesandbox-theme-docs/src/components/flexsearch.tsx:53
↓ 2 callers
Function
onClick
(event)
website/theme/components/menu/index.js:12
↓ 2 callers
Function
onResize
()
website/landing/components/Banner/Banner.tsx:40
↓ 2 callers
Function
openSpec
(file: string)
sandpack-react/src/components/Tests/SandpackTests.tsx:372
↓ 2 callers
Function
readBuffer
(content: string | Uint8Array)
sandpack-client/src/clients/static/utils.ts:25
↓ 2 callers
Method
render
()
examples/nextjs/pages/_document.tsx:6
↓ 2 callers
Function
sendResizeEvent
()
sandpack-client/src/clients/node/inject-scripts/resize.ts:15
↓ 2 callers
Method
serviceWorkerHandshake
()
sandpack-client/src/clients/runtime/index.ts:192
next →
1–100 of 600, ranked by callers