Compare commits
No commits in common. "master" and "v1.0.71" have entirely different histories.
@ -1,66 +0,0 @@
|
|||||||
name: Default (not tags)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags-ignore:
|
|
||||||
- '**'
|
|
||||||
|
|
||||||
env:
|
|
||||||
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
|
||||||
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
|
||||||
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
|
||||||
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
|
||||||
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
|
||||||
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
security:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
continue-on-error: true
|
|
||||||
container:
|
|
||||||
image: ${{ env.IMAGE }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install pnpm and npmci
|
|
||||||
run: |
|
|
||||||
pnpm install -g pnpm
|
|
||||||
pnpm install -g @shipzone/npmci
|
|
||||||
|
|
||||||
- name: Run npm prepare
|
|
||||||
run: npmci npm prepare
|
|
||||||
|
|
||||||
- name: Audit production dependencies
|
|
||||||
run: |
|
|
||||||
npmci command npm config set registry https://registry.npmjs.org
|
|
||||||
npmci command pnpm audit --audit-level=high --prod
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Audit development dependencies
|
|
||||||
run: |
|
|
||||||
npmci command npm config set registry https://registry.npmjs.org
|
|
||||||
npmci command pnpm audit --audit-level=high --dev
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
test:
|
|
||||||
if: ${{ always() }}
|
|
||||||
needs: security
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: ${{ env.IMAGE }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Test stable
|
|
||||||
run: |
|
|
||||||
npmci node install stable
|
|
||||||
npmci npm install
|
|
||||||
npmci npm test
|
|
||||||
|
|
||||||
- name: Test build
|
|
||||||
run: |
|
|
||||||
npmci node install stable
|
|
||||||
npmci npm install
|
|
||||||
npmci npm build
|
|
@ -1,124 +0,0 @@
|
|||||||
name: Default (tags)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
env:
|
|
||||||
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
|
||||||
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
|
||||||
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
|
||||||
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
|
||||||
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
|
||||||
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
security:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
continue-on-error: true
|
|
||||||
container:
|
|
||||||
image: ${{ env.IMAGE }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Prepare
|
|
||||||
run: |
|
|
||||||
pnpm install -g pnpm
|
|
||||||
pnpm install -g @shipzone/npmci
|
|
||||||
npmci npm prepare
|
|
||||||
|
|
||||||
- name: Audit production dependencies
|
|
||||||
run: |
|
|
||||||
npmci command npm config set registry https://registry.npmjs.org
|
|
||||||
npmci command pnpm audit --audit-level=high --prod
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Audit development dependencies
|
|
||||||
run: |
|
|
||||||
npmci command npm config set registry https://registry.npmjs.org
|
|
||||||
npmci command pnpm audit --audit-level=high --dev
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
test:
|
|
||||||
if: ${{ always() }}
|
|
||||||
needs: security
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: ${{ env.IMAGE }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Prepare
|
|
||||||
run: |
|
|
||||||
pnpm install -g pnpm
|
|
||||||
pnpm install -g @shipzone/npmci
|
|
||||||
npmci npm prepare
|
|
||||||
|
|
||||||
- name: Test stable
|
|
||||||
run: |
|
|
||||||
npmci node install stable
|
|
||||||
npmci npm install
|
|
||||||
npmci npm test
|
|
||||||
|
|
||||||
- name: Test build
|
|
||||||
run: |
|
|
||||||
npmci node install stable
|
|
||||||
npmci npm install
|
|
||||||
npmci npm build
|
|
||||||
|
|
||||||
release:
|
|
||||||
needs: test
|
|
||||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: ${{ env.IMAGE }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Prepare
|
|
||||||
run: |
|
|
||||||
pnpm install -g pnpm
|
|
||||||
pnpm install -g @shipzone/npmci
|
|
||||||
npmci npm prepare
|
|
||||||
|
|
||||||
- name: Release
|
|
||||||
run: |
|
|
||||||
npmci node install stable
|
|
||||||
npmci npm publish
|
|
||||||
|
|
||||||
metadata:
|
|
||||||
needs: test
|
|
||||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: ${{ env.IMAGE }}
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Prepare
|
|
||||||
run: |
|
|
||||||
pnpm install -g pnpm
|
|
||||||
pnpm install -g @shipzone/npmci
|
|
||||||
npmci npm prepare
|
|
||||||
|
|
||||||
- name: Code quality
|
|
||||||
run: |
|
|
||||||
npmci command npm install -g typescript
|
|
||||||
npmci npm install
|
|
||||||
|
|
||||||
- name: Trigger
|
|
||||||
run: npmci trigger
|
|
||||||
|
|
||||||
- name: Build docs and upload artifacts
|
|
||||||
run: |
|
|
||||||
npmci node install stable
|
|
||||||
npmci npm install
|
|
||||||
pnpm install -g @gitzone/tsdoc
|
|
||||||
npmci command tsdoc
|
|
||||||
continue-on-error: true
|
|
141
.gitlab-ci.yml
Normal file
141
.gitlab-ci.yml
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
# gitzone ci_default
|
||||||
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- .npmci_cache/
|
||||||
|
key: '$CI_BUILD_STAGE'
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- security
|
||||||
|
- test
|
||||||
|
- release
|
||||||
|
- metadata
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- npm install -g @shipzone/npmci
|
||||||
|
|
||||||
|
# ====================
|
||||||
|
# security stage
|
||||||
|
# ====================
|
||||||
|
mirror:
|
||||||
|
stage: security
|
||||||
|
script:
|
||||||
|
- npmci git mirror
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
tags:
|
||||||
|
- lossless
|
||||||
|
- docker
|
||||||
|
- notpriv
|
||||||
|
|
||||||
|
auditProductionDependencies:
|
||||||
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
stage: security
|
||||||
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci command npm install --production --ignore-scripts
|
||||||
|
- npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
- npmci command npm audit --audit-level=high --only=prod --production
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
|
auditDevDependencies:
|
||||||
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
stage: security
|
||||||
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci command npm install --ignore-scripts
|
||||||
|
- npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
- npmci command npm audit --audit-level=high --only=dev
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
|
# ====================
|
||||||
|
# test stage
|
||||||
|
# ====================
|
||||||
|
|
||||||
|
testStable:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci node install stable
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
testBuild:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci node install stable
|
||||||
|
- npmci npm install
|
||||||
|
- npmci command npm run build
|
||||||
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
release:
|
||||||
|
stage: release
|
||||||
|
script:
|
||||||
|
- npmci node install stable
|
||||||
|
- npmci npm publish
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
tags:
|
||||||
|
- lossless
|
||||||
|
- docker
|
||||||
|
- notpriv
|
||||||
|
|
||||||
|
# ====================
|
||||||
|
# metadata stage
|
||||||
|
# ====================
|
||||||
|
codequality:
|
||||||
|
stage: metadata
|
||||||
|
allow_failure: true
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
script:
|
||||||
|
- npmci command npm install -g tslint typescript
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci npm install
|
||||||
|
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||||
|
tags:
|
||||||
|
- lossless
|
||||||
|
- docker
|
||||||
|
- priv
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
stage: metadata
|
||||||
|
script:
|
||||||
|
- npmci trigger
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
tags:
|
||||||
|
- lossless
|
||||||
|
- docker
|
||||||
|
- notpriv
|
||||||
|
|
||||||
|
pages:
|
||||||
|
stage: metadata
|
||||||
|
script:
|
||||||
|
- npmci node install lts
|
||||||
|
- npmci command npm install -g @gitzone/tsdoc
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci npm install
|
||||||
|
- npmci command tsdoc
|
||||||
|
tags:
|
||||||
|
- lossless
|
||||||
|
- docker
|
||||||
|
- notpriv
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
artifacts:
|
||||||
|
expire_in: 1 week
|
||||||
|
paths:
|
||||||
|
- public
|
||||||
|
allow_failure: true
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -22,5 +22,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"typescript.tsdk": "node_modules/typescript/lib"
|
||||||
}
|
}
|
||||||
|
114
html/index.html
114
html/index.html
@ -1,6 +1,7 @@
|
|||||||
<!--gitzone element-->
|
<!--gitzone default-->
|
||||||
<!-- made by Task Venture Capital GmbH -->
|
<!-- made by Lossless GmbH -->
|
||||||
<!-- checkout https://maintainedby.lossless.com for awesome OpenSource projects -->
|
<!-- checkout https://maintainedby.lossless.com for awesome OpenSource projects -->
|
||||||
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!--Lets set some basic meta tags-->
|
<!--Lets set some basic meta tags-->
|
||||||
@ -9,20 +10,119 @@
|
|||||||
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height"
|
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height"
|
||||||
/>
|
/>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="theme-color" content="#000000">
|
||||||
|
|
||||||
|
<!--Lets make sure we recognize this as an PWA-->
|
||||||
|
<link rel="manifest" href="/manifest.json" />
|
||||||
|
<link rel="icon" type="image/png" href="/assetbroker/manifest/favicon.png">
|
||||||
|
|
||||||
<!--Lets load standard fonts-->
|
<!--Lets load standard fonts-->
|
||||||
<link rel="preconnect" href="https://assetbroker.lossless.one/" crossorigin>
|
|
||||||
<link rel="stylesheet" href="https://assetbroker.lossless.one/fonts/fonts.css">
|
|
||||||
|
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
|
||||||
|
<link
|
||||||
|
crossorigin="anonymous"
|
||||||
|
href="https://fonts.googleapis.com/icon?family=Material+Icons"
|
||||||
|
rel="stylesheet"
|
||||||
|
/>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Exo+2:wght@100;200;300;400;500;600;700;800&family=Roboto+Slab:wght@100;200;300;400;500;600;700;900&family=Roboto:wght@100;300;400;500;700;900&family=Roboto+Mono:wght@100;300;400;500;700;900&display=swap" rel="stylesheet">
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Just+Me+Again+Down+Here&display=swap" rel="stylesheet">
|
||||||
|
|
||||||
|
|
||||||
|
<!--Lets avoid a rescaling flicker due to default body margins-->
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
|
background: #000;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
background: #222222;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<script>
|
||||||
<script type="module" src="/bundle.js"></script>
|
projectVersion = '';
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<noscript>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background: #303f9f;
|
||||||
|
font-family: 'Roboto', sans-serif;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #ffffff;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
margin-top: 100px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 130px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
width: 600px;
|
||||||
|
margin: auto;
|
||||||
|
margin-top: 20px;
|
||||||
|
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: #4357d9;
|
||||||
|
}
|
||||||
|
.contentHeader {
|
||||||
|
padding: 20px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 25px;
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
padding: 10px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="logo">
|
||||||
|
<img src="https://assetbroker.lossless.one/brandfiles/lossless/svg-minimal-bright.svg">
|
||||||
|
</div>
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<div class="contentHeader">
|
||||||
|
We need JavaScript to run properly!
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
This site is being built using lit-element (made by Google). This technology works with
|
||||||
|
JavaScript. Subsequently this website does not work as intended by Lossless GmbH without
|
||||||
|
JavaScript.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="footer">
|
||||||
|
<a href="https://lossless.gmbh">Legal Info</a> |
|
||||||
|
<a href="https://lossless.gmbh/privacy">Privacy Policy</a>
|
||||||
|
</div>
|
||||||
|
</noscript>
|
||||||
|
<script type="text/javascript" async defer>
|
||||||
|
window.revenueEnabled = true;
|
||||||
|
const runRevenueCheck = async () => {
|
||||||
|
var e = document.createElement('div');
|
||||||
|
e.id = '476kjuhzgtr764';
|
||||||
|
e.style.display = 'none';
|
||||||
|
document.body.appendChild(e);
|
||||||
|
if (document.getElementById('476kjuhzgtr764')) {
|
||||||
|
window.revenueEnabled = true;
|
||||||
|
} else {
|
||||||
|
window.revenueEnabled = false;
|
||||||
|
}
|
||||||
|
console.log(`revenue enabled: ${window.revenueEnabled}`);
|
||||||
|
};
|
||||||
|
|
||||||
|
runRevenueCheck();
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
<script defer type="module" src="/bundle.js"></script>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// dees tools
|
// dees tools
|
||||||
import * as deesWccTools from '@design.estate/dees-wcctools';
|
import * as deesWccTools from '@designestate/dees-wcctools';
|
||||||
import * as deesDomTools from '@design.estate/dees-domtools';
|
import * as deesDomTools from '@designestate/dees-domtools';
|
||||||
|
|
||||||
// elements and pages
|
// elements and pages
|
||||||
import * as elements from '../ts_web/elements/index.js';
|
import * as elements from '../ts_web/elements/index.js';
|
||||||
|
@ -2,31 +2,17 @@
|
|||||||
"gitzone": {
|
"gitzone": {
|
||||||
"projectType": "wcc",
|
"projectType": "wcc",
|
||||||
"module": {
|
"module": {
|
||||||
"githost": "code.foss.global",
|
"githost": "gitlab.com",
|
||||||
"gitscope": "designestate",
|
"gitscope": "designestate",
|
||||||
"gitrepo": "dees-editor",
|
"gitrepo": "dees-editor",
|
||||||
"description": "An advanced editor for markdown documents based on Monaco editor with integrated terminal and markdown preview features.",
|
"description": "an advanced editor for markdown documents based on monaco.",
|
||||||
"npmPackagename": "@design.estate/dees-editor",
|
"npmPackagename": "@designestate/dees-editor",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"projectDomain": "design.estate",
|
"projectDomain": "design.estate"
|
||||||
"keywords": [
|
|
||||||
"markdown editor",
|
|
||||||
"Monaco editor",
|
|
||||||
"web components",
|
|
||||||
"typescript",
|
|
||||||
"custom elements",
|
|
||||||
"terminal",
|
|
||||||
"markdown preview",
|
|
||||||
"code editing",
|
|
||||||
"syntax highlighting"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"npmci": {
|
"npmci": {
|
||||||
"npmGlobalTools": [],
|
"npmGlobalTools": [],
|
||||||
"npmAccessLevel": "public"
|
"npmAccessLevel": "public"
|
||||||
},
|
|
||||||
"tsdoc": {
|
|
||||||
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
12602
package-lock.json
generated
Normal file
12602
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
53
package.json
53
package.json
@ -1,37 +1,37 @@
|
|||||||
{
|
{
|
||||||
"name": "@design.estate/dees-editor",
|
"name": "@designestate/dees-editor",
|
||||||
"version": "1.0.75",
|
"version": "1.0.71",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "An advanced editor for markdown documents based on Monaco editor with integrated terminal and markdown preview features.",
|
"description": "an advanced editor for markdown documents based on monaco.",
|
||||||
"main": "dist_ts_web/index.js",
|
"main": "dist_ts_web/index.js",
|
||||||
"typings": "dist_ts_web/index.d.ts",
|
"typings": "dist_ts_web/index.d.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "tstest test/",
|
"test": "tstest test/",
|
||||||
"build": "tsbuild element --allowimplicitany && tsbundle element --allowimplicitany",
|
"build": "tsbuild element --allowimplicitany --skiplibcheck && tsbundle element --allowimplicitany",
|
||||||
"watch": "tswatch element",
|
"watch": "tswatch element"
|
||||||
"buildDocs": "tsdoc"
|
|
||||||
},
|
},
|
||||||
"author": "Lossless GmbH",
|
"author": "Lossless GmbH",
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@design.estate/dees-domtools": "^2.0.55",
|
"@designestate/dees-domtools": "^2.0.22",
|
||||||
"@design.estate/dees-element": "^2.0.33",
|
"@designestate/dees-element": "^2.0.15",
|
||||||
"@design.estate/dees-wcctools": "^1.0.85",
|
"@designestate/dees-wcctools": "^1.0.74",
|
||||||
"@git.zone/tsrun": "^1.2.46",
|
"@gitzone/tsrun": "^1.2.32",
|
||||||
"@push.rocks/smartmarkdown": "^3.0.1",
|
"@losslessone_private/loint-pubapi": "^1.0.13",
|
||||||
"@webcontainer/api": "^1.1.8",
|
"@pushrocks/smartexpress": "^4.0.4",
|
||||||
"monaco-editor": "^0.45.0",
|
"@pushrocks/smartmarkdown": "^2.0.14",
|
||||||
"xterm": "^5.3.0",
|
"monaco-editor": "^0.33.0",
|
||||||
"xterm-addon-fit": "^0.8.0"
|
"xterm": "^4.18.0",
|
||||||
|
"xterm-addon-fit": "^0.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@git.zone/tsbuild": "^2.1.70",
|
"@gitzone/tsbuild": "^2.1.61",
|
||||||
"@git.zone/tsbundle": "^2.0.10",
|
"@gitzone/tsbundle": "^2.0.3",
|
||||||
"@git.zone/tstest": "^1.0.84",
|
"@gitzone/tstest": "^1.0.71",
|
||||||
"@git.zone/tswatch": "^2.0.13",
|
"@gitzone/tswatch": "^2.0.1",
|
||||||
"@push.rocks/projectinfo": "^5.0.2",
|
"@pushrocks/projectinfo": "^5.0.1",
|
||||||
"@push.rocks/tapbundle": "^5.0.15"
|
"@pushrocks/tapbundle": "^5.0.3"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"ts/**/*",
|
"ts/**/*",
|
||||||
@ -47,16 +47,5 @@
|
|||||||
],
|
],
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"last 1 Chrome versions"
|
"last 1 Chrome versions"
|
||||||
],
|
|
||||||
"keywords": [
|
|
||||||
"markdown editor",
|
|
||||||
"Monaco editor",
|
|
||||||
"web components",
|
|
||||||
"typescript",
|
|
||||||
"custom elements",
|
|
||||||
"terminal",
|
|
||||||
"markdown preview",
|
|
||||||
"code editing",
|
|
||||||
"syntax highlighting"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
6794
pnpm-lock.yaml
generated
6794
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
|||||||
|
|
135
readme.md
135
readme.md
@ -1,118 +1,39 @@
|
|||||||
# @design.estate/dees-editor
|
# @designestate/dees-editor
|
||||||
an advanced editor for markdown documents based on monaco.
|
an advanced editor for markdown documents based on monaco.
|
||||||
|
|
||||||
## Install
|
## Availabililty and Links
|
||||||
To install `@design.estate/dees-editor`, you need to run the following command using npm or Yarn. Make sure you have Node.js installed on your system before you proceed.
|
* [npmjs.org (npm package)](https://www.npmjs.com/package/@designestate/dees-editor)
|
||||||
|
* [gitlab.com (source)](https://gitlab.com/designestate/dees-editor)
|
||||||
|
* [github.com (source mirror)](https://github.com/designestate/dees-editor)
|
||||||
|
* [docs (typedoc)](https://designestate.gitlab.io/dees-editor/)
|
||||||
|
|
||||||
```bash
|
## Status for master
|
||||||
npm install @design.estate/dees-editor
|
|
||||||
# or if you prefer Yarn
|
Status Category | Status Badge
|
||||||
yarn add @design.estate/dees-editor
|
-- | --
|
||||||
```
|
GitLab Pipelines | [](https://lossless.cloud)
|
||||||
|
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
||||||
|
npm | [](https://lossless.cloud)
|
||||||
|
Snyk | [](https://lossless.cloud)
|
||||||
|
TypeScript Support | [](https://lossless.cloud)
|
||||||
|
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
|
Code Style | [](https://lossless.cloud)
|
||||||
|
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||||
|
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||||
|
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||||
|
Platform support | [](https://lossless.cloud) [](https://lossless.cloud)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
This guide walks you through the usage of `@design.estate/dees-editor`, an advanced editor for markdown documents based on Monaco Editor. This editor not only allows for high customization but also enhances your markdown editing with the robust features of Monaco Editor.
|
|
||||||
|
|
||||||
### Integrating `@design.estate/dees-editor` in Your Project
|
Use TypeScript for best in class intellisense
|
||||||
First, ensure you have installed `@design.estate/dees-editor` as described in the installation section.
|
|
||||||
|
|
||||||
#### Setting Up Your Project
|
## Contribution
|
||||||
Create a TypeScript file (e.g. `app.ts`) and import necessary functionalities using ESM syntax:
|
|
||||||
|
|
||||||
```typescript
|
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
|
||||||
import { DeesEditor, DeesTerminal, DeesEditorMarkdown, DeesEditorMarkdownOutlet } from '@design.estate/dees-editor';
|
|
||||||
```
|
|
||||||
|
|
||||||
### Displaying the Markdown Editor
|
For further information read the linked docs at the top of this readme.
|
||||||
To display the markdown editor in your web application, you will need to incorporate it into your HTML structure. Typically, you can use custom element tags provided by the library. Here's a simple example:
|
|
||||||
|
|
||||||
#### HTML Structure
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
Add the following HTML structure to your application's main HTML file (e.g., `index.html`):
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||||
|
|
||||||
```html
|
[](https://maintainedby.lossless.com)
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>Markdown Editor</title>
|
|
||||||
<script type="module" src="./app.ts"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<dees-editor></dees-editor>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Initializing the Editor
|
|
||||||
Within your `app.ts` file, initialize the markdown editor with desired options:
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
const editorElement = document.querySelector('dees-editor');
|
|
||||||
if (editorElement) {
|
|
||||||
editorElement.language = 'markdown'; // Set the language to markdown
|
|
||||||
editorElement.content = '# Markdown Editor\n\nStart typing your markdown content here...'; // Initial content
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Advanced Usage
|
|
||||||
`@design.estate/dees-editor` offers an advanced markdown editor that leverages the Monaco Editor. This means you can utilize Monaco's extensive API for further customization and functionality enhancement.
|
|
||||||
|
|
||||||
#### Configuring the Editor
|
|
||||||
The editor can be tailored to meet your needs, such as theming, read-only mode, and more. Explore Monaco's [`IStandaloneEditorConstructionOptions`](https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.IStandaloneEditorConstructionOptions.html) for all available configurations.
|
|
||||||
|
|
||||||
Example - Setting Dark Theme and Read-Only Mode:
|
|
||||||
```typescript
|
|
||||||
(async () => {
|
|
||||||
const editorInstance = await editorElement.editorDeferred.promise; // Wait for the editor to initialize
|
|
||||||
editorInstance.updateOptions({
|
|
||||||
theme: 'vs-dark', // Set theme to dark
|
|
||||||
readOnly: true // Make the editor read-only
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Integrating Terminal Emulator
|
|
||||||
`@design.estate/dees-editor` also includes a powerful terminal emulator, `DeesTerminal`, which can be embedded alongside your editor:
|
|
||||||
|
|
||||||
```html
|
|
||||||
<dees-terminal></dees-terminal>
|
|
||||||
```
|
|
||||||
|
|
||||||
And in your TypeScript file:
|
|
||||||
```typescript
|
|
||||||
const terminalElement = document.querySelector('dees-terminal');
|
|
||||||
if (terminalElement) {
|
|
||||||
// Initialize terminal with options or use it directly
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Creating a Live Markdown Preview
|
|
||||||
`@design.estate/dees-editor` facilitates creating live markdown previews. Utilize `DeesEditorMarkdown` for binding the editor with a live preview outlet.
|
|
||||||
|
|
||||||
```html
|
|
||||||
<dees-editormarkdown></dees-editormarkdown>
|
|
||||||
```
|
|
||||||
|
|
||||||
This component divides the viewport into an editor pane and a live preview pane. As you type in the editor, the markdown content automatically renders in the live preview.
|
|
||||||
|
|
||||||
### Conclusion
|
|
||||||
`@design.estate/dees-editor` is a feature-rich markdown editor built on top of Monaco Editor, offering extensive customizability and advanced features such as a terminal emulator and live markdown preview. Its integration into your project is straightforward, whether embedding the editor directly into your webpage or leveraging its components for advanced functionality. The versatility of Monaco Editor ensures that your markdown documentation needs are met with efficiency and style.
|
|
||||||
|
|
||||||
## License and Legal Information
|
|
||||||
|
|
||||||
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
|
|
||||||
|
|
||||||
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
### Trademarks
|
|
||||||
|
|
||||||
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
|
|
||||||
|
|
||||||
### Company Information
|
|
||||||
|
|
||||||
Task Venture Capital GmbH
|
|
||||||
Registered at District court Bremen HRB 35230 HB, Germany
|
|
||||||
|
|
||||||
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
|
|
||||||
|
|
||||||
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import { expect, expectAsync, tap, webhelpers } from '@push.rocks/tapbundle';
|
import { expect, expectAsync, tap, webhelpers } from '@pushrocks/tapbundle';
|
||||||
|
|
||||||
import * as deesEditorLib from '../ts_web/index.js';
|
import * as deesEditorLib from '../ts_web/index.js';
|
||||||
|
|
||||||
tap.test('test dees-editor', async () => {
|
tap.test('test dees-editor', async () => {
|
||||||
const deesEditor = new deesEditorLib.DeesEditor();
|
const deesEditor = new deesEditorLib.DeesEditor;
|
||||||
expect(deesEditor).toBeInstanceOf(deesEditorLib.DeesEditor);
|
expect(deesEditor).toBeInstanceOf(deesEditorLib.DeesEditor)
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('test dees-terminal', async () => {
|
tap.test('test dees-terminal', async () => {
|
||||||
const deesTerminal = await webhelpers.fixture(`<dees-terminal></dees-terminal>`);
|
const deesTerminal = await webhelpers.fixture(`<dees-terminal></dees-terminal>`);
|
||||||
expect(deesTerminal).toBeInstanceOf(deesEditorLib.DeesTerminal);
|
expect(deesTerminal).toBeInstanceOf(deesEditorLib.DeesTerminal);
|
||||||
});
|
})
|
||||||
|
|
||||||
tap.start();
|
tap.start()
|
@ -2,7 +2,7 @@
|
|||||||
* autocreated commitinfo by @pushrocks/commitinfo
|
* autocreated commitinfo by @pushrocks/commitinfo
|
||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@design.estate/dees-editor',
|
name: '@designestate/dees-editor',
|
||||||
version: '1.0.75',
|
version: '1.0.71',
|
||||||
description: 'an advanced editor for markdown documents based on monaco.'
|
description: 'an advanced editor for markdown documents based on monaco.'
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { customElement, DeesElement, html, type TemplateResult } from '@design.estate/dees-element';
|
import { customElement, DeesElement, html, TemplateResult } from '@designestate/dees-element';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
|
@ -3,11 +3,11 @@ import {
|
|||||||
property,
|
property,
|
||||||
html,
|
html,
|
||||||
customElement,
|
customElement,
|
||||||
type TemplateResult,
|
TemplateResult,
|
||||||
css,
|
css,
|
||||||
cssManager,
|
cssManager,
|
||||||
} from '@design.estate/dees-element';
|
} from '@designestate/dees-element';
|
||||||
import * as domtools from '@design.estate/dees-domtools';
|
import * as domtools from '@designestate/dees-domtools';
|
||||||
|
|
||||||
import type * as monaco from 'monaco-editor';
|
import type * as monaco from 'monaco-editor';
|
||||||
|
|
||||||
|
@ -3,13 +3,13 @@ import {
|
|||||||
property,
|
property,
|
||||||
html,
|
html,
|
||||||
customElement,
|
customElement,
|
||||||
type TemplateResult,
|
TemplateResult,
|
||||||
css,
|
css,
|
||||||
cssManager,
|
cssManager,
|
||||||
} from '@design.estate/dees-element';
|
} from '@designestate/dees-element';
|
||||||
import * as domtools from '@design.estate/dees-domtools';
|
import * as domtools from '@designestate/dees-domtools';
|
||||||
|
|
||||||
import * as smartmarkdown from '@push.rocks/smartmarkdown';
|
import * as smartmarkdown from '@pushrocks/smartmarkdown';
|
||||||
|
|
||||||
const deferred = domtools.plugins.smartpromise.defer();
|
const deferred = domtools.plugins.smartpromise.defer();
|
||||||
|
|
||||||
@ -41,7 +41,10 @@ export class DeesEditorMarkdown extends DeesElement {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
font-family: 'Roboto Slab';
|
font-family: 'Roboto Slab';
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
overflow-y: scroll;
|
}
|
||||||
|
|
||||||
|
.outletContainer h1 {
|
||||||
|
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
|
@ -1,15 +1,5 @@
|
|||||||
import {
|
import { DeesElement, property, html, customElement, TemplateResult, css, cssManager } from '@designestate/dees-element';
|
||||||
DeesElement,
|
import * as domtools from '@designestate/dees-domtools';
|
||||||
property,
|
|
||||||
html,
|
|
||||||
customElement,
|
|
||||||
type TemplateResult,
|
|
||||||
css,
|
|
||||||
cssManager,
|
|
||||||
} from '@design.estate/dees-element';
|
|
||||||
import * as domtools from '@design.estate/dees-domtools';
|
|
||||||
|
|
||||||
import * as webcontainer from '@webcontainer/api';
|
|
||||||
|
|
||||||
import { Terminal } from 'xterm';
|
import { Terminal } from 'xterm';
|
||||||
import { FitAddon } from 'xterm-addon-fit';
|
import { FitAddon } from 'xterm-addon-fit';
|
||||||
@ -22,7 +12,9 @@ declare global {
|
|||||||
|
|
||||||
@customElement('dees-terminal')
|
@customElement('dees-terminal')
|
||||||
export class DeesTerminal extends DeesElement {
|
export class DeesTerminal extends DeesElement {
|
||||||
public static demo = () => html` <dees-terminal></dees-terminal> `;
|
public static demo = () => html`
|
||||||
|
<dees-terminal></dees-terminal>
|
||||||
|
`;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
@ -87,143 +79,143 @@ export class DeesTerminal extends DeesElement {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
.xterm {
|
.xterm {
|
||||||
font-feature-settings: 'liga' 0;
|
font-feature-settings: "liga" 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-ms-user-select: none;
|
-ms-user-select: none;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm.focus,
|
.xterm.focus,
|
||||||
.xterm:focus {
|
.xterm:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm .xterm-helpers {
|
.xterm .xterm-helpers {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
/**
|
/**
|
||||||
* The z-index of the helpers must be higher than the canvases in order for
|
* The z-index of the helpers must be higher than the canvases in order for
|
||||||
* IMEs to appear on top.
|
* IMEs to appear on top.
|
||||||
*/
|
*/
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm .xterm-helper-textarea {
|
.xterm .xterm-helper-textarea {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
/* Move textarea out of the screen to the far left, so that the cursor is not visible */
|
/* Move textarea out of the screen to the far left, so that the cursor is not visible */
|
||||||
position: absolute;
|
position: absolute;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
left: -9999em;
|
left: -9999em;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
z-index: -5;
|
z-index: -5;
|
||||||
/** Prevent wrapping so the IME appears against the textarea at the correct position */
|
/** Prevent wrapping so the IME appears against the textarea at the correct position */
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
resize: none;
|
resize: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm .composition-view {
|
.xterm .composition-view {
|
||||||
/* TODO: Composition position got messed up somewhere */
|
/* TODO: Composition position got messed up somewhere */
|
||||||
background: #000;
|
background: #000;
|
||||||
color: #fff;
|
color: #FFF;
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm .composition-view.active {
|
.xterm .composition-view.active {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm .xterm-viewport {
|
.xterm .xterm-viewport {
|
||||||
/* On OS X this is required in order for the scroll bar to appear fully opaque */
|
/* On OS X this is required in order for the scroll bar to appear fully opaque */
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm .xterm-screen {
|
.xterm .xterm-screen {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm .xterm-screen canvas {
|
.xterm .xterm-screen canvas {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm .xterm-scroll-area {
|
.xterm .xterm-scroll-area {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm-char-measure-element {
|
.xterm-char-measure-element {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: -9999em;
|
left: -9999em;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm {
|
.xterm {
|
||||||
cursor: text;
|
cursor: text;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm.enable-mouse-events {
|
.xterm.enable-mouse-events {
|
||||||
/* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
|
/* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm.xterm-cursor-pointer {
|
.xterm.xterm-cursor-pointer {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm.column-select.focus {
|
.xterm.column-select.focus {
|
||||||
/* Column selection mode */
|
/* Column selection mode */
|
||||||
cursor: crosshair;
|
cursor: crosshair;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm .xterm-accessibility,
|
.xterm .xterm-accessibility,
|
||||||
.xterm .xterm-message {
|
.xterm .xterm-message {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm .live-region {
|
.xterm .live-region {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: -9999px;
|
left: -9999px;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm-dim {
|
.xterm-dim {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm-underline {
|
.xterm-underline {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
];
|
]
|
||||||
|
|
||||||
public render(): TemplateResult {
|
public render (): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
<div class="mainbox">
|
<div class="mainbox">
|
||||||
<div id="container"></div>
|
<div id="container"></div>
|
||||||
@ -231,17 +223,11 @@ export class DeesTerminal extends DeesElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async firstUpdated(
|
public async firstUpdated (_changedProperties: Map<string | number | symbol, unknown>): Promise<void> {
|
||||||
_changedProperties: Map<string | number | symbol, unknown>
|
|
||||||
): Promise<void> {
|
|
||||||
const domtools = await this.domtoolsPromise;
|
|
||||||
super.firstUpdated(_changedProperties);
|
super.firstUpdated(_changedProperties);
|
||||||
const container = this.shadowRoot.getElementById('container');
|
const container = this.shadowRoot.getElementById('container');
|
||||||
|
|
||||||
const term = new Terminal({
|
const term = new Terminal();
|
||||||
convertEol: true,
|
|
||||||
cursorBlink: true,
|
|
||||||
});
|
|
||||||
const fitAddon = new FitAddon();
|
const fitAddon = new FitAddon();
|
||||||
term.loadAddon(fitAddon);
|
term.loadAddon(fitAddon);
|
||||||
|
|
||||||
@ -252,23 +238,5 @@ export class DeesTerminal extends DeesElement {
|
|||||||
fitAddon.fit();
|
fitAddon.fit();
|
||||||
|
|
||||||
term.write(`dees-terminal custom terminal. \r\n$ `);
|
term.write(`dees-terminal custom terminal. \r\n$ `);
|
||||||
|
|
||||||
// lets start the webcontainer
|
|
||||||
// Call only once
|
|
||||||
const webcontainerInstance = await webcontainer.WebContainer.boot();
|
|
||||||
const shellProcess = await webcontainerInstance.spawn('jsh');
|
|
||||||
shellProcess.output.pipeTo(
|
|
||||||
new WritableStream({
|
|
||||||
write(data) {
|
|
||||||
term.write(data);
|
|
||||||
},
|
|
||||||
})
|
|
||||||
);
|
|
||||||
const input = shellProcess.input.getWriter();
|
|
||||||
term.onData((data) => {
|
|
||||||
input.write(data);
|
|
||||||
});
|
|
||||||
await domtools.convenience.smartdelay.delayFor(5000);
|
|
||||||
input.write(`pnpm add isomorphic-git @git.zone/tsbuild\n`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,14 +1,8 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"useDefineForClassFields": false,
|
"target": "ES2020",
|
||||||
"target": "ES2022",
|
"module": "ES2020",
|
||||||
"module": "NodeNext",
|
"moduleResolution": "node12"
|
||||||
"moduleResolution": "NodeNext",
|
}
|
||||||
"esModuleInterop": true,
|
|
||||||
"verbatimModuleSyntax": true
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist_*/**/*.d.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user