### GitHub Repo Browser Interface (HTML/JavaScript)
Source: https://context7.com/esri/arcgis-experience-builder-hosted-sample-widgets/llms.txt
An interactive HTML and JavaScript application that uses the GitHub API to browse the contents of a repository. It displays directories and files, allowing users to navigate the structure and link to file contents. Dependencies include the browser's fetch API.
```html
My GitHub Repo Browser
Repo Browser
```
--------------------------------
### Dynamic Module Import Widget in React
Source: https://context7.com/esri/arcgis-experience-builder-hosted-sample-widgets/llms.txt
Demonstrates runtime dynamic module loading using JavaScript's native import(). This reduces initial bundle size and improves performance by loading functionality on demand. It expects a module with a function 'f1'.
```tsx
/** @jsx jsx */
import { React, type AllWidgetProps, jsx } from 'jimu-core'
export default function Widget (props: AllWidgetProps) {
const [ma, setMa] = React.useState(null)
const [err, setErr] = React.useState(null)
React.useEffect(() => {
import('./module-a').then(m => { setMa(m) }).catch(e => { setErr(e) })
}, [])
return (
{ma &&
Module loaded, {ma.f1()}
}
{err &&
Load dynamic module error. {err.message}
}
)
}
// module-a.ts
export function f1 () {
return 'In f1.'
}
```
--------------------------------
### CSS for GitHub Repo Browser
Source: https://github.com/esri/arcgis-experience-builder-hosted-sample-widgets/blob/main/index.html
Basic CSS styling for the GitHub Repo Browser widget. It defines styles for folder and file list items, including custom icons using pseudo-elements for folders and files. It also sets up basic list styling and padding for the navigation list.
```css
.folder, .file { cursor: pointer; }
.folder::before { content: "📁 "; }
.file::before { content: "📄 "; }
ul { list-style-type: none; padding-left: 20px; }
```
--------------------------------
### Dynamic Shared Code Entry Widget in React
Source: https://context7.com/esri/arcgis-experience-builder-hosted-sample-widgets/llms.txt
Uses the jimu-core moduleLoader API to dynamically load shared code modules at runtime. This combines code sharing with lazy loading for optimal performance. It loads 'widgets/shared-code/entry1' and calls 'sampleFunction1'.
```tsx
import { React, type AllWidgetProps, moduleLoader } from 'jimu-core'
const Widget = (props: AllWidgetProps