@push.rocks/smartntml 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ /**
2
+ * autocreated commitinfo by @pushrocks/commitinfo
3
+ */
4
+ export declare const commitinfo: {
5
+ name: string;
6
+ version: string;
7
+ description: string;
8
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * autocreated commitinfo by @pushrocks/commitinfo
3
+ */
4
+ export const commitinfo = {
5
+ name: '@pushrocks/smartntml',
6
+ version: '2.0.4',
7
+ description: 'lit-html for the backend'
8
+ };
9
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSxzQkFBc0I7SUFDNUIsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLDBCQUEwQjtDQUN4QyxDQUFBIn0=
@@ -0,0 +1,8 @@
1
+ import './instrument/happydom.js';
2
+ import * as plugins from './smartntml.plugins.js';
3
+ import * as deesElement from '@designestate/dees-element';
4
+ export { deesElement };
5
+ export declare class Smartntml {
6
+ constructor();
7
+ renderTemplateResult(templateResult: plugins.deesElement.TemplateResult, stripCommentsArg?: boolean): Promise<string>;
8
+ }
@@ -0,0 +1,17 @@
1
+ import './instrument/happydom.js';
2
+ import * as plugins from './smartntml.plugins.js';
3
+ import * as deesElement from '@designestate/dees-element';
4
+ export { deesElement };
5
+ export class Smartntml {
6
+ constructor() { }
7
+ async renderTemplateResult(templateResult, stripCommentsArg = true) {
8
+ const element = document.createElement('div');
9
+ plugins.deesElement.render(templateResult, element);
10
+ let stringResult = element.innerHTML;
11
+ if (stripCommentsArg) {
12
+ stringResult = stringResult.replace(/<!--(.*?)-->/g, '');
13
+ }
14
+ return stringResult;
15
+ }
16
+ }
17
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLDBCQUEwQixDQUFDO0FBQ2xDLE9BQU8sS0FBSyxPQUFPLE1BQU0sd0JBQXdCLENBQUM7QUFFbEQsT0FBTyxLQUFLLFdBQVcsTUFBTSw0QkFBNEIsQ0FBQztBQUMxRCxPQUFPLEVBQUUsV0FBVyxFQUFFLENBQUM7QUFFdkIsTUFBTSxPQUFPLFNBQVM7SUFDcEIsZ0JBQWUsQ0FBQztJQUVULEtBQUssQ0FBQyxvQkFBb0IsQ0FDL0IsY0FBa0QsRUFDbEQsZ0JBQWdCLEdBQUcsSUFBSTtRQUV2QixNQUFNLE9BQU8sR0FBRyxRQUFRLENBQUMsYUFBYSxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQzlDLE9BQU8sQ0FBQyxXQUFXLENBQUMsTUFBTSxDQUFDLGNBQWMsRUFBRSxPQUFPLENBQUMsQ0FBQztRQUNwRCxJQUFJLFlBQVksR0FBRyxPQUFPLENBQUMsU0FBUyxDQUFDO1FBQ3JDLElBQUksZ0JBQWdCLEVBQUU7WUFDcEIsWUFBWSxHQUFHLFlBQVksQ0FBQyxPQUFPLENBQUMsZUFBZSxFQUFFLEVBQUUsQ0FBQyxDQUFDO1NBQzFEO1FBQ0QsT0FBTyxZQUFZLENBQUM7SUFDdEIsQ0FBQztDQUNGIn0=
@@ -0,0 +1 @@
1
+ import 'fake-indexeddb/auto';
@@ -0,0 +1,7 @@
1
+ // happy-dom setup
2
+ // first lets setup indexeddb
3
+ import 'fake-indexeddb/auto';
4
+ import { GlobalRegistrator } from '@happy-dom/global-registrator';
5
+ GlobalRegistrator.register();
6
+ window.location.href = 'http://localhost';
7
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGFwcHlkb20uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9pbnN0cnVtZW50L2hhcHB5ZG9tLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGtCQUFrQjtBQUVsQiw2QkFBNkI7QUFDN0IsT0FBTyxxQkFBcUIsQ0FBQztBQUU3QixPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUNsRSxpQkFBaUIsQ0FBQyxRQUFRLEVBQUUsQ0FBQztBQUM3QixNQUFNLENBQUMsUUFBUSxDQUFDLElBQUksR0FBRyxrQkFBa0IsQ0FBQyJ9
@@ -0,0 +1,4 @@
1
+ import * as smartpromise from '@pushrocks/smartpromise';
2
+ export { smartpromise };
3
+ import * as deesElement from '@designestate/dees-element';
4
+ export { deesElement };
@@ -0,0 +1,8 @@
1
+ // @pushrocks scope
2
+ import * as smartpromise from '@pushrocks/smartpromise';
3
+ export { smartpromise };
4
+ // designestate
5
+ import * as deesElement from '@designestate/dees-element';
6
+ export { deesElement };
7
+ // third party scope
8
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRudG1sLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydG50bWwucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxtQkFBbUI7QUFDbkIsT0FBTyxLQUFLLFlBQVksTUFBTSx5QkFBeUIsQ0FBQztBQUV4RCxPQUFPLEVBQUUsWUFBWSxFQUFFLENBQUM7QUFFeEIsZUFBZTtBQUNmLE9BQU8sS0FBSyxXQUFXLE1BQU0sNEJBQTRCLENBQUM7QUFFMUQsT0FBTyxFQUFFLFdBQVcsRUFBRSxDQUFDO0FBRXZCLG9CQUFvQiJ9
package/license ADDED
@@ -0,0 +1,9 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright 2022 Lossless GmbH <hello@lossless.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/npmextra.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "gitzone": {
3
+ "projectType": "npm",
4
+ "module": {
5
+ "githost": "gitlab.com",
6
+ "gitscope": "pushrocks",
7
+ "gitrepo": "smartntml",
8
+ "description": "lit-html for the backend",
9
+ "npmPackagename": "@pushrocks/smartntml",
10
+ "license": "MIT",
11
+ "projectDomain": "push.rocks"
12
+ }
13
+ },
14
+ "npmci": {
15
+ "npmGlobalTools": [],
16
+ "npmAccessLevel": "public"
17
+ }
18
+ }
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@push.rocks/smartntml",
3
+ "version": "2.0.4",
4
+ "private": false,
5
+ "description": "lit-html for the backend",
6
+ "main": "dist_ts/index.js",
7
+ "typings": "dist_ts/index.d.ts",
8
+ "type": "module",
9
+ "author": "Lossless GmbH",
10
+ "license": "MIT",
11
+ "scripts": {
12
+ "test": "(tstest test/ --web)",
13
+ "build": "(tsbuild --web)",
14
+ "buildDocs": "tsdoc"
15
+ },
16
+ "devDependencies": {
17
+ "@gitzone/tsbuild": "^2.1.65",
18
+ "@gitzone/tsbundle": "^2.0.7",
19
+ "@gitzone/tsrun": "^1.2.39",
20
+ "@gitzone/tstest": "^1.0.73",
21
+ "@pushrocks/tapbundle": "^5.0.4",
22
+ "@types/node": "^18.7.23",
23
+ "why-is-node-running": "^2.2.2"
24
+ },
25
+ "dependencies": {
26
+ "@designestate/dees-element": "^2.0.20",
27
+ "@happy-dom/global-registrator": "^8.9.0",
28
+ "@pushrocks/smartpromise": "^3.1.7",
29
+ "fake-indexeddb": "^4.0.1"
30
+ },
31
+ "browserslist": [
32
+ "last 1 chrome versions"
33
+ ],
34
+ "files": [
35
+ "ts/**/*",
36
+ "ts_web/**/*",
37
+ "dist/**/*",
38
+ "dist_*/**/*",
39
+ "dist_ts/**/*",
40
+ "dist_ts_web/**/*",
41
+ "assets/**/*",
42
+ "cli.js",
43
+ "npmextra.json",
44
+ "readme.md"
45
+ ]
46
+ }
package/readme.md ADDED
@@ -0,0 +1,37 @@
1
+ # @pushrocks/smartntml
2
+ lit-html for the backend
3
+
4
+ ## Availabililty and Links
5
+ * [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartntml)
6
+ * [gitlab.com (source)](https://gitlab.com/pushrocks/smartntml)
7
+ * [github.com (source mirror)](https://github.com/pushrocks/smartntml)
8
+ * [docs (typedoc)](https://pushrocks.gitlab.io/smartntml/)
9
+
10
+ ## Status for master
11
+
12
+ Status Category | Status Badge
13
+ -- | --
14
+ GitLab Pipelines | [![pipeline status](https://gitlab.com/pushrocks/smartntml/badges/master/pipeline.svg)](https://lossless.cloud)
15
+ GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/pushrocks/smartntml/badges/master/coverage.svg)](https://lossless.cloud)
16
+ npm | [![npm downloads per month](https://badgen.net/npm/dy/@pushrocks/smartntml)](https://lossless.cloud)
17
+ Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/pushrocks/smartntml)](https://lossless.cloud)
18
+ TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
19
+ node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
20
+ Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
21
+ PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/smartntml)](https://lossless.cloud)
22
+ PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartntml)](https://lossless.cloud)
23
+ BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartntml)](https://lossless.cloud)
24
+
25
+ ## Usage
26
+
27
+ Use TypeScript for best in class intellisense
28
+
29
+ ## Contribution
30
+
31
+ 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). :)
32
+
33
+ For further information read the linked docs at the top of this readme.
34
+
35
+ ## Legal
36
+ > MIT licensed | **&copy;** [Task Venture Capital GmbH](https://task.vc)
37
+ | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
@@ -0,0 +1,8 @@
1
+ /**
2
+ * autocreated commitinfo by @pushrocks/commitinfo
3
+ */
4
+ export const commitinfo = {
5
+ name: '@pushrocks/smartntml',
6
+ version: '2.0.4',
7
+ description: 'lit-html for the backend'
8
+ }
package/ts/index.ts ADDED
@@ -0,0 +1,22 @@
1
+ import './instrument/happydom.js';
2
+ import * as plugins from './smartntml.plugins.js';
3
+
4
+ import * as deesElement from '@designestate/dees-element';
5
+ export { deesElement };
6
+
7
+ export class Smartntml {
8
+ constructor() {}
9
+
10
+ public async renderTemplateResult(
11
+ templateResult: plugins.deesElement.TemplateResult,
12
+ stripCommentsArg = true
13
+ ) {
14
+ const element = document.createElement('div');
15
+ plugins.deesElement.render(templateResult, element);
16
+ let stringResult = element.innerHTML;
17
+ if (stripCommentsArg) {
18
+ stringResult = stringResult.replace(/<!--(.*?)-->/g, '');
19
+ }
20
+ return stringResult;
21
+ }
22
+ }
@@ -0,0 +1,8 @@
1
+ // happy-dom setup
2
+
3
+ // first lets setup indexeddb
4
+ import 'fake-indexeddb/auto';
5
+
6
+ import { GlobalRegistrator } from '@happy-dom/global-registrator';
7
+ GlobalRegistrator.register();
8
+ window.location.href = 'http://localhost';
@@ -0,0 +1,11 @@
1
+ // @pushrocks scope
2
+ import * as smartpromise from '@pushrocks/smartpromise';
3
+
4
+ export { smartpromise };
5
+
6
+ // designestate
7
+ import * as deesElement from '@designestate/dees-element';
8
+
9
+ export { deesElement };
10
+
11
+ // third party scope