Compare commits
33 Commits
Author | SHA1 | Date | |
---|---|---|---|
595620af4b | |||
8c3a116943 | |||
269b90c64c | |||
6d74bdfb51 | |||
6aa1e9bc2a | |||
3f83bb9fba | |||
57bbca6b28 | |||
51382611cf | |||
3094c0b815 | |||
f5273b6b82 | |||
9c51d93418 | |||
5a769ef7e2 | |||
8f71d1afde | |||
6f7dace5da | |||
4008a5ab62 | |||
13f1d4698f | |||
d93e183db1 | |||
bff3b1f567 | |||
39fb873aec | |||
a2f2605241 | |||
8dfb876988 | |||
5db7fc9a3b | |||
690b85f057 | |||
eea091cb56 | |||
8d725ef303 | |||
4aa2708f24 | |||
d1848f31a7 | |||
5aba0a7fa5 | |||
134774b870 | |||
43897f0fb5 | |||
2e57176dcc | |||
d1fe66f1ba | |||
8ea7c53154 |
66
.gitea/workflows/default_nottags.yaml
Normal file
66
.gitea/workflows/default_nottags.yaml
Normal file
@ -0,0 +1,66 @@
|
||||
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
|
124
.gitea/workflows/default_tags.yaml
Normal file
124
.gitea/workflows/default_tags.yaml
Normal file
@ -0,0 +1,124 @@
|
||||
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 @git.zone/tsdoc
|
||||
npmci command tsdoc
|
||||
continue-on-error: true
|
@ -13,31 +13,24 @@ stages:
|
||||
- metadata
|
||||
|
||||
before_script:
|
||||
- npm install -g @shipzone/npmci
|
||||
- pnpm install -g pnpm
|
||||
- pnpm install -g @shipzone/npmci
|
||||
- npmci npm prepare
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
mirror:
|
||||
stage: security
|
||||
script:
|
||||
- npmci git mirror
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
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
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command pnpm audit --audit-level=high --prod
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
@ -45,11 +38,10 @@ 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
|
||||
- npmci command pnpm audit --audit-level=high --dev
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
@ -60,7 +52,6 @@ auditDevDependencies:
|
||||
testStable:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
@ -71,10 +62,9 @@ testStable:
|
||||
testBuild:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci command npm run build
|
||||
- npmci npm build
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
@ -122,11 +112,9 @@ trigger:
|
||||
pages:
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci node install lts
|
||||
- npmci command npm install -g @gitzone/tsdoc
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci command tsdoc
|
||||
- npmci command npm run buildDocs
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--gitzone element-->
|
||||
<!-- made by Lossless GmbH -->
|
||||
<!-- made by Task Venture Capital GmbH -->
|
||||
<!-- checkout https://maintainedby.lossless.com for awesome OpenSource projects -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
@ -10,6 +10,10 @@
|
||||
/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<!--Lets load standard fonts-->
|
||||
<link rel="preconnect" href="https://assetbroker.lossless.one/" crossorigin>
|
||||
<link rel="stylesheet" href="https://assetbroker.lossless.one/fonts/fonts.css">
|
||||
|
||||
<style>
|
||||
body {
|
||||
margin: 0px;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// dees tools
|
||||
import * as deesWccTools from '../ts_web/index.js';
|
||||
import * as deesDomTools from '@designestate/dees-domtools';
|
||||
import * as deesDomTools from '@design.estate/dees-domtools';
|
||||
|
||||
// elements and pages
|
||||
import * as elements from '../test/elements/index.js';
|
||||
|
@ -2,17 +2,32 @@
|
||||
"gitzone": {
|
||||
"projectType": "wcc",
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"githost": "code.foss.global",
|
||||
"gitscope": "designestate",
|
||||
"gitrepo": "dees-wcctools",
|
||||
"description": "wcc tools for creating element catalogues",
|
||||
"description": "A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.",
|
||||
"npmPackagename": "@designestate/dees-wcctools",
|
||||
"license": "MIT",
|
||||
"projectDomain": "design.estate"
|
||||
"projectDomain": "design.estate",
|
||||
"keywords": [
|
||||
"web components",
|
||||
"element catalogues",
|
||||
"custom elements",
|
||||
"documentation",
|
||||
"typescript",
|
||||
"lit",
|
||||
"component development",
|
||||
"design system",
|
||||
"element testing",
|
||||
"page development"
|
||||
]
|
||||
}
|
||||
},
|
||||
"npmci": {
|
||||
"npmGlobalTools": [],
|
||||
"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"
|
||||
}
|
||||
}
|
17360
package-lock.json
generated
17360
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
44
package.json
44
package.json
@ -1,32 +1,32 @@
|
||||
{
|
||||
"name": "@designestate/dees-wcctools",
|
||||
"version": "1.0.74",
|
||||
"name": "@design.estate/dees-wcctools",
|
||||
"version": "1.0.90",
|
||||
"private": false,
|
||||
"description": "wcc tools for creating element catalogues",
|
||||
"description": "A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.",
|
||||
"main": "dist_ts_web/index.js",
|
||||
"typings": "dist_ts_web/index.d.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "(npm run build)",
|
||||
"build": "(tsbuild element --web --allowimplicitany --skiplibcheck && tsbundle element)",
|
||||
"watch": "tswatch element"
|
||||
"build": "(tsbuild element --web --allowimplicitany && tsbundle element)",
|
||||
"watch": "tswatch element",
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"author": "Lossless GmbH",
|
||||
"license": "UNLICENSED",
|
||||
"dependencies": {
|
||||
"@designestate/dees-domtools": "^2.0.6",
|
||||
"@designestate/dees-element": "^2.0.6",
|
||||
"@gitzone/tsrun": "^1.2.32",
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartexpress": "^4.0.4"
|
||||
"@design.estate/dees-domtools": "^2.0.57",
|
||||
"@design.estate/dees-element": "^2.0.34",
|
||||
"@push.rocks/smartdelay": "^3.0.5",
|
||||
"lit": "^3.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.61",
|
||||
"@gitzone/tsbundle": "^1.0.102",
|
||||
"@gitzone/tswatch": "^1.0.76",
|
||||
"@pushrocks/projectinfo": "^4.0.5",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.17.0"
|
||||
"@api.global/typedserver": "^3.0.29",
|
||||
"@git.zone/tsbuild": "^2.1.72",
|
||||
"@git.zone/tsbundle": "^2.0.15",
|
||||
"@git.zone/tsrun": "^1.2.44",
|
||||
"@git.zone/tswatch": "^2.0.23",
|
||||
"@push.rocks/projectinfo": "^5.0.2"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
@ -42,5 +42,17 @@
|
||||
],
|
||||
"browserslist": [
|
||||
"last 1 Chrome versions"
|
||||
],
|
||||
"keywords": [
|
||||
"web components",
|
||||
"element catalogues",
|
||||
"custom elements",
|
||||
"documentation",
|
||||
"typescript",
|
||||
"lit",
|
||||
"component development",
|
||||
"design system",
|
||||
"element testing",
|
||||
"page development"
|
||||
]
|
||||
}
|
||||
|
4230
pnpm-lock.yaml
generated
Normal file
4230
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
1
readme.hints.md
Normal file
1
readme.hints.md
Normal file
@ -0,0 +1 @@
|
||||
|
134
readme.md
134
readme.md
@ -1,41 +1,117 @@
|
||||
# @designestate/dees-wcctools
|
||||
# @design.estate/dees-wcctools
|
||||
wcc tools for creating element catalogues
|
||||
|
||||
## Availabililty and Links
|
||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@designestate/dees-wcctools)
|
||||
* [gitlab.com (source)](https://gitlab.com/designestate/dees-wcctools)
|
||||
* [github.com (source mirror)](https://github.com/designestate/dees-wcctools)
|
||||
* [docs (typedoc)](https://designestate.gitlab.io/dees-wcctools/)
|
||||
## Install
|
||||
To install `@design.estate/dees-wcctools`, you can use npm:
|
||||
|
||||
## Status for master
|
||||
|
||||
Status Category | Status Badge
|
||||
-- | --
|
||||
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)
|
||||
```bash
|
||||
npm install @design.estate/dees-wcctools --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
The `@design.estate/dees-wcctools` package provides a set of tools for creating element catalogues using Web Components. It leverages LitElement for creating custom elements and provides a structured way to showcase and test these elements in various environments and themes.
|
||||
|
||||
## Contribution
|
||||
### Setting Up
|
||||
First, ensure that your project is set up to use TypeScript and ESM syntax. This guide assumes you have a basic understanding of TypeScript and modern JavaScript development practices.
|
||||
|
||||
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). :)
|
||||
Start by importing the necessary tools from `@design.estate/dees-wcctools` in your main TypeScript file.
|
||||
|
||||
## Contribution
|
||||
```typescript
|
||||
import { setupWccTools } from '@design.estate/dees-wcctools';
|
||||
```
|
||||
|
||||
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). :)
|
||||
### Defining Custom Elements
|
||||
Define your custom elements using LitElement. Here's a simple example of an element:
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
```typescript
|
||||
import { LitElement, html, customElement } from 'lit';
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||
@customElement('my-element')
|
||||
class MyElement extends LitElement {
|
||||
render() {
|
||||
return html`<p>Hello, world!</p>`;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
[](https://maintainedby.lossless.com)
|
||||
### Bootstrapping the WCCTools Dashboard
|
||||
To showcase your elements, `@design.estate/dees-wcctools` provides a handy way to bootstrap a dashboard where your elements can be registered and displayed.
|
||||
|
||||
Create a bootstrap function in your main file or a separate module:
|
||||
|
||||
```typescript
|
||||
async function bootstrapWCCTools() {
|
||||
// Define your elements here
|
||||
const elements = {
|
||||
'my-element': MyElement, // Assuming MyElement is imported
|
||||
};
|
||||
|
||||
// Optionally, define pages as functions returning Lit HTML Templates
|
||||
const pages = {
|
||||
home: () => html`<h1>Welcome to My Element Catalogue</h1>`,
|
||||
};
|
||||
|
||||
// Setup the WCCTools dashboard
|
||||
setupWccTools(elements, pages);
|
||||
}
|
||||
```
|
||||
|
||||
Call this function to initialize your catalogue:
|
||||
|
||||
```typescript
|
||||
bootstrapWCCTools();
|
||||
```
|
||||
|
||||
### Configurations and Customizations
|
||||
The `setupWccTools` function accepts two arguments: `elements` and `pages`.
|
||||
|
||||
- `elements`: An object where keys are element tags (e.g., 'my-element') and values are the corresponding class definitions.
|
||||
- `pages`: An optional object where keys are page identifiers and values are functions returning Lit HTML templates.
|
||||
|
||||
### Testing Elements
|
||||
Once the dashboard is set up, navigate to your project in a web browser. You'll see a sidebar listing all registered elements and pages. Clicking on an element name will display it in the main view, allowing you to interact with it and see it in action.
|
||||
|
||||
### Theme and Environment Testing
|
||||
The dashboard also provides options for testing your elements in different environments (e.g., desktop, tablet) and themes (light or dark). This helps ensure that your elements are versatile and adaptable to varying conditions.
|
||||
|
||||
### Expanding Your Catalogue
|
||||
To add more elements to your catalogue, simply extend the `elements` object and rerun `bootstrapWCCTools()`. This modular approach makes it easy to maintain and expand your element catalogue.
|
||||
|
||||
### Leveraging TypeScript
|
||||
Using TypeScript allows you to enforce typing and build more reliable web components. Define properties with decorators, and use TypeScript's features to enhance your component development process.
|
||||
|
||||
```typescript
|
||||
import { LitElement, property, html, customElement } from 'lit';
|
||||
|
||||
@customElement('typed-element')
|
||||
class TypedElement extends LitElement {
|
||||
@property({type: String})
|
||||
name: string = 'World';
|
||||
|
||||
render() {
|
||||
return html`<p>Hello, ${this.name}!</p>`;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Conclusion
|
||||
`@design.estate/dees-wcctools` provides a powerful, flexible platform for developing, showcasing, and testing web components. By leveraging modern development practices like TypeScript and LitElement, you can build a robust catalogue of reusable web components ready for any project.
|
||||
|
||||
## 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,14 +1,14 @@
|
||||
import {
|
||||
DeesElement,
|
||||
customElement,
|
||||
TemplateResult,
|
||||
type TemplateResult,
|
||||
html,
|
||||
property,
|
||||
css,
|
||||
cssManager,
|
||||
} from '@designestate/dees-element';
|
||||
} from '@design.estate/dees-element';
|
||||
|
||||
import * as domtools from '@designestate/dees-domtools';
|
||||
import * as domtools from '@design.estate/dees-domtools';
|
||||
|
||||
enum ETestEnum {
|
||||
'first' = 'first',
|
||||
|
8
ts_web/00_commitinfo_data.ts
Normal file
8
ts_web/00_commitinfo_data.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@design.estate/dees-wcctools',
|
||||
version: '1.0.90',
|
||||
description: 'A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.'
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
import { DeesElement, property, html, customElement, TemplateResult, queryAsync, render, domtools } from '@designestate/dees-element';
|
||||
import { DeesElement, property, html, customElement, type TemplateResult, queryAsync, render, domtools } from '@design.estate/dees-element';
|
||||
|
||||
import * as plugins from '../wcctools.plugins.js';
|
||||
|
||||
@ -6,9 +6,9 @@ import * as plugins from '../wcctools.plugins.js';
|
||||
import './wcc-frame.js';
|
||||
import './wcc-sidebar.js';
|
||||
import './wcc-properties.js';
|
||||
import { TTheme } from './wcc-properties.js';
|
||||
import { TElementType } from './wcc-sidebar.js';
|
||||
import { breakpoints } from '@designestate/dees-domtools';
|
||||
import { type TTheme } from './wcc-properties.js';
|
||||
import { type TElementType } from './wcc-sidebar.js';
|
||||
import { breakpoints } from '@design.estate/dees-domtools';
|
||||
import { WccFrame } from './wcc-frame.js';
|
||||
|
||||
@customElement('wcc-dashboard')
|
||||
@ -61,7 +61,6 @@ export class WccDashboard extends DeesElement {
|
||||
return html`
|
||||
<style>
|
||||
:host {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
background: #fcfcfc;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
@ -134,12 +133,16 @@ export class WccDashboard extends DeesElement {
|
||||
);
|
||||
}
|
||||
|
||||
public async updated() {
|
||||
public async updated(changedPropertiesArg: Map<string, any>) {
|
||||
this.domtools = await plugins.deesDomtools.DomTools.setupDomTools();
|
||||
await this.domtools.router._handleRouteState();
|
||||
const storeElement = this.selectedItem;
|
||||
const wccFrame: WccFrame = this.shadowRoot.querySelector('wcc-frame');
|
||||
|
||||
if (changedPropertiesArg.has('selectedItemName')) {
|
||||
document.title = this.selectedItemName;
|
||||
};
|
||||
|
||||
if (this.selectedType === 'page' && this.selectedItem) {
|
||||
if (typeof this.selectedItem === 'function') {
|
||||
console.log('slotting page.');
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { DeesElement, property, html, customElement, TemplateResult, css, cssManager } from '@designestate/dees-element';
|
||||
import { DeesElement, property, html, customElement, type TemplateResult, css, cssManager } from '@design.estate/dees-element';
|
||||
|
||||
import * as domtools from '@designestate/dees-domtools';
|
||||
import * as domtools from '@design.estate/dees-domtools';
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
@ -25,6 +25,7 @@ export class WccFrame extends DeesElement {
|
||||
bottom: 100px;
|
||||
overflow-y: auto;
|
||||
overflow-x: auto;
|
||||
overscroll-behavior: contain;
|
||||
}
|
||||
|
||||
.viewport {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { DeesElement, property, html, customElement, TemplateResult, state } from '@designestate/dees-element';
|
||||
import { DeesElement, property, html, customElement, type TemplateResult, state } from '@design.estate/dees-element';
|
||||
import { WccDashboard } from './wcc-dashboard.js';
|
||||
|
||||
export type TPropertyType = 'String' | 'Number' | 'Boolean' | 'Object' | 'Enum' | 'Array';
|
||||
@ -36,7 +36,6 @@ export class WccProperties extends DeesElement {
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
|
||||
<style>
|
||||
:host {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
@ -62,6 +61,21 @@ export class WccProperties extends DeesElement {
|
||||
grid-template-columns: 33% 33% 33%;
|
||||
}
|
||||
|
||||
.material-symbols-outlined {
|
||||
font-family: 'Material Symbols Outlined';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48;
|
||||
}
|
||||
|
||||
.properties .property {
|
||||
padding: 5px;
|
||||
background: #444;
|
||||
@ -97,7 +111,6 @@ export class WccProperties extends DeesElement {
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.button:hover {
|
||||
cursor: pointer;
|
||||
color: #333;
|
||||
background: #fff;
|
||||
}
|
||||
@ -107,7 +120,6 @@ export class WccProperties extends DeesElement {
|
||||
}
|
||||
|
||||
.button.selected:hover {
|
||||
cursor: pointer;
|
||||
color: #ffffff;
|
||||
background: #455a64;
|
||||
}
|
||||
@ -125,7 +137,6 @@ export class WccProperties extends DeesElement {
|
||||
}
|
||||
|
||||
.docs:hover {
|
||||
cursor: pointer;
|
||||
color: #333;
|
||||
background: #fff;
|
||||
}
|
||||
@ -157,7 +168,7 @@ export class WccProperties extends DeesElement {
|
||||
this.selectTheme('dark');
|
||||
}}
|
||||
>
|
||||
Dark<br /><i class="material-icons">brightness_3</i>
|
||||
Dark<br /><i class="material-symbols-outlined">brightness_3</i>
|
||||
</div>
|
||||
<div
|
||||
class="button ${this.selectedTheme === 'bright' ? 'selected' : null}"
|
||||
@ -165,7 +176,7 @@ export class WccProperties extends DeesElement {
|
||||
this.selectTheme('bright');
|
||||
}}
|
||||
>
|
||||
Bright<br /><i class="material-icons">flare</i>
|
||||
Bright<br /><i class="material-symbols-outlined">flare</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -178,7 +189,7 @@ export class WccProperties extends DeesElement {
|
||||
this.selectViewport('phone');
|
||||
}}
|
||||
>
|
||||
Phone<br /><i class="material-icons">smartphone</i>
|
||||
Phone<br /><i class="material-symbols-outlined">smartphone</i>
|
||||
</div>
|
||||
<div
|
||||
class="button ${this.selectedViewport === 'phablet' ? 'selected' : null}"
|
||||
@ -186,7 +197,7 @@ export class WccProperties extends DeesElement {
|
||||
this.selectViewport('phablet');
|
||||
}}
|
||||
>
|
||||
Phablet<br /><i class="material-icons">smartphone</i>
|
||||
Phablet<br /><i class="material-symbols-outlined">smartphone</i>
|
||||
</div>
|
||||
<div
|
||||
class="button ${this.selectedViewport === 'tablet' ? 'selected' : null}"
|
||||
@ -194,7 +205,7 @@ export class WccProperties extends DeesElement {
|
||||
this.selectViewport('tablet');
|
||||
}}
|
||||
>
|
||||
Tablet<br /><i class="material-icons">tablet</i>
|
||||
Tablet<br /><i class="material-symbols-outlined">tablet</i>
|
||||
</div>
|
||||
<div
|
||||
class="button ${this.selectedViewport === 'desktop' ||
|
||||
@ -205,7 +216,7 @@ export class WccProperties extends DeesElement {
|
||||
this.selectViewport('native');
|
||||
}}
|
||||
>
|
||||
Desktop<br /><i class="material-icons">desktop_windows</i>
|
||||
Desktop<br /><i class="material-symbols-outlined">desktop_windows</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,14 +1,11 @@
|
||||
import * as plugins from '../wcctools.plugins.js';
|
||||
import { DeesElement, property, html, customElement, TemplateResult } from '@designestate/dees-element';
|
||||
import { DeesElement, property, html, customElement, type TemplateResult } from '@design.estate/dees-element';
|
||||
import { WccDashboard } from './wcc-dashboard.js';
|
||||
|
||||
export type TElementType = 'element' | 'page';
|
||||
|
||||
@customElement('wcc-sidebar')
|
||||
export class WccSidebar extends DeesElement {
|
||||
@property({type: Array})
|
||||
public websites: string[] = [];
|
||||
|
||||
@property({ attribute: false })
|
||||
public selectedItem: DeesElement | (() => TemplateResult);
|
||||
|
||||
@ -25,7 +22,8 @@ export class WccSidebar extends DeesElement {
|
||||
:host {
|
||||
display: block;
|
||||
border-right: 1px solid #999;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-family: 'Roboto', 'Inter', sans-serif;
|
||||
font-size: 12px;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
@ -39,21 +37,23 @@ export class WccSidebar extends DeesElement {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.heading {
|
||||
font-size: 24px;
|
||||
text-align: center;
|
||||
margin: 20px 5px 5px 5px;
|
||||
.material-symbols-outlined {
|
||||
font-family: 'Material Symbols Outlined';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48;
|
||||
}
|
||||
|
||||
.heading a {
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.subheading {
|
||||
text-align: center;
|
||||
}
|
||||
.selectOption {
|
||||
user-select: none;
|
||||
position: relative;
|
||||
line-height: 24px;
|
||||
padding: 5px;
|
||||
@ -62,7 +62,6 @@ export class WccSidebar extends DeesElement {
|
||||
grid-template-columns: 28px auto;
|
||||
}
|
||||
.selectOption:hover {
|
||||
cursor: pointer;
|
||||
padding: 5px;
|
||||
color: #333;
|
||||
background: #fff;
|
||||
@ -73,18 +72,17 @@ export class WccSidebar extends DeesElement {
|
||||
}
|
||||
|
||||
.selectOption.selected:hover {
|
||||
cursor: pointer;
|
||||
color: #ffffff;
|
||||
background: #455A64;
|
||||
}
|
||||
|
||||
.selectOption .material-icons {
|
||||
.selectOption .material-symbols-outlined {
|
||||
color: #666;
|
||||
display: block;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.selectOption.selected .material-icons {
|
||||
.selectOption.selected .material-symbols-outlined {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
@ -97,17 +95,7 @@ export class WccSidebar extends DeesElement {
|
||||
|
||||
|
||||
</style>
|
||||
<div class="heading">
|
||||
<a href="https://gitlab.com/designestate/dees-wcctools" target="_blank">wcctools</a>
|
||||
</div>
|
||||
<div class="subheading">
|
||||
by Lossless GmbH
|
||||
</div>
|
||||
<div class="menu">
|
||||
<h3>Live Websites</h3>
|
||||
${this.websites.map(website => {
|
||||
return html`<div class="selectOption"><i class="material-icons">ondemand_video</i><div class="text">${website}</div></div>`;
|
||||
})}
|
||||
<h3>Pages</h3>
|
||||
${(() => {
|
||||
const pages = Object.keys(this.dashboardRef.pages);
|
||||
@ -121,7 +109,7 @@ export class WccSidebar extends DeesElement {
|
||||
this.selectItem('page', pageName, item);
|
||||
}}
|
||||
>
|
||||
<i class="material-icons">insert_drive_file</i>
|
||||
<i class="material-symbols-outlined">insert_drive_file</i>
|
||||
<div class="text">${pageName}</div>
|
||||
</div>
|
||||
`;
|
||||
@ -140,13 +128,13 @@ export class WccSidebar extends DeesElement {
|
||||
this.selectItem('element', elementName, item);
|
||||
}}
|
||||
>
|
||||
<i class="material-icons">featured_video</i>
|
||||
<i class="material-symbols-outlined">featured_video</i>
|
||||
<div class="text">${elementName}</div>
|
||||
</div>
|
||||
`;
|
||||
});
|
||||
})()}
|
||||
</menu>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { WccDashboard } from './elements/wcc-dashboard.js';
|
||||
import { LitElement, TemplateResult } from 'lit-element';
|
||||
import { LitElement, type TemplateResult } from 'lit';
|
||||
|
||||
const setupWccTools = (elementsArg?: { [key: string]: LitElement }, pagesArg?: { [key: string]: () => TemplateResult }) => {
|
||||
let hasRun = false;
|
||||
|
@ -1,10 +1,10 @@
|
||||
import * as smartdelay from '@pushrocks/smartdelay';
|
||||
import * as smartdelay from '@push.rocks/smartdelay';
|
||||
|
||||
export {
|
||||
smartdelay
|
||||
};
|
||||
|
||||
import * as deesDomtools from '@designestate/dees-domtools';
|
||||
import * as deesDomtools from '@design.estate/dees-domtools';
|
||||
|
||||
export {
|
||||
deesDomtools
|
||||
|
@ -3,7 +3,12 @@
|
||||
"experimentalDecorators": true,
|
||||
"useDefineForClassFields": false,
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"moduleResolution": "nodenext"
|
||||
}
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"esModuleInterop": true,
|
||||
"verbatimModuleSyntax": true
|
||||
},
|
||||
"exclude": [
|
||||
"dist_*/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
|
17
tslint.json
17
tslint.json
@ -1,17 +0,0 @@
|
||||
{
|
||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||
"rules": {
|
||||
"semicolon": [true, "always"],
|
||||
"no-console": false,
|
||||
"ordered-imports": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"member-ordering": {
|
||||
"options":{
|
||||
"order": [
|
||||
"static-method"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultSeverity": "warning"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user