Compare commits
9 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f6fe02bf12 | |||
| 10a8a5203e | |||
| 4b274e1e99 | |||
| f9f839ed6c | |||
| 5c80d196ce | |||
| 74fbf45fcf | |||
| f004f2d0a6 | |||
| dd32500253 | |||
| e6394f0825 |
10 changed files with 1311 additions and 8384 deletions
|
|
@ -23,7 +23,7 @@ The result is a reactive UI on property changes.
|
||||||
|
|
||||||
There are many ways to get in touch:
|
There are many ways to get in touch:
|
||||||
|
|
||||||
1. Open a [GitHub issue](https://github.com/ayoayco/wcb/issues/new) or [discussion](https://github.com/ayoayco/wcb/discussions)
|
1. Open a [GitHub issue](https://github.com/ayo-run/wcb/issues/new) or [discussion](https://github.com/ayo-run/wcb/discussions)
|
||||||
1. Submit a ticket via [SourceHut todo](https://todo.sr.ht/~ayoayco/wcb)
|
1. Submit a ticket via [SourceHut todo](https://todo.sr.ht/~ayoayco/wcb)
|
||||||
1. Email me: [hi@ayo.run](mailto:hi@ayo.run)
|
1. Email me: [hi@ayo.run](mailto:hi@ayo.run)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,23 @@ export default defineConfig({
|
||||||
integrations: [
|
integrations: [
|
||||||
starlight({
|
starlight({
|
||||||
title: 'WCB (alpha)',
|
title: 'WCB (alpha)',
|
||||||
social: {
|
social: [
|
||||||
npm: 'https://www.npmjs.com/package/web-component-base',
|
{
|
||||||
sourcehut: 'https://sr.ht/~ayoayco/wcb/',
|
icon: 'npm',
|
||||||
github: 'https://github.com/ayoayco/wcb/',
|
label: 'NPM',
|
||||||
},
|
href: 'https://www.npmjs.com/package/web-component-base',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: 'sourcehut',
|
||||||
|
label: 'SourceHut',
|
||||||
|
href: 'https://sr.ht/~ayoayco/wcb/',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: 'github',
|
||||||
|
label: 'GitHub',
|
||||||
|
href: 'https://github.com/ayo-run/wcb/',
|
||||||
|
},
|
||||||
|
],
|
||||||
sidebar: [
|
sidebar: [
|
||||||
{
|
{
|
||||||
label: 'Guides',
|
label: 'Guides',
|
||||||
|
|
|
||||||
6666
docs/package-lock.json
generated
6666
docs/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -11,8 +11,8 @@
|
||||||
"deploy": "netlify deploy --site=$NETLIFY_SITE_ID --dir=dist --prod"
|
"deploy": "netlify deploy --site=$NETLIFY_SITE_ID --dir=dist --prod"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/starlight": "^0.32.5",
|
"@astrojs/starlight": "^0.39.1",
|
||||||
"astro": "^5.5.3",
|
"astro": "^6.3.1",
|
||||||
"sharp": "^0.32.5"
|
"sharp": "^0.34.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ If you have some complex needs, we recommend using the `WebComponent` base class
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
The library is distributed as complete ECMAScript Modules (ESM) and published on [NPM](https://ayco.io/n/web-component-base). Please open a [GitHub issue](https://github.com/ayoayco/wcb/issues/new) or [discussion](https://github.com/ayoayco/wcb/discussions) for problems or requests regarding our distribution. You can also submit a ticket in [SourceHut](https://todo.sr.ht/~ayoayco/wcb).
|
The library is distributed as complete ECMAScript Modules (ESM) and published on [NPM](https://ayco.io/n/web-component-base). Please open a [GitHub issue](https://github.com/ayo-run/wcb/issues/new) or [discussion](https://github.com/ayo-run/wcb/discussions) for problems or requests regarding our distribution. You can also submit a ticket in [SourceHut](https://todo.sr.ht/~ayoayco/wcb).
|
||||||
|
|
||||||
### Import via CDN
|
### Import via CDN
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
---
|
---
|
||||||
title: Web Component Base
|
title: Ultra-Minimal Custom HTML Elements
|
||||||
description: Web components in Easy Mode
|
description: Only the complexity you need. You decide.
|
||||||
template: splash
|
template: splash
|
||||||
hero:
|
hero:
|
||||||
tagline: The ultra-minimal base class for your custom HTML elements
|
tagline: With opt-in progressive upgrades, you get only the complexity you need. You decide.
|
||||||
# image:
|
# image:
|
||||||
# file: ../../assets/houston.webp
|
# file: ../../assets/houston.webp
|
||||||
actions:
|
actions:
|
||||||
|
|
@ -32,4 +32,3 @@ import { Card, CardGrid } from '@astrojs/starlight/components';
|
||||||
Declarative templates for DOM manipulation & event handlers
|
Declarative templates for DOM manipulation & event handlers
|
||||||
</Card>
|
</Card>
|
||||||
</CardGrid>
|
</CardGrid>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,12 @@
|
||||||
"pub:major": "npm version major && pnpm run pub",
|
"pub:major": "npm version major && pnpm run pub",
|
||||||
"format": "prettier . --write",
|
"format": "prettier . --write",
|
||||||
"lint": "eslint . --config eslint.config.mjs",
|
"lint": "eslint . --config eslint.config.mjs",
|
||||||
"prepare": "husky install"
|
"prepare": "husky"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/ayo-run/web-component-base.git"
|
||||||
},
|
},
|
||||||
"repository": "https://github.com/ayoayco/web-component-base",
|
|
||||||
"homepage": "https://WebComponent.io",
|
"homepage": "https://WebComponent.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"web components",
|
"web components",
|
||||||
|
|
@ -55,7 +58,7 @@
|
||||||
"author": "Ayo Ayco",
|
"author": "Ayo Ayco",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/ayoayco/web-component-base/issues"
|
"url": "https://github.com/ayo-run/web-component-base/issues"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.39.2",
|
"@eslint/js": "^9.39.2",
|
||||||
|
|
|
||||||
2971
pnpm-lock.yaml
2971
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
|
@ -13,7 +13,7 @@ import {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A minimal base class to reduce the complexity of creating reactive custom elements
|
* A minimal base class to reduce the complexity of creating reactive custom elements
|
||||||
* @see https://WebComponent.io
|
* @see https://webcomponent.io
|
||||||
*/
|
*/
|
||||||
export class WebComponent extends HTMLElement {
|
export class WebComponent extends HTMLElement {
|
||||||
#host
|
#host
|
||||||
|
|
@ -34,7 +34,7 @@ export class WebComponent extends HTMLElement {
|
||||||
/**
|
/**
|
||||||
* Read-only string property that represents how the component will be rendered
|
* Read-only string property that represents how the component will be rendered
|
||||||
* @returns {string | any}
|
* @returns {string | any}
|
||||||
* @see https://www.npmjs.com/package/web-component-base#template-vs-render
|
* @see https://webcomponent.io/template-vs-render/
|
||||||
*/
|
*/
|
||||||
get template() {
|
get template() {
|
||||||
return ''
|
return ''
|
||||||
|
|
@ -48,8 +48,7 @@ export class WebComponent extends HTMLElement {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read-only property containing camelCase counterparts of observed attributes.
|
* Read-only property containing camelCase counterparts of observed attributes.
|
||||||
* @see https://www.npmjs.com/package/web-component-base#prop-access
|
* @see https://webcomponent.io/prop-access/
|
||||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset
|
|
||||||
* @type {PropStringMap}
|
* @type {PropStringMap}
|
||||||
*/
|
*/
|
||||||
get props() {
|
get props() {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"outDir": "dist",
|
"outDir": "./dist",
|
||||||
|
"rootDir": "./src",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"emitDeclarationOnly": true
|
"emitDeclarationOnly": true
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue