Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
227 changes: 227 additions & 0 deletions examples/pydeck/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>pydeck Playground</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://unpkg.com/deck.gl@^9.0.0/dist/stylesheet.css" rel='stylesheet' />
<style>
body {margin: 0; font-family: sans-serif; overflow: hidden;}
#root {width: 100vw; height: 100vh; display: flex; flex-direction: row; align-items: stretch;}
#root * {
box-sizing: border-box;
}
#left-pane {
flex: 0 0 auto;
width: 40%;
min-width: 0;
display: flex;
flex-direction: column;
align-items: stretch;
}
#toolbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 12px;
border-bottom: 1px solid #ccc;
background: #f7f7f7;
}
#toolbar .toolbar-title {
display: flex;
align-items: center;
gap: 10px;
}
#toolbar .toolbar-title a {
color: #0b57d0;
font-size: 13px;
text-decoration: none;
}
#toolbar .toolbar-title a:hover {
text-decoration: underline;
}
#toolbar button {
display: flex;
gap: 4px;
align-items: center;
line-height: 1;
padding: 6px 12px;
border: 1px solid #999;
border-radius: 4px;
background: #fff;
cursor: pointer;
}
#toolbar button:disabled {
opacity: 0.65;
cursor: progress;
}
#editor {flex: 0 1 100%;}
#dropzone {
flex: 1 1 200px;
min-height: fit-content;
border-top: 1px solid #ccc;
background: #f7f7f7;
padding: 12px;
font-size: 13px;
}
#dropzone .files-list {
display: flex;
flex-direction: column;
gap: 8px;
margin-bottom: 12px;
max-height: 160px;
overflow: auto;
}
#dropzone .file-entry {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 8px 10px;
border: 1px solid #d9d9d9;
border-radius: 6px;
background: #fff;
}
#dropzone .file-entry.empty {
color: #666;
font-style: italic;
}
#dropzone .file-main {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
flex: 1 1 auto;
}
#dropzone .file-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 600;
}
#dropzone .file-info {
flex: 0 0 auto;
color: #666;
font-family: monospace;
font-size: 12px;
white-space: nowrap;
}
#dropzone .copy-file-button {
display: inline-flex;
align-items: center;
flex: 0 0 auto;
justify-content: center;
width: 24px;
height: 24px;
padding: 0;
border: none;
border-radius: 4px;
background: transparent;
color: inherit;
cursor: pointer;
font: inherit;
line-height: 1;
}
#dropzone .copy-file-button:hover {
background: #f3f3f3;
}
#dropzone .copy-file-button svg {
width: 14px;
height: 14px;
}
#dropzone .dropzone-target {
cursor: pointer;
border: 1px dashed #bbb;
border-radius: 6px;
padding: 12px;
text-align: center;
}
#dropzone .dropzone-target p {
margin: 0;
}
#dropzone .dropzone-error {
color: #a8071a;
margin-top: 8px;
}
#editor .inline-error > div {
background: #fff1f0;
border: 1px solid #ffccc7;
border-radius: 6px;
box-sizing: border-box;
color: #a8071a;
font-family: monospace;
font-size: 12px;
margin: 10px;
padding: 8px;
white-space: pre-wrap;
}
#right-pane {
flex: 1 1 100%;
display: flex;
flex-direction: column;
min-width: 0;
}
#right-pane .output-pane {
flex: 0 0 auto;
min-height: 0;
}
#right-pane .html-pane {
position: relative;
background: #fff;
}
#right-pane .html-pane iframe {
width: 100%;
height: 100%;
border: none;
}
#right-pane .text-pane {
overflow: auto;
font-family: monospace;
background: #222;
color: #fff;
padding: 24px;
white-space: wrap;
}
#right-pane .text-pane pre {
margin: 0;
white-space: pre-wrap;
}
#right-pane .text-output-stderr {
color: #ff9b9b;
}
#right-pane .output-empty {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
color: #666;
font-size: 13px;
}
.gutter {
flex: 0 0 auto;
background: #ececec;
position: relative;
}
.gutter.gutter-horizontal {
cursor: col-resize;
width: 4px;
border-left: 1px solid #d7d7d7;
border-right: 1px solid #d7d7d7;
}
.gutter.gutter-vertical {
cursor: row-resize;
height: 4px;
border-top: 1px solid #d7d7d7;
border-bottom: 1px solid #d7d7d7;
}
</style>
</head>
<body>
<div id="app"></div>
</body>
<script type="module">
import {renderToDOM} from './src/app.tsx';
renderToDOM(document.getElementById('app'));
</script>
</html>
24 changes: 24 additions & 0 deletions examples/pydeck/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "deckgl-examples-playground",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relate name to pydeck?

"version": "0.0.0",
"private": true,
"license": "MIT",
"scripts": {
"start": "vite --open",
"start-local": "vite --config ../vite.config.local.mjs",
"build": "vite build"
},
"dependencies": {
"@monaco-editor/react": "^4.4.6",
"monaco-editor": "^0.39.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-dropzone": "^15.0.0",
"react-virtualized-auto-sizer": "^1.0.2",
"split.js": "^1.6.5"
},
"devDependencies": {
"typescript": "^4.6.0",
"vite": "^7.3.3"
}
}
Loading
Loading