@edynamix/mf-isolation 0.0.3 → 0.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.
- package/README.md +23 -3
- package/dist/angular.d.ts +2 -1
- package/dist/angular.d.ts.map +1 -1
- package/dist/angular.js +241 -2
- package/dist/angular.js.map +1 -1
- package/package.json +34 -6
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ CSS isolation and Angular overlay helpers for microfrontends.
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
8
|
+
bun add @edynamix/mf-isolation@latest
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Runtime boundary
|
|
@@ -62,13 +62,33 @@ Run this plugin through Vite/PostCSS before Angular AOT compilation. Do not comb
|
|
|
62
62
|
|
|
63
63
|
## Angular CDK overlays
|
|
64
64
|
|
|
65
|
+
The Angular integration targets Angular/CDK 19.x. In a hosted application, install the complete provider array so global and connected overlays share the module boundary's viewport and coordinate system:
|
|
66
|
+
|
|
65
67
|
```ts
|
|
66
68
|
import { provideMfOverlayRoot } from '@edynamix/mf-isolation/angular';
|
|
67
69
|
|
|
68
|
-
const providers = provideMfOverlayRoot(
|
|
70
|
+
const providers = provideMfOverlayRoot(overlayRoot);
|
|
69
71
|
```
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
Pass all of `providers` through the application bootstrap. Calling `provideMfOverlayRoot()` without an element preserves CDK's normal document-viewport behavior.
|
|
74
|
+
|
|
75
|
+
Legacy NgModule applications that receive the root through an injection token must install both providers through the token-aware helper:
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
import { InjectionToken, NgModule } from '@angular/core';
|
|
79
|
+
import { provideMfOverlayRootFromToken } from '@edynamix/mf-isolation/angular';
|
|
80
|
+
|
|
81
|
+
export const MF_OVERLAY_ROOT = new InjectionToken<HTMLElement>('MF_OVERLAY_ROOT');
|
|
82
|
+
|
|
83
|
+
@NgModule({
|
|
84
|
+
providers: [...provideMfOverlayRootFromToken(MF_OVERLAY_ROOT)],
|
|
85
|
+
})
|
|
86
|
+
export class AppModule {}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Provide the runtime `MF_OVERLAY_ROOT` value through the existing platform/bootstrap injector. Do not extract only the first provider from `provideMfOverlayRoot()`; that installs the container but omits boundary-aware connected positioning.
|
|
90
|
+
|
|
91
|
+
The Angular entry point requires `@angular/core`, `@angular/common`, and `@angular/cdk` 19.x.
|
|
72
92
|
|
|
73
93
|
## Host-owned Zone.js
|
|
74
94
|
|
package/dist/angular.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type { StaticProvider } from '@angular/core';
|
|
1
|
+
import type { ProviderToken, StaticProvider } from '@angular/core';
|
|
2
2
|
export declare const provideMfOverlayRoot: (overlayRoot?: HTMLElement) => StaticProvider[];
|
|
3
|
+
export declare const provideMfOverlayRootFromToken: (overlayRootToken: ProviderToken<HTMLElement>) => StaticProvider[];
|
|
3
4
|
//# sourceMappingURL=angular.d.ts.map
|
package/dist/angular.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular.d.ts","sourceRoot":"","sources":["../src/angular.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"angular.d.ts","sourceRoot":"","sources":["../src/angular.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AA2SnE,eAAO,MAAM,oBAAoB,GAAI,cAAc,WAAW,KAAG,cAAc,EAkB9E,CAAC;AAEF,eAAO,MAAM,6BAA6B,GAAI,kBAAkB,aAAa,CAAC,WAAW,CAAC,KAAG,cAAc,EAE1G,CAAC"}
|
package/dist/angular.js
CHANGED
|
@@ -1,17 +1,246 @@
|
|
|
1
|
-
import { OverlayContainer } from '@angular/cdk/overlay';
|
|
1
|
+
import { FlexibleConnectedPositionStrategy, GlobalPositionStrategy, OverlayContainer, OverlayPositionBuilder, } from '@angular/cdk/overlay';
|
|
2
|
+
import { Platform } from '@angular/cdk/platform';
|
|
3
|
+
import { ViewportRuler } from '@angular/cdk/scrolling';
|
|
4
|
+
import { DOCUMENT } from '@angular/common';
|
|
5
|
+
// Mirrors the CDK 19 overlay-prebuilt.css structural rules while intentionally excluding document-level scroll blocking.
|
|
6
|
+
const CDK_OVERLAY_STRUCTURAL_CSS = `
|
|
7
|
+
.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}
|
|
8
|
+
.cdk-overlay-container{position:fixed;z-index:1000}
|
|
9
|
+
.cdk-overlay-container:empty{display:none}
|
|
10
|
+
.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}
|
|
11
|
+
.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%;z-index:1000}
|
|
12
|
+
.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0;touch-action:manipulation;z-index:1000;transition:opacity 400ms cubic-bezier(0.25,0.8,0.25,1)}
|
|
13
|
+
@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}
|
|
14
|
+
.cdk-overlay-backdrop-showing{opacity:1}
|
|
15
|
+
@media(forced-colors:active){.cdk-overlay-backdrop-showing{opacity:.6}}
|
|
16
|
+
.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}
|
|
17
|
+
.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}
|
|
18
|
+
.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}
|
|
19
|
+
.cdk-overlay-backdrop-noop-animation{transition:none}
|
|
20
|
+
.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px;z-index:1000}
|
|
21
|
+
`;
|
|
22
|
+
const translateRectToBoundary = (rect, boundary) => {
|
|
23
|
+
const left = rect.left - boundary.left;
|
|
24
|
+
const top = rect.top - boundary.top;
|
|
25
|
+
return {
|
|
26
|
+
bottom: top + rect.height,
|
|
27
|
+
height: rect.height,
|
|
28
|
+
left,
|
|
29
|
+
right: left + rect.width,
|
|
30
|
+
top,
|
|
31
|
+
width: rect.width,
|
|
32
|
+
x: left,
|
|
33
|
+
y: top,
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
const getBoundaryRect = (overlayRoot) => {
|
|
37
|
+
const { height, width } = overlayRoot.getBoundingClientRect();
|
|
38
|
+
return {
|
|
39
|
+
bottom: height,
|
|
40
|
+
height,
|
|
41
|
+
left: 0,
|
|
42
|
+
right: width,
|
|
43
|
+
top: 0,
|
|
44
|
+
width,
|
|
45
|
+
x: 0,
|
|
46
|
+
y: 0,
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
const createBoundaryDocument = (document, overlayRoot) => {
|
|
50
|
+
const boundaryDocumentElement = new Proxy(document.documentElement, {
|
|
51
|
+
get: (target, property, receiver) => {
|
|
52
|
+
if (property === 'clientHeight') {
|
|
53
|
+
return overlayRoot.getBoundingClientRect().height;
|
|
54
|
+
}
|
|
55
|
+
if (property === 'clientWidth') {
|
|
56
|
+
return overlayRoot.getBoundingClientRect().width;
|
|
57
|
+
}
|
|
58
|
+
return Reflect.get(target, property, receiver);
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
return new Proxy(document, {
|
|
62
|
+
get: (target, property, receiver) => {
|
|
63
|
+
if (property === 'documentElement') {
|
|
64
|
+
return boundaryDocumentElement;
|
|
65
|
+
}
|
|
66
|
+
return Reflect.get(target, property, receiver);
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
const createBoundaryViewportRuler = (viewportRuler, overlayRoot) => {
|
|
71
|
+
const boundaryViewportRuler = Object.create(viewportRuler);
|
|
72
|
+
boundaryViewportRuler.getViewportRect = () => getBoundaryRect(overlayRoot);
|
|
73
|
+
boundaryViewportRuler.getViewportScrollPosition = () => ({ left: 0, top: 0 });
|
|
74
|
+
boundaryViewportRuler.getViewportSize = () => {
|
|
75
|
+
const { height, width } = getBoundaryRect(overlayRoot);
|
|
76
|
+
return { height, width };
|
|
77
|
+
};
|
|
78
|
+
return boundaryViewportRuler;
|
|
79
|
+
};
|
|
80
|
+
const adaptConnectedPositionStrategy = (strategy, overlayRoot, observeBoundary) => {
|
|
81
|
+
const internals = strategy;
|
|
82
|
+
const getOriginRect = internals._getOriginRect.bind(strategy);
|
|
83
|
+
const getOriginPoint = internals._getOriginPoint.bind(strategy);
|
|
84
|
+
const attach = strategy.attach.bind(strategy);
|
|
85
|
+
const detach = strategy.detach.bind(strategy);
|
|
86
|
+
const dispose = strategy.dispose.bind(strategy);
|
|
87
|
+
let stopObserving = () => { };
|
|
88
|
+
internals._getOriginRect = () => {
|
|
89
|
+
return translateRectToBoundary(getOriginRect(), overlayRoot.getBoundingClientRect());
|
|
90
|
+
};
|
|
91
|
+
internals._getOriginPoint = (originRect, _containerRect, position) => {
|
|
92
|
+
return getOriginPoint(originRect, getBoundaryRect(overlayRoot), position);
|
|
93
|
+
};
|
|
94
|
+
strategy.attach = (overlayRef) => {
|
|
95
|
+
attach(overlayRef);
|
|
96
|
+
stopObserving();
|
|
97
|
+
stopObserving = observeBoundary(() => strategy.apply());
|
|
98
|
+
};
|
|
99
|
+
strategy.detach = () => {
|
|
100
|
+
stopObserving();
|
|
101
|
+
stopObserving = () => { };
|
|
102
|
+
detach();
|
|
103
|
+
};
|
|
104
|
+
strategy.dispose = () => {
|
|
105
|
+
stopObserving();
|
|
106
|
+
stopObserving = () => { };
|
|
107
|
+
dispose();
|
|
108
|
+
};
|
|
109
|
+
return strategy;
|
|
110
|
+
};
|
|
111
|
+
class MfOverlayPositionBuilder extends OverlayPositionBuilder {
|
|
112
|
+
#document;
|
|
113
|
+
#overlayContainer;
|
|
114
|
+
#overlayRoot;
|
|
115
|
+
#platform;
|
|
116
|
+
#viewportRuler;
|
|
117
|
+
constructor(viewportRuler, document, platform, overlayContainer, overlayRoot) {
|
|
118
|
+
super();
|
|
119
|
+
this.#viewportRuler = viewportRuler;
|
|
120
|
+
this.#document = document;
|
|
121
|
+
this.#platform = platform;
|
|
122
|
+
this.#overlayContainer = overlayContainer;
|
|
123
|
+
this.#overlayRoot = overlayRoot;
|
|
124
|
+
}
|
|
125
|
+
global() {
|
|
126
|
+
return new GlobalPositionStrategy();
|
|
127
|
+
}
|
|
128
|
+
flexibleConnectedTo(origin) {
|
|
129
|
+
const boundaryDocument = createBoundaryDocument(this.#document, this.#overlayRoot);
|
|
130
|
+
const boundaryViewportRuler = createBoundaryViewportRuler(this.#viewportRuler, this.#overlayRoot);
|
|
131
|
+
const strategy = new FlexibleConnectedPositionStrategy(origin, boundaryViewportRuler, boundaryDocument, this.#platform, this.#overlayContainer);
|
|
132
|
+
const overlayContainer = this.#overlayContainer;
|
|
133
|
+
return adaptConnectedPositionStrategy(strategy, this.#overlayRoot, (callback) => overlayContainer.observeBoundary(callback));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
2
136
|
class MfOverlayContainer extends OverlayContainer {
|
|
137
|
+
#boundaryObservers = new Set();
|
|
3
138
|
#overlayRoot;
|
|
139
|
+
#animationFrame = null;
|
|
140
|
+
#boundaryRect = null;
|
|
141
|
+
#restoreRootPosition = null;
|
|
142
|
+
#shadowStyle = null;
|
|
4
143
|
constructor(overlayRoot) {
|
|
5
144
|
super();
|
|
6
145
|
this.#overlayRoot = overlayRoot;
|
|
7
146
|
}
|
|
147
|
+
ngOnDestroy() {
|
|
148
|
+
if (this.#animationFrame !== null) {
|
|
149
|
+
this.#overlayRoot.ownerDocument.defaultView?.cancelAnimationFrame(this.#animationFrame);
|
|
150
|
+
}
|
|
151
|
+
this.#animationFrame = null;
|
|
152
|
+
this.#boundaryObservers.clear();
|
|
153
|
+
super.ngOnDestroy();
|
|
154
|
+
this.#shadowStyle?.remove();
|
|
155
|
+
this.#shadowStyle = null;
|
|
156
|
+
this.#restoreRootPosition?.();
|
|
157
|
+
this.#restoreRootPosition = null;
|
|
158
|
+
}
|
|
159
|
+
observeBoundary(callback) {
|
|
160
|
+
this.#boundaryObservers.add(callback);
|
|
161
|
+
if (this.#boundaryObservers.size === 1) {
|
|
162
|
+
this.#boundaryRect = this.#overlayRoot.getBoundingClientRect();
|
|
163
|
+
this.#scheduleBoundaryCheck();
|
|
164
|
+
}
|
|
165
|
+
return () => {
|
|
166
|
+
this.#boundaryObservers.delete(callback);
|
|
167
|
+
if (this.#boundaryObservers.size === 0 && this.#animationFrame !== null) {
|
|
168
|
+
this.#overlayRoot.ownerDocument.defaultView?.cancelAnimationFrame(this.#animationFrame);
|
|
169
|
+
this.#animationFrame = null;
|
|
170
|
+
this.#boundaryRect = null;
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
}
|
|
8
174
|
_createContainer() {
|
|
175
|
+
if (this.#overlayRoot.ownerDocument.defaultView?.getComputedStyle(this.#overlayRoot).position === 'static') {
|
|
176
|
+
const previousPosition = this.#overlayRoot.style.position;
|
|
177
|
+
this.#overlayRoot.style.position = 'relative';
|
|
178
|
+
this.#restoreRootPosition = () => {
|
|
179
|
+
this.#overlayRoot.style.position = previousPosition;
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
const rootNode = this.#overlayRoot.getRootNode();
|
|
183
|
+
const ShadowRootConstructor = this.#overlayRoot.ownerDocument.defaultView?.ShadowRoot;
|
|
184
|
+
if (ShadowRootConstructor && rootNode instanceof ShadowRootConstructor) {
|
|
185
|
+
const style = this._document.createElement('style');
|
|
186
|
+
style.setAttribute('data-edyn-mf-cdk-overlay-styles', '');
|
|
187
|
+
style.textContent = CDK_OVERLAY_STRUCTURAL_CSS;
|
|
188
|
+
rootNode.appendChild(style);
|
|
189
|
+
this.#shadowStyle = style;
|
|
190
|
+
}
|
|
9
191
|
const container = this._document.createElement('div');
|
|
10
192
|
container.classList.add('cdk-overlay-container');
|
|
193
|
+
container.style.inset = '0';
|
|
194
|
+
container.style.position = 'absolute';
|
|
11
195
|
this.#overlayRoot.appendChild(container);
|
|
12
196
|
this._containerElement = container;
|
|
13
197
|
}
|
|
198
|
+
#scheduleBoundaryCheck() {
|
|
199
|
+
const window = this.#overlayRoot.ownerDocument.defaultView;
|
|
200
|
+
if (!window || this.#animationFrame !== null || this.#boundaryObservers.size === 0) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
this.#animationFrame = window.requestAnimationFrame(() => {
|
|
204
|
+
this.#animationFrame = null;
|
|
205
|
+
const previous = this.#boundaryRect;
|
|
206
|
+
const current = this.#overlayRoot.getBoundingClientRect();
|
|
207
|
+
this.#boundaryRect = current;
|
|
208
|
+
if (previous &&
|
|
209
|
+
(previous.height !== current.height || previous.left !== current.left || previous.top !== current.top || previous.width !== current.width)) {
|
|
210
|
+
for (const observer of this.#boundaryObservers) {
|
|
211
|
+
observer();
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
this.#scheduleBoundaryCheck();
|
|
215
|
+
});
|
|
216
|
+
}
|
|
14
217
|
}
|
|
218
|
+
const isDocumentViewportRoot = (overlayRoot) => {
|
|
219
|
+
return overlayRoot === overlayRoot.ownerDocument.body || overlayRoot === overlayRoot.ownerDocument.documentElement;
|
|
220
|
+
};
|
|
221
|
+
const createOverlayContainer = (overlayRoot) => {
|
|
222
|
+
return isDocumentViewportRoot(overlayRoot) ? new OverlayContainer() : new MfOverlayContainer(overlayRoot);
|
|
223
|
+
};
|
|
224
|
+
const createOverlayPositionBuilder = (viewportRuler, document, platform, overlayContainer, overlayRoot) => {
|
|
225
|
+
if (isDocumentViewportRoot(overlayRoot)) {
|
|
226
|
+
return new OverlayPositionBuilder();
|
|
227
|
+
}
|
|
228
|
+
return new MfOverlayPositionBuilder(viewportRuler, document, platform, overlayContainer, overlayRoot);
|
|
229
|
+
};
|
|
230
|
+
const createTokenProviders = (overlayRootToken) => {
|
|
231
|
+
return [
|
|
232
|
+
{
|
|
233
|
+
provide: OverlayContainer,
|
|
234
|
+
useFactory: createOverlayContainer,
|
|
235
|
+
deps: [overlayRootToken],
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
provide: OverlayPositionBuilder,
|
|
239
|
+
useFactory: createOverlayPositionBuilder,
|
|
240
|
+
deps: [ViewportRuler, DOCUMENT, Platform, OverlayContainer, overlayRootToken],
|
|
241
|
+
},
|
|
242
|
+
];
|
|
243
|
+
};
|
|
15
244
|
export const provideMfOverlayRoot = (overlayRoot) => {
|
|
16
245
|
if (!overlayRoot) {
|
|
17
246
|
return [];
|
|
@@ -19,8 +248,18 @@ export const provideMfOverlayRoot = (overlayRoot) => {
|
|
|
19
248
|
return [
|
|
20
249
|
{
|
|
21
250
|
provide: OverlayContainer,
|
|
22
|
-
useFactory: () =>
|
|
251
|
+
useFactory: () => createOverlayContainer(overlayRoot),
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
provide: OverlayPositionBuilder,
|
|
255
|
+
useFactory: (viewportRuler, document, platform, overlayContainer) => {
|
|
256
|
+
return createOverlayPositionBuilder(viewportRuler, document, platform, overlayContainer, overlayRoot);
|
|
257
|
+
},
|
|
258
|
+
deps: [ViewportRuler, DOCUMENT, Platform, OverlayContainer],
|
|
23
259
|
},
|
|
24
260
|
];
|
|
25
261
|
};
|
|
262
|
+
export const provideMfOverlayRootFromToken = (overlayRootToken) => {
|
|
263
|
+
return createTokenProviders(overlayRootToken);
|
|
264
|
+
};
|
|
26
265
|
//# sourceMappingURL=angular.js.map
|
package/dist/angular.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular.js","sourceRoot":"","sources":["../src/angular.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"angular.js","s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E,CAAC,gBAAgB,CAAC;SACzB;QACD;YACE,OAAO,EAAE,sBAAsB;YAC/B,UAAU,EAAE,4BAA4B;YACxC,IAAI,EAAE,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,gBAAgB,CAAC;SAC9E;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,WAAyB,EAAoB,EAAE;IAClF,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO;QACL;YACE,OAAO,EAAE,gBAAgB;YACzB,UAAU,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,WAAW,CAAC;SACtD;QACD;YACE,OAAO,EAAE,sBAAsB;YAC/B,UAAU,EAAE,CAAC,aAA4B,EAAE,QAAkB,EAAE,QAAkB,EAAE,gBAAkC,EAAE,EAAE;gBACvH,OAAO,4BAA4B,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,WAAW,CAAC,CAAC;YACxG,CAAC;YACD,IAAI,EAAE,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,CAAC;SAC5D;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,gBAA4C,EAAoB,EAAE;IAC9G,OAAO,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;AAChD,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edynamix/mf-isolation",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "CSS and overlay isolation helpers for eDynamix microfrontends.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
7
|
+
"packageManager": "bun@1.3.13",
|
|
8
|
+
"engines": {
|
|
9
|
+
"bun": ">=1.3.0",
|
|
10
|
+
"node": ">=22"
|
|
11
|
+
},
|
|
7
12
|
"sideEffects": false,
|
|
8
13
|
"files": [
|
|
9
14
|
"dist",
|
|
@@ -33,9 +38,17 @@
|
|
|
33
38
|
"scripts": {
|
|
34
39
|
"build": "bun run clean && tsc -p tsconfig.build.json",
|
|
35
40
|
"clean": "bun -e \"import { rmSync } from 'node:fs'; rmSync('dist', { recursive: true, force: true });\"",
|
|
41
|
+
"format": "biome format --write .",
|
|
42
|
+
"knip": "knip",
|
|
43
|
+
"lint": "biome check .",
|
|
44
|
+
"lint:fix": "biome check --write .",
|
|
36
45
|
"pack:check": "bun run build && bun pm pack --dry-run --ignore-scripts",
|
|
46
|
+
"package:smoke": "bun run scripts/package-smoke.ts",
|
|
37
47
|
"prepack": "bun run build",
|
|
38
|
-
"
|
|
48
|
+
"test": "bun test src",
|
|
49
|
+
"test:browser": "playwright test",
|
|
50
|
+
"typecheck": "tsc --noEmit",
|
|
51
|
+
"verify": "bun run lint && bun run typecheck && bun run knip && bun run test && bun run test:browser && bun run build && bun run package:smoke"
|
|
39
52
|
},
|
|
40
53
|
"publishConfig": {
|
|
41
54
|
"access": "public"
|
|
@@ -46,19 +59,34 @@
|
|
|
46
59
|
"postcss-value-parser": "^4.2.0"
|
|
47
60
|
},
|
|
48
61
|
"devDependencies": {
|
|
49
|
-
"@angular/cdk": "
|
|
50
|
-
"@angular/
|
|
51
|
-
"@angular/
|
|
52
|
-
"@
|
|
62
|
+
"@angular/cdk": "19.2.19",
|
|
63
|
+
"@angular/common": "19.2.25",
|
|
64
|
+
"@angular/compiler": "19.2.25",
|
|
65
|
+
"@angular/core": "19.2.25",
|
|
66
|
+
"@angular/platform-browser": "19.2.25",
|
|
67
|
+
"@angular/platform-browser-dynamic": "19.2.25",
|
|
68
|
+
"@biomejs/biome": "2.5.2",
|
|
69
|
+
"@happy-dom/global-registrator": "20.11.2",
|
|
70
|
+
"@playwright/test": "1.60.0",
|
|
71
|
+
"@types/bun": "1.3.14",
|
|
72
|
+
"@types/node": "22.20.1",
|
|
73
|
+
"knip": "6.32.2",
|
|
74
|
+
"typescript": "5.8.2",
|
|
75
|
+
"vite": "8.0.16",
|
|
76
|
+
"zone.js": "0.15.1"
|
|
53
77
|
},
|
|
54
78
|
"peerDependencies": {
|
|
55
79
|
"@angular/cdk": "^19.0.0",
|
|
80
|
+
"@angular/common": "^19.0.0",
|
|
56
81
|
"@angular/core": "^19.0.0"
|
|
57
82
|
},
|
|
58
83
|
"peerDependenciesMeta": {
|
|
59
84
|
"@angular/cdk": {
|
|
60
85
|
"optional": true
|
|
61
86
|
},
|
|
87
|
+
"@angular/common": {
|
|
88
|
+
"optional": true
|
|
89
|
+
},
|
|
62
90
|
"@angular/core": {
|
|
63
91
|
"optional": true
|
|
64
92
|
}
|