Compare commits
	
		
			16 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 217ea3e9d4 | |||
| 8263a4fe73 | |||
| 340582e042 | |||
| a8e07f9682 | |||
| aa37652b6d | |||
| 7e26cd39d7 | |||
| 05cc971c0b | |||
| 8d39592d23 | |||
| 0d6f9b7f19 | |||
| 8fc1a4ae5d | |||
| 82d672abc2 | |||
| 387b415de9 | |||
| 74229cb226 | |||
| 2e64489e9b | |||
| af2b4048d0 | |||
| a4992c26be | 
							
								
								
									
										128
									
								
								.gitlab-ci.yml
									
									
									
									
									
								
							
							
						
						
									
										128
									
								
								.gitlab-ci.yml
									
									
									
									
									
								
							@@ -1,128 +0,0 @@
 | 
				
			|||||||
# gitzone ci_default
 | 
					 | 
				
			||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
cache:
 | 
					 | 
				
			||||||
  paths:
 | 
					 | 
				
			||||||
    - .npmci_cache/
 | 
					 | 
				
			||||||
  key: '$CI_BUILD_STAGE'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
stages:
 | 
					 | 
				
			||||||
  - security
 | 
					 | 
				
			||||||
  - test
 | 
					 | 
				
			||||||
  - release
 | 
					 | 
				
			||||||
  - metadata
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
before_script:
 | 
					 | 
				
			||||||
  - pnpm install -g pnpm
 | 
					 | 
				
			||||||
  - pnpm install -g @shipzone/npmci
 | 
					 | 
				
			||||||
  - npmci npm prepare
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# ====================
 | 
					 | 
				
			||||||
# security stage
 | 
					 | 
				
			||||||
# ====================
 | 
					 | 
				
			||||||
# ====================
 | 
					 | 
				
			||||||
# security stage
 | 
					 | 
				
			||||||
# ====================
 | 
					 | 
				
			||||||
auditProductionDependencies:
 | 
					 | 
				
			||||||
  image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
 | 
					 | 
				
			||||||
  stage: security
 | 
					 | 
				
			||||||
  script:
 | 
					 | 
				
			||||||
     - npmci command npm config set registry https://registry.npmjs.org
 | 
					 | 
				
			||||||
     - npmci command pnpm audit --audit-level=high --prod
 | 
					 | 
				
			||||||
  tags:
 | 
					 | 
				
			||||||
    - lossless
 | 
					 | 
				
			||||||
    - docker
 | 
					 | 
				
			||||||
  allow_failure: true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
auditDevDependencies:
 | 
					 | 
				
			||||||
  image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
 | 
					 | 
				
			||||||
  stage: security
 | 
					 | 
				
			||||||
  script:
 | 
					 | 
				
			||||||
    - npmci command npm config set registry https://registry.npmjs.org
 | 
					 | 
				
			||||||
    - npmci command pnpm audit --audit-level=high --dev
 | 
					 | 
				
			||||||
  tags:
 | 
					 | 
				
			||||||
    - lossless
 | 
					 | 
				
			||||||
    - docker
 | 
					 | 
				
			||||||
  allow_failure: true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# ====================
 | 
					 | 
				
			||||||
# test stage
 | 
					 | 
				
			||||||
# ====================
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
testStable:
 | 
					 | 
				
			||||||
  stage: test
 | 
					 | 
				
			||||||
  script:
 | 
					 | 
				
			||||||
    - npmci node install stable
 | 
					 | 
				
			||||||
    - npmci npm install
 | 
					 | 
				
			||||||
    - npmci npm test
 | 
					 | 
				
			||||||
  coverage: /\d+.?\d+?\%\s*coverage/
 | 
					 | 
				
			||||||
  tags:
 | 
					 | 
				
			||||||
    - docker
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
testBuild:
 | 
					 | 
				
			||||||
  stage: test
 | 
					 | 
				
			||||||
  script:
 | 
					 | 
				
			||||||
    - npmci node install stable
 | 
					 | 
				
			||||||
    - npmci npm install
 | 
					 | 
				
			||||||
    - npmci npm build
 | 
					 | 
				
			||||||
  coverage: /\d+.?\d+?\%\s*coverage/
 | 
					 | 
				
			||||||
  tags:
 | 
					 | 
				
			||||||
    - docker
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
release:
 | 
					 | 
				
			||||||
  stage: release
 | 
					 | 
				
			||||||
  script:
 | 
					 | 
				
			||||||
    - npmci node install stable
 | 
					 | 
				
			||||||
    - npmci npm publish
 | 
					 | 
				
			||||||
  only:
 | 
					 | 
				
			||||||
    - tags
 | 
					 | 
				
			||||||
  tags:
 | 
					 | 
				
			||||||
    - lossless
 | 
					 | 
				
			||||||
    - docker
 | 
					 | 
				
			||||||
    - notpriv
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# ====================
 | 
					 | 
				
			||||||
# metadata stage
 | 
					 | 
				
			||||||
# ====================
 | 
					 | 
				
			||||||
codequality:
 | 
					 | 
				
			||||||
  stage: metadata
 | 
					 | 
				
			||||||
  allow_failure: true
 | 
					 | 
				
			||||||
  only:
 | 
					 | 
				
			||||||
    - tags
 | 
					 | 
				
			||||||
  script:
 | 
					 | 
				
			||||||
    - npmci command npm install -g typescript
 | 
					 | 
				
			||||||
    - npmci npm prepare
 | 
					 | 
				
			||||||
    - npmci npm install
 | 
					 | 
				
			||||||
  tags:
 | 
					 | 
				
			||||||
    - lossless
 | 
					 | 
				
			||||||
    - docker
 | 
					 | 
				
			||||||
    - priv
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
trigger:
 | 
					 | 
				
			||||||
  stage: metadata
 | 
					 | 
				
			||||||
  script:
 | 
					 | 
				
			||||||
    - npmci trigger
 | 
					 | 
				
			||||||
  only:
 | 
					 | 
				
			||||||
    - tags
 | 
					 | 
				
			||||||
  tags:
 | 
					 | 
				
			||||||
    - lossless
 | 
					 | 
				
			||||||
    - docker
 | 
					 | 
				
			||||||
    - notpriv
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
pages:
 | 
					 | 
				
			||||||
  stage: metadata
 | 
					 | 
				
			||||||
  script:
 | 
					 | 
				
			||||||
    - npmci node install stable
 | 
					 | 
				
			||||||
    - npmci npm install
 | 
					 | 
				
			||||||
    - npmci command npm run buildDocs
 | 
					 | 
				
			||||||
  tags:
 | 
					 | 
				
			||||||
    - lossless
 | 
					 | 
				
			||||||
    - docker
 | 
					 | 
				
			||||||
    - notpriv
 | 
					 | 
				
			||||||
  only:
 | 
					 | 
				
			||||||
    - tags
 | 
					 | 
				
			||||||
  artifacts:
 | 
					 | 
				
			||||||
    expire_in: 1 week
 | 
					 | 
				
			||||||
    paths:
 | 
					 | 
				
			||||||
      - public
 | 
					 | 
				
			||||||
  allow_failure: true
 | 
					 | 
				
			||||||
							
								
								
									
										46
									
								
								changelog.md
									
									
									
									
									
								
							
							
						
						
									
										46
									
								
								changelog.md
									
									
									
									
									
								
							@@ -1,5 +1,51 @@
 | 
				
			|||||||
# Changelog
 | 
					# Changelog
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 2025-07-06 - 2.1.2 - fix(build)
 | 
				
			||||||
 | 
					Update build script in package.json to include 'tsfolders' in tsbuild command
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Changed build script from 'tsbuild --web --allowimplicitany && tsbundle npm' to 'tsbuild tsfolders --web --allowimplicitany && tsbundle npm'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 2025-07-06 - 2.1.1 - fix(documentation)
 | 
				
			||||||
 | 
					Refine project documentation and metadata for clarity
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Update readme examples to better illustrate custom element usage
 | 
				
			||||||
 | 
					- Clarify CssManager theming and API usage in documentation
 | 
				
			||||||
 | 
					- Ensure package.json and commitinfo reflect accurate project details
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 2025-07-06 - 2.1.0 - feat(DeesElement)
 | 
				
			||||||
 | 
					Add invocation of the themeChanged hook in connectedCallback
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Now calls themeChanged (if defined) when the theme changes, enabling custom handlers for theme switches
 | 
				
			||||||
 | 
					- Improves lifecycle management by allowing extensions to react to bright/dark mode changes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 2025-06-20 - 2.0.44 - fix(ci)
 | 
				
			||||||
 | 
					Remove obsolete GitLab CI configuration
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Deleted the .gitlab-ci.yml file to remove outdated CI configuration from the repository.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 2025-06-20 - 2.0.43 - fix(dependencies)
 | 
				
			||||||
 | 
					Bump build and runtime dependencies to newer versions for improved tooling and compatibility.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Bumped @git.zone/tsbuild from ^2.3.2 to ^2.6.4
 | 
				
			||||||
 | 
					- Bumped @git.zone/tsbundle from ^2.2.5 to ^2.4.0
 | 
				
			||||||
 | 
					- Bumped @git.zone/tstest from ^1.0.96 to ^2.3.1
 | 
				
			||||||
 | 
					- Bumped @push.rocks/tapbundle from ^5.6.3 to ^6.0.3
 | 
				
			||||||
 | 
					- Bumped @design.estate/dees-domtools from ^2.3.2 to ^2.3.3
 | 
				
			||||||
 | 
					- Bumped @push.rocks/smartrx from ^3.0.7 to ^3.0.10
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 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.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										16
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								package.json
									
									
									
									
									
								
							@@ -1,6 +1,6 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "name": "@design.estate/dees-element",
 | 
					  "name": "@design.estate/dees-element",
 | 
				
			||||||
  "version": "2.0.40",
 | 
					  "version": "2.1.2",
 | 
				
			||||||
  "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",
 | 
				
			||||||
@@ -10,20 +10,20 @@
 | 
				
			|||||||
  "license": "MIT",
 | 
					  "license": "MIT",
 | 
				
			||||||
  "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
    "test": "(tstest test/ --web)",
 | 
					    "test": "(tstest test/ --web)",
 | 
				
			||||||
    "build": "(tsbuild --web --allowimplicitany && tsbundle npm)",
 | 
					    "build": "(tsbuild tsfolders --web --allowimplicitany && tsbundle npm)",
 | 
				
			||||||
    "buildDocs": "tsdoc"
 | 
					    "buildDocs": "tsdoc"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
    "@git.zone/tsbuild": "^2.3.2",
 | 
					    "@git.zone/tsbuild": "^2.6.4",
 | 
				
			||||||
    "@git.zone/tsbundle": "^2.2.5",
 | 
					    "@git.zone/tsbundle": "^2.4.0",
 | 
				
			||||||
    "@git.zone/tstest": "^1.0.96",
 | 
					    "@git.zone/tstest": "^2.3.1",
 | 
				
			||||||
    "@push.rocks/tapbundle": "^5.6.3",
 | 
					    "@push.rocks/tapbundle": "^6.0.3",
 | 
				
			||||||
    "@types/node": "^22.14.1"
 | 
					    "@types/node": "^22.14.1"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "@design.estate/dees-domtools": "^2.3.2",
 | 
					    "@design.estate/dees-domtools": "^2.3.3",
 | 
				
			||||||
    "@push.rocks/isounique": "^1.0.5",
 | 
					    "@push.rocks/isounique": "^1.0.5",
 | 
				
			||||||
    "@push.rocks/smartrx": "^3.0.7",
 | 
					    "@push.rocks/smartrx": "^3.0.10",
 | 
				
			||||||
    "lit": "^3.3.0"
 | 
					    "lit": "^3.3.0"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "browserslist": [
 | 
					  "browserslist": [
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2893
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2893
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -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.1.2',
 | 
				
			||||||
  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.'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,11 +25,22 @@ export class DeesElement extends plugins.lit.LitElement {
 | 
				
			|||||||
    });
 | 
					    });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /**
 | 
				
			||||||
 | 
					   * Called when the theme changes between bright and dark.
 | 
				
			||||||
 | 
					   * Override this method to handle theme changes.
 | 
				
			||||||
 | 
					   * @param goBright - true if switching to bright theme, false if switching to dark theme
 | 
				
			||||||
 | 
					   */
 | 
				
			||||||
 | 
					  protected themeChanged?(goBright: boolean): void;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  public async connectedCallback() {
 | 
					  public async connectedCallback() {
 | 
				
			||||||
    super.connectedCallback();
 | 
					    super.connectedCallback();
 | 
				
			||||||
    const domtools = await this.domtoolsPromise;
 | 
					    const domtools = await this.domtoolsPromise;
 | 
				
			||||||
    this.themeSubscription = domtools.themeManager.themeObservable.subscribe((goBrightArg) => {
 | 
					    this.themeSubscription = domtools.themeManager.themeObservable.subscribe((goBrightArg) => {
 | 
				
			||||||
      this.goBright = goBrightArg;
 | 
					      this.goBright = goBrightArg;
 | 
				
			||||||
 | 
					      // Call themeChanged if it's defined
 | 
				
			||||||
 | 
					      if (this.themeChanged) {
 | 
				
			||||||
 | 
					        this.themeChanged(goBrightArg);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
    this.rxSubscriptions.push(this.themeSubscription);
 | 
					    this.rxSubscriptions.push(this.themeSubscription);
 | 
				
			||||||
    for (const startupFunction of this.startupFunctions) {
 | 
					    for (const startupFunction of this.startupFunctions) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,6 +2,9 @@ import { CssManager } from './classes.cssmanager.js';
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// lit exports
 | 
					// lit exports
 | 
				
			||||||
export { html, type TemplateResult, css, unsafeCSS, render, type CSSResult } from 'lit';
 | 
					export { html, type TemplateResult, css, unsafeCSS, render, type CSSResult } from 'lit';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export { html as static, unsafeStatic } from 'lit/static-html.js';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export { unsafeHTML } from 'lit/directives/unsafe-html.js';
 | 
					export { unsafeHTML } from 'lit/directives/unsafe-html.js';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export { customElement } from 'lit/decorators/custom-element.js';
 | 
					export { customElement } from 'lit/decorators/custom-element.js';
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user