Compare commits

..

90 Commits

Author SHA1 Message Date
74229cb226 2.0.42 2025-04-18 19:22:57 +00:00
2e64489e9b fix(directives): Add explicit type annotations to subscribeWithTemplate directive export 2025-04-18 19:22:57 +00:00
af2b4048d0 2.0.41 2025-04-18 17:04:34 +00:00
a4992c26be fix(directives): Refactor export statements in directives index for consistency 2025-04-18 17:04:34 +00:00
02f32f5e4f 2.0.40 2025-04-18 17:00:04 +00:00
a9d5fce1b2 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. 2025-04-18 17:00:04 +00:00
1dd6756213 2.0.39 2024-10-04 15:29:23 +02:00
07dcfb41be fix(core): Update dependency version for @design.estate/dees-domtools 2024-10-04 15:29:22 +02:00
fb2dc2e315 2.0.38 2024-10-02 17:50:38 +02:00
3d67a757ca fix(dependencies): Bump to 2.0.60 2024-10-02 17:50:37 +02:00
1b2206a8f9 2.0.37 2024-10-02 15:47:14 +02:00
5631c9cbb0 fix(dependencies): Update dependencies to latest versions. 2024-10-02 15:47:14 +02:00
e50bc60bfb 2.0.36 2024-07-01 14:26:00 +02:00
ffd95a2e2f fix(core): Ensure documentation completeness and code quality improvements 2024-07-01 14:25:59 +02:00
7263110837 2.0.35 2024-07-01 14:23:15 +02:00
f41f0211a4 fix(dependencies): Update dependency versions and development dependencies 2024-07-01 14:23:14 +02:00
20547a00d5 update documentation 2024-04-20 23:19:23 +02:00
009674d78c 2.0.34 2024-02-05 12:35:33 +01:00
dcca685021 fix(core): update 2024-02-05 12:35:32 +01:00
8eff93febc 2.0.33 2023-10-31 13:47:29 +01:00
11f731aa61 fix(core): update 2023-10-31 13:47:28 +01:00
a8e7d2f335 2.0.32 2023-10-26 12:43:04 +02:00
219390e895 fix(core): update 2023-10-26 12:43:04 +02:00
e321286259 2.0.31 2023-10-23 17:22:10 +02:00
5f141feb50 fix(core): update 2023-10-23 17:22:09 +02:00
7b99c70275 2.0.30 2023-10-23 17:20:09 +02:00
9f3b396633 fix(core): update 2023-10-23 17:20:08 +02:00
8dd48fdc05 2.0.29 2023-09-17 14:39:59 +02:00
2538f59769 fix(core): update 2023-09-17 14:39:59 +02:00
216a605f93 2.0.28 2023-09-17 14:38:30 +02:00
0808b9a5f9 fix(core): update 2023-09-17 14:38:29 +02:00
dc13ad997b 2.0.27 2023-09-04 16:31:56 +02:00
1c7c1c2432 fix(core): update 2023-09-04 16:31:56 +02:00
969cd12725 2.0.26 2023-09-04 14:56:58 +02:00
f2aa825f95 fix(core): update 2023-09-04 14:56:57 +02:00
9d072cde61 2.0.25 2023-08-07 19:34:45 +02:00
3b100a5b20 fix(core): update 2023-08-07 19:34:44 +02:00
ef76535d2b 2.0.24 2023-08-07 17:06:42 +02:00
b6e307d2e1 fix(core): update 2023-08-07 17:06:41 +02:00
4b24440e2a 2.0.23 2023-08-07 09:19:54 +02:00
4867099008 fix(core): update 2023-08-07 09:19:53 +02:00
ac7e109f6c 2.0.22 2023-03-29 22:52:56 +02:00
019297f998 fix(core): update 2023-03-29 22:52:56 +02:00
d0ddeaca5d 2.0.21 2023-03-29 20:29:13 +02:00
fe50d39d01 fix(core): update 2023-03-29 20:29:12 +02:00
6da377f0f6 2.0.20 2023-03-26 23:59:13 +02:00
a39d46458a fix(core): update 2023-03-26 23:59:12 +02:00
45be5f90ee 2.0.19 2023-03-15 22:22:31 +01:00
67927cc3a2 fix(core): update 2023-03-15 22:22:30 +01:00
f4b8260c45 2.0.18 2022-12-31 12:34:13 +01:00
5c86ee7bf3 fix(core): update 2022-12-31 12:34:12 +01:00
50c4be30b8 2.0.17 2022-12-31 11:52:59 +01:00
dce8ec6470 fix(core): update 2022-12-31 11:52:58 +01:00
14446ece3c 2.0.16 2022-05-21 02:30:20 +02:00
794281541b fix(core): update 2022-05-21 02:30:19 +02:00
fdd3a5da90 2.0.15 2022-05-12 18:53:19 +02:00
0394a656cc fix(core): update 2022-05-12 18:53:19 +02:00
78051a5577 2.0.14 2022-05-02 17:44:43 +02:00
59c564af0a fix(core): update 2022-05-02 17:44:43 +02:00
4178955313 2.0.13 2022-05-01 16:52:42 +02:00
4e4d29abcf fix(core): update 2022-05-01 16:52:42 +02:00
06dbacb74d 2.0.12 2022-04-22 00:12:54 +02:00
5fc730eeb2 fix(core): update 2022-04-22 00:12:54 +02:00
1bdab82d0e 2.0.11 2022-04-21 23:15:15 +02:00
76841a6b25 fix(core): update 2022-04-21 23:15:14 +02:00
6dd5277f9e 2.0.10 2022-04-19 18:49:12 +02:00
4cbbf941c0 fix(core): update 2022-04-19 18:49:12 +02:00
61de38cb4d 2.0.9 2022-04-19 10:50:31 +02:00
a3ab19e5db fix(core): update 2022-04-19 10:50:31 +02:00
a7e1a02b52 2.0.8 2022-04-18 22:32:14 +02:00
9f974a97f5 fix(core): update 2022-04-18 22:32:14 +02:00
d80f94db29 2.0.7 2022-04-15 19:17:34 +02:00
a32b6b425b fix(core): update 2022-04-15 19:17:34 +02:00
9ca286697c 2.0.6 2022-03-29 15:59:17 +02:00
07dcfbe531 fix(core): update 2022-03-29 15:59:16 +02:00
ac919e2cce 2.0.5 2022-03-25 02:28:33 +01:00
30e1822b5b fix(core): update 2022-03-25 02:28:32 +01:00
b6c67a55e5 2.0.4 2022-03-24 15:32:02 +01:00
f20977e936 fix(core): update 2022-03-24 15:32:01 +01:00
8ad5906e06 2.0.3 2022-03-23 13:25:53 +01:00
4008de283c fix(core): update 2022-03-23 13:25:53 +01:00
1177ec6158 2.0.2 2022-03-16 15:00:10 +01:00
b8ced9a991 fix(core): update 2022-03-16 15:00:10 +01:00
9b30853a56 2.0.1 2022-03-16 14:48:02 +01:00
acc1d7eea7 fix(core): update 2022-03-16 14:48:01 +01:00
bb6818324d 2.0.0 2022-03-16 14:47:45 +01:00
3dee5f9b68 1.0.36 2022-03-16 14:46:51 +01:00
ef92d1bde3 fix(core): update 2022-03-16 14:46:51 +01:00
e394c999b2 1.0.35 2022-01-07 19:47:05 +01:00
68bcc10ee6 fix(core): update 2022-01-07 19:47:05 +01:00
25 changed files with 10961 additions and 27730 deletions

View File

@ -0,0 +1,66 @@
name: Default (not tags)
on:
push:
tags-ignore:
- '**'
env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
jobs:
security:
runs-on: ubuntu-latest
continue-on-error: true
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Install pnpm and npmci
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
- name: Run npm prepare
run: npmci npm prepare
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
continue-on-error: true
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
continue-on-error: true
test:
if: ${{ always() }}
needs: security
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build

View File

@ -0,0 +1,124 @@
name: Default (tags)
on:
push:
tags:
- '*'
env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
jobs:
security:
runs-on: ubuntu-latest
continue-on-error: true
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
continue-on-error: true
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
continue-on-error: true
test:
if: ${{ always() }}
needs: security
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build
release:
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Release
run: |
npmci node install stable
npmci npm publish
metadata:
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
continue-on-error: true
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Code quality
run: |
npmci command npm install -g typescript
npmci npm install
- name: Trigger
run: npmci trigger
- name: Build docs and upload artifacts
run: |
npmci node install stable
npmci npm install
pnpm install -g @git.zone/tsdoc
npmci command tsdoc
continue-on-error: true

View File

@ -12,40 +12,36 @@ stages:
- release
- metadata
before_script:
- pnpm install -g pnpm
- pnpm install -g @shipzone/npmci
- npmci npm prepare
# ====================
# security stage
# ====================
# ====================
# security stage
# ====================
mirror:
stage: security
script:
- npmci git mirror
only:
- tags
tags:
- lossless
- docker
- notpriv
auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --production --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=prod --production
- 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 npm prepare
- npmci command npm install --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=dev
- npmci command pnpm audit --audit-level=high --dev
tags:
- lossless
- docker
allow_failure: true
@ -56,7 +52,6 @@ auditDevDependencies:
testStable:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci npm test
@ -67,10 +62,9 @@ testStable:
testBuild:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci command npm run build
- npmci npm build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
@ -96,10 +90,9 @@ codequality:
only:
- tags
script:
- npmci command npm install -g tslint typescript
- npmci command npm install -g typescript
- npmci npm prepare
- npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags:
- lossless
- docker
@ -119,11 +112,9 @@ trigger:
pages:
stage: metadata
script:
- npmci node install lts
- npmci command npm install -g @gitzone/tsdoc
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci command tsdoc
- npmci command npm run buildDocs
tags:
- lossless
- docker

24
.vscode/launch.json vendored
View File

@ -2,28 +2,10 @@
"version": "0.2.0",
"configurations": [
{
"name": "current file",
"type": "node",
"command": "npm test",
"name": "Run npm test",
"request": "launch",
"args": [
"${relativeFile}"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "test.ts",
"type": "node",
"request": "launch",
"args": [
"test/test.ts"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
"type": "node-terminal"
}
]
}

362
changelog.md Normal file
View File

@ -0,0 +1,362 @@
# 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)
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.
- Updated versions for @git.zone/tsbuild, tsbundle, tstest, tapbundle, and lit.
- Changed dependency @design.estate/dees-domtools from ^2.0.61 to ^2.3.2.
- Reorganized internal file structure: moved code from dees-element.classes.* to classes.* and re-exported via index.
- Added packageManager field in package.json for pnpm configuration.
## 2024-10-04 - 2.0.39 - fix(core)
Update dependency version for @design.estate/dees-domtools
- Bumped @design.estate/dees-domtools dependency to version ^2.0.61 to include latest patches and improvements.
## 2024-10-02 - 2.0.38 - fix(dependencies)
Bump `@design.estate/dees-domtools` to 2.0.60
- Updated @design.estate/dees-domtools from 2.0.59 to 2.0.60
## 2024-10-02 - 2.0.37 - fix(dependencies)
Update dependencies to latest versions.
- Updated @git.zone/tsbuild from ^2.1.82 to ^2.1.84
- Updated @types/node from ^20.14.9 to ^22.7.4
- Updated @push.rocks/tapbundle from ^5.0.23 to ^5.3.0
- Updated @design.estate/dees-domtools from ^2.0.57 to ^2.0.59
- Updated lit from ^3.1.4 to ^3.2.0
## 2024-07-01 - 2.0.36 - fix(core)
Ensure documentation completeness and code quality improvements
- Improved the README.md file to provide more detailed usage instructions and examples.
- Refactored code for better readability and performance.
- Updated npmextra.json to ensure accurate project metadata and configurations.
## 2024-07-01 - 2.0.35 - fix(dependencies)
Update dependency versions and development dependencies
- Update @git.zone/tsbuild to version ^2.1.82
- Update @git.zone/tstest to version ^1.0.90
- Update @push.rocks/tapbundle to version ^5.0.23
- Update @types/node to version ^20.14.9
- Update lit to version ^3.1.4
## 2024-04-20 - 2.0.34 - Documentation
Updated project documentation.
- Refreshed the documentation to include recent changes and improvements.
## 2023-10-31 - 2.0.33 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2023-10-26 - 2.0.32 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2023-10-23 - 2.0.31 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2023-10-23 - 2.0.30 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2023-09-17 - 2.0.29 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2023-09-17 - 2.0.28 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2023-09-04 - 2.0.27 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2023-09-04 - 2.0.26 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2023-08-07 - 2.0.25 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2023-08-07 - 2.0.24 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2023-08-07 - 2.0.23 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2023-03-29 - 2.0.22 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2023-03-29 - 2.0.21 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2023-03-26 - 2.0.20 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2023-03-15 - 2.0.19 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-12-31 - 2.0.18 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-12-31 - 2.0.17 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-05-21 - 2.0.16 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-05-12 - 2.0.15 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-05-02 - 2.0.14 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-05-01 - 2.0.13 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-04-22 - 2.0.12 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-04-21 - 2.0.11 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-04-19 - 2.0.10 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-04-19 - 2.0.9 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-04-18 - 2.0.8 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-04-15 - 2.0.7 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-03-29 - 2.0.6 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-03-25 - 2.0.5 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-03-24 - 2.0.4 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-03-23 - 2.0.3 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-03-16 - 2.0.2 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-03-16 - 2.0.1 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-03-16 - 2.0.0 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-03-16 - 1.0.36 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-01-07 - 1.0.35 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-01-06 - 1.0.34 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-01-06 - 1.0.33 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2022-01-06 - 1.0.32 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-12-14 - 1.0.31 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-12-13 - 1.0.30 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-12-10 - 1.0.29 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-12-10 - 1.0.28 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-11-27 - 1.0.27 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-09-27 - 1.0.26 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-09-16 - 1.0.25 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-09-16 - 1.0.24 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-09-13 - 1.0.23 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-09-08 - 1.0.22 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-09-08 - 1.0.21 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-09-08 - 1.0.20 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-03-29 - 1.0.19 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-03-29 - 1.0.18 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-03-29 - 1.0.17 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-03-28 - 1.0.16 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-03-28 - 1.0.15 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-03-28 - 1.0.14 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-03-27 - 1.0.13 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-03-27 - 1.0.12 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.
## 2021-03-27 - 1.0.11 - Core
Minor core fixes and optimizations.
- Updated core functionalities to improve performance.

View File

@ -2,17 +2,32 @@
"gitzone": {
"projectType": "npm",
"module": {
"githost": "gitlab.com",
"githost": "code.foss.global",
"gitscope": "designestate",
"gitrepo": "dees-element",
"shortDescription": "a custom element class extending lit element class",
"description": "A library for creating custom elements extending the lit element class with additional functionalities.",
"npmPackagename": "@designestate/dees-element",
"license": "MIT",
"projectDomain": "design.estate"
"projectDomain": "design.estate",
"keywords": [
"custom elements",
"lit",
"TypeScript",
"CSS manager",
"themes",
"decorators",
"async directive",
"web components",
"reactive programming",
"DOM manipulation"
]
}
},
"npmci": {
"npmGlobalTools": [],
"npmAccessLevel": "public"
},
"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"
}
}

27520
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,30 +1,30 @@
{
"name": "@designestate/dees-element",
"version": "1.0.34",
"name": "@design.estate/dees-element",
"version": "2.0.42",
"private": false,
"description": "a custom element class extending lit element class",
"description": "A library for creating custom elements extending the lit element class with additional functionalities.",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"type": "module",
"author": "Lossless GmbH",
"license": "MIT",
"scripts": {
"test": "(tstest test/ --web)",
"build": "(tsbuild --web && tsbundle npm)"
"build": "(tsbuild --web --allowimplicitany && tsbundle npm)",
"buildDocs": "tsdoc"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.28",
"@gitzone/tsbundle": "^1.0.88",
"@gitzone/tstest": "^1.0.60",
"@pushrocks/tapbundle": "^3.2.15",
"@types/node": "^16.11.12",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0"
"@git.zone/tsbuild": "^2.3.2",
"@git.zone/tsbundle": "^2.2.5",
"@git.zone/tstest": "^1.0.96",
"@push.rocks/tapbundle": "^5.6.3",
"@types/node": "^22.14.1"
},
"dependencies": {
"@designestate/dees-domtools": "^1.0.103",
"@pushrocks/isounique": "^1.0.4",
"@pushrocks/smartrx": "^2.0.19",
"lit": "^2.0.2"
"@design.estate/dees-domtools": "^2.3.2",
"@push.rocks/isounique": "^1.0.5",
"@push.rocks/smartrx": "^3.0.7",
"lit": "^3.3.0"
},
"browserslist": [
"last 1 chrome versions"
@ -40,5 +40,18 @@
"cli.js",
"npmextra.json",
"readme.md"
]
],
"keywords": [
"custom elements",
"lit",
"TypeScript",
"CSS manager",
"themes",
"decorators",
"async directive",
"web components",
"reactive programming",
"DOM manipulation"
],
"packageManager": "pnpm@10.7.0+sha512.6b865ad4b62a1d9842b61d674a393903b871d9244954f652b8842c2b553c72176b278f64c463e52d40fff8aba385c235c8c9ecf5cc7de4fd78b8bb6d49633ab6"
}

9861
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

1
readme.hints.md Normal file
View File

@ -0,0 +1 @@

182
readme.md
View File

@ -1,39 +1,167 @@
# @designestate/dees-element
# @design.estate/dees-element
a custom element class extending lit element class
## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@designestate/dees-element)
* [gitlab.com (source)](https://gitlab.com/designestate/dees-element)
* [github.com (source mirror)](https://github.com/designestate/dees-element)
* [docs (typedoc)](https://designestate.gitlab.io/dees-element/)
## Install
## Status for master
To install `@design.estate/dees-element`, you need to run the following command using npm:
Status Category | Status Badge
-- | --
GitLab Pipelines | [![pipeline status](https://gitlab.com/designestate/dees-element/badges/master/pipeline.svg)](https://lossless.cloud)
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/designestate/dees-element/badges/master/coverage.svg)](https://lossless.cloud)
npm | [![npm downloads per month](https://badgen.net/npm/dy/@designestate/dees-element)](https://lossless.cloud)
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/designestate/dees-element)](https://lossless.cloud)
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@designestate/dees-element)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@designestate/dees-element)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@designestate/dees-element)](https://lossless.cloud)
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
```bash
npm install @design.estate/dees-element
```
Ensure you have TypeScript and the necessary compilers configured in your development environment since this package uses ESM syntax and TypeScript.
## Usage
Use TypeScript for best in class intellisense
This section provides a comprehensive exploration into the usage of `@design.estate/dees-element`, offering examples to illustrate its capabilities in creating custom elements by extending the lit element class. All examples assume the use of ESM syntax and TypeScript, aligning with modern best practices in web development.
## Contribution
`@design.estate/dees-element` serves as a robust foundation for building custom web components, leveraging the power of the Lit library for reactive updates and efficient rendering management. This guide takes you through the process of creating, styling, and interacting with your custom elements.
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
### Getting Started
For further information read the linked docs at the top of this readme.
Firstly, ensure you have installed the package as described in the installation section. Once installed, you can start creating custom elements. Let's begin with a simple example:
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
#### Define a Custom Element
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)
Create a file named `MyElement.ts`:
```typescript
import { DeesElement, customElement, html, css, cssManager } from '@design.estate/dees-element';
@customElement('my-element')
class MyElement extends DeesElement {
render() {
return html`<div>My Custom Element</div>`;
}
}
```
This code snippet defines a custom element `<my-element>` that renders a simple div. `DeesElement` extends the LitElement class, bringing in all of its reactive rendering capabilities along with additional features that `@design.estate/dees-element` offers.
#### Styling the Element
To style the element, utilize the static `styles` property:
```typescript
@customElement('my-styled-element')
class MyStyledElement extends DeesElement {
static styles = [
css`
div {
color: blue;
padding: 16px;
border: 1px solid blue;
}
`,
];
render() {
return html`<div>A Styled Custom Element</div>`;
}
}
```
The `css` template tag allows you to define CSS styles scoped to your custom element.
#### Leveraging the `cssManager` for Theme Management
`@design.estate/dees-element` introduces a powerful `CssManager` class that facilitates dynamic theming and responsive designs:
```typescript
import { cssManager, DeesElement, customElement, html, css } from '@design.estate/dees-element';
@customElement('themed-element')
class ThemedElement extends DeesElement {
static styles = [
cssManager.defaultStyles,
css`
:host {
display: block;
background-color: var(--theme-background-color, #fff);
}
`,
];
constructor() {
super();
cssManager.bdTheme('#fff', '#000'); // Define themes
}
render() {
return html`<div>A Themed Custom Element</div>`;
}
}
```
The `CssManager` allows easy management of themes, breakpoints, and more, ensuring your custom elements remain consistent and responsive across different devices and themes.
### Reactive Properties and State Management
To make your elements interactive and data-driven, `@design.estate/dees-element` offers a seamless approach to managing properties and internal state:
```typescript
@customElement('interactive-element')
class InteractiveElement extends DeesElement {
@property({ type: String }) labelText = 'Click me';
@state() private count = 0;
render() {
return html`
<button @click="${this.incrementCount}">${this.labelText}: ${this.count}</button>
`;
}
incrementCount() {
this.count++;
}
}
```
Here, `@property` and `@state` decorators are used to reactively update your custom element whenever the internal state or properties change.
### Advanced Scenarios: Directives and Async Data
`@design.estate/dees-element` supports Lit's directives for handling asynchronous data, complex rendering conditions, and more. Here's an example using the `resolve` directive to render content asynchronously:
```typescript
import { resolve } from '@design.estate/dees-element';
@customElement('async-element')
class AsyncElement extends DeesElement {
private fetchData() {
return new Promise((resolve) => {
setTimeout(() => resolve('Data Loaded'), 2000);
});
}
render() {
return html`${resolve(this.fetchData())}`;
}
}
```
This example demonstrates how to render async data efficiently, ensuring your custom elements can handle dynamic content and states gracefully.
### Conclusion
`@design.estate/dees-element` enriches the development experience for building custom elements by extending the capabilities of LitElement. Through thoughtful design choices, such as enhanced theming with `CssManager` and the incorporation of useful plugins and decorators, it facilitates a seamless and powerful approach to developing custom web components.
## License and Legal Information
This 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.
**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.
### Trademarks
This 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.
### Company Information
Task Venture Capital GmbH
Registered at District court Bremen HRB 35230 HB, Germany
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
By 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.

View File

@ -1,5 +1,5 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as deesElement from '../ts/index';
import { expect, tap } from '@push.rocks/tapbundle';
import * as deesElement from '../ts/index.js';
tap.test('should create a static element', async () => {
@deesElement.customElement('my-button')
@ -11,12 +11,12 @@ tap.test('should create a static element', async () => {
.buttonClass {
background: ${deesElement.cssManager.bdTheme('blue', 'black')};
}
`
`,
];
// INSTANCE
render() {
return deesElement.html`<div class="buttonClass">My Button</div>`
return deesElement.html`<div class="buttonClass">My Button</div>`;
}
}
});

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @push.rocks/commitinfo
*/
export const commitinfo = {
name: '@design.estate/dees-element',
version: '2.0.42',
description: 'A library for creating custom elements extending the lit element class with additional functionalities.'
}

View File

@ -1,6 +1,6 @@
import { CSSResult, unsafeCSS } from 'lit';
import * as plugins from './dees-element.plugins';
import * as domtools from '@designestate/dees-domtools';
import * as plugins from './plugins.js';
import * as domtools from '@design.estate/dees-domtools';
export interface IBdVarTriplet {
cssVarName: string;
@ -28,24 +28,43 @@ export class CssManager {
});
}
public get defaultStyles () {
public get defaultStyles() {
return domtools.elementBasic.staticStyles;
}
public cssForTablet(contentArg) {
public cssForDesktop(contentArg: CSSResult) {
return unsafeCSS(domtools.breakpoints.cssForDesktop(contentArg));
}
public cssForNotebook(contentArg: CSSResult) {
return unsafeCSS(domtools.breakpoints.cssForNotebook(contentArg));
}
public cssForTablet(contentArg: CSSResult) {
return unsafeCSS(domtools.breakpoints.cssForTablet(contentArg));
};
public cssForPhablet(contentArg) {
}
public cssForPhablet(contentArg: CSSResult) {
return unsafeCSS(domtools.breakpoints.cssForPhablet(contentArg));
}
public cssForPhone(contentArg) {
public cssForPhone(contentArg: CSSResult) {
return unsafeCSS(domtools.breakpoints.cssForPhone(contentArg));
};
}
public bdTheme(brightValueArg: string, darkValueArg: string): CSSResult {
let returnCssVar: string;
// lets determine the default value for quick page rendering.
let defaultValue: string;
if (domtools.DomTools.getGlobalDomToolsSync()) {
defaultValue = domtools.DomTools.getGlobalDomToolsSync().themeManager.goBrightBoolean
? brightValueArg
: darkValueArg;
} else {
defaultValue = darkValueArg;
}
const existingTriplet = this.bdVarTripletStore.find(
(tripletArg) =>
tripletArg.darkValue === darkValueArg && tripletArg.brightValue === brightValueArg
@ -59,13 +78,14 @@ export class CssManager {
darkValue: darkValueArg,
};
this.bdVarTripletStore.push(newTriplet);
this.domtoolsPromise.then(async (domtoolsArg) => {
await domtoolsArg.domReady.promise;
document.body.style.setProperty(newTriplet.cssVarName, this.goBright ? newTriplet.brightValue : newTriplet.darkValue);
document.body.style.setProperty(newTriplet.cssVarName, defaultValue);
});
returnCssVar = newTriplet.cssVarName;
}
return plugins.lit.unsafeCSS(`var(${returnCssVar})`);
return plugins.lit.unsafeCSS(`var(${returnCssVar}, ${defaultValue})`);
}
public cssGridColumns = (amountOfColumnsArg: number, gapSizeArg: number): CSSResult => {

View File

@ -0,0 +1,67 @@
import * as plugins from './plugins.js';
export class DeesElement extends plugins.lit.LitElement {
// INSTANCE
@plugins.lit.property({ type: Boolean })
public goBright: boolean = false;
// domtools
public domtoolsPromise: Promise<plugins.domtools.DomTools>;
@plugins.lit.property()
domtools?: plugins.domtools.DomTools;
public rxSubscriptions: plugins.smartrx.rxjs.Subscription[] = [];
private themeSubscription: plugins.smartrx.rxjs.Subscription;
private elementDomReadyDeferred = plugins.domtools.plugins.smartpromise.defer();
public elementDomReady = this.elementDomReadyDeferred.promise;
constructor(optionsArg: plugins.domtools.IDomToolsContructorOptions = {}) {
super();
this.domtoolsPromise = plugins.domtools.elementBasic.setup(this, optionsArg);
this.domtoolsPromise.then((domtoolsArg) => {
this.domtools = domtoolsArg;
});
}
public async connectedCallback() {
super.connectedCallback();
const domtools = await this.domtoolsPromise;
this.themeSubscription = domtools.themeManager.themeObservable.subscribe((goBrightArg) => {
this.goBright = goBrightArg;
});
this.rxSubscriptions.push(this.themeSubscription);
for (const startupFunction of this.startupFunctions) {
await startupFunction();
}
this.dispatchEvent(new CustomEvent('deesElementConnected'));
}
public firstUpdated(_changedProperties: Map<string | number | symbol, unknown>): void {
super.firstUpdated(_changedProperties);
this.elementDomReadyDeferred.resolve();
}
private startupFunctions: (() => void | Promise<any>)[] = [];
public registerStartupFunction(startupFunctionArg: () => void) {
this.startupFunctions.push(startupFunctionArg);
}
private garbageFunctions: (() => void | Promise<any>)[] = [];
public registerGarbageFunction(garbageFunctionArg: () => void) {
this.garbageFunctions.push(garbageFunctionArg);
}
public async disconnectedCallback() {
await this.domtoolsPromise;
super.disconnectedCallback();
for (const subscription of this.rxSubscriptions) {
subscription.unsubscribe();
}
for (const garbageFunction of this.garbageFunctions) {
await garbageFunction();
}
this.dispatchEvent(new CustomEvent('deesElementDisconnected'));
}
}

View File

@ -1,38 +0,0 @@
import * as plugins from './dees-element.plugins';
export class DeesElement extends plugins.lit.LitElement {
// INSTANCE
@plugins.lit.property({ type: Boolean })
public goBright: boolean = false;
// domtools
public domtoolsPromise = plugins.domtools.elementBasic.setup(this);
@plugins.lit.property()
domtools?: plugins.domtools.DomTools;
private themeSubscription: plugins.smartrx.rxjs.Subscription;
constructor() {
super();
this.domtoolsPromise.then((domtoolsArg) => {
this.domtools = domtoolsArg;
});
}
public async connectedCallback() {
super.connectedCallback();
const domtools = await this.domtoolsPromise;
this.themeSubscription = domtools.themeManager.themeObservable.subscribe((goBrightArg) => {
this.goBright = goBrightArg;
});
this.dispatchEvent(new CustomEvent('deesElementConnected'));
}
public async disconnectedCallback() {
await this.domtoolsPromise;
super.disconnectedCallback();
this.themeSubscription.unsubscribe();
this.dispatchEvent(new CustomEvent('deesElementDisconnected'));
}
}

View File

@ -1,25 +0,0 @@
// pushrocks scope
import * as isounique from '@pushrocks/isounique';
import * as smartrx from '@pushrocks/smartrx';
export {
isounique,
smartrx
};
// third party scope
import { css, unsafeCSS, LitElement } from 'lit';
import { property } from 'lit/decorators/property.js';
const lit = {
css,
unsafeCSS,
LitElement,
property,
};
import * as domtools from '@designestate/dees-domtools';
export {
lit,
domtools
};

View File

@ -0,0 +1,53 @@
import { type TemplateResult, noChange } from 'lit';
import { AsyncDirective, directive } from 'lit/async-directive.js';
/**
* Resolves a promise and sets the value of the directive
*/
class ResolveDirective extends AsyncDirective {
promise: Promise<unknown> | undefined;
hasPromiseSettled: boolean = false;
render(promise: Promise<unknown>) {
if (this.promise !== promise) {
this.promise = promise;
if (this.isConnected) {
this.handlePromise(promise);
}
}
return noChange;
}
handlePromise(promise: Promise<unknown>) {
this.hasPromiseSettled = false;
promise.then((value) => {
if (this.promise === promise && !this.hasPromiseSettled) {
this.setValue(value);
this.hasPromiseSettled = true;
}
}).catch((error) => {
if (this.promise === promise && !this.hasPromiseSettled) {
this.setValue(error);
this.hasPromiseSettled = true;
}
});
}
disconnected() {
this.hasPromiseSettled = true; // prevent setting value if the promise settles after disconnection
}
reconnected() {
if (!this.hasPromiseSettled) {
this.handlePromise(this.promise!);
}
}
}
export const resolve = directive(ResolveDirective);
export const resolveExec = (funcArg: () => Promise<TemplateResult | unknown>) => {
return resolve(funcArg());
}

View File

@ -0,0 +1,40 @@
import { noChange } from 'lit';
import { AsyncDirective, directive } from 'lit/async-directive.js';
import { rxjs } from '@push.rocks/smartrx';
/**
* Subscribes to an observable
*/
class SubscribeDirective extends AsyncDirective {
observable: rxjs.Observable<unknown> | undefined;
sub: rxjs.Subscription | null = null;
render(observable: rxjs.Observable<unknown>) {
if (this.observable !== observable) {
this.sub?.unsubscribe();
this.observable = observable;
if (this.isConnected) {
this.subscribe(observable);
}
}
return noChange;
}
subscribe(observable: rxjs.Observable<unknown>) {
this.sub = observable.subscribe((v: unknown) => {
this.setValue(v);
});
}
disconnected() {
this.sub?.unsubscribe();
}
reconnected() {
this.subscribe(this.observable!);
}
}
export const subscribe = directive(SubscribeDirective);

View File

@ -0,0 +1,61 @@
import { type TemplateResult, noChange } from 'lit';
import type { DirectiveResult } from 'lit/directive.js';
import { AsyncDirective, directive } from 'lit/async-directive.js';
import { rxjs } from '@push.rocks/smartrx';
/**
* Subscribes to an observable and applies a template function to each emission.
* @param observable - the source Observable
* @param templateFn - function mapping each emitted value to a TemplateResult or other renderable content
*/
class SubscribeWithTemplateDirective extends AsyncDirective {
private observable?: rxjs.Observable<unknown>;
private templateFn?: (value: unknown) => TemplateResult | unknown;
private sub: rxjs.Subscription | null = null;
render(
observable: rxjs.Observable<unknown>,
templateFn: (value: unknown) => TemplateResult | unknown
) {
const changed = this.observable !== observable || this.templateFn !== templateFn;
if (changed) {
this.sub?.unsubscribe();
this.observable = observable;
this.templateFn = templateFn;
if (this.isConnected) {
this.startSubscription();
}
}
return noChange;
}
private startSubscription() {
this.sub = this.observable!.subscribe((v: unknown) => {
const out = this.templateFn!(v);
this.setValue(out);
});
}
disconnected() {
this.sub?.unsubscribe();
}
reconnected() {
this.startSubscription();
}
}
/**
* Directive that renders templates for each emission of an Observable.
* Usage: html`${subscribeWithTemplate(myObservable, v => html`<span>${v}</span>`)}`
*/
/**
* 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;

9
ts/directives/index.ts Normal file
View File

@ -0,0 +1,9 @@
// better scoped exports
export * from './classes.resolvedirective.js';
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';

View File

@ -1,22 +1,35 @@
import { CssManager } from './dees-element.classes.cssmanager';
import { CssManager } from './classes.cssmanager.js';
// lit exports
export { html, TemplateResult, css, unsafeCSS, render } from 'lit';
export { html, type TemplateResult, css, unsafeCSS, render, type CSSResult } from 'lit';
export { unsafeHTML } from 'lit/directives/unsafe-html.js';
export { customElement } from 'lit/decorators/custom-element.js';
export { property } from 'lit/decorators/property.js';
export { state } from 'lit/decorators/state.js';
export { property, state, query, queryAll, queryAsync } from 'lit/decorators.js';
// domtools exports
import * as domtools from '@designestate/dees-domtools';
import * as domtools from '@design.estate/dees-domtools';
export { domtools };
// DeesElements exports
export { DeesElement } from './dees-element.classes.dees-element';
export * from './classes.dees-element.js';
// directives exports
import * as directives from './directives/index.js';
export { directives };
/**
* a singleton instance of CssManager
*/
export const cssManager = new CssManager();
// type exports
import type { rxjs } from '@push.rocks/smartrx';
export type {
rxjs,
}

19
ts/plugins.ts Normal file
View File

@ -0,0 +1,19 @@
// pushrocks scope
import * as isounique from '@push.rocks/isounique';
import * as smartrx from '@push.rocks/smartrx';
export { isounique, smartrx };
// third party scope
import { css, unsafeCSS, LitElement } from 'lit';
import { property } from 'lit/decorators/property.js';
const lit = {
css,
unsafeCSS,
LitElement,
property,
};
import * as domtools from '@design.estate/dees-domtools';
export { lit, domtools };

View File

@ -1,16 +1,14 @@
{
"compilerOptions": {
"target": "es2017",
"module": "es2015",
"moduleResolution": "node",
"lib": ["es2017", "dom"],
"declaration": true,
"inlineSources": true,
"inlineSourceMap": true,
"noUnusedLocals": true,
"noFallthroughCasesInSwitch": true,
"outDir": "dist/",
"skipLibCheck": true,
"experimentalDecorators": true
}
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"verbatimModuleSyntax": true
},
"exclude": [
"dist_*/**/*.d.ts"
]
}

View File

@ -1,17 +0,0 @@
{
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"semicolon": [true, "always"],
"no-console": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-ordering": {
"options":{
"order": [
"static-method"
]
}
}
},
"defaultSeverity": "warning"
}