Compare commits

..

No commits in common. "master" and "v1.0.81" have entirely different histories.

10 changed files with 721 additions and 1808 deletions

View File

@ -2,32 +2,17 @@
"gitzone": {
"projectType": "wcc",
"module": {
"githost": "code.foss.global",
"githost": "gitlab.com",
"gitscope": "designestate",
"gitrepo": "dees-wcctools",
"description": "A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.",
"description": "wcc tools for creating element catalogues",
"npmPackagename": "@designestate/dees-wcctools",
"license": "MIT",
"projectDomain": "design.estate",
"keywords": [
"web components",
"element catalogues",
"custom elements",
"documentation",
"typescript",
"lit",
"component development",
"design system",
"element testing",
"page development"
]
"projectDomain": "design.estate"
}
},
"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"
}
}

View File

@ -1,8 +1,8 @@
{
"name": "@design.estate/dees-wcctools",
"version": "1.0.90",
"version": "1.0.81",
"private": false,
"description": "A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.",
"description": "wcc tools for creating element catalogues",
"main": "dist_ts_web/index.js",
"typings": "dist_ts_web/index.d.ts",
"type": "module",
@ -15,17 +15,17 @@
"author": "Lossless GmbH",
"license": "UNLICENSED",
"dependencies": {
"@design.estate/dees-domtools": "^2.0.57",
"@design.estate/dees-element": "^2.0.34",
"@design.estate/dees-domtools": "^2.0.51",
"@design.estate/dees-element": "^2.0.29",
"@push.rocks/smartdelay": "^3.0.5",
"lit": "^3.1.3"
"lit": "^2.8.0"
},
"devDependencies": {
"@api.global/typedserver": "^3.0.29",
"@git.zone/tsbuild": "^2.1.72",
"@git.zone/tsbundle": "^2.0.15",
"@api.global/typedserver": "^3.0.5",
"@git.zone/tsbuild": "^2.1.66",
"@git.zone/tsbundle": "^2.0.8",
"@git.zone/tsrun": "^1.2.44",
"@git.zone/tswatch": "^2.0.23",
"@git.zone/tswatch": "^2.0.7",
"@push.rocks/projectinfo": "^5.0.2"
},
"files": [
@ -42,17 +42,5 @@
],
"browserslist": [
"last 1 Chrome versions"
],
"keywords": [
"web components",
"element catalogues",
"custom elements",
"documentation",
"typescript",
"lit",
"component development",
"design system",
"element testing",
"page development"
]
}

2326
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@

134
readme.md
View File

@ -1,117 +1,39 @@
# @design.estate/dees-wcctools
# @designestate/dees-wcctools
wcc tools for creating element catalogues
## Install
To install `@design.estate/dees-wcctools`, you can use npm:
## 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/)
```bash
npm install @design.estate/dees-wcctools --save
```
## Status for master
Status Category | Status Badge
-- | --
GitLab Pipelines | [![pipeline status](https://gitlab.com/designestate/dees-wcctools/badges/master/pipeline.svg)](https://lossless.cloud)
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/designestate/dees-wcctools/badges/master/coverage.svg)](https://lossless.cloud)
npm | [![npm downloads per month](https://badgen.net/npm/dy/@designestate/dees-wcctools)](https://lossless.cloud)
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/designestate/dees-wcctools)](https://lossless.cloud)
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@designestate/dees-wcctools)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@designestate/dees-wcctools)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@designestate/dees-wcctools)](https://lossless.cloud)
## 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.
### 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.
## Contribution
Start by importing the necessary tools from `@design.estate/dees-wcctools` in your main TypeScript file.
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). :)
```typescript
import { setupWccTools } from '@design.estate/dees-wcctools';
```
## Contribution
### Defining Custom Elements
Define your custom elements using LitElement. Here's a simple example of an element:
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). :)
```typescript
import { LitElement, html, customElement } from 'lit';
For further information read the linked docs at the top of this readme.
@customElement('my-element')
class MyElement extends LitElement {
render() {
return html`<p>Hello, world!</p>`;
}
}
```
### 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.
## Legal
> MIT licensed | **&copy;** [Task Venture Capital GmbH](https://task.vc)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)

View File

@ -3,6 +3,6 @@
*/
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.'
version: '1.0.81',
description: 'wcc tools for creating element catalogues'
}

View File

@ -133,16 +133,12 @@ export class WccDashboard extends DeesElement {
);
}
public async updated(changedPropertiesArg: Map<string, any>) {
public async updated() {
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.');

View File

@ -25,7 +25,6 @@ export class WccFrame extends DeesElement {
bottom: 100px;
overflow-y: auto;
overflow-x: auto;
overscroll-behavior: contain;
}
.viewport {

View File

@ -111,6 +111,7 @@ export class WccProperties extends DeesElement {
transition: all 0.2s;
}
.button:hover {
cursor: pointer;
color: #333;
background: #fff;
}
@ -120,6 +121,7 @@ export class WccProperties extends DeesElement {
}
.button.selected:hover {
cursor: pointer;
color: #ffffff;
background: #455a64;
}
@ -137,6 +139,7 @@ export class WccProperties extends DeesElement {
}
.docs:hover {
cursor: pointer;
color: #333;
background: #fff;
}

View File

@ -53,7 +53,6 @@ export class WccSidebar extends DeesElement {
}
.selectOption {
user-select: none;
position: relative;
line-height: 24px;
padding: 5px;
@ -62,6 +61,7 @@ export class WccSidebar extends DeesElement {
grid-template-columns: 28px auto;
}
.selectOption:hover {
cursor: pointer;
padding: 5px;
color: #333;
background: #fff;
@ -72,6 +72,7 @@ export class WccSidebar extends DeesElement {
}
.selectOption.selected:hover {
cursor: pointer;
color: #ffffff;
background: #455A64;
}