Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to UIElement
# Contributing to Le Truc

Thank you for your interest in contributing to **UIElement**! Your contributions help improve the project and benefit the community. This guide outlines how to get involved.
Thank you for your interest in contributing to **Le Truc**! Your contributions help improve the project and benefit the community. This guide outlines how to get involved.

---

Expand Down Expand Up @@ -31,7 +31,7 @@ By participating in this project, you agree to abide by our **[Code of Conduct](
If you find a bug or have a feature request:

1. **Search the issue tracker** to check if your issue has already been reported.
2. If not, [open a new issue](https://github.com/zeixcom/ui-element/issues/new) and provide:
2. If not, [open a new issue](https://github.com/zeixcom/le-truc/issues/new) and provide:
- A clear and descriptive title.
- Steps to reproduce the issue (if applicable).
- Expected vs. actual behavior.
Expand Down Expand Up @@ -71,7 +71,7 @@ To set up the project locally:
bun install
```

(UIElement uses Bun as its package manager and runtime.)
(Le Truc uses Bun as its package manager and runtime.)

**Run tests in watch mode:**

Expand Down Expand Up @@ -157,4 +157,4 @@ By contributing, you agree that your contributions will be licensed under the MI

---

Thank you for contributing to UIElement! 🚀
Thank you for contributing to Le Truc! 🚀
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
# UIElement
# Le Truc

Version 0.14.0

**UIElement** - a HTML-first library for reactive Web Components
**Le Truc** - a HTML-first library for reactive Web Components

UIElement is a set of functions to build reusable, loosely coupled Web Components with reactive properties. It provides structure through components and simplifies state management and DOM synchronization using declarative signals and effects, leading to more organized and maintainable code without a steep learning curve.
Le Truc is a set of functions to build reusable, loosely coupled Web Components with reactive properties. It provides structure through components and simplifies state management and DOM synchronization using declarative signals and effects, leading to more organized and maintainable code without a steep learning curve.

Unlike SPA frameworks (React, Vue, Svelte, etc.) UIElement takes a HTML-first approach, progressively enhancing sever-rendered HTML rather than recreating (rendering) it using JavaScript. UIElement achieves the same result as SPA frameworks with SSR, but with a simpler, more efficient approach. It works with a backend written in any language or with any static site generator.
Unlike SPA frameworks (React, Vue, Svelte, etc.) Le Truc takes a HTML-first approach, progressively enhancing sever-rendered HTML rather than recreating (rendering) it using JavaScript. Le Truc achieves the same result as SPA frameworks with SSR, but with a simpler, more efficient approach. It works with a backend written in any language or with any static site generator.

## Key Features

- 🧱 **HTML Web Components**: Build on standard HTML and enhance it with encapsulated, reusable Web Components. No virtual DOM – UIElement works directly with the real DOM.
- 🧱 **HTML Web Components**: Build on standard HTML and enhance it with encapsulated, reusable Web Components. No virtual DOM – Le Truc works directly with the real DOM.
- 🚦 **Reactive Properties**: Define reactive properties for fine-grained, efficient state management (signals). Changes automatically propagate only to the parts of the DOM that need updating, avoiding unnecessary re-renders.
- 🧩 **Function Composition**: Declare component behavior by composing small, reusable functions (attribute parsers and effects). This promotes cleaner code compared to spaghetti code problems that commonly occur when writing low-level imperative code.
- 🛠️ **Customizable**: UIElement is designed to be easily customizable and extensible. You can create your own custom attribute parsers and effects to suit your specific needs.
- 🛠️ **Customizable**: Le Truc is designed to be easily customizable and extensible. You can create your own custom attribute parsers and effects to suit your specific needs.
- 🌐 **Context Support**: Share global states across components without prop drilling or tightly coupling logic.
- 🪶 **Tiny footprint**: Minimal core (~4kB gzipped) with tree-shaking support, adding only the necessary JavaScript to enhance your HTML.
- 🛡️ **Type Safety**: Get early warnings when types don't match, improving code quality and reducing bugs.

UIElement uses [Cause & Effect](https://github.com/zeixcom/cause-effect) internally for state management with signals and for scheduled DOM updates. But you could easily rewrite the `component()` function to use a signals library of your choice or to produce something else than Web Components.
Le Truc uses [Cause & Effect](https://github.com/zeixcom/cause-effect) internally for state management with signals and for scheduled DOM updates. But you could easily rewrite the `component()` function to use a signals library of your choice or to produce something else than Web Components.

## Installation

```bash
# with npm
npm install @zeix/ui-element
npm install @zeix/le-truc

# or with bun
bun add @zeix/ui-element
bun add @zeix/le-truc
```

## Documentation

The full documentation is still work in progress. The following chapters are already reasonably complete:

- [Introduction](https://zeixcom.github.io/ui-element/index.html)
- [Getting Started](https://zeixcom.github.io/ui-element/getting-started.html)
- [Components](https://zeixcom.github.io/ui-element/components.html)
- [Styling](https://zeixcom.github.io/ui-element/styling.html)
- [Data Flow](https://zeixcom.github.io/ui-element/data-flow.html)
- [About](https://zeixcom.github.io/ui-element/about.html)
- [Introduction](https://zeixcom.github.io/le-truc/index.html)
- [Getting Started](https://zeixcom.github.io/le-truc/getting-started.html)
- [Components](https://zeixcom.github.io/le-truc/components.html)
- [Styling](https://zeixcom.github.io/le-truc/styling.html)
- [Data Flow](https://zeixcom.github.io/le-truc/data-flow.html)
- [About](https://zeixcom.github.io/le-truc/about.html)

## Basic Usage

Expand All @@ -53,10 +53,10 @@ Server-rendered markup:
</basic-counter>
```

UIElement component:
Le Truc component:

```js
import { asInteger, component, on, setText } from '@zeix/ui-element'
import { asInteger, component, on, setText } from '@zeix/le-truc'

export default component(
'basic-counter',
Expand Down Expand Up @@ -157,10 +157,10 @@ Server-rendered markup:
</module-tabgroup>
```

UIElement component:
Le Truc component:

````js
import { component, on, setProperty, show } from '@zeix/ui-element'
import { component, on, setProperty, show } from '@zeix/le-truc'
import { manageArrowKeyFocus } from './manage-arrow-key-focus'

export default component('module-tabgroup', {
Expand Down Expand Up @@ -298,7 +298,7 @@ An example demonstrating how to use a custom attribute parser (sanitize an URL)
</module-lazy>
```

UIElement component:
Le Truc component:

```js
import {
Expand All @@ -310,7 +310,7 @@ import {
show,
state,
toggleClass,
} from '@zeix/ui-element'
} from '@zeix/le-truc'
import { asURL } from './as-url'

export default component(
Expand Down
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion docs-src/includes/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h2 class="visually-hidden">Main Menu</h2>
<a href="index.html">
<span class="icon">📖</span>
<strong>Introduction</strong>
<small>Overview and key benefits of UIElement</small>
<small>Overview and key benefits of Le Truc</small>
</a>
</li>

Expand Down
4 changes: 2 additions & 2 deletions docs-src/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{{ title }} – UIElement Docs</title>
<title>{{ title }} – Le Truc Docs</title>
<meta name="description" content="{{ description }}" />
<link
rel="preload"
Expand All @@ -30,7 +30,7 @@
Skip to main content
</a>
<h1 class="content">
UIElement Docs <small>Version 0.14.0</small>
Le Truc Docs <small>Version 0.14.0</small>
</h1>
{{ include 'menu.html' }}
<card-callout class="content danger" hidden>
Expand Down
26 changes: 13 additions & 13 deletions docs-src/pages/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ description: 'License, versioning, getting involved'
# 🤝 About

<div>
<p class="lead"><strong>Join the UIElement community!</strong> This page covers the people behind UIElement, how you can contribute, versioning details, and licensing. Whether you’re a developer, designer, or sponsor, there are many ways to get involved.</p>
<p class="lead"><strong>Join the Le Truc community!</strong> This page covers the people behind Le Truc, how you can contribute, versioning details, and licensing. Whether you’re a developer, designer, or sponsor, there are many ways to get involved.</p>
{{ toc }}
</div>
</section-hero>

<section>

## Who's Behind UIElement?
## Who's Behind Le Truc?

UIElement is an **open-source project**, actively developed by [Zeix AG](https://zeix.com), a Switzerland-based agency for User-Centered Design, committed to enhancing accessibility and usability in web technologies.
Le Truc is an **open-source project**, actively developed by [Zeix AG](https://zeix.com), a Switzerland-based agency for User-Centered Design, committed to enhancing accessibility and usability in web technologies.

### Core Team & Contributors

Expand All @@ -32,7 +32,7 @@ UIElement is an **open-source project**, actively developed by [Zeix AG](https:/

**Become a Sponsor**

UIElement is free and open-source. If your organization finds it valuable, consider [sponsoring its development]([email protected]) to help make web development **lightweight, accessible, and fun** again!
Le Truc is free and open-source. If your organization finds it valuable, consider [sponsoring its development]([email protected]) to help make web development **lightweight, accessible, and fun** again!

</card-callout>

Expand All @@ -44,7 +44,7 @@ UIElement is free and open-source. If your organization finds it valuable, consi

This project is licensed under the [MIT License](https://opensource.org/licenses/MIT), which means you can **use, modify, and distribute** it freely – even in commercial projects.

A copy of the license can be found in the [LICENSE](https://github.com/zeixcom/ui-element/blob/main/LICENSE) file of the repository.
A copy of the license can be found in the [LICENSE](https://github.com/zeixcom/le-truc/blob/main/LICENSE) file of the repository.

</section>

Expand All @@ -58,41 +58,41 @@ A copy of the license can be found in the [LICENSE](https://github.com/zeixcom/u

**Release candidate**

This version is a **pre-release** of UIElement, meaning **breaking changes** may still occur before the official release of version 1.0. Please check the [release notes](https://github.com/zeixcom/ui-element/releases) before updating.
This version is a **pre-release** of Le Truc, meaning **breaking changes** may still occur before the official release of version 1.0. Please check the [release notes](https://github.com/zeixcom/le-truc/releases) before updating.

</card-callout>

### Versioning Scheme

UIElement follows [Semantic Versioning](https://semver.org/) (SemVer), which is structured as <code>MAJOR.MINOR.PATCH</code>.
Le Truc follows [Semantic Versioning](https://semver.org/) (SemVer), which is structured as <code>MAJOR.MINOR.PATCH</code>.

- **MAJOR**: Breaking changes that require migrations.
- **MINOR**: New features that are backwards compatible.
- **PATCH**: Bug fixes and performance improvements.

### Previous Pre-Releases

View all releases and associated notes on [Github Releases](https://github.com/zeixcom/ui-element/releases).
View all releases and associated notes on [Github Releases](https://github.com/zeixcom/le-truc/releases).

</section>

<section>

## Getting Involved

UIElement is **an open-source project**, and contributions are always welcome! Whether you’re **reporting bugs, improving documentation, or suggesting features**, here's how you can help:
Le Truc is **an open-source project**, and contributions are always welcome! Whether you’re **reporting bugs, improving documentation, or suggesting features**, here's how you can help:

- [Open an Issue](https://github.com/zeixcom/ui-element/issues) – Report bugs or suggest features.
- [Submit a Pull Request](https://github.com/zeixcom/ui-element/blob/main/CONTRIBUTING.md) – Help improve UIElement by fixing issues or adding new features.
- [Open an Issue](https://github.com/zeixcom/le-truc/issues) – Report bugs or suggest features.
- [Submit a Pull Request](https://github.com/zeixcom/le-truc/blob/main/CONTRIBUTING.md) – Help improve Le Truc by fixing issues or adding new features.
- Join the Discussion – Share ideas and get feedback from the community.

### Contributing Code

- Fork the repository, create a new branch, and submit a pull request.
- Read the [Contributing Guidelines](https://github.com/zeixcom/ui-element/blob/main/CONTRIBUTING.md) for setting up a development environment and best practices.
- Read the [Contributing Guidelines](https://github.com/zeixcom/le-truc/blob/main/CONTRIBUTING.md) for setting up a development environment and best practices.

### Community Guidelines

We strive for a welcoming and inclusive environment. Please follow our [Code of Conduct](https://github.com/zeixcom/ui-element/blob/main/CODE_OF_CONDUCT.md) when contributing.
We strive for a welcoming and inclusive environment. Please follow our [Code of Conduct](https://github.com/zeixcom/le-truc/blob/main/CODE_OF_CONDUCT.md) when contributing.

</section>
44 changes: 22 additions & 22 deletions docs-src/pages/api/README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
**@zeix/ui-element**
**@zeix/le-truc**

***

# UIElement
# Le Truc

Version 0.14.0

**UIElement** - a HTML-first library for reactive Web Components
**Le Truc** - a HTML-first library for reactive Web Components

UIElement is a set of functions to build reusable, loosely coupled Web Components with reactive properties. It provides structure through components and simplifies state management and DOM synchronization using declarative signals and effects, leading to more organized and maintainable code without a steep learning curve.
Le Truc is a set of functions to build reusable, loosely coupled Web Components with reactive properties. It provides structure through components and simplifies state management and DOM synchronization using declarative signals and effects, leading to more organized and maintainable code without a steep learning curve.

Unlike SPA frameworks (React, Vue, Svelte, etc.) UIElement takes a HTML-first approach, progressively enhancing sever-rendered HTML rather than recreating (rendering) it using JavaScript. UIElement achieves the same result as SPA frameworks with SSR, but with a simpler, more efficient approach. It works with a backend written in any language or with any static site generator.
Unlike SPA frameworks (React, Vue, Svelte, etc.) Le Truc takes a HTML-first approach, progressively enhancing sever-rendered HTML rather than recreating (rendering) it using JavaScript. Le Truc achieves the same result as SPA frameworks with SSR, but with a simpler, more efficient approach. It works with a backend written in any language or with any static site generator.

## Key Features

- 🧱 **HTML Web Components**: Build on standard HTML and enhance it with encapsulated, reusable Web Components. No virtual DOM – UIElement works directly with the real DOM.
- 🧱 **HTML Web Components**: Build on standard HTML and enhance it with encapsulated, reusable Web Components. No virtual DOM – Le Truc works directly with the real DOM.
- 🚦 **Reactive Properties**: Define reactive properties for fine-grained, efficient state management (signals). Changes automatically propagate only to the parts of the DOM that need updating, avoiding unnecessary re-renders.
- 🧩 **Function Composition**: Declare component behavior by composing small, reusable functions (attribute parsers and effects). This promotes cleaner code compared to spaghetti code problems that commonly occur when writing low-level imperative code.
- 🛠️ **Customizable**: UIElement is designed to be easily customizable and extensible. You can create your own custom attribute parsers and effects to suit your specific needs.
- 🛠️ **Customizable**: Le Truc is designed to be easily customizable and extensible. You can create your own custom attribute parsers and effects to suit your specific needs.
- 🌐 **Context Support**: Share global states across components without prop drilling or tightly coupling logic.
- 🪶 **Tiny footprint**: Minimal core (~4kB gzipped) with tree-shaking support, adding only the necessary JavaScript to enhance your HTML.
- 🛡️ **Type Safety**: Get early warnings when types don't match, improving code quality and reducing bugs.

UIElement uses [Cause & Effect](https://github.com/zeixcom/cause-effect) internally for state management with signals and for scheduled DOM updates. But you could easily rewrite the `component()` function to use a signals library of your choice or to produce something else than Web Components.
Le Truc uses [Cause & Effect](https://github.com/zeixcom/cause-effect) internally for state management with signals and for scheduled DOM updates. But you could easily rewrite the `component()` function to use a signals library of your choice or to produce something else than Web Components.

## Installation

```bash
# with npm
npm install @zeix/ui-element
npm install @zeix/le-truc

# or with bun
bun add @zeix/ui-element
bun add @zeix/le-truc
```

## Documentation

The full documentation is still work in progress. The following chapters are already reasonably complete:

- [Introduction](https://zeixcom.github.io/ui-element/index.html)
- [Getting Started](https://zeixcom.github.io/ui-element/getting-started.html)
- [Components](https://zeixcom.github.io/ui-element/components.html)
- [Styling](https://zeixcom.github.io/ui-element/styling.html)
- [Data Flow](https://zeixcom.github.io/ui-element/data-flow.html)
- [About](https://zeixcom.github.io/ui-element/about.html)
- [Introduction](https://zeixcom.github.io/le-truc/index.html)
- [Getting Started](https://zeixcom.github.io/le-truc/getting-started.html)
- [Components](https://zeixcom.github.io/le-truc/components.html)
- [Styling](https://zeixcom.github.io/le-truc/styling.html)
- [Data Flow](https://zeixcom.github.io/le-truc/data-flow.html)
- [About](https://zeixcom.github.io/le-truc/about.html)

## Basic Usage

Expand All @@ -57,10 +57,10 @@ Server-rendered markup:
</basic-counter>
```

UIElement component:
Le Truc component:

```js
import { asInteger, component, on, setText } from '@zeix/ui-element'
import { asInteger, component, on, setText } from '@zeix/le-truc'

export default component(
'basic-counter',
Expand Down Expand Up @@ -161,10 +161,10 @@ Server-rendered markup:
</module-tabgroup>
```

UIElement component:
Le Truc component:

````js
import { component, on, setProperty, show } from '@zeix/ui-element'
import { component, on, setProperty, show } from '@zeix/le-truc'
import { manageArrowKeyFocus } from './manage-arrow-key-focus'

export default component('module-tabgroup', {
Expand Down Expand Up @@ -302,7 +302,7 @@ An example demonstrating how to use a custom attribute parser (sanitize an URL)
</module-lazy>
```

UIElement component:
Le Truc component:

```js
import {
Expand All @@ -314,7 +314,7 @@ import {
show,
state,
toggleClass,
} from '@zeix/ui-element'
} from '@zeix/le-truc'
import { asURL } from './as-url'

export default component(
Expand Down
Loading