Repository: vdolek/angular-resize-event
Branch: master
Commit: d577ba9f01ba
Files: 32
Total size: 24.3 KB
Directory structure:
gitextract_9dohus3n/
├── .editorconfig
├── .github/
│ └── workflows/
│ ├── ci.yml
│ └── npm-publish.yml
├── .gitignore
├── LICENSE
├── README.md
├── angular.json
├── package.json
├── playground/
│ ├── .browserslistrc
│ ├── .editorconfig
│ ├── angular.json
│ ├── package.json
│ ├── src/
│ │ ├── app/
│ │ │ ├── app.component.html
│ │ │ ├── app.component.scss
│ │ │ ├── app.component.ts
│ │ │ └── app.module.ts
│ │ ├── index.html
│ │ ├── main.ts
│ │ ├── polyfills.ts
│ │ └── styles.scss
│ ├── tsconfig.app.json
│ └── tsconfig.json
├── projects/
│ └── angular-resize-event/
│ ├── README.md
│ ├── ng-package.json
│ ├── package.json
│ ├── src/
│ │ ├── lib/
│ │ │ ├── angular-resize-event.module.ts
│ │ │ ├── resized.directive.ts
│ │ │ └── resized.event.ts
│ │ └── public-api.ts
│ ├── tsconfig.lib.json
│ └── tsconfig.lib.prod.json
└── tsconfig.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.ts]
quote_type = single
[*.md]
max_line_length = off
trim_trailing_whitespace = false
================================================
FILE: .github/workflows/ci.yml
================================================
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: CI
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
# - run: npm run lint
- run: npm run build
# - run: npm test
================================================
FILE: .github/workflows/npm-publish.yml
================================================
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Publish Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
- run: npm ci
- run: npm run build
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm publish
working-directory: dist/angular-resize-event
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
# publish-gpr:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# with:
# node-version: 16
# registry-url: https://npm.pkg.github.com/
# - run: npm ci
# - run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
================================================
FILE: .gitignore
================================================
# See http://help.github.com/ignore-files/ for more about ignoring files.
# Compiled output
/dist
/tmp
/out-tsc
/bazel-out
# Node
/node_modules
npm-debug.log
yarn-error.log
# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2020 Martin Volek
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# Angular Resize Event
[](https://github.com/vdolek/angular-resize-event)
[](https://www.npmjs.com/package/angular-resize-event)
[](https://github.com/vdolek/angular-resize-event/actions?query=workflow%3ACI)
[](https://www.npmjs.com/package/angular-resize-event)
[](https://snyk.io/test/github/vdolek/angular-resize-event)
Angular 14 directive for detecting changes of an element size.
It is as simple as:
```html
<div (resized)="onResized($event)"></div>
```
It internally uses browser native [`ResizeObserver`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver). Therefore it is not supported in IE.
For Angular 11 you can use version 2.1.0 which internally uses uses `ResizeSensor` from [CSS Element Queries](https://github.com/marcj/css-element-queries) that is supported in IE.
## Playground
[StackBlitz playground](https://stackblitz.com/edit/angular-resize-event-playground?file=src/app/app.component.html)
## Using the library
Import the library in any Angular application by running:
```bash
$ npm install angular-resize-event
```
and then from your Angular `AppModule`:
```typescript
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// Import the library module
import { AngularResizeEventModule } from 'angular-resize-event';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
// Specify AngularResizeEventModule library as an import
AngularResizeEventModule
],
providers: [],
bootstrap: [ AppComponent ]
})
export class AppModule { }
```
Once your library is imported, you can use its `resized` directive in your Angular application:
```html
<div (resized)="onResized($event)"></div>
```
```typescript
import { Component } from '@angular/core';
// Import the resized event model
import { ResizedEvent } from 'angular-resize-event';
@Component({...})
class MyComponent {
width: number;
height: number;
onResized(event: ResizedEvent) {
this.width = event.newRect.width;
this.height = event.newRect.height;
}
}
```
## License
MIT © [Martin Volek](mailto:martin@vdolek.cz)
================================================
FILE: angular.json
================================================
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"angular-resize-event": {
"projectType": "library",
"root": "projects/angular-resize-event",
"sourceRoot": "projects/angular-resize-event/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "projects/angular-resize-event/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/angular-resize-event/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/angular-resize-event/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/angular-resize-event/src/test.ts",
"tsConfig": "projects/angular-resize-event/tsconfig.spec.json",
"karmaConfig": "projects/angular-resize-event/karma.conf.js"
}
}
}
}
},
"cli": {
"analytics": false
}
}
================================================
FILE: package.json
================================================
{
"name": "angular-resize-event",
"version": "3.2.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"postbuild": "cp README.md dist/angular-resize-event/README.md"
},
"private": true,
"dependencies": {
"@angular/animations": "^14.0.2",
"@angular/common": "^14.0.2",
"@angular/compiler": "^14.0.2",
"@angular/core": "^14.0.2",
"@angular/forms": "^14.0.2",
"@angular/platform-browser": "^14.0.2",
"@angular/platform-browser-dynamic": "^14.0.2",
"@angular/router": "^14.0.2",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.0.2",
"@angular/cli": "^14.0.2",
"@angular/compiler-cli": "^14.0.2",
"@types/jasmine": "~4.0.0",
"@types/node": "^12.11.1",
"jasmine-core": "~4.1.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"ng-packagr": "^14.0.2",
"typescript": "~4.7.3"
}
}
================================================
FILE: playground/.browserslistrc
================================================
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support
# You can see what browsers were selected by your queries by running:
# npx browserslist
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
================================================
FILE: playground/.editorconfig
================================================
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.ts]
quote_type = single
[*.md]
max_line_length = off
trim_trailing_whitespace = false
================================================
FILE: playground/angular.json
================================================
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"playground": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
},
"@schematics/angular:application": {
"strict": true
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/playground",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"preserveSymlinks": true,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "playground:build:production"
},
"development": {
"browserTarget": "playground:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "playground:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
}
}
}
}
},
"defaultProject": "playground"
}
================================================
FILE: playground/package.json
================================================
{
"name": "playground",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"@angular/animations": "~13.1.0",
"@angular/common": "~13.1.0",
"@angular/compiler": "~13.1.0",
"@angular/core": "~13.1.0",
"@angular/forms": "~13.1.0",
"@angular/platform-browser": "~13.1.0",
"@angular/platform-browser-dynamic": "~13.1.0",
"@angular/router": "~13.1.0",
"rxjs": "~7.4.0",
"angular-resize-event": "file:../dist/angular-resize-event",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.1.1",
"@angular/cli": "~13.1.1",
"@angular/compiler-cli": "~13.1.0",
"@types/jasmine": "~3.8.0",
"@types/node": "^12.11.1",
"jasmine-core": "~3.8.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "~4.5.2"
}
}
================================================
FILE: playground/src/app/app.component.html
================================================
<div (resized)="onResized($event)">
{{ width }} x {{ height }}
</div>
================================================
FILE: playground/src/app/app.component.scss
================================================
div {
position: absolute;
height: 50%;
width: 50%;
top: 0;
left: 0;
background-color: red;
border: 2px solid black;
}
================================================
FILE: playground/src/app/app.component.ts
================================================
import { Component } from '@angular/core';
import { ResizedEvent } from 'angular-resize-event';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
width = 0;
height = 0;
onResized(event: ResizedEvent) {
console.warn('event', event);
this.width = event.newRect.width;
this.height = event.newRect.height;
}
}
================================================
FILE: playground/src/app/app.module.ts
================================================
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { AngularResizeEventModule } from 'angular-resize-event';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AngularResizeEventModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
================================================
FILE: playground/src/index.html
================================================
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Playground</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
</html>
================================================
FILE: playground/src/main.ts
================================================
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
================================================
FILE: playground/src/polyfills.ts
================================================
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/**
* IE11 requires the following for NgClass support on SVG elements
*/
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/
================================================
FILE: playground/src/styles.scss
================================================
/* You can add global styles to this file, and also import other style files */
================================================
FILE: playground/tsconfig.app.json
================================================
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": [
"src/main.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.d.ts"
]
}
================================================
FILE: playground/tsconfig.json
================================================
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "es2017",
"module": "es2020",
"lib": [
"es2018",
"dom"
]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}
================================================
FILE: projects/angular-resize-event/README.md
================================================
# AngularResizeEvent
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.0.2.
## Code scaffolding
Run `ng generate component component-name --project angular-resize-event` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project angular-resize-event`.
> Note: Don't forget to add `--project angular-resize-event` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build angular-resize-event` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build angular-resize-event`, go to the dist folder `cd dist/angular-resize-event` and run `npm publish`.
## Running unit tests
Run `ng test angular-resize-event` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
================================================
FILE: projects/angular-resize-event/ng-package.json
================================================
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/angular-resize-event",
"lib": {
"entryFile": "src/public-api.ts"
}
}
================================================
FILE: projects/angular-resize-event/package.json
================================================
{
"name": "angular-resize-event",
"version": "3.2.0",
"repository": {
"type": "git",
"url": "https://github.com/vdolek/angular-resize-event"
},
"homepage": "https://github.com/vdolek/angular-resize-event#readme",
"author": {
"name": "Martin Volek",
"email": "martin@vdolek.cz"
},
"keywords": [
"angular",
"resized",
"event"
],
"license": "MIT",
"peerDependencies": {
"@angular/common": ">= 12.2.0 < 15",
"@angular/core": ">= 12.2.0 < 15"
},
"dependencies": {
"tslib": "^2.3.0"
}
}
================================================
FILE: projects/angular-resize-event/src/lib/angular-resize-event.module.ts
================================================
import { NgModule } from '@angular/core';
import { ResizedDirective } from './resized.directive';
@NgModule({
declarations: [
ResizedDirective
],
imports: [
],
exports: [
ResizedDirective
]
})
export class AngularResizeEventModule {}
================================================
FILE: projects/angular-resize-event/src/lib/resized.directive.ts
================================================
import { Directive, ElementRef, EventEmitter, NgZone, OnDestroy, OnInit, Output } from '@angular/core';
import { ResizedEvent } from './resized.event';
@Directive({
selector: '[resized]'
})
export class ResizedDirective implements OnInit, OnDestroy {
private observer: ResizeObserver;
private oldRect?: DOMRectReadOnly;
@Output()
public readonly resized;
public constructor(
private readonly element: ElementRef,
private readonly zone: NgZone
)
{
this.resized = new EventEmitter<ResizedEvent>();
this.observer = new ResizeObserver(entries => this.zone.run(() => this.observe(entries)));
}
public ngOnInit(): void {
this.observer.observe(this.element.nativeElement)
}
public ngOnDestroy(): void {
this.observer.disconnect();
}
private observe(entries: ResizeObserverEntry[]): void {
const domSize = entries[0];
const resizedEvent = new ResizedEvent(domSize.contentRect, this.oldRect);
this.oldRect = domSize.contentRect;
this.resized.emit(resizedEvent);
}
}
================================================
FILE: projects/angular-resize-event/src/lib/resized.event.ts
================================================
export class ResizedEvent {
public newRect: DOMRectReadOnly;
public oldRect?: DOMRectReadOnly;
public isFirst: boolean;
public constructor(newRect: DOMRectReadOnly, oldRect: DOMRectReadOnly | undefined) {
this.newRect = newRect;
this.oldRect = oldRect;
this.isFirst = oldRect == null;
}
}
================================================
FILE: projects/angular-resize-event/src/public-api.ts
================================================
/*
* Public API Surface of angular-resize-event
*/
export { ResizedEvent } from './lib/resized.event';
export * from './lib/resized.directive';
export * from './lib/angular-resize-event.module';
================================================
FILE: projects/angular-resize-event/tsconfig.lib.json
================================================
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"target": "es2020",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"types": [],
"lib": [
"es2020",
"dom"
]
}
}
================================================
FILE: projects/angular-resize-event/tsconfig.lib.prod.json
================================================
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"compilationMode": "partial"
}
}
================================================
FILE: tsconfig.json
================================================
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"compileOnSave": false,
"compilerOptions": {
"paths": {
"angular-resize-event": [
"dist/angular-resize-event/angular-resize-event",
"dist/angular-resize-event"
]
},
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "es2020",
"module": "es2020",
"lib": [
"es2020",
"dom"
]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}
gitextract_9dohus3n/ ├── .editorconfig ├── .github/ │ └── workflows/ │ ├── ci.yml │ └── npm-publish.yml ├── .gitignore ├── LICENSE ├── README.md ├── angular.json ├── package.json ├── playground/ │ ├── .browserslistrc │ ├── .editorconfig │ ├── angular.json │ ├── package.json │ ├── src/ │ │ ├── app/ │ │ │ ├── app.component.html │ │ │ ├── app.component.scss │ │ │ ├── app.component.ts │ │ │ └── app.module.ts │ │ ├── index.html │ │ ├── main.ts │ │ ├── polyfills.ts │ │ └── styles.scss │ ├── tsconfig.app.json │ └── tsconfig.json ├── projects/ │ └── angular-resize-event/ │ ├── README.md │ ├── ng-package.json │ ├── package.json │ ├── src/ │ │ ├── lib/ │ │ │ ├── angular-resize-event.module.ts │ │ │ ├── resized.directive.ts │ │ │ └── resized.event.ts │ │ └── public-api.ts │ ├── tsconfig.lib.json │ └── tsconfig.lib.prod.json └── tsconfig.json
SYMBOL INDEX (11 symbols across 5 files)
FILE: playground/src/app/app.component.ts
class AppComponent (line 9) | class AppComponent {
method onResized (line 13) | onResized(event: ResizedEvent) {
FILE: playground/src/app/app.module.ts
class AppModule (line 18) | class AppModule { }
FILE: projects/angular-resize-event/src/lib/angular-resize-event.module.ts
class AngularResizeEventModule (line 14) | class AngularResizeEventModule {}
FILE: projects/angular-resize-event/src/lib/resized.directive.ts
class ResizedDirective (line 7) | class ResizedDirective implements OnInit, OnDestroy {
method constructor (line 14) | public constructor(
method ngOnInit (line 23) | public ngOnInit(): void {
method ngOnDestroy (line 27) | public ngOnDestroy(): void {
method observe (line 31) | private observe(entries: ResizeObserverEntry[]): void {
FILE: projects/angular-resize-event/src/lib/resized.event.ts
class ResizedEvent (line 1) | class ResizedEvent {
method constructor (line 6) | public constructor(newRect: DOMRectReadOnly, oldRect: DOMRectReadOnly ...
Condensed preview — 32 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (28K chars).
[
{
"path": ".editorconfig",
"chars": 274,
"preview": "# Editor configuration, see https://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size ="
},
{
"path": ".github/workflows/ci.yml",
"chars": 681,
"preview": "# This workflow will do a clean install of node dependencies, build the source code and run tests across different versi"
},
{
"path": ".github/workflows/npm-publish.yml",
"chars": 1283,
"preview": "# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created\n# For "
},
{
"path": ".gitignore",
"chars": 548,
"preview": "# See http://help.github.com/ignore-files/ for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-"
},
{
"path": "LICENSE",
"chars": 1069,
"preview": "MIT License\n\nCopyright (c) 2020 Martin Volek\n\nPermission is hereby granted, free of charge, to any person obtaining a co"
},
{
"path": "README.md",
"chars": 2620,
"preview": "# Angular Resize Event\n\n[=\"onResized($event)\">\n {{ width }} x {{ height }}\n</div>\n"
},
{
"path": "playground/src/app/app.component.scss",
"chars": 132,
"preview": "div {\n position: absolute;\n height: 50%;\n width: 50%;\n top: 0;\n left: 0;\n background-color: red;\n border: 2px sol"
},
{
"path": "playground/src/app/app.component.ts",
"chars": 423,
"preview": "import { Component } from '@angular/core';\nimport { ResizedEvent } from 'angular-resize-event';\n\n@Component({\n selector"
},
{
"path": "playground/src/app/app.module.ts",
"chars": 409,
"preview": "import { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\n\nimport { AppCompon"
},
{
"path": "playground/src/index.html",
"chars": 296,
"preview": "<!doctype html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\">\n <title>Playground</title>\n <base href=\"/\">\n <meta n"
},
{
"path": "playground/src/main.ts",
"chars": 213,
"preview": "import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module"
},
{
"path": "playground/src/polyfills.ts",
"chars": 2820,
"preview": "/**\n * This file includes polyfills needed by Angular and is loaded before the app.\n * You can add your own extra polyfi"
},
{
"path": "playground/src/styles.scss",
"chars": 80,
"preview": "/* You can add global styles to this file, and also import other style files */\n"
},
{
"path": "playground/tsconfig.app.json",
"chars": 287,
"preview": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n \"extends\": \"./tsconfig.json\",\n \"compil"
},
{
"path": "playground/tsconfig.json",
"chars": 783,
"preview": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n \"compileOnSave\": false,\n \"compilerOpti"
},
{
"path": "projects/angular-resize-event/README.md",
"chars": 1089,
"preview": "# AngularResizeEvent\n\nThis library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.0"
},
{
"path": "projects/angular-resize-event/ng-package.json",
"chars": 169,
"preview": "{\n \"$schema\": \"../../node_modules/ng-packagr/ng-package.schema.json\",\n \"dest\": \"../../dist/angular-resize-event\",\n \"l"
},
{
"path": "projects/angular-resize-event/package.json",
"chars": 549,
"preview": "{\n \"name\": \"angular-resize-event\",\n \"version\": \"3.2.0\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://githu"
},
{
"path": "projects/angular-resize-event/src/lib/angular-resize-event.module.ts",
"chars": 255,
"preview": "import { NgModule } from '@angular/core';\nimport { ResizedDirective } from './resized.directive';\n\n@NgModule({\n declara"
},
{
"path": "projects/angular-resize-event/src/lib/resized.directive.ts",
"chars": 1034,
"preview": "import { Directive, ElementRef, EventEmitter, NgZone, OnDestroy, OnInit, Output } from '@angular/core';\nimport { Resized"
},
{
"path": "projects/angular-resize-event/src/lib/resized.event.ts",
"chars": 334,
"preview": "export class ResizedEvent {\n public newRect: DOMRectReadOnly;\n public oldRect?: DOMRectReadOnly;\n public isFirs"
},
{
"path": "projects/angular-resize-event/src/public-api.ts",
"chars": 198,
"preview": "/*\n * Public API Surface of angular-resize-event\n */\n\nexport { ResizedEvent } from './lib/resized.event';\nexport * from "
},
{
"path": "projects/angular-resize-event/tsconfig.lib.json",
"chars": 347,
"preview": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n \"extends\": \"../../tsconfig.json\",\n \"co"
},
{
"path": "projects/angular-resize-event/tsconfig.lib.prod.json",
"chars": 240,
"preview": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n \"extends\": \"./tsconfig.lib.json\",\n \"co"
},
{
"path": "tsconfig.json",
"chars": 1019,
"preview": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n \"compileOnSave\": false,\n \"compilerOpti"
}
]
About this extraction
This page contains the full source code of the vdolek/angular-resize-event GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 32 files (24.3 KB), approximately 7.2k tokens, and a symbol index with 11 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.