@wolsok/thanos 17.0.17 → 17.0.19

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.
Files changed (54) hide show
  1. package/esm2022/index.js +10 -0
  2. package/esm2022/index.js.map +1 -0
  3. package/esm2022/lib/animation.state.js +2 -0
  4. package/esm2022/lib/animation.state.js.map +1 -0
  5. package/esm2022/lib/create-ws-thanos-options.js +9 -0
  6. package/esm2022/lib/create-ws-thanos-options.js.map +1 -0
  7. package/esm2022/lib/simplex-noise-options.js +2 -0
  8. package/esm2022/lib/simplex-noise-options.js.map +1 -0
  9. package/esm2022/lib/simplex-noise.js +199 -0
  10. package/esm2022/lib/simplex-noise.js.map +1 -0
  11. package/esm2022/lib/ws-thanos-options.token.js +13 -0
  12. package/esm2022/lib/ws-thanos-options.token.js.map +1 -0
  13. package/esm2022/lib/ws-thanos.directive.js +67 -0
  14. package/esm2022/lib/ws-thanos.directive.js.map +1 -0
  15. package/esm2022/lib/ws-thanos.options.js +2 -0
  16. package/esm2022/lib/ws-thanos.options.js.map +1 -0
  17. package/esm2022/lib/ws-thanos.service.js +252 -0
  18. package/esm2022/lib/ws-thanos.service.js.map +1 -0
  19. package/esm2022/wolsok-thanos.js +5 -0
  20. package/esm2022/wolsok-thanos.js.map +1 -0
  21. package/{src/index.ts → index.d.ts} +0 -3
  22. package/lib/animation.state.d.ts +6 -0
  23. package/lib/create-ws-thanos-options.d.ts +2 -0
  24. package/lib/simplex-noise-options.d.ts +9 -0
  25. package/lib/simplex-noise.d.ts +18 -0
  26. package/lib/ws-thanos-options.token.d.ts +4 -0
  27. package/lib/ws-thanos.directive.d.ts +29 -0
  28. package/lib/ws-thanos.options.d.ts +5 -0
  29. package/lib/ws-thanos.service.d.ts +20 -0
  30. package/package.json +18 -7
  31. package/wolsok-thanos.d.ts +5 -0
  32. package/CHANGELOG.md +0 -59
  33. package/eslint.config.mjs +0 -64
  34. package/jest.config.ts +0 -23
  35. package/ng-package.json +0 -8
  36. package/project.json +0 -40
  37. package/src/assets/how-to-be-funny.png.ts +0 -4
  38. package/src/lib/animation.state.ts +0 -6
  39. package/src/lib/create-ws-thanos-options.ts +0 -12
  40. package/src/lib/random-util.ts +0 -24
  41. package/src/lib/simplex-noise-options.ts +0 -9
  42. package/src/lib/simplex-noise.ts +0 -240
  43. package/src/lib/ws-thanos-options.token.spec.ts +0 -19
  44. package/src/lib/ws-thanos-options.token.ts +0 -20
  45. package/src/lib/ws-thanos.directive.spec.ts +0 -175
  46. package/src/lib/ws-thanos.directive.ts +0 -70
  47. package/src/lib/ws-thanos.options.ts +0 -5
  48. package/src/lib/ws-thanos.service.spec.ts +0 -9
  49. package/src/lib/ws-thanos.service.ts +0 -387
  50. package/src/test-setup.ts +0 -9
  51. package/tsconfig.json +0 -32
  52. package/tsconfig.lib.json +0 -15
  53. package/tsconfig.lib.prod.json +0 -10
  54. package/tsconfig.spec.json +0 -10
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ws-thanos.service.js","sourceRoot":"","sources":["../../../../../../libs/public/ws-thanos/src/lib/ws-thanos.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EACL,uBAAuB,EACvB,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,GAAG,EAEH,SAAS,EACT,SAAS,EACT,GAAG,EACH,YAAY,GACb,MAAM,MAAM,CAAC;AAEd,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;;AAGpE,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,kBAAkB,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;AAC1C,MAAM,YAAY,GAAG,CAAC,CAAC;AACvB,MAAM,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EAAE;oBAC5C,kBAAkB,EAAE,IAAI;iBACzB,CAAC,CAAC;gBACH,IAAI,OAAO,EAAE,CAAC;oBACZ,eAAe,CAAC,aAAa,CAAC,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;gBAClE,CAAC;YACH,CAAC,CAAC,EACF,SAAS,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,cAAc,CAAC,UAAU,IAAI,CAAC,CAAC,EAC7D,QAAQ,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CACtC,CAAC;QACJ,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;8GA3UU,eAAe;kHAAf,eAAe,cADF,MAAM;;2FACnB,eAAe;kBAD3B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE","sourcesContent":["import { Injectable, inject } from '@angular/core';\n\nimport { default as html2canvas } from 'html2canvas';\nimport {\n animationFrameScheduler,\n finalize,\n from,\n interval,\n map,\n Observable,\n switchMap,\n takeWhile,\n tap,\n timeInterval,\n} from 'rxjs';\nimport { AnimationState } from './animation.state';\nimport { SimplexNoise } from './simplex-noise';\nimport { WS_THANOS_OPTIONS_TOKEN } from './ws-thanos-options.token';\nimport type { WsThanosOptions } from './ws-thanos.options';\n\nconst PARTICLE_BYTE_LENGTH = 10;\nconst MIN_PARTICLE_ALPHA = ~~(255 * 0.01);\nconst HEIGHT_SCALE = 5;\nconst WIDTH_SCALE = 2;\nconst FLOW_FIELD_RES = 0.05;\n\ninterface ParticlesData {\n particles: Float32Array;\n maxParticleX: number;\n minParticleY: number;\n}\n\ninterface UpdateParticleParams {\n particlesData: ParticlesData;\n animationState: AnimationState;\n thanosOptions: WsThanosOptions;\n noise: SimplexNoise;\n seed: number;\n}\n\ninterface ParticleIndices {\n x: number;\n y: number;\n dx: number;\n dy: number;\n ax: number;\n ay: number;\n r: number;\n g: number;\n b: number;\n a: number;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class WsThanosService {\n private readonly thanosOptions: WsThanosOptions = inject(\n WS_THANOS_OPTIONS_TOKEN\n );\n\n private static getParticleIndicesForBase(base: number): ParticleIndices {\n return {\n x: base,\n y: base + 1,\n dx: base + 2,\n dy: base + 3,\n ax: base + 4,\n ay: base + 5,\n r: base + 6,\n g: base + 7,\n b: base + 8,\n a: base + 9,\n };\n }\n\n private static getColorIndicesForCoord(\n x: number,\n y: number,\n width: number\n ): { a: number; r: number; b: number; g: number } {\n const red = y * (width * 4) + x * 4;\n return { r: red, g: red + 1, b: red + 2, a: red + 3 };\n }\n\n private static updateParticles({\n seed,\n noise,\n particlesData,\n thanosOptions,\n animationState,\n }: UpdateParticleParams): void {\n const { deltaTSec, animationT, maxWidth, maxHeight } = animationState;\n const { particleAcceleration } = thanosOptions;\n const { particles, maxParticleX, minParticleY } = particlesData;\n\n // the time is used to calculate the vaporization front.\n const time = Math.sin(animationT * (Math.PI / 2)) * 1.1;\n\n const startAccelerateX = maxParticleX - time * maxParticleX;\n const startAccelerateY = time * (maxHeight - minParticleY) + minParticleY;\n\n const lengthY = maxHeight - startAccelerateY;\n const accelerateRadiusPow =\n startAccelerateX * startAccelerateX + lengthY * lengthY;\n\n for (let i = 0; i < particles.length; i += PARTICLE_BYTE_LENGTH) {\n const { x, y, dx, dy, ax, ay, a } =\n WsThanosService.getParticleIndicesForBase(i);\n const particleX = particles[x];\n const particleY = particles[y];\n\n // only update particles that are inside view and visible\n if (\n particleX > maxWidth ||\n particleX < 0 ||\n particleY > maxHeight ||\n particleY < 0 ||\n particles[a] < MIN_PARTICLE_ALPHA\n ) {\n continue;\n }\n\n if (!(Math.abs(particles[ax]) > 0 || Math.abs(particles[ay]) > 0)) {\n let pYLength = maxHeight - particleY;\n let pXLength = particleX;\n\n // we calculate some random looking numbers and functions to have nice looking vaporizing front of particles\n // todo consider to use noise;\n pXLength += Math.tan((pXLength / 20.12) * time + seed) * 0.5;\n pXLength += (particleX % deltaTSec) * 0.5;\n pXLength +=\n Math.sin((pXLength / 30 + 723.394) * time + seed * 12.5) * 11;\n pYLength += Math.tan((pYLength / 0.45) * time + seed * 1.5) * 0.5;\n pYLength +=\n Math.cos((pYLength / 100 + 2323.234) * time + seed * 456.1) * 23;\n\n const pLength = pXLength * pXLength + pYLength * pYLength;\n if (pLength > accelerateRadiusPow) {\n particles[ax] = Math.random();\n particles[ay] = Math.random() * -1;\n }\n } else {\n // use noise to flow along velocity field\n const flowFieldAcc = WsThanosService.getXYFromFlowField(\n noise,\n seed,\n particleX,\n particleY\n );\n const accelerationX = flowFieldAcc[0];\n const accelerationY = flowFieldAcc[1];\n particles[ax] += accelerationX;\n particles[ay] += accelerationY;\n }\n\n // * Math.pow(1 + animationT, 4)\n particles[dx] += particles[ax] * particleAcceleration * deltaTSec;\n particles[dy] += particles[ay] * particleAcceleration * deltaTSec;\n particles[x] += particles[dx] * deltaTSec;\n particles[y] += particles[dy] * deltaTSec;\n // fade particle out ( very late);\n particles[a] *= 1 - Math.pow(animationT, 15); // 255 - Math.sqrt(particles[dx] * particles[dx] + particles[dy] * particles[dy]) / 1.2;\n }\n }\n\n private static drawParticles(\n drawCtx: CanvasRenderingContext2D,\n particles: Float32Array\n ): void {\n const { width, height } = drawCtx.canvas;\n drawCtx.clearRect(0, 0, width, height);\n const image = drawCtx.getImageData(0, 0, width, height);\n const imageData = image.data;\n for (let i = 0; i < particles.length; i += PARTICLE_BYTE_LENGTH) {\n const particleX = particles[i];\n const particleY = particles[i + 1];\n const pI = WsThanosService.getParticleIndicesForBase(i);\n if (\n particleX > width ||\n particleX < 0 ||\n particleY > height ||\n particleY < 0 ||\n particles[pI.a] < MIN_PARTICLE_ALPHA\n ) {\n continue;\n }\n const { r, g, b, a } = WsThanosService.getColorIndicesForCoord(\n ~~particles[pI.x],\n ~~particles[pI.y],\n width\n );\n imageData[r] = ~~particles[pI.r];\n imageData[g] = ~~particles[pI.g];\n imageData[b] = ~~particles[pI.b];\n imageData[a] = ~~particles[pI.a];\n }\n drawCtx.putImageData(image, 0, 0);\n }\n\n private static prepareCanvasForVaporize(\n divCanvas: HTMLCanvasElement,\n maxParticleCount: number\n ): {\n particlesData: ParticlesData;\n resultCanvas: HTMLCanvasElement;\n } {\n const { width, height } = divCanvas;\n\n // scale result canvas to have more room to draw particles while vaporizing;\n const resultHeight = height * HEIGHT_SCALE;\n const resultWidth = width * WIDTH_SCALE;\n const resultCanvas: HTMLCanvasElement = document.createElement('canvas');\n resultCanvas.height = resultHeight;\n resultCanvas.width = resultWidth;\n\n const imageData = divCanvas\n .getContext('2d', { willReadFrequently: true })\n ?.getImageData(0, 0, width, height);\n if (imageData == null) {\n throw new Error('Could not get image data from canvas');\n }\n const particlesData = WsThanosService.createParticlesForImageData(\n imageData,\n maxParticleCount,\n resultHeight\n );\n return { resultCanvas, particlesData };\n }\n\n private static createParticlesForImageData(\n imageData: ImageData,\n maxParticleCount: number,\n resultHeight: number\n ): { minParticleY: number; maxParticleX: number; particles: Float32Array } {\n const { width, height } = imageData;\n let particleCandidates = 0;\n let particleCount = 0;\n\n const particleCandiatesList: { x: number; y: number }[] = [];\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n const { a } = WsThanosService.getColorIndicesForCoord(x, y, width);\n if (imageData.data[a] >= MIN_PARTICLE_ALPHA) {\n particleCandidates++;\n particleCandiatesList.push({ x, y });\n }\n }\n }\n\n const maxNumParticles = Math.min(particleCandidates, maxParticleCount);\n const particles = new Float32Array(\n Float32Array.BYTES_PER_ELEMENT * maxNumParticles * PARTICLE_BYTE_LENGTH\n );\n\n let maxParticleX = 0;\n let minParticleY = resultHeight;\n while (particleCount < maxNumParticles) {\n // select random index from candiates\n const index = ~~(Math.random() * particleCandiatesList.length);\n const { x, y } = particleCandiatesList[index];\n\n // overwrite index with last element to prevent double selection of particles\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n particleCandiatesList[index] = particleCandiatesList.pop()!;\n\n maxParticleX = Math.max(maxParticleX, x);\n minParticleY = Math.min(minParticleY, y);\n const { dx, dy, ax, ay, r, g, b, a, ...xy } =\n WsThanosService.getParticleIndicesForBase(\n particleCount * PARTICLE_BYTE_LENGTH\n );\n particles[xy.x] = x;\n particles[xy.y] = y + resultHeight - height;\n particles[dx] = 0;\n particles[dy] = 0;\n particles[ax] = 0;\n particles[ay] = 0;\n\n const indicesImage = WsThanosService.getColorIndicesForCoord(x, y, width);\n\n particles[r] = imageData.data[indicesImage.r];\n particles[g] = imageData.data[indicesImage.g];\n particles[b] = imageData.data[indicesImage.b];\n particles[a] = imageData.data[indicesImage.a];\n particleCount++;\n }\n return { particles, maxParticleX, minParticleY };\n }\n\n private static getXYFromFlowField(\n noise: SimplexNoise,\n seed: number,\n x: number,\n y: number\n ) {\n const sampleX = noise.scaled3D(x, y, seed + 33.23, FLOW_FIELD_RES);\n const sampleY = noise.scaled3D(x, seed / 13.23, y, FLOW_FIELD_RES) * -1;\n return [sampleX, sampleY];\n }\n\n /**\n * start the vaporize-effect.\n */\n vaporize(elem: HTMLElement): Observable<AnimationState> {\n return this.vaporizeIntern(elem);\n }\n\n private vaporizeIntern(elem: HTMLElement): Observable<AnimationState> {\n elem.style.opacity = elem.style.opacity || '1';\n elem.style.transition = `opacity ${Math.floor(\n this.thanosOptions.animationLength * 0.8\n )}ms ease-out`;\n const noise = new SimplexNoise({ frequency: 0.01, min: 0 });\n const seed = new Date().getTime() * Math.random();\n const html2CanvasPromise: Promise<HTMLCanvasElement> = html2canvas(elem, {\n backgroundColor: null,\n scale: 1,\n allowTaint: true,\n windowHeight: window.innerHeight,\n windowWidth: window.innerWidth,\n scrollY: -window.scrollY,\n });\n\n return from(html2CanvasPromise).pipe(\n map((canvasFromHtmlElem) => {\n const canvasAndParticles = WsThanosService.prepareCanvasForVaporize(\n canvasFromHtmlElem,\n this.thanosOptions.maxParticleCount\n );\n const { resultCanvas } = canvasAndParticles;\n if (elem.parentElement) {\n elem.parentElement.style.position =\n elem.parentElement.style.position || 'relative';\n }\n resultCanvas.style.position = 'absolute';\n resultCanvas.style.left = 0 + 'px';\n resultCanvas.style.top =\n '-' + elem.getBoundingClientRect().height * (HEIGHT_SCALE - 1) + 'px';\n resultCanvas.style.zIndex = '2000';\n resultCanvas.style.pointerEvents = 'none';\n\n elem.insertAdjacentElement('beforebegin', resultCanvas);\n // this should start the transition above defined\n elem.style.opacity = '0';\n return canvasAndParticles;\n }),\n switchMap(({ resultCanvas, particlesData }) => {\n let time = 0;\n const { animationLength, maxParticleCount, particleAcceleration } =\n this.thanosOptions;\n return interval(1000 / 60, animationFrameScheduler).pipe(\n timeInterval(),\n tap((deltaT) => (time += deltaT.interval)),\n map(\n (deltaT) =>\n ({\n deltaTSec: deltaT.interval / 1000,\n animationT: time / animationLength,\n maxWidth: resultCanvas.width,\n maxHeight: resultCanvas.height,\n }) as AnimationState\n ),\n tap((animationState) => {\n WsThanosService.updateParticles({\n particlesData,\n animationState,\n thanosOptions: {\n animationLength,\n maxParticleCount,\n particleAcceleration,\n },\n noise,\n seed,\n });\n const context = resultCanvas.getContext('2d', {\n willReadFrequently: true,\n });\n if (context) {\n WsThanosService.drawParticles(context, particlesData.particles);\n }\n }),\n takeWhile((animationState) => animationState.animationT <= 1),\n finalize(() => resultCanvas.remove())\n );\n })\n );\n }\n}\n"]}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=wolsok-thanos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wolsok-thanos.js","sourceRoot":"","sources":["../../../../../libs/public/ws-thanos/src/wolsok-thanos.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC","sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"]}
@@ -1,6 +1,3 @@
1
- /*
2
- * Public API Surface of ws-thanos
3
- */
4
1
  export * from './lib/ws-thanos.service';
5
2
  export * from './lib/ws-thanos.directive';
6
3
  export * from './lib/ws-thanos-options.token';
@@ -0,0 +1,6 @@
1
+ export interface AnimationState {
2
+ deltaTSec: number;
3
+ animationT: number;
4
+ maxWidth: number;
5
+ maxHeight: number;
6
+ }
@@ -0,0 +1,2 @@
1
+ import { WsThanosOptions } from './ws-thanos.options';
2
+ export declare function createWsThanosOptions(options?: Partial<WsThanosOptions>): WsThanosOptions;
@@ -0,0 +1,9 @@
1
+ export interface SimplexNoiseOptions {
2
+ amplitude: number;
3
+ frequency: number;
4
+ max: number;
5
+ min: number;
6
+ octaves: number;
7
+ persistence: number;
8
+ random: () => number;
9
+ }
@@ -0,0 +1,18 @@
1
+ import type { SimplexNoiseOptions } from './simplex-noise-options';
2
+ export declare class SimplexNoise {
3
+ constructor(options?: Partial<SimplexNoiseOptions>);
4
+ static G3: number;
5
+ static GRAD3D: number[][];
6
+ readonly amplitude: number;
7
+ readonly frequency: number;
8
+ readonly octaves: number;
9
+ readonly perm: Uint8Array;
10
+ readonly permMod12: Uint8Array;
11
+ readonly persistence: number;
12
+ readonly random: () => number;
13
+ readonly scale: (value: number) => number;
14
+ private memScale3D;
15
+ dot(gs: number[], coords: number[]): number;
16
+ raw3D(x: number, y: number, z: number): number;
17
+ scaled3D(x: number, y: number, z: number, resolution: number): number;
18
+ }
@@ -0,0 +1,4 @@
1
+ import { InjectionToken, Provider } from '@angular/core';
2
+ import type { WsThanosOptions } from './ws-thanos.options';
3
+ export declare const WS_THANOS_OPTIONS_TOKEN: InjectionToken<WsThanosOptions>;
4
+ export declare function provideWsThanosOptions(options?: Partial<WsThanosOptions>): Provider;
@@ -0,0 +1,29 @@
1
+ import { Observable } from 'rxjs';
2
+ import { AnimationState } from './animation.state';
3
+ import * as i0 from "@angular/core";
4
+ export declare class WsThanosDirective {
5
+ private wsThanosCompleteSubject;
6
+ private untilDestroyed;
7
+ wsThanosComplete: Observable<void>;
8
+ private subscriptions;
9
+ private readonly vaporizeDomElem;
10
+ private readonly thanosService;
11
+ private readonly thanosOptions;
12
+ /**
13
+ *
14
+ * Vaporize the dom element of this directive
15
+ * @param removeElem remove the vaporized dom element or blend back in after a while
16
+ *
17
+ * Subscribe to the returned observable to start vaporization
18
+ *
19
+ */
20
+ vaporize$(removeElem?: boolean): Observable<AnimationState>;
21
+ /**
22
+ * Vaporize the dom element of this directive
23
+ * @param removeElem remove the vaporized dom element or blend back in after a while
24
+ *
25
+ */
26
+ vaporize(removeElem?: boolean): Observable<void>;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<WsThanosDirective, never>;
28
+ static ɵdir: i0.ɵɵDirectiveDeclaration<WsThanosDirective, "[wsThanos], ws-thanos", ["thanos"], {}, { "wsThanosComplete": "wsThanosComplete"; }, never, never, true, never>;
29
+ }
@@ -0,0 +1,5 @@
1
+ export interface WsThanosOptions {
2
+ animationLength: number;
3
+ maxParticleCount: number;
4
+ particleAcceleration: number;
5
+ }
@@ -0,0 +1,20 @@
1
+ import { Observable } from 'rxjs';
2
+ import { AnimationState } from './animation.state';
3
+ import * as i0 from "@angular/core";
4
+ export declare class WsThanosService {
5
+ private readonly thanosOptions;
6
+ private static getParticleIndicesForBase;
7
+ private static getColorIndicesForCoord;
8
+ private static updateParticles;
9
+ private static drawParticles;
10
+ private static prepareCanvasForVaporize;
11
+ private static createParticlesForImageData;
12
+ private static getXYFromFlowField;
13
+ /**
14
+ * start the vaporize-effect.
15
+ */
16
+ vaporize(elem: HTMLElement): Observable<AnimationState>;
17
+ private vaporizeIntern;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<WsThanosService, never>;
19
+ static ɵprov: i0.ɵɵInjectableDeclaration<WsThanosService>;
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wolsok/thanos",
3
- "version": "17.0.17",
3
+ "version": "17.0.19",
4
4
  "description": "Wolf Soko's implementation of a cool Thanos snapping vaporizing effect for destroying dom elements",
5
5
  "bugs": {
6
6
  "url": "https://github.com/WolfSoko/wol-sok-mono/issues"
@@ -23,16 +23,27 @@
23
23
  "Marvel",
24
24
  "npm"
25
25
  ],
26
- "scripts": {
27
- "build:thanos": "nx build ws-thanos"
28
- },
29
26
  "peerDependencies": {
30
27
  "@angular/core": "20.3.7",
31
28
  "html2canvas": "^1.4.1",
32
29
  "rxjs": "7.8.2"
33
30
  },
34
- "dependencies": {},
31
+ "dependencies": {
32
+ "tslib": "^2.3.0"
33
+ },
35
34
  "publishConfig": {
36
35
  "access": "public"
37
- }
38
- }
36
+ },
37
+ "module": "esm2022/wolsok-thanos.js",
38
+ "typings": "wolsok-thanos.d.ts",
39
+ "exports": {
40
+ "./package.json": {
41
+ "default": "./package.json"
42
+ },
43
+ ".": {
44
+ "types": "./wolsok-thanos.d.ts",
45
+ "default": "./esm2022/wolsok-thanos.js"
46
+ }
47
+ },
48
+ "sideEffects": false
49
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@wolsok/thanos" />
5
+ export * from './index';
package/CHANGELOG.md DELETED
@@ -1,59 +0,0 @@
1
- ## 16.1.0 (2024-02-27)
2
-
3
- ### 🚀 Features
4
-
5
- - nrwl/workspace migrate to 14.1.4
6
-
7
- - add thanosDemo mode
8
-
9
- - ✨ extract lib for cdk spa stack
10
-
11
- - **\*:** rename sc-thanos ws-thanos
12
-
13
- - **ws-thanos:** update version to 3.0.0
14
-
15
- - **ws-thanos:** update version to 3.0.1
16
-
17
- - **ws-thanos:** update version to 3.0.1
18
-
19
- - **release:** use release please to CD ws-thanos
20
-
21
- ### 🔥 Performance
22
-
23
- - ⚡️ add willReadFrequently: true to canvases
24
-
25
- ### 🩹 Fixes
26
-
27
- - nrwl/cli migrate to 14.2.1 revert deletion of package.json
28
-
29
- - 🐛 remove updateBuildableProjectDepsInPackageJson in project.jsons
30
-
31
- - **ws-thanos:** remove windows backslashes
32
-
33
- - **deps:** update dependency tslib to v2.4.1
34
-
35
- - **deps:** :arrow_up: update nrwl workspace
36
-
37
- - **deps:** :arrow_up: update nrwl workspace
38
-
39
- - **deps:** :arrow_up: update nrwl workspace
40
-
41
- - **info:** grammar for thanos
42
-
43
- - **deps:** :arrow_up: update nrwl workspace to v15.1.4
44
-
45
- - **deps:** :arrow_up: update nrwl workspace to v16
46
-
47
- - **ws-thanos:** complete observable
48
-
49
- - **ws-thanos:** complete observable
50
-
51
- - **ws-thanos:** use better seed
52
-
53
- - **deps:** :arrow_up: update nx monorepo to v17
54
-
55
- ### ❤️ Thank You
56
-
57
- - Renovate Bot GitHub
58
- - Wolfram
59
- - Wolfram Sokollek
package/eslint.config.mjs DELETED
@@ -1,64 +0,0 @@
1
- import { FlatCompat } from '@eslint/eslintrc';
2
- import baseConfig from '../../../eslint.config.mjs';
3
- import js from '@eslint/js';
4
-
5
- import { fileURLToPath } from 'node:url';
6
- import { dirname } from 'node:path';
7
-
8
- // Convert import.meta.url to a file path
9
- const __filename = fileURLToPath(import.meta.url);
10
- const __dirname = dirname(__filename);
11
-
12
- const compat = new FlatCompat({
13
- baseDirectory: __dirname,
14
- recommendedConfig: js.configs.recommended,
15
- });
16
-
17
- export default [
18
- ...baseConfig,
19
- ...compat
20
- .config({
21
- extends: [
22
- 'plugin:@nx/angular',
23
- 'plugin:@angular-eslint/template/process-inline-templates',
24
- ],
25
- })
26
- .map((config) => ({
27
- ...config,
28
- files: ['**/*.ts'],
29
- rules: {
30
- ...config.rules,
31
- '@angular-eslint/directive-selector': [
32
- 'error',
33
- {
34
- type: 'attribute',
35
- prefix: 'wsThanos',
36
- style: 'camelCase',
37
- },
38
- ],
39
- '@angular-eslint/component-selector': [
40
- 'error',
41
- {
42
- type: 'element',
43
- prefix: 'ws-thanos',
44
- style: 'kebab-case',
45
- },
46
- ],
47
- },
48
- })),
49
- ...compat
50
- .config({ extends: ['plugin:@nx/angular-template'] })
51
- .map((config) => ({
52
- ...config,
53
- files: ['**/*.html'],
54
- rules: {
55
- ...config.rules,
56
- },
57
- })),
58
- {
59
- files: ['**/*.ts'],
60
- rules: {
61
- '@angular-eslint/prefer-standalone': 'off',
62
- },
63
- },
64
- ];
package/jest.config.ts DELETED
@@ -1,23 +0,0 @@
1
- import { JestConfigWithTsJest } from 'ts-jest';
2
-
3
- export default {
4
- displayName: 'libs/public-ws-thanos',
5
- preset: '../../../jest.preset.cjs',
6
- setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
7
- coverageDirectory: '../../../coverage/libs/public/ws-thanos',
8
- transform: {
9
- '^.+\\.(ts|mjs|js|html)$': [
10
- 'jest-preset-angular',
11
- {
12
- tsconfig: '<rootDir>/tsconfig.spec.json',
13
- stringifyContentPathRegex: '\\.(html|svg)$',
14
- },
15
- ],
16
- },
17
- transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
18
- snapshotSerializers: [
19
- 'jest-preset-angular/build/serializers/no-ng-attributes',
20
- 'jest-preset-angular/build/serializers/ng-snapshot',
21
- 'jest-preset-angular/build/serializers/html-comment',
22
- ],
23
- } as JestConfigWithTsJest;
package/ng-package.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../../dist/libs/public/ws-thanos",
4
- "lib": {
5
- "entryFile": "src/index.ts"
6
- },
7
- "assets": ["README.md"]
8
- }
package/project.json DELETED
@@ -1,40 +0,0 @@
1
- {
2
- "name": "ws-thanos",
3
- "$schema": "../../../node_modules/nx/schemas/project-schema.json",
4
- "projectType": "library",
5
- "sourceRoot": "libs/public/ws-thanos/src",
6
- "prefix": "ws",
7
- "tags": ["shared", "published", "ui"],
8
- "targets": {
9
- "build": {
10
- "executor": "@nx/angular:ng-packagr-lite",
11
- "outputs": ["{workspaceRoot}/dist/libs/public/ws-thanos"],
12
- "options": {
13
- "project": "libs/public/ws-thanos/ng-package.json",
14
- "tsConfig": "libs/public/ws-thanos/tsconfig.lib.json"
15
- },
16
- "configurations": {
17
- "production": {
18
- "tsConfig": "libs/public/ws-thanos/tsconfig.lib.prod.json"
19
- },
20
- "development": {}
21
- },
22
- "defaultConfiguration": "production"
23
- },
24
- "lint": {
25
- "options": {
26
- "args": ["./**/*.ts"]
27
- }
28
- },
29
- "test": {
30
- "executor": "@nx/jest:jest",
31
- "outputs": ["{workspaceRoot}/coverage/libs/public/ws-thanos"],
32
- "options": {
33
- "jestConfig": "libs/public/ws-thanos/jest.config.ts",
34
- "passWithNoTests": false,
35
- "codeCoverage": true,
36
- "tsConfig": "libs/public/ws-thanos/tsconfig.spec.json"
37
- }
38
- }
39
- }
40
- }