@htmlplus/element 2.13.1 → 2.14.0

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021-2023 The HTMLPLUS Authors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -1,5 +1,5 @@
1
1
  import { kebabCase, camelCase, pascalCase } from 'change-case';
2
- import { API_HOST, STATIC_STYLE, STATIC_TAG, API_STACKS, API_REQUEST, API_CONNECTED, LIFECYCLE_UPDATE, API_STYLE, LIFECYCLE_UPDATED, API_RENDER_COMPLETED, METHOD_RENDER, TYPE_BOOLEAN, TYPE_NUMBER, TYPE_NULL, TYPE_DATE, TYPE_ARRAY, TYPE_OBJECT, TYPE_UNDEFINED, LIFECYCLE_CONNECTED, LIFECYCLE_DISCONNECTED, KEY, API_INSTANCE, MAPPER, LIFECYCLE_CONSTRUCTED, LIFECYCLE_ADOPTED, LIFECYCLE_LOADED } from './constants.js';
2
+ import { API_HOST, STATIC_TAG, API_STACKS, API_REQUEST, API_CONNECTED, LIFECYCLE_UPDATE, STATIC_STYLE, API_STYLE, LIFECYCLE_UPDATED, API_RENDER_COMPLETED, METHOD_RENDER, TYPE_BOOLEAN, TYPE_NUMBER, TYPE_NULL, TYPE_DATE, TYPE_ARRAY, TYPE_OBJECT, TYPE_UNDEFINED, LIFECYCLE_CONNECTED, LIFECYCLE_DISCONNECTED, KEY, API_INSTANCE, MAPPER, LIFECYCLE_CONSTRUCTED, LIFECYCLE_ADOPTED, LIFECYCLE_LOADED } from './constants.js';
3
3
 
4
4
  const appendToMethod = (target, key, handler) => {
5
5
  // Gets the previous function
@@ -264,10 +264,6 @@ const getFramework = (target) => {
264
264
  return 'angular';
265
265
  };
266
266
 
267
- const getStyles = (target) => {
268
- return target.constructor[STATIC_STYLE] ?? target[STATIC_STYLE];
269
- };
270
-
271
267
  const getTag = (target) => {
272
268
  return target.constructor[STATIC_TAG] ?? target[STATIC_TAG];
273
269
  };
@@ -1125,7 +1121,7 @@ const request = (target, name, previous, callback) => {
1125
1121
  });
1126
1122
  // TODO
1127
1123
  (() => {
1128
- const raw = getStyles(target);
1124
+ const raw = target.constructor[STATIC_STYLE];
1129
1125
  if (!raw)
1130
1126
  return;
1131
1127
  const regex1 = /this-([\w-]+)(?:-([\w-]+))?/g;
@@ -1,3 +1,3 @@
1
- export { B as Bind, C as Consumer, D as Direction, E as Element, k as Event, H as Host, I as IsRTL, L as Listen, M as Method, l as Property, P as Provider, Q as Query, m as QueryAll, S as Slots, n as State, W as Watch, c as classes, d as direction, a as dispatch, g as getConfig, h as host, i as isCSSColor, b as isRTL, f as off, o as on, q as query, e as queryAll, j as setConfig, s as slots, t as toUnit } from './client-By_MTZkm.js';
1
+ export { B as Bind, C as Consumer, D as Direction, E as Element, k as Event, H as Host, I as IsRTL, L as Listen, M as Method, l as Property, P as Provider, Q as Query, m as QueryAll, S as Slots, n as State, W as Watch, c as classes, d as direction, a as dispatch, g as getConfig, h as host, i as isCSSColor, b as isRTL, f as off, o as on, q as query, e as queryAll, j as setConfig, s as slots, t as toUnit } from './client-B7RqkVf0.js';
2
2
  import 'change-case';
3
3
  import './constants.js';
@@ -1,3 +1,3 @@
1
- export { p as attributes, r as html, u as styles } from './client-By_MTZkm.js';
1
+ export { p as attributes, r as html, u as styles } from './client-B7RqkVf0.js';
2
2
  import 'change-case';
3
3
  import './constants.js';
package/package.json CHANGED
@@ -1,18 +1,42 @@
1
1
  {
2
2
  "name": "@htmlplus/element",
3
- "version": "2.13.1",
3
+ "version": "2.14.0",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "author": "Masood Abdolian <m.abdolian@gmail.com>",
7
- "description": "A powerful library for building scalable, reusable, fast, tastable and lightweight design system for any web technologies. Powerd by Web Component.",
7
+ "description": "A powerful library for building scalable, reusable, fast, tastable and lightweight design system for any web technologies. Powered by Web Component.",
8
8
  "type": "module",
9
- "main": "client.js",
10
- "types": "client.d.ts",
9
+ "main": "./dist/client.js",
10
+ "types": "./dist/client.d.ts",
11
+ "scripts": {
12
+ "build": "npm run clean && rollup -c",
13
+ "clean": "rimraf dist",
14
+ "development:start": "vite --config development/vite.config.js",
15
+ "format": "prettier --write ."
16
+ },
11
17
  "files": [
12
- "**/*.*"
18
+ "./dist/*",
19
+ "./package.json",
20
+ "./README.md"
13
21
  ],
14
- "publishConfig": {
15
- "directory": "dist"
22
+ "exports": {
23
+ ".": {
24
+ "import": "./dist/client.js",
25
+ "types": "./dist/client.d.ts"
26
+ },
27
+ "./bundlers.js": {
28
+ "import": "./dist/bundlers.js",
29
+ "types": "./dist/bundlers.d.ts"
30
+ },
31
+ "./internal.js": {
32
+ "import": "./dist/internal.js",
33
+ "types": "./dist/internal.d.ts"
34
+ },
35
+ "./transformer.js": {
36
+ "import": "./dist/transformer.js",
37
+ "types": "./dist/transformer.d.ts"
38
+ },
39
+ "./jsx-runtime": "./dist/jsx-runtime.d.ts"
16
40
  },
17
41
  "engines": {
18
42
  "node": ">= 20.10.0"
@@ -54,6 +78,7 @@
54
78
  "@semantic-release/npm": "^12.0.1",
55
79
  "@semantic-release/release-notes-generator": "^14.0.1",
56
80
  "@trivago/prettier-plugin-sort-imports": "^4.3.0",
81
+ "conventional-changelog-conventionalcommits": "^8.0.0",
57
82
  "cpy": "^11.0.1",
58
83
  "prettier": "^3.3.3",
59
84
  "rimraf": "^6.0.1",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes