Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 766858d2f1 | |||
| 3f2ecbc7fa | |||
| 7892be0707 | |||
| adbf910993 | |||
| c726cd5af8 | |||
| 8d60911b34 | |||
| 217ea3e9d4 | |||
| 8263a4fe73 |
30
changelog.md
30
changelog.md
@@ -1,5 +1,35 @@
|
||||
# Changelog
|
||||
|
||||
## 2026-01-04 - 2.1.5 - fix(build)
|
||||
bump @design.estate/dees-domtools to ^2.3.7 and remove experimentalDecorators and useDefineForClassFields from tsconfig.json
|
||||
|
||||
- Bumped @design.estate/dees-domtools from ^2.3.6 to ^2.3.7.
|
||||
- Removed "experimentalDecorators" and "useDefineForClassFields" compiler options from tsconfig.json.
|
||||
|
||||
## 2026-01-04 - 2.1.4 - fix(build)
|
||||
update dev and runtime dependencies, export additional lit directives, switch test export to default, convert class properties to accessors, and update npmextra configuration
|
||||
|
||||
- Bump devDependencies: @git.zone/tsbuild -> ^4.0.2, @git.zone/tsbundle -> ^2.6.3, @git.zone/tstest -> ^3.1.4, @types/node -> ^25.0.3
|
||||
- Bump runtime deps: @design.estate/dees-domtools -> ^2.3.6, lit -> ^3.3.2
|
||||
- Change test script to run tstest in verbose mode and export default tap.start() in test entry
|
||||
- Convert DeesElement properties to use 'accessor' syntax and make domtools non-optional in type
|
||||
- Add exports for lit directives keyed and repeat in directives index
|
||||
- Update packageManager to pnpm@10.27.0 and adjust npmextra.json: rename keys, add release registries and accessLevel
|
||||
|
||||
## 2025-11-16 - 2.1.3 - fix(CssManager)
|
||||
Make CssManager a singleton and export the shared instance via getSingleton; update tests and dependencies
|
||||
|
||||
- Convert CssManager to a singleton by adding a private static instance and a public static getSingleton() method.
|
||||
- Use CssManager.getSingleton() for the exported cssManager in ts/index.ts to ensure a single shared instance across the app.
|
||||
- Add a Chromium-focused test (test.chromium.ts) and remove the browser-specific test file.
|
||||
- Bump devDependencies (@git.zone/tsbuild, @git.zone/tsbundle, @git.zone/tstest) and update lit to ^3.3.1.
|
||||
- Add readme.hints.md documenting the CssManager singleton pattern and supported access patterns.
|
||||
|
||||
## 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
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"gitzone": {
|
||||
"@git.zone/cli": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "code.foss.global",
|
||||
@@ -21,13 +21,19 @@
|
||||
"reactive programming",
|
||||
"DOM manipulation"
|
||||
]
|
||||
},
|
||||
"release": {
|
||||
"registries": [
|
||||
"https://verdaccio.lossless.digital",
|
||||
"https://registry.npmjs.org"
|
||||
],
|
||||
"accessLevel": "public"
|
||||
}
|
||||
},
|
||||
"npmci": {
|
||||
"npmGlobalTools": [],
|
||||
"npmAccessLevel": "public"
|
||||
},
|
||||
"tsdoc": {
|
||||
"@git.zone/tsdoc": {
|
||||
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
||||
},
|
||||
"@ship.zone/szci": {
|
||||
"npmGlobalTools": []
|
||||
}
|
||||
}
|
||||
20
package.json
20
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@design.estate/dees-element",
|
||||
"version": "2.1.1",
|
||||
"version": "2.1.5",
|
||||
"private": false,
|
||||
"description": "A library for creating custom elements extending the lit element class with additional functionalities.",
|
||||
"main": "dist_ts/index.js",
|
||||
@@ -9,22 +9,22 @@
|
||||
"author": "Lossless GmbH",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "(tstest test/ --web)",
|
||||
"build": "(tsbuild --web --allowimplicitany && tsbundle npm)",
|
||||
"test": "(tstest test/ --verbose)",
|
||||
"build": "(tsbuild tsfolders --web --allowimplicitany && tsbundle npm)",
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@git.zone/tsbuild": "^2.6.4",
|
||||
"@git.zone/tsbundle": "^2.4.0",
|
||||
"@git.zone/tstest": "^2.3.1",
|
||||
"@git.zone/tsbuild": "^4.0.2",
|
||||
"@git.zone/tsbundle": "^2.6.3",
|
||||
"@git.zone/tstest": "^3.1.4",
|
||||
"@push.rocks/tapbundle": "^6.0.3",
|
||||
"@types/node": "^22.14.1"
|
||||
"@types/node": "^25.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@design.estate/dees-domtools": "^2.3.3",
|
||||
"@design.estate/dees-domtools": "^2.3.7",
|
||||
"@push.rocks/isounique": "^1.0.5",
|
||||
"@push.rocks/smartrx": "^3.0.10",
|
||||
"lit": "^3.3.0"
|
||||
"lit": "^3.3.2"
|
||||
},
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
@@ -53,5 +53,5 @@
|
||||
"reactive programming",
|
||||
"DOM manipulation"
|
||||
],
|
||||
"packageManager": "pnpm@10.7.0+sha512.6b865ad4b62a1d9842b61d674a393903b871d9244954f652b8842c2b553c72176b278f64c463e52d40fff8aba385c235c8c9ecf5cc7de4fd78b8bb6d49633ab6"
|
||||
"packageManager": "pnpm@10.27.0"
|
||||
}
|
||||
|
||||
5670
pnpm-lock.yaml
generated
5670
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1 +1,15 @@
|
||||
|
||||
# Project Hints
|
||||
|
||||
## CssManager Singleton Pattern
|
||||
|
||||
**Location:** `ts/classes.cssmanager.ts`
|
||||
|
||||
The `CssManager` class uses a singleton pattern:
|
||||
- **Static method:** `CssManager.getSingleton()` - Returns the singleton instance
|
||||
- **Exported instance:** `cssManager` (from `ts/index.ts`) - Uses `getSingleton()` internally
|
||||
|
||||
Both access patterns are supported for backward compatibility:
|
||||
- `cssManager.method()` - Legacy pattern (still works)
|
||||
- `CssManager.getSingleton().method()` - Preferred pattern
|
||||
|
||||
The singleton ensures only one instance manages CSS variables and theme changes throughout the application.
|
||||
|
||||
@@ -21,4 +21,4 @@ tap.test('should create a static element', async () => {
|
||||
}
|
||||
});
|
||||
|
||||
tap.start();
|
||||
export default tap.start();
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@design.estate/dees-element',
|
||||
version: '2.1.1',
|
||||
version: '2.1.5',
|
||||
description: 'A library for creating custom elements extending the lit element class with additional functionalities.'
|
||||
}
|
||||
|
||||
@@ -9,6 +9,21 @@ export interface IBdVarTriplet {
|
||||
}
|
||||
|
||||
export class CssManager {
|
||||
// STATIC
|
||||
private static instance: CssManager | null = null;
|
||||
|
||||
/**
|
||||
* Returns the singleton instance of CssManager
|
||||
*/
|
||||
public static getSingleton(): CssManager {
|
||||
if (!CssManager.instance) {
|
||||
CssManager.instance = new CssManager();
|
||||
}
|
||||
return CssManager.instance;
|
||||
}
|
||||
|
||||
|
||||
// INSTANCE
|
||||
public domtoolsPromise = domtools.DomTools.setupDomTools();
|
||||
public goBright: boolean = false;
|
||||
public bdVarTripletStore: IBdVarTriplet[] = [];
|
||||
|
||||
@@ -3,13 +3,13 @@ import * as plugins from './plugins.js';
|
||||
export class DeesElement extends plugins.lit.LitElement {
|
||||
// INSTANCE
|
||||
@plugins.lit.property({ type: Boolean })
|
||||
public goBright: boolean = false;
|
||||
public accessor goBright: boolean = false;
|
||||
|
||||
// domtools
|
||||
public domtoolsPromise: Promise<plugins.domtools.DomTools>;
|
||||
|
||||
@plugins.lit.property()
|
||||
domtools?: plugins.domtools.DomTools;
|
||||
public accessor domtools: plugins.domtools.DomTools;
|
||||
|
||||
public rxSubscriptions: plugins.smartrx.rxjs.Subscription[] = [];
|
||||
private themeSubscription: plugins.smartrx.rxjs.Subscription;
|
||||
|
||||
@@ -6,4 +6,6 @@ export * from './classes.subscribedirective.js';
|
||||
export { subscribeWithTemplate } from './classes.subscribewithtemplate.js';
|
||||
|
||||
export { until } from 'lit/directives/until.js';
|
||||
export { asyncAppend } from 'lit/directives/async-append.js';
|
||||
export { asyncAppend } from 'lit/directives/async-append.js';
|
||||
export { keyed } from 'lit/directives/keyed.js';
|
||||
export { repeat } from 'lit/directives/repeat.js';
|
||||
@@ -26,7 +26,7 @@ export { directives };
|
||||
/**
|
||||
* a singleton instance of CssManager
|
||||
*/
|
||||
export const cssManager = new CssManager();
|
||||
export const cssManager = CssManager.getSingleton();
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"experimentalDecorators": true,
|
||||
"useDefineForClassFields": false,
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
|
||||
Reference in New Issue
Block a user