Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
74229cb226 | |||
2e64489e9b | |||
af2b4048d0 | |||
a4992c26be |
13
changelog.md
13
changelog.md
@ -1,5 +1,18 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2025-04-18 - 2.0.42 - fix(directives)
|
||||||
|
Add explicit type annotations to subscribeWithTemplate directive export
|
||||||
|
|
||||||
|
- Imported DirectiveResult type for better typing
|
||||||
|
- Defined SubscribeWithTemplateFn signature to ensure proper type inference
|
||||||
|
- Used type assertion with 'as SubscribeWithTemplateFn' to improve type safety
|
||||||
|
|
||||||
|
## 2025-04-18 - 2.0.41 - fix(directives)
|
||||||
|
Refactor export statements in directives index for consistency
|
||||||
|
|
||||||
|
- Changed individual export of 'resolve' and 'subscribe' to wildcard exports in ts/directives/index.ts
|
||||||
|
- Simplified module export structure without altering functionality
|
||||||
|
|
||||||
## 2025-04-18 - 2.0.40 - fix(dees-element)
|
## 2025-04-18 - 2.0.40 - fix(dees-element)
|
||||||
Refactor project structure and update dependency versions. Internal modules (e.g. dees-element classes and directives) have been reorganized and deprecated paths removed, and package.json now includes an updated packageManager field.
|
Refactor project structure and update dependency versions. Internal modules (e.g. dees-element classes and directives) have been reorganized and deprecated paths removed, and package.json now includes an updated packageManager field.
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@design.estate/dees-element",
|
"name": "@design.estate/dees-element",
|
||||||
"version": "2.0.40",
|
"version": "2.0.42",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "A library for creating custom elements extending the lit element class with additional functionalities.",
|
"description": "A library for creating custom elements extending the lit element class with additional functionalities.",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@design.estate/dees-element',
|
name: '@design.estate/dees-element',
|
||||||
version: '2.0.40',
|
version: '2.0.42',
|
||||||
description: 'A library for creating custom elements extending the lit element class with additional functionalities.'
|
description: 'A library for creating custom elements extending the lit element class with additional functionalities.'
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { type TemplateResult, noChange } from 'lit';
|
import { type TemplateResult, noChange } from 'lit';
|
||||||
|
import type { DirectiveResult } from 'lit/directive.js';
|
||||||
import { AsyncDirective, directive } from 'lit/async-directive.js';
|
import { AsyncDirective, directive } from 'lit/async-directive.js';
|
||||||
import { rxjs } from '@push.rocks/smartrx';
|
import { rxjs } from '@push.rocks/smartrx';
|
||||||
|
|
||||||
@ -48,4 +49,13 @@ class SubscribeWithTemplateDirective extends AsyncDirective {
|
|||||||
* Directive that renders templates for each emission of an Observable.
|
* Directive that renders templates for each emission of an Observable.
|
||||||
* Usage: html`${subscribeWithTemplate(myObservable, v => html`<span>${v}</span>`)}`
|
* Usage: html`${subscribeWithTemplate(myObservable, v => html`<span>${v}</span>`)}`
|
||||||
*/
|
*/
|
||||||
export const subscribeWithTemplate = directive(SubscribeWithTemplateDirective);
|
/**
|
||||||
|
* Typed directive function signature: returns a Lit DirectiveResult.
|
||||||
|
*/
|
||||||
|
type SubscribeWithTemplateFn = <T>(
|
||||||
|
observable: rxjs.Observable<T>,
|
||||||
|
templateFn: (value: T) => TemplateResult | unknown
|
||||||
|
) => DirectiveResult;
|
||||||
|
export const subscribeWithTemplate = directive(
|
||||||
|
SubscribeWithTemplateDirective
|
||||||
|
) as SubscribeWithTemplateFn;
|
@ -1,11 +1,7 @@
|
|||||||
// better scoped exports
|
// better scoped exports
|
||||||
import { resolve } from './classes.resolvedirective.js';
|
export * from './classes.resolvedirective.js';
|
||||||
import { subscribe } from './classes.subscribedirective.js';
|
export * from './classes.subscribedirective.js';
|
||||||
|
|
||||||
export {
|
|
||||||
resolve,
|
|
||||||
subscribe,
|
|
||||||
}
|
|
||||||
|
|
||||||
export { subscribeWithTemplate } from './classes.subscribewithtemplate.js';
|
export { subscribeWithTemplate } from './classes.subscribewithtemplate.js';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user