[
  {
    "path": ".editorconfig",
    "content": "# Editor configuration, see https://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = 2\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[*.ts]\nquote_type = single\n\n[*.md]\nmax_line_length = off\ntrim_trailing_whitespace = false\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "content": "# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node\n# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions\n\nname: CI\n\non:\n  push:\n  pull_request:\n\njobs:\n  build:\n\n    runs-on: ubuntu-latest\n\n    strategy:\n      matrix:\n        node-version: [14.x, 16.x]\n\n    steps:\n    - uses: actions/checkout@v2\n    - name: Use Node.js ${{ matrix.node-version }}\n      uses: actions/setup-node@v1\n      with:\n        node-version: ${{ matrix.node-version }}\n    - run: npm ci\n#    - run: npm run lint\n    - run: npm run build\n#    - run: npm test\n"
  },
  {
    "path": ".github/workflows/npm-publish.yml",
    "content": "# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created\n# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages\n\nname: Publish Package\n\non:\n  release:\n    types: [created]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/setup-node@v1\n        with:\n          node-version: 16\n      - run: npm ci\n      - run: npm run build\n\n  publish-npm:\n    needs: build\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/setup-node@v1\n        with:\n          node-version: 16\n          registry-url: https://registry.npmjs.org/\n      - run: npm ci\n      - run: npm run build\n      - run: npm publish\n        working-directory: dist/angular-resize-event\n        env:\n          NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}\n\n#  publish-gpr:\n#    needs: build\n#    runs-on: ubuntu-latest\n#    steps:\n#      - uses: actions/checkout@v2\n#      - uses: actions/setup-node@v1\n#        with:\n#          node-version: 16\n#          registry-url: https://npm.pkg.github.com/\n#      - run: npm ci\n#      - run: npm publish\n#        env:\n#          NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}\n"
  },
  {
    "path": ".gitignore",
    "content": "# 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-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n\n# System Files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2020 Martin Volek\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Angular Resize Event\n\n[![github version](https://img.shields.io/github/package-json/v/vdolek/angular-resize-event/master?label=github)](https://github.com/vdolek/angular-resize-event)\n[![npm version](https://img.shields.io/npm/v/angular-resize-event)](https://www.npmjs.com/package/angular-resize-event)\n[![build status](https://img.shields.io/github/workflow/status/vdolek/angular-resize-event/CI/master)](https://github.com/vdolek/angular-resize-event/actions?query=workflow%3ACI)\n[![downloads](https://img.shields.io/npm/dt/angular-resize-event)](https://www.npmjs.com/package/angular-resize-event)\n[![vulnerabilities](https://img.shields.io/snyk/vulnerabilities/github/vdolek/angular-resize-event)](https://snyk.io/test/github/vdolek/angular-resize-event)\n\nAngular 14 directive for detecting changes of an element size.\n\nIt is as simple as:\n\n```html\n<div (resized)=\"onResized($event)\"></div>\n```\n\nIt internally uses browser native [`ResizeObserver`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver). Therefore it is not supported in IE.\n\nFor 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.\n\n## Playground\n\n[StackBlitz playground](https://stackblitz.com/edit/angular-resize-event-playground?file=src/app/app.component.html)\n\n## Using the library\n\nImport the library in any Angular application by running:\n\n```bash\n$ npm install angular-resize-event\n```\n\nand then from your Angular `AppModule`:\n\n```typescript\nimport { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\nimport { AppComponent } from './app.component';\n\n// Import the library module\nimport { AngularResizeEventModule } from 'angular-resize-event';\n\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [\n    BrowserModule,\n\n    // Specify AngularResizeEventModule library as an import\n    AngularResizeEventModule\n  ],\n  providers: [],\n  bootstrap: [ AppComponent ]\n})\nexport class AppModule { }\n```\n\nOnce your library is imported, you can use its `resized` directive in your Angular application:\n\n```html\n<div (resized)=\"onResized($event)\"></div>\n```\n\n```typescript\nimport { Component } from '@angular/core';\n\n// Import the resized event model\nimport { ResizedEvent } from 'angular-resize-event';\n\n@Component({...})\nclass MyComponent {\n  width: number;\n  height: number;\n\n  onResized(event: ResizedEvent) {\n    this.width = event.newRect.width;\n    this.height = event.newRect.height;\n  }\n}\n```\n\n## License\n\nMIT © [Martin Volek](mailto:martin@vdolek.cz)\n"
  },
  {
    "path": "angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"angular-resize-event\": {\n      \"projectType\": \"library\",\n      \"root\": \"projects/angular-resize-event\",\n      \"sourceRoot\": \"projects/angular-resize-event/src\",\n      \"prefix\": \"lib\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular-devkit/build-angular:ng-packagr\",\n          \"options\": {\n            \"project\": \"projects/angular-resize-event/ng-package.json\"\n          },\n          \"configurations\": {\n            \"production\": {\n              \"tsConfig\": \"projects/angular-resize-event/tsconfig.lib.prod.json\"\n            },\n            \"development\": {\n              \"tsConfig\": \"projects/angular-resize-event/tsconfig.lib.json\"\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"test\": {\n          \"builder\": \"@angular-devkit/build-angular:karma\",\n          \"options\": {\n            \"main\": \"projects/angular-resize-event/src/test.ts\",\n            \"tsConfig\": \"projects/angular-resize-event/tsconfig.spec.json\",\n            \"karmaConfig\": \"projects/angular-resize-event/karma.conf.js\"\n          }\n        }\n      }\n    }\n  },\n  \"cli\": {\n    \"analytics\": false\n  }\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"angular-resize-event\",\n  \"version\": \"3.2.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"watch\": \"ng build --watch --configuration development\",\n    \"test\": \"ng test\",\n    \"postbuild\": \"cp README.md dist/angular-resize-event/README.md\"\n  },\n  \"private\": true,\n  \"dependencies\": {\n    \"@angular/animations\": \"^14.0.2\",\n    \"@angular/common\": \"^14.0.2\",\n    \"@angular/compiler\": \"^14.0.2\",\n    \"@angular/core\": \"^14.0.2\",\n    \"@angular/forms\": \"^14.0.2\",\n    \"@angular/platform-browser\": \"^14.0.2\",\n    \"@angular/platform-browser-dynamic\": \"^14.0.2\",\n    \"@angular/router\": \"^14.0.2\",\n    \"rxjs\": \"~7.5.0\",\n    \"tslib\": \"^2.3.0\",\n    \"zone.js\": \"~0.11.4\"\n  },\n  \"devDependencies\": {\n    \"@angular-devkit/build-angular\": \"^14.0.2\",\n    \"@angular/cli\": \"^14.0.2\",\n    \"@angular/compiler-cli\": \"^14.0.2\",\n    \"@types/jasmine\": \"~4.0.0\",\n    \"@types/node\": \"^12.11.1\",\n    \"jasmine-core\": \"~4.1.0\",\n    \"karma\": \"~6.3.0\",\n    \"karma-chrome-launcher\": \"~3.1.0\",\n    \"karma-coverage\": \"~2.2.0\",\n    \"karma-jasmine\": \"~5.0.0\",\n    \"karma-jasmine-html-reporter\": \"~1.7.0\",\n    \"ng-packagr\": \"^14.0.2\",\n    \"typescript\": \"~4.7.3\"\n  }\n}\n"
  },
  {
    "path": "playground/.browserslistrc",
    "content": "# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.\n# For additional information regarding the format and rule options, please see:\n# https://github.com/browserslist/browserslist#queries\n\n# For the full list of supported browsers by the Angular framework, please see:\n# https://angular.io/guide/browser-support\n\n# You can see what browsers were selected by your queries by running:\n#   npx browserslist\n\nlast 1 Chrome version\nlast 1 Firefox version\nlast 2 Edge major versions\nlast 2 Safari major versions\nlast 2 iOS major versions\nFirefox ESR\nnot IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.\n"
  },
  {
    "path": "playground/.editorconfig",
    "content": "# Editor configuration, see https://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = 2\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[*.ts]\nquote_type = single\n\n[*.md]\nmax_line_length = off\ntrim_trailing_whitespace = false\n"
  },
  {
    "path": "playground/angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"playground\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"style\": \"scss\"\n        },\n        \"@schematics/angular:application\": {\n          \"strict\": true\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular-devkit/build-angular:browser\",\n          \"options\": {\n            \"outputPath\": \"dist/playground\",\n            \"index\": \"src/index.html\",\n            \"main\": \"src/main.ts\",\n            \"polyfills\": \"src/polyfills.ts\",\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"inlineStyleLanguage\": \"scss\",\n            \"preserveSymlinks\": true,\n            \"assets\": [\n              \"src/favicon.ico\",\n              \"src/assets\"\n            ],\n            \"styles\": [\n              \"src/styles.scss\"\n            ],\n            \"scripts\": []\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kb\",\n                  \"maximumError\": \"1mb\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"2kb\",\n                  \"maximumError\": \"4kb\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"buildOptimizer\": false,\n              \"optimization\": false,\n              \"vendorChunk\": true,\n              \"extractLicenses\": false,\n              \"sourceMap\": true,\n              \"namedChunks\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular-devkit/build-angular:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"browserTarget\": \"playground:build:production\"\n            },\n            \"development\": {\n              \"browserTarget\": \"playground:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        },\n        \"extract-i18n\": {\n          \"builder\": \"@angular-devkit/build-angular:extract-i18n\",\n          \"options\": {\n            \"browserTarget\": \"playground:build\"\n          }\n        },\n        \"test\": {\n          \"builder\": \"@angular-devkit/build-angular:karma\",\n          \"options\": {\n            \"main\": \"src/test.ts\",\n            \"polyfills\": \"src/polyfills.ts\",\n            \"tsConfig\": \"tsconfig.spec.json\",\n            \"karmaConfig\": \"karma.conf.js\",\n            \"inlineStyleLanguage\": \"scss\",\n            \"assets\": [\n              \"src/favicon.ico\",\n              \"src/assets\"\n            ],\n            \"styles\": [\n              \"src/styles.scss\"\n            ],\n            \"scripts\": []\n          }\n        }\n      }\n    }\n  },\n  \"defaultProject\": \"playground\"\n}\n"
  },
  {
    "path": "playground/package.json",
    "content": "{\n  \"name\": \"playground\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"watch\": \"ng build --watch --configuration development\",\n    \"test\": \"ng test\"\n  },\n  \"private\": true,\n  \"dependencies\": {\n    \"@angular/animations\": \"~13.1.0\",\n    \"@angular/common\": \"~13.1.0\",\n    \"@angular/compiler\": \"~13.1.0\",\n    \"@angular/core\": \"~13.1.0\",\n    \"@angular/forms\": \"~13.1.0\",\n    \"@angular/platform-browser\": \"~13.1.0\",\n    \"@angular/platform-browser-dynamic\": \"~13.1.0\",\n    \"@angular/router\": \"~13.1.0\",\n    \"rxjs\": \"~7.4.0\",\n    \"angular-resize-event\": \"file:../dist/angular-resize-event\",\n    \"tslib\": \"^2.3.0\",\n    \"zone.js\": \"~0.11.4\"\n  },\n  \"devDependencies\": {\n    \"@angular-devkit/build-angular\": \"~13.1.1\",\n    \"@angular/cli\": \"~13.1.1\",\n    \"@angular/compiler-cli\": \"~13.1.0\",\n    \"@types/jasmine\": \"~3.8.0\",\n    \"@types/node\": \"^12.11.1\",\n    \"jasmine-core\": \"~3.8.0\",\n    \"karma\": \"~6.3.0\",\n    \"karma-chrome-launcher\": \"~3.1.0\",\n    \"karma-coverage\": \"~2.0.3\",\n    \"karma-jasmine\": \"~4.0.0\",\n    \"karma-jasmine-html-reporter\": \"~1.7.0\",\n    \"typescript\": \"~4.5.2\"\n  }\n}\n"
  },
  {
    "path": "playground/src/app/app.component.html",
    "content": "<div (resized)=\"onResized($event)\">\n  {{ width }} x {{ height }}\n</div>\n"
  },
  {
    "path": "playground/src/app/app.component.scss",
    "content": "div {\n  position: absolute;\n  height: 50%;\n  width: 50%;\n  top: 0;\n  left: 0;\n  background-color: red;\n  border: 2px solid black;\n}\n"
  },
  {
    "path": "playground/src/app/app.component.ts",
    "content": "import { Component } from '@angular/core';\nimport { ResizedEvent } from 'angular-resize-event';\n\n@Component({\n  selector: 'app-root',\n  templateUrl: './app.component.html',\n  styleUrls: ['./app.component.scss']\n})\nexport class AppComponent {\n  width = 0;\n  height = 0;\n\n  onResized(event: ResizedEvent) {\n    console.warn('event', event);\n    this.width = event.newRect.width;\n    this.height = event.newRect.height;\n  }\n}\n"
  },
  {
    "path": "playground/src/app/app.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\n\nimport { AppComponent } from './app.component';\nimport { AngularResizeEventModule } from 'angular-resize-event';\n\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [\n    BrowserModule,\n    AngularResizeEventModule\n  ],\n  providers: [],\n  bootstrap: [AppComponent]\n})\nexport class AppModule { }\n"
  },
  {
    "path": "playground/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"utf-8\">\n  <title>Playground</title>\n  <base href=\"/\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\">\n</head>\n<body>\n  <app-root></app-root>\n</body>\n</html>\n"
  },
  {
    "path": "playground/src/main.ts",
    "content": "import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n  .catch(err => console.error(err));\n"
  },
  {
    "path": "playground/src/polyfills.ts",
    "content": "/**\n * This file includes polyfills needed by Angular and is loaded before the app.\n * You can add your own extra polyfills to this file.\n *\n * This file is divided into 2 sections:\n *   1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.\n *   2. Application imports. Files imported after ZoneJS that should be loaded before your main\n *      file.\n *\n * The current setup is for so-called \"evergreen\" browsers; the last versions of browsers that\n * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),\n * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.\n *\n * Learn more in https://angular.io/guide/browser-support\n */\n\n/***************************************************************************************************\n * BROWSER POLYFILLS\n */\n\n/**\n * IE11 requires the following for NgClass support on SVG elements\n */\n// import 'classlist.js';  // Run `npm install --save classlist.js`.\n\n/**\n * Web Animations `@angular/platform-browser/animations`\n * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.\n * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).\n */\n// import 'web-animations-js';  // Run `npm install --save web-animations-js`.\n\n/**\n * By default, zone.js will patch all possible macroTask and DomEvents\n * user can disable parts of macroTask/DomEvents patch by setting following flags\n * because those flags need to be set before `zone.js` being loaded, and webpack\n * will put import in the top of bundle, so user need to create a separate file\n * in this directory (for example: zone-flags.ts), and put the following flags\n * into that file, and then add the following code before importing zone.js.\n * import './zone-flags';\n *\n * The flags allowed in zone-flags.ts are listed here.\n *\n * The following flags will work for all browsers.\n *\n * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame\n * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick\n * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames\n *\n *  in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js\n *  with the following flag, it will bypass `zone.js` patch for IE/Edge\n *\n *  (window as any).__Zone_enable_cross_context_check = true;\n *\n */\n\n/***************************************************************************************************\n * Zone JS is required by default for Angular itself.\n */\nimport 'zone.js';  // Included with Angular CLI.\n\n\n/***************************************************************************************************\n * APPLICATION IMPORTS\n */\n"
  },
  {
    "path": "playground/src/styles.scss",
    "content": "/* You can add global styles to this file, and also import other style files */\n"
  },
  {
    "path": "playground/tsconfig.app.json",
    "content": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"files\": [\n    \"src/main.ts\",\n    \"src/polyfills.ts\"\n  ],\n  \"include\": [\n    \"src/**/*.d.ts\"\n  ]\n}\n"
  },
  {
    "path": "playground/tsconfig.json",
    "content": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"baseUrl\": \"./\",\n    \"outDir\": \"./dist/out-tsc\",\n    \"forceConsistentCasingInFileNames\": true,\n    \"strict\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"sourceMap\": true,\n    \"declaration\": false,\n    \"downlevelIteration\": true,\n    \"experimentalDecorators\": true,\n    \"moduleResolution\": \"node\",\n    \"importHelpers\": true,\n    \"target\": \"es2017\",\n    \"module\": \"es2020\",\n    \"lib\": [\n      \"es2018\",\n      \"dom\"\n    ]\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  },
  {
    "path": "projects/angular-resize-event/README.md",
    "content": "# AngularResizeEvent\n\nThis library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.0.2.\n\n## Code scaffolding\n\nRun `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`.\n> 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. \n\n## Build\n\nRun `ng build angular-resize-event` to build the project. The build artifacts will be stored in the `dist/` directory.\n\n## Publishing\n\nAfter building your library with `ng build angular-resize-event`, go to the dist folder `cd dist/angular-resize-event` and run `npm publish`.\n\n## Running unit tests\n\nRun `ng test angular-resize-event` to execute the unit tests via [Karma](https://karma-runner.github.io).\n\n## Further help\n\nTo 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.\n"
  },
  {
    "path": "projects/angular-resize-event/ng-package.json",
    "content": "{\n  \"$schema\": \"../../node_modules/ng-packagr/ng-package.schema.json\",\n  \"dest\": \"../../dist/angular-resize-event\",\n  \"lib\": {\n    \"entryFile\": \"src/public-api.ts\"\n  }\n}"
  },
  {
    "path": "projects/angular-resize-event/package.json",
    "content": "{\n  \"name\": \"angular-resize-event\",\n  \"version\": \"3.2.0\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/vdolek/angular-resize-event\"\n  },\n  \"homepage\": \"https://github.com/vdolek/angular-resize-event#readme\",\n  \"author\": {\n    \"name\": \"Martin Volek\",\n    \"email\": \"martin@vdolek.cz\"\n  },\n  \"keywords\": [\n    \"angular\",\n    \"resized\",\n    \"event\"\n  ],\n  \"license\": \"MIT\",\n  \"peerDependencies\": {\n    \"@angular/common\": \">= 12.2.0 < 15\",\n    \"@angular/core\": \">= 12.2.0 < 15\"\n  },\n  \"dependencies\": {\n    \"tslib\": \"^2.3.0\"\n  }\n}\n"
  },
  {
    "path": "projects/angular-resize-event/src/lib/angular-resize-event.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { ResizedDirective } from './resized.directive';\n\n@NgModule({\n  declarations: [\n    ResizedDirective\n  ],\n  imports: [\n  ],\n  exports: [\n    ResizedDirective\n  ]\n})\nexport class AngularResizeEventModule {}\n"
  },
  {
    "path": "projects/angular-resize-event/src/lib/resized.directive.ts",
    "content": "import { Directive, ElementRef, EventEmitter, NgZone, OnDestroy, OnInit, Output } from '@angular/core';\nimport { ResizedEvent } from './resized.event';\n\n@Directive({\n  selector: '[resized]'\n})\nexport class ResizedDirective implements OnInit, OnDestroy {\n  private observer: ResizeObserver;\n  private oldRect?: DOMRectReadOnly;\n\n  @Output()\n  public readonly resized;\n\n  public constructor(\n    private readonly element: ElementRef,\n    private readonly zone: NgZone\n  )\n  {\n    this.resized = new EventEmitter<ResizedEvent>();\n    this.observer = new ResizeObserver(entries => this.zone.run(() => this.observe(entries)));\n  }\n\n  public ngOnInit(): void {\n    this.observer.observe(this.element.nativeElement)\n  }\n\n  public ngOnDestroy(): void {\n    this.observer.disconnect();\n  }\n\n  private observe(entries: ResizeObserverEntry[]): void {\n    const domSize = entries[0];\n    const resizedEvent = new ResizedEvent(domSize.contentRect, this.oldRect);\n    this.oldRect = domSize.contentRect;\n    this.resized.emit(resizedEvent);\n  }\n}\n\n"
  },
  {
    "path": "projects/angular-resize-event/src/lib/resized.event.ts",
    "content": "export class ResizedEvent {\n    public newRect: DOMRectReadOnly;\n    public oldRect?: DOMRectReadOnly;\n    public isFirst: boolean;\n\n    public constructor(newRect: DOMRectReadOnly, oldRect: DOMRectReadOnly | undefined) {\n        this.newRect = newRect;\n        this.oldRect = oldRect;\n        this.isFirst = oldRect == null;\n    }\n}\n"
  },
  {
    "path": "projects/angular-resize-event/src/public-api.ts",
    "content": "/*\n * Public API Surface of angular-resize-event\n */\n\nexport { ResizedEvent } from './lib/resized.event';\nexport * from './lib/resized.directive';\nexport * from './lib/angular-resize-event.module';\n"
  },
  {
    "path": "projects/angular-resize-event/tsconfig.lib.json",
    "content": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"../../out-tsc/lib\",\n    \"target\": \"es2020\",\n    \"declaration\": true,\n    \"declarationMap\": true,\n    \"inlineSources\": true,\n    \"types\": [],\n    \"lib\": [\n      \"es2020\",\n      \"dom\"\n    ]\n  }\n}\n"
  },
  {
    "path": "projects/angular-resize-event/tsconfig.lib.prod.json",
    "content": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n  \"extends\": \"./tsconfig.lib.json\",\n  \"compilerOptions\": {\n    \"declarationMap\": false\n  },\n  \"angularCompilerOptions\": {\n    \"compilationMode\": \"partial\"\n  }\n}\n"
  },
  {
    "path": "tsconfig.json",
    "content": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"paths\": {\n      \"angular-resize-event\": [\n        \"dist/angular-resize-event/angular-resize-event\",\n        \"dist/angular-resize-event\"\n      ]\n    },\n    \"baseUrl\": \"./\",\n    \"outDir\": \"./dist/out-tsc\",\n    \"forceConsistentCasingInFileNames\": true,\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"sourceMap\": true,\n    \"declaration\": false,\n    \"downlevelIteration\": true,\n    \"experimentalDecorators\": true,\n    \"moduleResolution\": \"node\",\n    \"importHelpers\": true,\n    \"target\": \"es2020\",\n    \"module\": \"es2020\",\n    \"lib\": [\n      \"es2020\",\n      \"dom\"\n    ]\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"strictTemplates\": true\n  }\n}\n"
  }
]