@lookwe/lit-mixins 1.0.0 → 1.0.2

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/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './internal/delegate-focus';
2
- export * from './internal/element-internals';
3
- export * from './internal/form-associated';
4
- export * from './internal/popover-target';
1
+ export * from './internal/delegate-focus.js';
2
+ export * from './internal/element-internals.js';
3
+ export * from './internal/form-associated.js';
4
+ export * from './internal/popover-target.js';
@@ -1,5 +1,5 @@
1
1
  import { ReactiveElement } from 'lit';
2
- import { MixinBase, MixinReturn } from '@lookwe/utils';
2
+ import { MixinBase, MixinReturn } from '@lookwe/utils/types';
3
3
  /**
4
4
  * A unique symbol to retrieve the focus element.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
- import { MixinBase, MixinReturn } from '@lookwe/utils';
2
+ import { MixinBase, MixinReturn } from '@lookwe/utils/types';
3
3
  /**
4
4
  * A unique symbol used for protected access to an instance's `ElementInternals`.
5
5
  *
@@ -28,7 +28,7 @@ function mixinElementInternals(base) {
28
28
  class WithElementInternalsElement extends base {
29
29
  constructor() {
30
30
  super(...arguments);
31
- _WithElementInternalsElement_internals.set(this, undefined);
31
+ _WithElementInternalsElement_internals.set(this, void 0);
32
32
  }
33
33
  get [(_WithElementInternalsElement_internals = new WeakMap(), internals)]() {
34
34
  // Create internals in getter so that it can be used in methods called on
@@ -1,5 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
- import { MixinBase, MixinReturn } from '@lookwe/utils';
2
+ import { MixinBase, MixinReturn } from '@lookwe/utils/types';
3
3
  import { WithElementInternals } from './element-internals.js';
4
4
  /**
5
5
  * A form-associated element.
@@ -1,6 +1,5 @@
1
1
  import { __classPrivateFieldGet, __classPrivateFieldSet, __runInitializers, __esDecorate } from 'tslib';
2
2
  import { property } from 'lit/decorators.js';
3
- import { stringConverter } from '@lookwe/lit-converters';
4
3
  import { internals } from './element-internals.js';
5
4
 
6
5
  /**
@@ -114,7 +113,7 @@ function mixinFormAssociated(base) {
114
113
  if (!this.isConnected)
115
114
  return;
116
115
  this[internals].setFormValue(this[getFormValue](), this[getFormState]());
117
- }, _name_decorators = [property({ reflect: true, converter: stringConverter })], _disabled_decorators = [property({ type: Boolean })], getFormState)]() {
116
+ }, _name_decorators = [property({ reflect: true, useDefault: true })], _disabled_decorators = [property({ type: Boolean })], getFormState)]() {
118
117
  return this[getFormValue]();
119
118
  }
120
119
  formDisabledCallback(disabled) {
@@ -129,7 +128,7 @@ function mixinFormAssociated(base) {
129
128
  }
130
129
  },
131
130
  (() => {
132
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : undefined;
131
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
133
132
  __esDecorate(_a, null, _name_decorators, { kind: "accessor", name: "name", static: false, private: false, access: { has: obj => "name" in obj, get: obj => obj.name, set: (obj, value) => { obj.name = value; } }, metadata: _metadata }, _name_initializers, _name_extraInitializers);
134
133
  __esDecorate(_a, null, _disabled_decorators, { kind: "accessor", name: "disabled", static: false, private: false, access: { has: obj => "disabled" in obj, get: obj => obj.disabled, set: (obj, value) => { obj.disabled = value; } }, metadata: _metadata }, _disabled_initializers, _disabled_extraInitializers);
135
134
  if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
@@ -1,5 +1,5 @@
1
1
  import { ReactiveElement } from 'lit';
2
- import { MixinBase, MixinReturn } from '@lookwe/utils';
2
+ import { MixinBase, MixinReturn } from '@lookwe/utils/types';
3
3
  /**
4
4
  * An instance with all the useful properties to use the [Popover
5
5
  * api](https://developer.mozilla.org/docs/Web/API/Popover_API).
@@ -1,6 +1,5 @@
1
- import { __esDecorate, __classPrivateFieldGet, __classPrivateFieldSet, __runInitializers } from 'tslib';
1
+ import { __classPrivateFieldGet, __classPrivateFieldSet, __runInitializers, __esDecorate } from 'tslib';
2
2
  import { property } from 'lit/decorators.js';
3
- import { stringConverter } from '@lookwe/lit-converters';
4
3
 
5
4
  /**
6
5
  * Mixes in popovertarget behavior for a class. This allows an element to control an external popover element.
@@ -66,8 +65,8 @@ function mixinPopoverTarget(base) {
66
65
  return root.querySelector(`#${CSS.escape(this.popoverTarget)}`);
67
66
  },
68
67
  (() => {
69
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : undefined;
70
- _popoverTarget_decorators = [property({ reflect: true, attribute: 'popovertarget', converter: stringConverter })];
68
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
69
+ _popoverTarget_decorators = [property({ reflect: true, attribute: 'popovertarget', useDefault: true })];
71
70
  _set_popoverTargetElement_decorators = [property({ attribute: false })];
72
71
  _popoverTargetAction_decorators = [property({ attribute: 'popovertargetaction' })];
73
72
  __esDecorate(_a, null, _popoverTarget_decorators, { kind: "accessor", name: "popoverTarget", static: false, private: false, access: { has: obj => "popoverTarget" in obj, get: obj => obj.popoverTarget, set: (obj, value) => { obj.popoverTarget = value; } }, metadata: _metadata }, _popoverTarget_initializers, _popoverTarget_extraInitializers);
package/package.json CHANGED
@@ -5,6 +5,10 @@
5
5
  "bugs": {
6
6
  "url": "https://github.com/Lookwe69/lit-mixins/issues"
7
7
  },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/Lookwe69/lit-mixins.git"
11
+ },
8
12
  "keywords": [
9
13
  "lui mixin",
10
14
  "web-components mixin",
@@ -14,7 +18,7 @@
14
18
  "lit popover target"
15
19
  ],
16
20
  "author": "Lookwe",
17
- "version": "1.0.0",
21
+ "version": "1.0.2",
18
22
  "type": "module",
19
23
  "scripts": {
20
24
  "build": "rollup --config rollup-dist.config.js",
@@ -24,7 +28,7 @@
24
28
  "lint": "npm run lint:eslint && npm run lint:ts",
25
29
  "lint:eslint": "eslint 'src/**/*.ts'",
26
30
  "lint:ts": "tsc --noEmit",
27
- "format": "prettier --check --ignore-path .gitignore --ignore-path .prettierignore .",
31
+ "format": "prettier --check --ignore-path .gitignore .",
28
32
  "format:fix": "npm run format -- --write && npm run format -- --write --plugin=@homer0/prettier-plugin-jsdoc",
29
33
  "test": "npm run build && wtr && MODE=prod wtr",
30
34
  "test:dev": "npm run build && wtr",
@@ -55,31 +59,32 @@
55
59
  "access": "public"
56
60
  },
57
61
  "dependencies": {
58
- "@lookwe/lit-converters": "^1.0.1",
59
- "@lookwe/utils": "^1.1.0",
60
- "lit": "^3.2.1",
61
- "tslib": "^2.8.0"
62
+ "@lookwe/utils": "^1.1.3",
63
+ "lit": "^3.3.2",
64
+ "tslib": "^2.8.1"
62
65
  },
63
66
  "devDependencies": {
64
- "@homer0/prettier-plugin-jsdoc": "^9.1.0",
65
- "@ianvs/prettier-plugin-sort-imports": "^4.4.1",
67
+ "@homer0/prettier-plugin-jsdoc": "^11.0.1",
68
+ "@ianvs/prettier-plugin-sort-imports": "^4.7.0",
66
69
  "@open-wc/testing": "^4.0.0",
67
- "@rollup/plugin-node-resolve": "^16.0.0",
68
- "@rollup/plugin-replace": "^6.0.2",
69
- "@rollup/plugin-typescript": "^12.1.2",
70
+ "@rollup/plugin-node-resolve": "^16.0.3",
71
+ "@rollup/plugin-replace": "^6.0.3",
72
+ "@rollup/plugin-typescript": "^12.3.0",
73
+ "@tsconfig/strictest": "^2.0.8",
70
74
  "@types/mocha": "^10.0.10",
71
75
  "@web/dev-server-rollup": "^0.6.4",
72
- "@web/test-runner": "^0.17.3",
76
+ "@web/test-runner": "^0.20.2",
73
77
  "@web/test-runner-commands": "^0.9.0",
74
- "@web/test-runner-playwright": "^0.11.0",
75
- "eslint": "^9.18.0",
76
- "globals": "^15.14.0",
77
- "prettier": "^3.4.2",
78
- "rollup": "^4.31.0",
79
- "rollup-plugin-multi-input": "^1.5.0",
80
- "semantic-release": "^24.2.1",
81
- "sinon": "^19.0.2",
82
- "typescript": "^5.7.3",
83
- "typescript-eslint": "^8.21.0"
78
+ "@web/test-runner-playwright": "^0.11.1",
79
+ "eslint": "^9.39.2",
80
+ "globals": "^17.0.0",
81
+ "playwright": "^1.57.0",
82
+ "prettier": "^3.8.0",
83
+ "rollup": "^4.55.2",
84
+ "rollup-plugin-multi-input": "^1.7.0",
85
+ "semantic-release": "^25.0.2",
86
+ "sinon": "^21.0.1",
87
+ "typescript": "^5.9.3",
88
+ "typescript-eslint": "^8.53.1"
84
89
  }
85
90
  }