Compare commits

...

9 commits
v4.1.2 ... main

10 changed files with 1311 additions and 8384 deletions

View file

@ -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)

View file

@ -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

File diff suppressed because it is too large Load diff

View file

@ -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"
} }
} }

View file

@ -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

View file

@ -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>

View file

@ -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",

File diff suppressed because it is too large Load diff

View file

@ -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() {

View file

@ -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
}, },