@wc-bindable/angular 0.12.0 → 0.12.1

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/README.md CHANGED
@@ -52,22 +52,9 @@ A standalone directive applied via the `wcBindable` attribute selector.
52
52
  This directive uses `@Output()` with `EventEmitter` rather than the newer `output()` function API (Angular 17.3+). Reasons:
53
53
 
54
54
  - **Broader compatibility** — works with Angular 17+ (matching the `peerDependencies` requirement).
55
- - **Testability** — `@Output()` does not require an injection context, so the directive's own logic can be unit-tested by constructing it directly.
55
+ - **Testability** — `@Output()` does not require an injection context, so the directive can be instantiated directly in unit tests.
56
56
  - **Stability** — `EventEmitter` is a long-established, stable Angular API with no deprecation planned.
57
57
 
58
- ## Compatibility
59
-
60
- The package is built with the Angular compiler in partial compilation mode (the Angular Package Format), so an application's build links the directive like any other Angular library. Nothing has to be configured.
61
-
62
- | Angular | How it is tested |
63
- |---|---|
64
- | 17.0.0, the lowest version the peer range admits | A real application, built with the Angular CLI and run in Chromium |
65
- | The version this repository is installed with (21.2) | The same |
66
-
67
- The application is the usage example above. The test builds it from the packed package, checks the package's `.d.ts` with the application (`skipLibCheck: false`, `strictTemplates`), and binds an element whose definition arrives after the application has started. It runs in CI with the other integration suites: `npm run test:integration --workspace @wc-bindable/angular`.
68
-
69
- Up to 0.12.0 the package was built with plain `tsc`, and an application that imported `WcBindableDirective` did not compile (`NG2012`). Use 0.13.0 or later.
70
-
71
58
  ## Late-defined elements
72
59
 
73
60
  `bind()` is called with `syncOn: "define"` by default, so an element whose custom element
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { ElementRef, EventEmitter, OnInit, OnDestroy } from "@angular/core";
2
2
  import { type BindOptions } from "@wc-bindable/core";
3
- import * as i0 from "@angular/core";
4
3
  export declare class WcBindableDirective implements OnInit, OnDestroy {
5
4
  private el;
6
5
  wcBindableChange: EventEmitter<{
@@ -19,7 +18,5 @@ export declare class WcBindableDirective implements OnInit, OnDestroy {
19
18
  constructor(el: ElementRef<HTMLElement>);
20
19
  ngOnInit(): void;
21
20
  ngOnDestroy(): void;
22
- static ɵfac: i0.ɵɵFactoryDeclaration<WcBindableDirective, never>;
23
- static ɵdir: i0.ɵɵDirectiveDeclaration<WcBindableDirective, "[wcBindable]", never, { "wcBindableSyncOn": { "alias": "wcBindableSyncOn"; "required": false; }; }, { "wcBindableChange": "wcBindableChange"; }, never, never, true, never>;
24
21
  }
25
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,YAAY,EAEZ,MAAM,EACN,SAAS,EAEV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAQ,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;;AAE3D,qBAIa,mBAAoB,YAAW,MAAM,EAAE,SAAS;IAc/C,OAAO,CAAC,EAAE;IAbZ,gBAAgB;cAA4B,MAAM;eAAS,OAAO;OAAM;IAElF;;;;;;OAMG;IACM,gBAAgB,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAElD,OAAO,CAAC,MAAM,CAAC,CAAa;gBAER,EAAE,EAAE,UAAU,CAAC,WAAW,CAAC;IAE/C,QAAQ;IAYR,WAAW;yCA5BA,mBAAmB;2CAAnB,mBAAmB;CA+B/B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,YAAY,EAEZ,MAAM,EACN,SAAS,EAEV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAQ,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAE3D,qBAIa,mBAAoB,YAAW,MAAM,EAAE,SAAS;IAc/C,OAAO,CAAC,EAAE;IAbZ,gBAAgB;cAA4B,MAAM;eAAS,OAAO;OAAM;IAElF;;;;;;OAMG;IACM,gBAAgB,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAElD,OAAO,CAAC,MAAM,CAAC,CAAa;gBAER,EAAE,EAAE,UAAU,CAAC,WAAW,CAAC;IAE/C,QAAQ;IAYR,WAAW;CAGZ"}
package/dist/index.js CHANGED
@@ -1,7 +1,15 @@
1
- import { Directive, EventEmitter, Input, Output, } from "@angular/core";
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { Directive, ElementRef, EventEmitter, Input, Output, } from "@angular/core";
2
11
  import { bind } from "@wc-bindable/core";
3
- import * as i0 from "@angular/core";
4
- export class WcBindableDirective {
12
+ let WcBindableDirective = class WcBindableDirective {
5
13
  constructor(el) {
6
14
  this.el = el;
7
15
  this.wcBindableChange = new EventEmitter();
@@ -19,18 +27,21 @@ export class WcBindableDirective {
19
27
  ngOnDestroy() {
20
28
  this.unbind?.();
21
29
  }
22
- }
23
- WcBindableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: WcBindableDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
24
- WcBindableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.1", type: WcBindableDirective, isStandalone: true, selector: "[wcBindable]", inputs: { wcBindableSyncOn: "wcBindableSyncOn" }, outputs: { wcBindableChange: "wcBindableChange" }, ngImport: i0 });
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: WcBindableDirective, decorators: [{
26
- type: Directive,
27
- args: [{
28
- selector: "[wcBindable]",
29
- standalone: true,
30
- }]
31
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { wcBindableChange: [{
32
- type: Output
33
- }], wcBindableSyncOn: [{
34
- type: Input
35
- }] } });
30
+ };
31
+ __decorate([
32
+ Output(),
33
+ __metadata("design:type", Object)
34
+ ], WcBindableDirective.prototype, "wcBindableChange", void 0);
35
+ __decorate([
36
+ Input(),
37
+ __metadata("design:type", Object)
38
+ ], WcBindableDirective.prototype, "wcBindableSyncOn", void 0);
39
+ WcBindableDirective = __decorate([
40
+ Directive({
41
+ selector: "[wcBindable]",
42
+ standalone: true,
43
+ }),
44
+ __metadata("design:paramtypes", [ElementRef])
45
+ ], WcBindableDirective);
46
+ export { WcBindableDirective };
36
47
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,YAAY,EACZ,KAAK,EAGL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,IAAI,EAAoB,MAAM,mBAAmB,CAAC;;AAM3D,MAAM,OAAO,mBAAmB;IAc9B,YAAoB,EAA2B;QAA3B,OAAE,GAAF,EAAE,CAAyB;QAbrC,qBAAgB,GAAG,IAAI,YAAY,EAAoC,CAAC;IAahC,CAAC;IAEnD,QAAQ;QACN,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC;QAEtC,uEAAuE;QACvE,iEAAiE;QACjE,uEAAuE;QACvE,yDAAyD;QACzD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EA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M,EAAE,EAAE,CAAC;IAClB,CAAC;CACF,CAAA;AA9BW;IAAT,MAAM,EAAE;;6DAAyE;AASzE;IAAR,KAAK,EAAE;;6DAA0C;AAVvC,mBAAmB;IAJ/B,SAAS,CAAC;QACT,QAAQ,EAAE,cAAc;QACxB,UAAU,EAAE,IAAI;KACjB,CAAC;qCAewB,UAAU;GAdvB,mBAAmB,CA+B/B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wc-bindable/angular",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "Angular adapter for wc-bindable protocol",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -17,18 +17,15 @@
17
17
  "README.md"
18
18
  ],
19
19
  "scripts": {
20
- "build": "ngc -p tsconfig.build.json",
21
- "dev": "ngc -p tsconfig.build.json --watch",
22
- "test:integration": "playwright test"
20
+ "build": "tsc",
21
+ "dev": "tsc --watch",
22
+ "prepublishOnly": "node ../../scripts/check-publish.mjs"
23
23
  },
24
24
  "dependencies": {
25
- "@wc-bindable/core": "^0.12.0"
25
+ "@wc-bindable/core": "^0.12.1"
26
26
  },
27
27
  "peerDependencies": {
28
- "@angular/core": ">=17.0.0"
29
- },
30
- "engines": {
31
- "node": ">=22"
28
+ "@angular/core": ">=17"
32
29
  },
33
30
  "repository": {
34
31
  "type": "git",