-
Notifications
You must be signed in to change notification settings - Fork 877
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #399 from conwnet/master
release 0.7.0
- Loading branch information
Showing
228 changed files
with
13,340 additions
and
58,880 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ | |
**/lib/vscode/** | ||
**/dist/** | ||
**/src/vs/** | ||
htm.module.js | ||
preact.module.js | ||
preact-hooks.module.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ lib | |
dist | ||
out | ||
node_modules | ||
.yalc | ||
yalc.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
.vscode-button { | ||
border: none; | ||
display: inline-block; | ||
padding: 0 10px; | ||
height: 26px; | ||
line-height: 26px; | ||
font-size: 14px; | ||
outline: 1px solid transparent; | ||
outline-offset: 2px !important; | ||
color: var(--vscode-button-foreground); | ||
background: var(--vscode-button-background); | ||
cursor: pointer; | ||
} | ||
|
||
.vscode-button.loading { | ||
opacity: .5; | ||
} | ||
|
||
.vscode-button.size-mini { | ||
padding: 0 8px; | ||
height: 22px; | ||
line-height: 22px; | ||
font-size: 12px; | ||
} | ||
|
||
.vscode-button.size-middle { | ||
padding: 0 12px; | ||
height: 30px; | ||
line-height: 30px; | ||
font-size: 14px; | ||
} | ||
|
||
.vscode-button.size-large { | ||
padding: 0 14px; | ||
height: 34px; | ||
line-height: 34px; | ||
font-size: 18px; | ||
} | ||
|
||
.vscode-button:not([disabled]):hover { | ||
background: var(--vscode-button-hoverBackground); | ||
} | ||
|
||
.vscode-button:not([disabled]):focus { | ||
outline-color: var(--vscode-focusBorder); | ||
} | ||
|
||
.vscode-input { | ||
border: none; | ||
display: inline-block; | ||
padding: 0 4px; | ||
height: 26px; | ||
line-height: 26px; | ||
font-size: 13px; | ||
outline: 1px solid transparent; | ||
font-family: var(--vscode-font-family); | ||
color: var(--vscode-input-foreground); | ||
border: 1px solid var(--vscode-input-background); | ||
background-color: var(--vscode-input-background); | ||
} | ||
|
||
.vscode-input.size-mini { | ||
padding: 0 2px; | ||
height: 22px; | ||
line-height: 22px; | ||
font-size: 12px; | ||
} | ||
|
||
.vscode-input.size-middle { | ||
padding: 0 4px; | ||
height: 30px; | ||
line-height: 30px; | ||
font-size: 13px; | ||
} | ||
|
||
.vscode-input.size-large { | ||
padding: 0 6px; | ||
height: 34px; | ||
line-height: 34px; | ||
font-size: 18px; | ||
} | ||
|
||
.vscode-input:not([disabled]):focus { | ||
outline-color: var(--vscode-focusBorder); | ||
outline: 1px solid -webkit-focus-ring-color; | ||
outline-offset: -1px; | ||
} | ||
|
||
.vscode-textarea { | ||
border: none; | ||
display: inline-block; | ||
outline: 1px solid transparent; | ||
font-family: var(--vscode-font-family); | ||
color: var(--vscode-input-foreground); | ||
border: 1px solid var(--vscode-input-background); | ||
background-color: var(--vscode-input-background); | ||
} | ||
|
||
.vscode-textarea:not([disabled]):focus { | ||
outline-color: var(--vscode-focusBorder); | ||
outline: 1px solid -webkit-focus-ring-color; | ||
outline-offset: -1px; | ||
} | ||
|
||
.vscode-loading { | ||
width: 100%; | ||
text-align: center; | ||
height: 26px; | ||
} | ||
|
||
.vscode-loading > span { | ||
height: 100%; | ||
width: 5px; | ||
display: inline-block; | ||
margin-right: 4px; | ||
background: var(--vscode-button-background); | ||
animation: vscodeLoading 1.2s infinite ease-in-out; | ||
} | ||
|
||
.vscode-loading > span:nth-child(2) { | ||
animation-delay: -1s; | ||
} | ||
|
||
.vscode-loading > span:nth-child(3) { | ||
animation-delay: -0.9s; | ||
} | ||
|
||
.vscode-loading > span:nth-child(4) { | ||
animation-delay: -0.8s; | ||
} | ||
|
||
.vscode-loading > span:nth-child(5) { | ||
margin-right: 0 !important; | ||
animation-delay: -0.7s; | ||
} | ||
|
||
@keyframes vscodeLoading { | ||
0% { | ||
transform: scaleY(0.4); | ||
} | ||
25% { | ||
transform: scaleY(1); | ||
} | ||
50% { | ||
transform: scaleY(0.4); | ||
} | ||
75% { | ||
transform: scaleY(0.4); | ||
} | ||
100% { | ||
transform: scaleY(0.4); | ||
} | ||
} | ||
|
||
.vscode-link { | ||
cursor: pointer; | ||
color: var(--vscode-textLink-foreground); | ||
text-decoration: underline; | ||
} | ||
|
||
.vscode-link:hover { | ||
color: var(--vscode-textLink-activeForeground); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { h } from './preact.module.js'; | ||
import htm from './htm.module.js'; | ||
|
||
export const html = htm.bind(h); | ||
|
||
export const VscodeButton = ({ size, loading, ...props }) => { | ||
const sizeClass = `size-${size || 'small'}`; | ||
const loadingClass = loading ? 'loading' : ''; | ||
const classes = `vscode-button ${sizeClass} ${loadingClass}`; | ||
|
||
return html`<button class=${classes} disabled=${loading} ...${props} />`; | ||
}; | ||
|
||
export const VscodeInput = ({ size, ...props }) => { | ||
const classes = `vscode-input size-${size || 'small'}`; | ||
|
||
return html`<input class=${classes} ...${props} />`; | ||
}; | ||
|
||
export const VscodeTextarea = (props) => { | ||
return html` <textarea class="vscode-textarea" ...${props} /> `; | ||
}; | ||
|
||
export const VscodeLoading = ({ blockWidth, blockSpacing, ...props }) => { | ||
const _blockWidth = blockWidth || '5px'; | ||
const _blockSpacing = blockSpacing || '4px'; | ||
const styleStr = `width: ${_blockWidth}; margin-right: ${_blockSpacing}`; | ||
const blocks = Array.from({ length: 5 }).map(() => html`<span style=${styleStr} />`); | ||
|
||
return html`<div class="vscode-loading" ...${props}>${blocks}</div>`; | ||
}; | ||
|
||
export const VscodeLink = ({ to, external, ...props }) => { | ||
const hrefProp = to ? { href: to } : {}; | ||
const roleProp = to ? {} : { role: 'button' }; | ||
const targetProp = external ? { target: '_blank' } : {}; | ||
const combineProps = { ...hrefProp, ...roleProp, ...targetProp }; | ||
|
||
return html` <a class="vscode-link" ...${combineProps} ...${props} /> `; | ||
}; | ||
|
||
export const postMessage = (() => { | ||
const vscode = window.acquireVsCodeApi(); | ||
const uniqueId = ((id) => () => id++)(1); | ||
const messageMap = new Map(); | ||
|
||
window.addEventListener('message', ({ data }) => { | ||
messageMap.has(data.id) && messageMap.get(data.id)(data.data); | ||
}); | ||
|
||
return (type, data) => { | ||
const messageId = uniqueId(); | ||
vscode.postMessage({ type, data, id: messageId }); | ||
return new Promise((resolve) => { | ||
messageMap.set(messageId, resolve); | ||
}); | ||
}; | ||
})(); |
Oops, something went wrong.
7272697
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
github1s – ./
github1s.com
github1s-git-release-vscode-github1s.vercel.app
github1s-vscode-github1s.vercel.app
stable.github1s.com
auth.github1s.com
github1s.dev
www.github1s.dev