@ngutil/graphics 0.0.102 → 0.0.105
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/fesm2022/ngutil-graphics.mjs +6 -6
- package/fesm2022/ngutil-graphics.mjs.map +1 -1
- package/index.d.ts +118 -3
- package/package.json +6 -6
- package/cover.service.d.ts +0 -69
- package/ripple/ripple.directive.d.ts +0 -33
- package/util/animation-observable.d.ts +0 -10
- package/util/index.d.ts +0 -2
- package/util/polygon.d.ts +0 -7
|
@@ -131,10 +131,10 @@ class RippleDirective extends Destructible {
|
|
|
131
131
|
#onMouseDown = (event) => {
|
|
132
132
|
this.begin(event);
|
|
133
133
|
};
|
|
134
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
135
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
134
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: RippleDirective, deps: [{ token: i0.TemplateRef }, { token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
135
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.13", type: RippleDirective, isStandalone: true, selector: "ng-template[nuRipple]", exportAs: ["nuRipple"], usesInheritance: true, ngImport: i0 }); }
|
|
136
136
|
}
|
|
137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: RippleDirective, decorators: [{
|
|
138
138
|
type: Directive,
|
|
139
139
|
args: [{
|
|
140
140
|
selector: "ng-template[nuRipple]",
|
|
@@ -352,10 +352,10 @@ class CoverService {
|
|
|
352
352
|
return new RevealCoverRef(container, options, this.#watcher);
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
356
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
355
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: CoverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
356
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: CoverService, providedIn: "root" }); }
|
|
357
357
|
}
|
|
358
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
358
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: CoverService, decorators: [{
|
|
359
359
|
type: Injectable,
|
|
360
360
|
args: [{ providedIn: "root" }]
|
|
361
361
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngutil-graphics.mjs","sources":["../../../../packages/graphics/src/util/animation-observable.ts","../../../../packages/graphics/src/util/polygon.ts","../../../../packages/graphics/src/ripple/ripple.directive.ts","../../../../packages/graphics/src/cover.service.ts","../../../../packages/graphics/src/ngutil-graphics.ts"],"sourcesContent":["import { AnimationBuilder, AnimationMetadata, AnimationOptions } from \"@angular/animations\"\n\nimport { Observable, Subscriber } from \"rxjs\"\n\nimport { coerceElement, ElementInput } from \"@ngutil/common\"\n\nexport interface AnimationObservableParams {\n builder: AnimationBuilder\n animation: AnimationMetadata | AnimationMetadata[]\n element: ElementInput\n options?: AnimationOptions\n}\n\nexport function animationObservable({ builder, animation, element, options }: AnimationObservableParams) {\n return new Observable((dst: Subscriber<void>) => {\n const factory = builder.build(animation)\n const player = factory.create(coerceElement(element), options)\n\n const done = () => {\n dst.next()\n dst.complete()\n }\n\n player.onDestroy(done)\n player.onDone(done)\n player.play()\n\n return () => {\n player.pause()\n player.destroy()\n }\n })\n}\n","import { Position } from \"@ngutil/style\"\n\nexport type Polygon = Position[]\n\nexport function polygonRect(topLeft: Position, bottomRight: Position): Polygon {\n const result: Polygon = []\n\n result.push(topLeft)\n result.push({ x: bottomRight.x, y: topLeft.y })\n result.push(bottomRight)\n result.push({ x: topLeft.x, y: bottomRight.y })\n result.push(topLeft)\n\n return result\n}\n\nconst OctoAngle = (Math.PI * 2) / 8\n\nexport function polygonRoundedRect(topLeft: Position, bottomRight: Position, radius: number): Polygon {\n if (radius <= 0) {\n return polygonRect(topLeft, bottomRight)\n }\n\n const result: Polygon = []\n const maxR = Math.min(bottomRight.x - topLeft.x, bottomRight.y - topLeft.y) / 2\n const r = Math.min(radius, maxR)\n\n // top left half\n result.push(...polygonArc({ x: topLeft.x + r, y: topLeft.y + r }, r, OctoAngle * 3, OctoAngle * 2))\n result.push({ x: topLeft.x + r, y: topLeft.y })\n result.push({ x: bottomRight.x - r, y: topLeft.y })\n\n // top right\n result.push(...polygonArc({ x: bottomRight.x - r, y: topLeft.y + r }, r, OctoAngle * 2, OctoAngle * 0))\n result.push({ x: bottomRight.x, y: topLeft.y + r })\n\n // bottom right\n result.push(...polygonArc({ x: bottomRight.x - r, y: bottomRight.y - r }, r, OctoAngle * 0, -OctoAngle * 2))\n result.push({ x: bottomRight.x - r, y: bottomRight.y })\n\n // bottom left\n result.push(...polygonArc({ x: topLeft.x + r, y: bottomRight.y - r }, r, OctoAngle * 6, OctoAngle * 4))\n result.push({ x: topLeft.x, y: bottomRight.y - r })\n\n // top left half\n result.push({ x: topLeft.x, y: topLeft.y + r })\n result.push(...polygonArc({ x: topLeft.x + r, y: topLeft.y + r }, r, OctoAngle * 4, OctoAngle * 3))\n\n result.push(result[0])\n\n return result\n}\n\nexport function polygonArc(center: Position, radius: number, startAngle: number, endAngle: number): Polygon {\n const result: Polygon = []\n\n if (radius === 0) {\n return result\n }\n\n const reversed = startAngle > endAngle\n let angle = Math.min(startAngle, endAngle)\n const end = Math.max(startAngle, endAngle)\n\n for (; angle < end; angle += 0.1) {\n const x = center.x + radius * Math.cos(angle)\n const y = center.y - radius * Math.sin(angle)\n result.push({ x, y })\n }\n\n return reversed ? result.reverse() : result\n}\n\nexport function polygonToCss(polygon: Polygon): string {\n return `polygon(${polygon.map(p => `${p.x}px ${p.y}px`).join(\",\")})`\n}\n\nexport function maxPossibleRadius(x: number, y: number, w: number, h: number) {\n const distX = Math.max(x, Math.abs(w - x))\n const distY = Math.max(y, Math.abs(h - y))\n return Math.sqrt(distX * distX + distY * distY)\n}\n","import { Directive, ElementRef, NgZone, TemplateRef } from \"@angular/core\"\n\nimport { Destructible, IDisposable } from \"@ngutil/common\"\n\nimport { maxPossibleRadius } from \"../util\"\n\n@Directive({\n selector: \"ng-template[nuRipple]\",\n exportAs: \"nuRipple\"\n})\nexport class RippleDirective extends Destructible {\n #current?: Ripple\n\n constructor(\n private readonly tplRef: TemplateRef<any>,\n private readonly zone: NgZone,\n private readonly el: ElementRef<Node>\n ) {\n super()\n zone.runOutsideAngular(() => {\n const target = el.nativeElement.parentElement\n if (target) {\n target.addEventListener(\"mousedown\", this.#onMouseDown)\n this.d.any(() => target.removeEventListener(\"mousedown\", this.#onMouseDown))\n }\n })\n }\n\n begin(event: MouseEvent) {\n this.#current?.autoDestroy()\n const cfg = this.#createRippleConfig(event)\n const ripple = this.#createRipple(cfg)\n this.#current = ripple\n\n const refEl = this.tplRef.elementRef.nativeElement as HTMLElement\n refEl.parentNode?.insertBefore(ripple.el, refEl)\n ripple.start()\n }\n\n end() {\n this.#current?.autoDestroy()\n }\n\n #createRipple(config: RippleConfig) {\n const ripple = new Ripple(config, this.zone, () => {\n if (this.#current === ripple) {\n this.#current = undefined\n }\n })\n this.d.disposable(ripple)\n return ripple\n }\n\n #createRippleConfig(event: MouseEvent): RippleConfig {\n const container = event.currentTarget as HTMLElement\n const bounds = container.getBoundingClientRect()\n const w = bounds.width\n const h = bounds.height\n const x = event.clientX - bounds.left\n const y = event.clientY - bounds.top\n const r = maxPossibleRadius(x, y, w, h) + Math.min(w, h)\n return { x, y, w, h, r, d: 600 }\n }\n\n #onMouseDown = (event: MouseEvent) => {\n this.begin(event)\n }\n}\n\ntype RippleConfig = { x: number; y: number; w: number; h: number; r: number; d: number }\n\nexport class Ripple implements IDisposable {\n public readonly el: HTMLDivElement\n public readonly isRunning: boolean = false\n\n #autoDestroy = false\n #hiding = false\n\n constructor(\n config: RippleConfig,\n zone: NgZone,\n public readonly onDestroy: () => void\n ) {\n const el = document.createElement(\"div\")\n el.style.position = \"absolute\"\n el.style.top = `${config.y - config.r}px`\n el.style.left = `${config.x - config.r}px`\n el.style.width = `${config.r * 2}px`\n el.style.height = `${config.r * 2}px`\n el.style.pointerEvents = \"none\"\n el.style.backgroundColor = \"var(--ripple-color)\"\n el.style.borderRadius = \"50%\"\n el.style.transition = `opacity ${config.d / 2}ms ease-out, transform ${config.d}ms ease-out`\n el.style.opacity = \"0\"\n el.style.transformOrigin = \"center\"\n el.style.transform = \"scale(0)\"\n this.el = el\n\n zone.runOutsideAngular(() => {\n el.addEventListener(\"transitionstart\", this.#transBegin)\n el.addEventListener(\"transitionend\", this.#transEnd)\n el.addEventListener(\"transitioncancel\", this.#transEnd)\n document.addEventListener(\"mouseup\", this.autoDestroy, { capture: true, passive: true })\n document.addEventListener(\"dragend\", this.autoDestroy, { capture: true, passive: true })\n })\n }\n\n start() {\n // eslint-disable-next-line no-extra-semi\n ; (this as { isRunning: boolean }).isRunning = true\n // XXX: force style apply\n const opacity = typeof window !== \"undefined\" ? Number(window.getComputedStyle(this.el).opacity) : 1\n this.el.style.opacity = opacity ? \"0.3\" : \"0.3\"\n this.el.style.transform = \"scale(1)\"\n }\n\n autoDestroy = () => {\n if (this.isRunning) {\n this.#autoDestroy = true\n } else {\n this.#fadeOut()\n }\n }\n\n dispose(): void {\n this.el.removeEventListener(\"transitionstart\", this.#transBegin)\n this.el.removeEventListener(\"transitionend\", this.#transEnd)\n this.el.removeEventListener(\"transitioncancel\", this.#transEnd)\n document.removeEventListener(\"mouseup\", this.autoDestroy, { capture: true })\n this.el.parentNode?.removeChild(this.el)\n this.onDestroy()\n }\n\n #transBegin = () => {\n // eslint-disable-next-line no-extra-semi\n ; (this as { isRunning: boolean }).isRunning = true\n }\n\n #transEnd = (event: TransitionEvent) => {\n if (event.propertyName === \"opacity\") {\n if (this.#hiding) {\n this.dispose()\n } else {\n if (this.#autoDestroy) {\n this.#fadeOut()\n }\n }\n } else if (event.propertyName === \"transform\") {\n // eslint-disable-next-line no-extra-semi\n ; (this as { isRunning: boolean }).isRunning = false\n if (this.#autoDestroy) {\n this.dispose()\n }\n }\n }\n\n #fadeOut() {\n if (this.#hiding) {\n return\n }\n this.#hiding = true\n this.el.style.opacity = \"0\"\n }\n}\n","import { ElementRef, inject, Injectable } from \"@angular/core\"\n\nimport {\n combineLatest,\n filter,\n from,\n map,\n Observable,\n ObservableInput,\n of,\n Subscriber,\n switchMap,\n TeardownLogic\n} from \"rxjs\"\n\nimport { coerceElement, ElementInput, isElementInput } from \"@ngutil/common\"\nimport { Rect, rectContract, rectExpand, RectWatcher, SidesInput } from \"@ngutil/style\"\n\nimport { maxPossibleRadius, Polygon, polygonArc, polygonRect, polygonRoundedRect, polygonToCss } from \"./util\"\n\nexport interface CommonCoverOptions {\n color: \"transparent\" | string\n style?: Partial<CSSStyleDeclaration>\n}\n\nexport interface SolidCoverOptions extends CommonCoverOptions {\n type: \"solid\"\n}\n\nexport interface CropCoverOptions extends CommonCoverOptions {\n type: \"crop\"\n /**\n * Element that will be interactive while the cover is visible\n */\n crop: ElementInput | ObservableInput<Rect | ElementInput>\n shape: CropShapeOptions\n expand?: SidesInput\n contract?: SidesInput\n disablePointerEvents?: boolean\n}\n\nexport type CropShapeOptions = CropRectOptions | CropCircleOptions | CropShapeCustom\n\nexport interface CropRectOptions {\n type: \"rect\"\n borderRadius?: number\n}\n\nexport interface CropCircleOptions {\n type: \"circle\"\n}\n\nexport type CropShapeCustom = (container: Rect, crop: Rect) => Polygon\n\nexport interface RevealCoverOptions extends CommonCoverOptions {\n type: \"reveal\"\n /**\n * Left and right coordinates inside the container\n */\n origin: { left: number; top: number }\n}\n\nexport type CoverOptions = SolidCoverOptions | CropCoverOptions | RevealCoverOptions\n\nexport abstract class CoverRef<O extends CommonCoverOptions, R = void> extends ElementRef<HTMLElement> {\n protected readonly watcher: RectWatcher\n\n constructor(\n readonly container: ElementInput,\n readonly options: O,\n watcher: RectWatcher\n ) {\n super(document.createElement(\"div\"))\n this.watcher = watcher\n\n Object.assign(this.nativeElement.style, {\n position: \"absolute\",\n inset: \"0px\"\n })\n }\n\n show(): Observable<R> {\n return new Observable(dest => {\n const element = this.nativeElement\n coerceElement(this.container).appendChild(element)\n dest.add(() => element.parentElement?.removeChild(element))\n return this._show(dest)\n })\n }\n\n protected applyStyle(mask: HTMLElement) {\n const options = this.options\n const backgroundColor = options.color === \"transparent\" ? \"rgba(255, 255, 255, 0.0001)\" : options.color\n\n if (options.style) {\n Object.assign(mask.style, { backgroundColor, ...options.style })\n } else {\n Object.assign(mask.style, { backgroundColor })\n }\n }\n\n protected abstract _show(dest: Subscriber<unknown>): TeardownLogic\n}\n\nexport class SolidCoverRef extends CoverRef<SolidCoverOptions> {\n protected override _show(dest: Subscriber<unknown>): TeardownLogic {\n this.applyStyle(this.nativeElement)\n }\n}\n\nexport class CropCoverRef extends CoverRef<CropCoverOptions> {\n protected override _show(dest: Subscriber<unknown>): TeardownLogic {\n const options = this.options\n const crop = isElementInput(options.crop) ? of(options.crop) : from(options.crop)\n let maskEl = this.nativeElement\n\n // TODO: a backdrop filter kicsit ksőbb jelenik meg így\n if (this.options.disablePointerEvents) {\n maskEl = document.createElement(\"div\")\n Object.assign(maskEl.style, {\n position: \"absolute\",\n inset: \"0px\"\n })\n this.applyStyle(maskEl)\n // maskEl.style.backdropFilter = null as any\n this.nativeElement.appendChild(maskEl)\n this.nativeElement.style.background = \"rgba(0, 0, 0, 0.1)\"\n // this.nativeElement.style.backdropFilter = this.options.style?.backdropFilter as any\n } else {\n this.applyStyle(this.nativeElement)\n }\n\n return combineLatest({\n container: this.watcher.watch(this.container, \"border-box\"),\n crop: crop.pipe(\n filter(value => value != null),\n switchMap(crop => {\n if (isElementInput(crop)) {\n return this.watcher.watch(coerceElement(crop), \"border-box\")\n } else {\n return of(crop)\n }\n }),\n map(crop => {\n if (this.options.expand) {\n crop = rectExpand(crop, this.options.expand)\n }\n\n if (this.options.contract) {\n crop = rectContract(crop, this.options.contract)\n }\n\n return crop\n })\n )\n }).subscribe(({ container, crop }) => {\n const outer = polygonRect({ x: 0, y: 0 }, { x: container.width, y: container.height })\n const croppedArea = this.#polygon(container, crop).reverse()\n const polygon = [...outer, ...croppedArea]\n\n maskEl.style.clipPath = polygonToCss(polygon)\n })\n }\n\n #polygon(container: Rect, crop: Rect): Polygon {\n const shape = this.options.shape\n if (typeof shape === \"function\") {\n return shape(container, crop)\n } else if (shape.type === \"circle\") {\n const r = maxPossibleRadius(crop.x, crop.y, crop.width, crop.height)\n return polygonArc({ x: crop.x + r, y: crop.y + r }, r, 0, Math.PI * 2)\n } else if (shape.type === \"rect\") {\n const top = Math.round(Math.max(crop.y - container.y, 0))\n const right = Math.round(Math.max(crop.x + crop.width))\n const bottom = Math.round(Math.max(crop.y + crop.height))\n const left = Math.round(Math.max(crop.x - container.x))\n\n if (shape.borderRadius != null) {\n return polygonRoundedRect({ x: left, y: top }, { x: right, y: bottom }, shape.borderRadius)\n } else {\n return polygonRect({ x: left, y: top }, { x: right, y: bottom })\n }\n }\n return []\n }\n}\n\nexport class RevealCoverRef extends CoverRef<RevealCoverOptions> {\n protected override _show(dest: Subscriber<unknown>): TeardownLogic {}\n}\n\n@Injectable({ providedIn: \"root\" })\nexport class CoverService {\n readonly #watcher = inject(RectWatcher)\n\n create(container: ElementInput, options: CoverOptions) {\n switch (options.type) {\n case \"solid\":\n return new SolidCoverRef(container, options, this.#watcher)\n case \"crop\":\n return new CropCoverRef(container, options, this.#watcher)\n case \"reveal\":\n return new RevealCoverRef(container, options, this.#watcher)\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAaM,SAAU,mBAAmB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAA6B,EAAA;AACnG,IAAA,OAAO,IAAI,UAAU,CAAC,CAAC,GAAqB,KAAI;QAC5C,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC;AACxC,QAAA,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;QAE9D,MAAM,IAAI,GAAG,MAAK;YACd,GAAG,CAAC,IAAI,EAAE;YACV,GAAG,CAAC,QAAQ,EAAE;AAClB,SAAC;AAED,QAAA,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;AACtB,QAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;QACnB,MAAM,CAAC,IAAI,EAAE;AAEb,QAAA,OAAO,MAAK;YACR,MAAM,CAAC,KAAK,EAAE;YACd,MAAM,CAAC,OAAO,EAAE;AACpB,SAAC;AACL,KAAC,CAAC;AACN;;AC5BgB,SAAA,WAAW,CAAC,OAAiB,EAAE,WAAqB,EAAA;IAChE,MAAM,MAAM,GAAY,EAAE;AAE1B,IAAA,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;AACpB,IAAA,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;AAC/C,IAAA,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;AACxB,IAAA,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC;AAC/C,IAAA,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;A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;gBACT,OAAO,IAAI,cAAc,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC;;;8GAV/D,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAZ,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cADC,MAAM,EAAA,CAAA,CAAA;;2FACnB,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;AC/LlC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngutil-graphics.mjs","sources":["../../../../packages/graphics/src/util/animation-observable.ts","../../../../packages/graphics/src/util/polygon.ts","../../../../packages/graphics/src/ripple/ripple.directive.ts","../../../../packages/graphics/src/cover.service.ts","../../../../packages/graphics/src/ngutil-graphics.ts"],"sourcesContent":["import { AnimationBuilder, AnimationMetadata, AnimationOptions } from \"@angular/animations\"\n\nimport { Observable, Subscriber } from \"rxjs\"\n\nimport { coerceElement, ElementInput } from \"@ngutil/common\"\n\nexport interface AnimationObservableParams {\n builder: AnimationBuilder\n animation: AnimationMetadata | AnimationMetadata[]\n element: ElementInput\n options?: AnimationOptions\n}\n\nexport function animationObservable({ builder, animation, element, options }: AnimationObservableParams) {\n return new Observable((dst: Subscriber<void>) => {\n const factory = builder.build(animation)\n const player = factory.create(coerceElement(element), options)\n\n const done = () => {\n dst.next()\n dst.complete()\n }\n\n player.onDestroy(done)\n player.onDone(done)\n player.play()\n\n return () => {\n player.pause()\n player.destroy()\n }\n })\n}\n","import { Position } from \"@ngutil/style\"\n\nexport type Polygon = Position[]\n\nexport function polygonRect(topLeft: Position, bottomRight: Position): Polygon {\n const result: Polygon = []\n\n result.push(topLeft)\n result.push({ x: bottomRight.x, y: topLeft.y })\n result.push(bottomRight)\n result.push({ x: topLeft.x, y: bottomRight.y })\n result.push(topLeft)\n\n return result\n}\n\nconst OctoAngle = (Math.PI * 2) / 8\n\nexport function polygonRoundedRect(topLeft: Position, bottomRight: Position, radius: number): Polygon {\n if (radius <= 0) {\n return polygonRect(topLeft, bottomRight)\n }\n\n const result: Polygon = []\n const maxR = Math.min(bottomRight.x - topLeft.x, bottomRight.y - topLeft.y) / 2\n const r = Math.min(radius, maxR)\n\n // top left half\n result.push(...polygonArc({ x: topLeft.x + r, y: topLeft.y + r }, r, OctoAngle * 3, OctoAngle * 2))\n result.push({ x: topLeft.x + r, y: topLeft.y })\n result.push({ x: bottomRight.x - r, y: topLeft.y })\n\n // top right\n result.push(...polygonArc({ x: bottomRight.x - r, y: topLeft.y + r }, r, OctoAngle * 2, OctoAngle * 0))\n result.push({ x: bottomRight.x, y: topLeft.y + r })\n\n // bottom right\n result.push(...polygonArc({ x: bottomRight.x - r, y: bottomRight.y - r }, r, OctoAngle * 0, -OctoAngle * 2))\n result.push({ x: bottomRight.x - r, y: bottomRight.y })\n\n // bottom left\n result.push(...polygonArc({ x: topLeft.x + r, y: bottomRight.y - r }, r, OctoAngle * 6, OctoAngle * 4))\n result.push({ x: topLeft.x, y: bottomRight.y - r })\n\n // top left half\n result.push({ x: topLeft.x, y: topLeft.y + r })\n result.push(...polygonArc({ x: topLeft.x + r, y: topLeft.y + r }, r, OctoAngle * 4, OctoAngle * 3))\n\n result.push(result[0])\n\n return result\n}\n\nexport function polygonArc(center: Position, radius: number, startAngle: number, endAngle: number): Polygon {\n const result: Polygon = []\n\n if (radius === 0) {\n return result\n }\n\n const reversed = startAngle > endAngle\n let angle = Math.min(startAngle, endAngle)\n const end = Math.max(startAngle, endAngle)\n\n for (; angle < end; angle += 0.1) {\n const x = center.x + radius * Math.cos(angle)\n const y = center.y - radius * Math.sin(angle)\n result.push({ x, y })\n }\n\n return reversed ? result.reverse() : result\n}\n\nexport function polygonToCss(polygon: Polygon): string {\n return `polygon(${polygon.map(p => `${p.x}px ${p.y}px`).join(\",\")})`\n}\n\nexport function maxPossibleRadius(x: number, y: number, w: number, h: number) {\n const distX = Math.max(x, Math.abs(w - x))\n const distY = Math.max(y, Math.abs(h - y))\n return Math.sqrt(distX * distX + distY * distY)\n}\n","import { Directive, ElementRef, NgZone, TemplateRef } from \"@angular/core\"\n\nimport { Destructible, IDisposable } from \"@ngutil/common\"\n\nimport { maxPossibleRadius } from \"../util\"\n\n@Directive({\n selector: \"ng-template[nuRipple]\",\n exportAs: \"nuRipple\"\n})\nexport class RippleDirective extends Destructible {\n #current?: Ripple\n\n constructor(\n private readonly tplRef: TemplateRef<any>,\n private readonly zone: NgZone,\n private readonly el: ElementRef<Node>\n ) {\n super()\n zone.runOutsideAngular(() => {\n const target = el.nativeElement.parentElement\n if (target) {\n target.addEventListener(\"mousedown\", this.#onMouseDown)\n this.d.any(() => target.removeEventListener(\"mousedown\", this.#onMouseDown))\n }\n })\n }\n\n begin(event: MouseEvent) {\n this.#current?.autoDestroy()\n const cfg = this.#createRippleConfig(event)\n const ripple = this.#createRipple(cfg)\n this.#current = ripple\n\n const refEl = this.tplRef.elementRef.nativeElement as HTMLElement\n refEl.parentNode?.insertBefore(ripple.el, refEl)\n ripple.start()\n }\n\n end() {\n this.#current?.autoDestroy()\n }\n\n #createRipple(config: RippleConfig) {\n const ripple = new Ripple(config, this.zone, () => {\n if (this.#current === ripple) {\n this.#current = undefined\n }\n })\n this.d.disposable(ripple)\n return ripple\n }\n\n #createRippleConfig(event: MouseEvent): RippleConfig {\n const container = event.currentTarget as HTMLElement\n const bounds = container.getBoundingClientRect()\n const w = bounds.width\n const h = bounds.height\n const x = event.clientX - bounds.left\n const y = event.clientY - bounds.top\n const r = maxPossibleRadius(x, y, w, h) + Math.min(w, h)\n return { x, y, w, h, r, d: 600 }\n }\n\n #onMouseDown = (event: MouseEvent) => {\n this.begin(event)\n }\n}\n\ntype RippleConfig = { x: number; y: number; w: number; h: number; r: number; d: number }\n\nexport class Ripple implements IDisposable {\n public readonly el: HTMLDivElement\n public readonly isRunning: boolean = false\n\n #autoDestroy = false\n #hiding = false\n\n constructor(\n config: RippleConfig,\n zone: NgZone,\n public readonly onDestroy: () => void\n ) {\n const el = document.createElement(\"div\")\n el.style.position = \"absolute\"\n el.style.top = `${config.y - config.r}px`\n el.style.left = `${config.x - config.r}px`\n el.style.width = `${config.r * 2}px`\n el.style.height = `${config.r * 2}px`\n el.style.pointerEvents = \"none\"\n el.style.backgroundColor = \"var(--ripple-color)\"\n el.style.borderRadius = \"50%\"\n el.style.transition = `opacity ${config.d / 2}ms ease-out, transform ${config.d}ms ease-out`\n el.style.opacity = \"0\"\n el.style.transformOrigin = \"center\"\n el.style.transform = \"scale(0)\"\n this.el = el\n\n zone.runOutsideAngular(() => {\n el.addEventListener(\"transitionstart\", this.#transBegin)\n el.addEventListener(\"transitionend\", this.#transEnd)\n el.addEventListener(\"transitioncancel\", this.#transEnd)\n document.addEventListener(\"mouseup\", this.autoDestroy, { capture: true, passive: true })\n document.addEventListener(\"dragend\", this.autoDestroy, { capture: true, passive: true })\n })\n }\n\n start() {\n // eslint-disable-next-line no-extra-semi\n ; (this as { isRunning: boolean }).isRunning = true\n // XXX: force style apply\n const opacity = typeof window !== \"undefined\" ? Number(window.getComputedStyle(this.el).opacity) : 1\n this.el.style.opacity = opacity ? \"0.3\" : \"0.3\"\n this.el.style.transform = \"scale(1)\"\n }\n\n autoDestroy = () => {\n if (this.isRunning) {\n this.#autoDestroy = true\n } else {\n this.#fadeOut()\n }\n }\n\n dispose(): void {\n this.el.removeEventListener(\"transitionstart\", this.#transBegin)\n this.el.removeEventListener(\"transitionend\", this.#transEnd)\n this.el.removeEventListener(\"transitioncancel\", this.#transEnd)\n document.removeEventListener(\"mouseup\", this.autoDestroy, { capture: true })\n this.el.parentNode?.removeChild(this.el)\n this.onDestroy()\n }\n\n #transBegin = () => {\n // eslint-disable-next-line no-extra-semi\n ; (this as { isRunning: boolean }).isRunning = true\n }\n\n #transEnd = (event: TransitionEvent) => {\n if (event.propertyName === \"opacity\") {\n if (this.#hiding) {\n this.dispose()\n } else {\n if (this.#autoDestroy) {\n this.#fadeOut()\n }\n }\n } else if (event.propertyName === \"transform\") {\n // eslint-disable-next-line no-extra-semi\n ; (this as { isRunning: boolean }).isRunning = false\n if (this.#autoDestroy) {\n this.dispose()\n }\n }\n }\n\n #fadeOut() {\n if (this.#hiding) {\n return\n }\n this.#hiding = true\n this.el.style.opacity = \"0\"\n }\n}\n","import { ElementRef, inject, Injectable } from \"@angular/core\"\n\nimport {\n combineLatest,\n filter,\n from,\n map,\n Observable,\n ObservableInput,\n of,\n Subscriber,\n switchMap,\n TeardownLogic\n} from \"rxjs\"\n\nimport { coerceElement, ElementInput, isElementInput } from \"@ngutil/common\"\nimport { Rect, rectContract, rectExpand, RectWatcher, SidesInput } from \"@ngutil/style\"\n\nimport { maxPossibleRadius, Polygon, polygonArc, polygonRect, polygonRoundedRect, polygonToCss } from \"./util\"\n\nexport interface CommonCoverOptions {\n color: \"transparent\" | string\n style?: Partial<CSSStyleDeclaration>\n}\n\nexport interface SolidCoverOptions extends CommonCoverOptions {\n type: \"solid\"\n}\n\nexport interface CropCoverOptions extends CommonCoverOptions {\n type: \"crop\"\n /**\n * Element that will be interactive while the cover is visible\n */\n crop: ElementInput | ObservableInput<Rect | ElementInput>\n shape: CropShapeOptions\n expand?: SidesInput\n contract?: SidesInput\n disablePointerEvents?: boolean\n}\n\nexport type CropShapeOptions = CropRectOptions | CropCircleOptions | CropShapeCustom\n\nexport interface CropRectOptions {\n type: \"rect\"\n borderRadius?: number\n}\n\nexport interface CropCircleOptions {\n type: \"circle\"\n}\n\nexport type CropShapeCustom = (container: Rect, crop: Rect) => Polygon\n\nexport interface RevealCoverOptions extends CommonCoverOptions {\n type: \"reveal\"\n /**\n * Left and right coordinates inside the container\n */\n origin: { left: number; top: number }\n}\n\nexport type CoverOptions = SolidCoverOptions | CropCoverOptions | RevealCoverOptions\n\nexport abstract class CoverRef<O extends CommonCoverOptions, R = void> extends ElementRef<HTMLElement> {\n protected readonly watcher: RectWatcher\n\n constructor(\n readonly container: ElementInput,\n readonly options: O,\n watcher: RectWatcher\n ) {\n super(document.createElement(\"div\"))\n this.watcher = watcher\n\n Object.assign(this.nativeElement.style, {\n position: \"absolute\",\n inset: \"0px\"\n })\n }\n\n show(): Observable<R> {\n return new Observable(dest => {\n const element = this.nativeElement\n coerceElement(this.container).appendChild(element)\n dest.add(() => element.parentElement?.removeChild(element))\n return this._show(dest)\n })\n }\n\n protected applyStyle(mask: HTMLElement) {\n const options = this.options\n const backgroundColor = options.color === \"transparent\" ? \"rgba(255, 255, 255, 0.0001)\" : options.color\n\n if (options.style) {\n Object.assign(mask.style, { backgroundColor, ...options.style })\n } else {\n Object.assign(mask.style, { backgroundColor })\n }\n }\n\n protected abstract _show(dest: Subscriber<unknown>): TeardownLogic\n}\n\nexport class SolidCoverRef extends CoverRef<SolidCoverOptions> {\n protected override _show(dest: Subscriber<unknown>): TeardownLogic {\n this.applyStyle(this.nativeElement)\n }\n}\n\nexport class CropCoverRef extends CoverRef<CropCoverOptions> {\n protected override _show(dest: Subscriber<unknown>): TeardownLogic {\n const options = this.options\n const crop = isElementInput(options.crop) ? of(options.crop) : from(options.crop)\n let maskEl = this.nativeElement\n\n // TODO: a backdrop filter kicsit ksőbb jelenik meg így\n if (this.options.disablePointerEvents) {\n maskEl = document.createElement(\"div\")\n Object.assign(maskEl.style, {\n position: \"absolute\",\n inset: \"0px\"\n })\n this.applyStyle(maskEl)\n // maskEl.style.backdropFilter = null as any\n this.nativeElement.appendChild(maskEl)\n this.nativeElement.style.background = \"rgba(0, 0, 0, 0.1)\"\n // this.nativeElement.style.backdropFilter = this.options.style?.backdropFilter as any\n } else {\n this.applyStyle(this.nativeElement)\n }\n\n return combineLatest({\n container: this.watcher.watch(this.container, \"border-box\"),\n crop: crop.pipe(\n filter(value => value != null),\n switchMap(crop => {\n if (isElementInput(crop)) {\n return this.watcher.watch(coerceElement(crop), \"border-box\")\n } else {\n return of(crop)\n }\n }),\n map(crop => {\n if (this.options.expand) {\n crop = rectExpand(crop, this.options.expand)\n }\n\n if (this.options.contract) {\n crop = rectContract(crop, this.options.contract)\n }\n\n return crop\n })\n )\n }).subscribe(({ container, crop }) => {\n const outer = polygonRect({ x: 0, y: 0 }, { x: container.width, y: container.height })\n const croppedArea = this.#polygon(container, crop).reverse()\n const polygon = [...outer, ...croppedArea]\n\n maskEl.style.clipPath = polygonToCss(polygon)\n })\n }\n\n #polygon(container: Rect, crop: Rect): Polygon {\n const shape = this.options.shape\n if (typeof shape === \"function\") {\n return shape(container, crop)\n } else if (shape.type === \"circle\") {\n const r = maxPossibleRadius(crop.x, crop.y, crop.width, crop.height)\n return polygonArc({ x: crop.x + r, y: crop.y + r }, r, 0, Math.PI * 2)\n } else if (shape.type === \"rect\") {\n const top = Math.round(Math.max(crop.y - container.y, 0))\n const right = Math.round(Math.max(crop.x + crop.width))\n const bottom = Math.round(Math.max(crop.y + crop.height))\n const left = Math.round(Math.max(crop.x - container.x))\n\n if (shape.borderRadius != null) {\n return polygonRoundedRect({ x: left, y: top }, { x: right, y: bottom }, shape.borderRadius)\n } else {\n return polygonRect({ x: left, y: top }, { x: right, y: bottom })\n }\n }\n return []\n }\n}\n\nexport class RevealCoverRef extends CoverRef<RevealCoverOptions> {\n protected override _show(dest: Subscriber<unknown>): TeardownLogic {}\n}\n\n@Injectable({ providedIn: \"root\" })\nexport class CoverService {\n readonly #watcher = inject(RectWatcher)\n\n create(container: ElementInput, options: CoverOptions) {\n switch (options.type) {\n case \"solid\":\n return new SolidCoverRef(container, options, this.#watcher)\n case \"crop\":\n return new CropCoverRef(container, options, this.#watcher)\n case \"reveal\":\n return new RevealCoverRef(container, options, this.#watcher)\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AA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I,CAAC,QAAQ,CAAC;AAC/D,YAAA,KAAK,MAAM;gBACP,OAAO,IAAI,YAAY,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC;AAC9D,YAAA,KAAK,QAAQ;gBACT,OAAO,IAAI,cAAc,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC;;IAExE;+GAZS,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAZ,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cADC,MAAM,EAAA,CAAA,CAAA;;4FACnB,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;AC/LlC;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,3 +1,118 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { TemplateRef, NgZone, ElementRef } from '@angular/core';
|
|
3
|
+
import { Destructible, IDisposable, ElementInput } from '@ngutil/common';
|
|
4
|
+
import { Observable, ObservableInput, Subscriber, TeardownLogic } from 'rxjs';
|
|
5
|
+
import { Position, Rect, SidesInput, RectWatcher } from '@ngutil/style';
|
|
6
|
+
import { AnimationBuilder, AnimationMetadata, AnimationOptions } from '@angular/animations';
|
|
7
|
+
|
|
8
|
+
declare class RippleDirective extends Destructible {
|
|
9
|
+
#private;
|
|
10
|
+
private readonly tplRef;
|
|
11
|
+
private readonly zone;
|
|
12
|
+
private readonly el;
|
|
13
|
+
constructor(tplRef: TemplateRef<any>, zone: NgZone, el: ElementRef<Node>);
|
|
14
|
+
begin(event: MouseEvent): void;
|
|
15
|
+
end(): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RippleDirective, never>;
|
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RippleDirective, "ng-template[nuRipple]", ["nuRipple"], {}, {}, never, never, true, never>;
|
|
18
|
+
}
|
|
19
|
+
type RippleConfig = {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
w: number;
|
|
23
|
+
h: number;
|
|
24
|
+
r: number;
|
|
25
|
+
d: number;
|
|
26
|
+
};
|
|
27
|
+
declare class Ripple implements IDisposable {
|
|
28
|
+
#private;
|
|
29
|
+
readonly onDestroy: () => void;
|
|
30
|
+
readonly el: HTMLDivElement;
|
|
31
|
+
readonly isRunning: boolean;
|
|
32
|
+
constructor(config: RippleConfig, zone: NgZone, onDestroy: () => void);
|
|
33
|
+
start(): void;
|
|
34
|
+
autoDestroy: () => void;
|
|
35
|
+
dispose(): void;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface AnimationObservableParams {
|
|
39
|
+
builder: AnimationBuilder;
|
|
40
|
+
animation: AnimationMetadata | AnimationMetadata[];
|
|
41
|
+
element: ElementInput;
|
|
42
|
+
options?: AnimationOptions;
|
|
43
|
+
}
|
|
44
|
+
declare function animationObservable({ builder, animation, element, options }: AnimationObservableParams): Observable<void>;
|
|
45
|
+
|
|
46
|
+
type Polygon = Position[];
|
|
47
|
+
declare function polygonRect(topLeft: Position, bottomRight: Position): Polygon;
|
|
48
|
+
declare function polygonRoundedRect(topLeft: Position, bottomRight: Position, radius: number): Polygon;
|
|
49
|
+
declare function polygonArc(center: Position, radius: number, startAngle: number, endAngle: number): Polygon;
|
|
50
|
+
declare function polygonToCss(polygon: Polygon): string;
|
|
51
|
+
declare function maxPossibleRadius(x: number, y: number, w: number, h: number): number;
|
|
52
|
+
|
|
53
|
+
interface CommonCoverOptions {
|
|
54
|
+
color: "transparent" | string;
|
|
55
|
+
style?: Partial<CSSStyleDeclaration>;
|
|
56
|
+
}
|
|
57
|
+
interface SolidCoverOptions extends CommonCoverOptions {
|
|
58
|
+
type: "solid";
|
|
59
|
+
}
|
|
60
|
+
interface CropCoverOptions extends CommonCoverOptions {
|
|
61
|
+
type: "crop";
|
|
62
|
+
/**
|
|
63
|
+
* Element that will be interactive while the cover is visible
|
|
64
|
+
*/
|
|
65
|
+
crop: ElementInput | ObservableInput<Rect | ElementInput>;
|
|
66
|
+
shape: CropShapeOptions;
|
|
67
|
+
expand?: SidesInput;
|
|
68
|
+
contract?: SidesInput;
|
|
69
|
+
disablePointerEvents?: boolean;
|
|
70
|
+
}
|
|
71
|
+
type CropShapeOptions = CropRectOptions | CropCircleOptions | CropShapeCustom;
|
|
72
|
+
interface CropRectOptions {
|
|
73
|
+
type: "rect";
|
|
74
|
+
borderRadius?: number;
|
|
75
|
+
}
|
|
76
|
+
interface CropCircleOptions {
|
|
77
|
+
type: "circle";
|
|
78
|
+
}
|
|
79
|
+
type CropShapeCustom = (container: Rect, crop: Rect) => Polygon;
|
|
80
|
+
interface RevealCoverOptions extends CommonCoverOptions {
|
|
81
|
+
type: "reveal";
|
|
82
|
+
/**
|
|
83
|
+
* Left and right coordinates inside the container
|
|
84
|
+
*/
|
|
85
|
+
origin: {
|
|
86
|
+
left: number;
|
|
87
|
+
top: number;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
type CoverOptions = SolidCoverOptions | CropCoverOptions | RevealCoverOptions;
|
|
91
|
+
declare abstract class CoverRef<O extends CommonCoverOptions, R = void> extends ElementRef<HTMLElement> {
|
|
92
|
+
readonly container: ElementInput;
|
|
93
|
+
readonly options: O;
|
|
94
|
+
protected readonly watcher: RectWatcher;
|
|
95
|
+
constructor(container: ElementInput, options: O, watcher: RectWatcher);
|
|
96
|
+
show(): Observable<R>;
|
|
97
|
+
protected applyStyle(mask: HTMLElement): void;
|
|
98
|
+
protected abstract _show(dest: Subscriber<unknown>): TeardownLogic;
|
|
99
|
+
}
|
|
100
|
+
declare class SolidCoverRef extends CoverRef<SolidCoverOptions> {
|
|
101
|
+
protected _show(dest: Subscriber<unknown>): TeardownLogic;
|
|
102
|
+
}
|
|
103
|
+
declare class CropCoverRef extends CoverRef<CropCoverOptions> {
|
|
104
|
+
#private;
|
|
105
|
+
protected _show(dest: Subscriber<unknown>): TeardownLogic;
|
|
106
|
+
}
|
|
107
|
+
declare class RevealCoverRef extends CoverRef<RevealCoverOptions> {
|
|
108
|
+
protected _show(dest: Subscriber<unknown>): TeardownLogic;
|
|
109
|
+
}
|
|
110
|
+
declare class CoverService {
|
|
111
|
+
#private;
|
|
112
|
+
create(container: ElementInput, options: CoverOptions): SolidCoverRef | CropCoverRef | RevealCoverRef;
|
|
113
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CoverService, never>;
|
|
114
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CoverService>;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export { CoverRef, CoverService, CropCoverRef, RevealCoverRef, Ripple, RippleDirective, SolidCoverRef, animationObservable, maxPossibleRadius, polygonArc, polygonRect, polygonRoundedRect, polygonToCss };
|
|
118
|
+
export type { AnimationObservableParams, CommonCoverOptions, CoverOptions, CropCircleOptions, CropCoverOptions, CropRectOptions, CropShapeCustom, CropShapeOptions, Polygon, RevealCoverOptions, SolidCoverOptions };
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngutil/graphics",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.105",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/animations": "
|
|
6
|
-
"@angular/common": "
|
|
7
|
-
"@angular/core": "
|
|
5
|
+
"@angular/animations": "20.3.13",
|
|
6
|
+
"@angular/common": "20.3.13",
|
|
7
|
+
"@angular/core": "20.3.13",
|
|
8
8
|
"rxjs": "^7.8.1",
|
|
9
|
-
"@ngutil/common": "0.0.
|
|
10
|
-
"@ngutil/style": "0.0.
|
|
9
|
+
"@ngutil/common": "0.0.105",
|
|
10
|
+
"@ngutil/style": "0.0.105"
|
|
11
11
|
},
|
|
12
12
|
"publishConfig": {
|
|
13
13
|
"access": "public",
|
package/cover.service.d.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { ElementRef } from "@angular/core";
|
|
2
|
-
import { Observable, ObservableInput, Subscriber, TeardownLogic } from "rxjs";
|
|
3
|
-
import { ElementInput } from "@ngutil/common";
|
|
4
|
-
import { Rect, RectWatcher, SidesInput } from "@ngutil/style";
|
|
5
|
-
import { Polygon } from "./util";
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export interface CommonCoverOptions {
|
|
8
|
-
color: "transparent" | string;
|
|
9
|
-
style?: Partial<CSSStyleDeclaration>;
|
|
10
|
-
}
|
|
11
|
-
export interface SolidCoverOptions extends CommonCoverOptions {
|
|
12
|
-
type: "solid";
|
|
13
|
-
}
|
|
14
|
-
export interface CropCoverOptions extends CommonCoverOptions {
|
|
15
|
-
type: "crop";
|
|
16
|
-
/**
|
|
17
|
-
* Element that will be interactive while the cover is visible
|
|
18
|
-
*/
|
|
19
|
-
crop: ElementInput | ObservableInput<Rect | ElementInput>;
|
|
20
|
-
shape: CropShapeOptions;
|
|
21
|
-
expand?: SidesInput;
|
|
22
|
-
contract?: SidesInput;
|
|
23
|
-
disablePointerEvents?: boolean;
|
|
24
|
-
}
|
|
25
|
-
export type CropShapeOptions = CropRectOptions | CropCircleOptions | CropShapeCustom;
|
|
26
|
-
export interface CropRectOptions {
|
|
27
|
-
type: "rect";
|
|
28
|
-
borderRadius?: number;
|
|
29
|
-
}
|
|
30
|
-
export interface CropCircleOptions {
|
|
31
|
-
type: "circle";
|
|
32
|
-
}
|
|
33
|
-
export type CropShapeCustom = (container: Rect, crop: Rect) => Polygon;
|
|
34
|
-
export interface RevealCoverOptions extends CommonCoverOptions {
|
|
35
|
-
type: "reveal";
|
|
36
|
-
/**
|
|
37
|
-
* Left and right coordinates inside the container
|
|
38
|
-
*/
|
|
39
|
-
origin: {
|
|
40
|
-
left: number;
|
|
41
|
-
top: number;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
export type CoverOptions = SolidCoverOptions | CropCoverOptions | RevealCoverOptions;
|
|
45
|
-
export declare abstract class CoverRef<O extends CommonCoverOptions, R = void> extends ElementRef<HTMLElement> {
|
|
46
|
-
readonly container: ElementInput;
|
|
47
|
-
readonly options: O;
|
|
48
|
-
protected readonly watcher: RectWatcher;
|
|
49
|
-
constructor(container: ElementInput, options: O, watcher: RectWatcher);
|
|
50
|
-
show(): Observable<R>;
|
|
51
|
-
protected applyStyle(mask: HTMLElement): void;
|
|
52
|
-
protected abstract _show(dest: Subscriber<unknown>): TeardownLogic;
|
|
53
|
-
}
|
|
54
|
-
export declare class SolidCoverRef extends CoverRef<SolidCoverOptions> {
|
|
55
|
-
protected _show(dest: Subscriber<unknown>): TeardownLogic;
|
|
56
|
-
}
|
|
57
|
-
export declare class CropCoverRef extends CoverRef<CropCoverOptions> {
|
|
58
|
-
#private;
|
|
59
|
-
protected _show(dest: Subscriber<unknown>): TeardownLogic;
|
|
60
|
-
}
|
|
61
|
-
export declare class RevealCoverRef extends CoverRef<RevealCoverOptions> {
|
|
62
|
-
protected _show(dest: Subscriber<unknown>): TeardownLogic;
|
|
63
|
-
}
|
|
64
|
-
export declare class CoverService {
|
|
65
|
-
#private;
|
|
66
|
-
create(container: ElementInput, options: CoverOptions): SolidCoverRef | CropCoverRef | RevealCoverRef;
|
|
67
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CoverService, never>;
|
|
68
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CoverService>;
|
|
69
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ElementRef, NgZone, TemplateRef } from "@angular/core";
|
|
2
|
-
import { Destructible, IDisposable } from "@ngutil/common";
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class RippleDirective extends Destructible {
|
|
5
|
-
#private;
|
|
6
|
-
private readonly tplRef;
|
|
7
|
-
private readonly zone;
|
|
8
|
-
private readonly el;
|
|
9
|
-
constructor(tplRef: TemplateRef<any>, zone: NgZone, el: ElementRef<Node>);
|
|
10
|
-
begin(event: MouseEvent): void;
|
|
11
|
-
end(): void;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RippleDirective, never>;
|
|
13
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RippleDirective, "ng-template[nuRipple]", ["nuRipple"], {}, {}, never, never, true, never>;
|
|
14
|
-
}
|
|
15
|
-
type RippleConfig = {
|
|
16
|
-
x: number;
|
|
17
|
-
y: number;
|
|
18
|
-
w: number;
|
|
19
|
-
h: number;
|
|
20
|
-
r: number;
|
|
21
|
-
d: number;
|
|
22
|
-
};
|
|
23
|
-
export declare class Ripple implements IDisposable {
|
|
24
|
-
#private;
|
|
25
|
-
readonly onDestroy: () => void;
|
|
26
|
-
readonly el: HTMLDivElement;
|
|
27
|
-
readonly isRunning: boolean;
|
|
28
|
-
constructor(config: RippleConfig, zone: NgZone, onDestroy: () => void);
|
|
29
|
-
start(): void;
|
|
30
|
-
autoDestroy: () => void;
|
|
31
|
-
dispose(): void;
|
|
32
|
-
}
|
|
33
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AnimationBuilder, AnimationMetadata, AnimationOptions } from "@angular/animations";
|
|
2
|
-
import { Observable } from "rxjs";
|
|
3
|
-
import { ElementInput } from "@ngutil/common";
|
|
4
|
-
export interface AnimationObservableParams {
|
|
5
|
-
builder: AnimationBuilder;
|
|
6
|
-
animation: AnimationMetadata | AnimationMetadata[];
|
|
7
|
-
element: ElementInput;
|
|
8
|
-
options?: AnimationOptions;
|
|
9
|
-
}
|
|
10
|
-
export declare function animationObservable({ builder, animation, element, options }: AnimationObservableParams): Observable<void>;
|
package/util/index.d.ts
DELETED
package/util/polygon.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Position } from "@ngutil/style";
|
|
2
|
-
export type Polygon = Position[];
|
|
3
|
-
export declare function polygonRect(topLeft: Position, bottomRight: Position): Polygon;
|
|
4
|
-
export declare function polygonRoundedRect(topLeft: Position, bottomRight: Position, radius: number): Polygon;
|
|
5
|
-
export declare function polygonArc(center: Position, radius: number, startAngle: number, endAngle: number): Polygon;
|
|
6
|
-
export declare function polygonToCss(polygon: Polygon): string;
|
|
7
|
-
export declare function maxPossibleRadius(x: number, y: number, w: number, h: number): number;
|