From cfa44df50341ba5eb094bbea701dd207ca49fccc Mon Sep 17 00:00:00 2001 From: Milo Date: Wed, 9 Jul 2025 20:47:43 +0000 Subject: [PATCH] refactor(devtools): simplify vendored deps to make importing into google3 easier (#62567) prefer using node_modules/webtreemap, and remove memo-decorator PR Close #62567 --- .../npm_translate_lock_MzA5NzUwNzMx | 6 +- devtools/projects/ng-devtools/BUILD.bazel | 1 - .../bargraph-formatter/BUILD.bazel | 1 - .../bargraph-formatter/bargraph-formatter.ts | 12 +- .../flamegraph-formatter/BUILD.bazel | 1 - .../tree-map-formatter/BUILD.bazel | 1 - .../tree-map-formatter/tree-map-formatter.ts | 13 +- .../tree-map-visualizer/BUILD.bazel | 2 +- .../tree-map-visualizer.component.ts | 2 +- .../src/lib/vendor/memo-decorator/BUILD.bazel | 8 - .../src/lib/vendor/memo-decorator/README.md | 97 ----- .../src/lib/vendor/memo-decorator/index.ts | 48 --- .../src/lib/vendor/webtreemap/BUILD.bazel | 11 - .../src/lib/vendor/webtreemap/LICENSE | 202 ----------- .../src/lib/vendor/webtreemap/README.md | 67 ---- .../src/lib/vendor/webtreemap/tree.ts | 107 ------ .../src/lib/vendor/webtreemap/treemap.ts | 343 ------------------ package.json | 1 - pnpm-lock.yaml | 7 - yarn.lock | 5 - 20 files changed, 24 insertions(+), 911 deletions(-) delete mode 100644 devtools/projects/ng-devtools/src/lib/vendor/memo-decorator/BUILD.bazel delete mode 100644 devtools/projects/ng-devtools/src/lib/vendor/memo-decorator/README.md delete mode 100644 devtools/projects/ng-devtools/src/lib/vendor/memo-decorator/index.ts delete mode 100644 devtools/projects/ng-devtools/src/lib/vendor/webtreemap/BUILD.bazel delete mode 100644 devtools/projects/ng-devtools/src/lib/vendor/webtreemap/LICENSE delete mode 100644 devtools/projects/ng-devtools/src/lib/vendor/webtreemap/README.md delete mode 100644 devtools/projects/ng-devtools/src/lib/vendor/webtreemap/tree.ts delete mode 100644 devtools/projects/ng-devtools/src/lib/vendor/webtreemap/treemap.ts diff --git a/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx b/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx index 2d23600d853..2c72200bd44 100755 --- a/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx +++ b/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx @@ -8,7 +8,7 @@ adev/shared-docs/package.json=450629456 adev/shared-docs/pipeline/api-gen/package.json=939673974 integration/package.json=-239561259 modules/package.json=-2111512175 -package.json=-1105986473 +package.json=2040412148 packages/animations/package.json=-678724831 packages/benchpress/package.json=-1908328724 packages/common/package.json=1729763064 @@ -26,7 +26,7 @@ packages/platform-server/package.json=-737662753 packages/router/package.json=860819913 packages/upgrade/package.json=16347051 packages/zone.js/package.json=-1005735564 -pnpm-lock.yaml=-525143433 +pnpm-lock.yaml=-373910383 pnpm-workspace.yaml=1738525657 tools/bazel/rules_angular_store/package.json=-239561259 -yarn.lock=-1269359948 +yarn.lock=-1535687935 diff --git a/devtools/projects/ng-devtools/BUILD.bazel b/devtools/projects/ng-devtools/BUILD.bazel index 1bb5e7e6ae1..eadd2fd4ce0 100644 --- a/devtools/projects/ng-devtools/BUILD.bazel +++ b/devtools/projects/ng-devtools/BUILD.bazel @@ -16,7 +16,6 @@ ng_project( "//:node_modules/@angular/material", "//:node_modules/@types/d3", "//:node_modules/d3", - "//:node_modules/memo-decorator", "//:node_modules/ngx-flamegraph", "//:node_modules/rxjs", "//:node_modules/webtreemap", diff --git a/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/bargraph-formatter/BUILD.bazel b/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/bargraph-formatter/BUILD.bazel index 12d6c4169ad..718be16404f 100644 --- a/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/bargraph-formatter/BUILD.bazel +++ b/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/bargraph-formatter/BUILD.bazel @@ -16,7 +16,6 @@ ts_project( "//:node_modules/tslib", "//devtools/projects/ng-devtools/src/lib/application-services:theme_rjs", "//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter:record-formatter_rjs", - "//devtools/projects/ng-devtools/src/lib/vendor/memo-decorator:memo-decorator_rjs", "//devtools/projects/protocol:protocol_rjs", ], ) diff --git a/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/bargraph-formatter/bargraph-formatter.ts b/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/bargraph-formatter/bargraph-formatter.ts index 31da0322285..bccfc617783 100644 --- a/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/bargraph-formatter/bargraph-formatter.ts +++ b/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/bargraph-formatter/bargraph-formatter.ts @@ -12,7 +12,6 @@ import { type ProfilerFrame, } from '../../../../../../../../protocol'; -import {memo} from '../../../../../vendor/memo-decorator'; import {RecordFormatter} from '../record-formatter'; export interface BargraphNode { @@ -25,8 +24,13 @@ export interface BargraphNode { } export class BarGraphFormatter extends RecordFormatter { - @memo({cache: new WeakMap()}) + cache = new WeakMap(); + override formatFrame(frame: ProfilerFrame): BargraphNode[] { + if (this.cache.has(frame)) { + return this.cache.get(frame); + } + const result: BargraphNode[] = []; this.addFrame(result, frame.directives); // Remove nodes with 0 value. @@ -55,7 +59,9 @@ export class BarGraphFormatter extends RecordFormatter { }); // Sort nodes by value. - return Object.values(uniqueBarGraphNodes).sort((a, b) => b.value - a.value); + const out = Object.values(uniqueBarGraphNodes).sort((a, b) => b.value - a.value); + this.cache.set(frame, out); + return out; } override addFrame( diff --git a/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/flamegraph-formatter/BUILD.bazel b/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/flamegraph-formatter/BUILD.bazel index a9dfbc42e2e..d029b15c505 100644 --- a/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/flamegraph-formatter/BUILD.bazel +++ b/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/flamegraph-formatter/BUILD.bazel @@ -14,7 +14,6 @@ ng_project( ), deps = [ "//:node_modules/@angular/core", - "//:node_modules/memo-decorator", "//:node_modules/rxjs", "//devtools/projects/ng-devtools/src/lib/application-services:theme_rjs", "//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter:record-formatter_rjs", diff --git a/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/tree-map-formatter/BUILD.bazel b/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/tree-map-formatter/BUILD.bazel index 2162409cfc8..910b2dee5cb 100644 --- a/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/tree-map-formatter/BUILD.bazel +++ b/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/tree-map-formatter/BUILD.bazel @@ -16,7 +16,6 @@ ts_project( deps = [ "//:node_modules/tslib", "//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter:record-formatter_rjs", - "//devtools/projects/ng-devtools/src/lib/vendor/memo-decorator:memo-decorator_rjs", "//devtools/projects/protocol:protocol_rjs", ], ) diff --git a/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/tree-map-formatter/tree-map-formatter.ts b/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/tree-map-formatter/tree-map-formatter.ts index 9d199f925ed..b59a8febb00 100644 --- a/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/tree-map-formatter/tree-map-formatter.ts +++ b/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/tree-map-formatter/tree-map-formatter.ts @@ -8,7 +8,6 @@ import {ElementProfile, type ProfilerFrame} from '../../../../../../../../protocol'; -import {memo} from '../../../../../vendor/memo-decorator'; import {RecordFormatter} from '../record-formatter'; export interface TreeMapNode { @@ -20,20 +19,28 @@ export interface TreeMapNode { } export class TreeMapFormatter extends RecordFormatter { - @memo({cache: new WeakMap()}) + cache = new WeakMap(); + override formatFrame(record: ProfilerFrame): TreeMapNode { + if (this.cache.has(record)) { + return this.cache.get(record); + } + const children: TreeMapNode[] = []; this.addFrame(children, record.directives); const size = children.reduce((accum, curr) => { return accum + curr.size; }, 0); - return { + + const out = { id: 'Application', size, value: size, children, original: null, }; + this.cache.set(record, out); + return out; } override addFrame( diff --git a/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/recording-visualizer/tree-map-visualizer/BUILD.bazel b/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/recording-visualizer/tree-map-visualizer/BUILD.bazel index 03c58c736fe..5daaf7adf5b 100644 --- a/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/recording-visualizer/tree-map-visualizer/BUILD.bazel +++ b/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/recording-visualizer/tree-map-visualizer/BUILD.bazel @@ -23,8 +23,8 @@ ng_project( deps = [ "//:node_modules/@angular/core", "//:node_modules/rxjs", + "//:node_modules/webtreemap", "//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/tree-map-formatter:tree-map-formatter_rjs", - "//devtools/projects/ng-devtools/src/lib/vendor/webtreemap:webtreemap_rjs", "//devtools/projects/protocol:protocol_rjs", ], ) diff --git a/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/recording-visualizer/tree-map-visualizer/tree-map-visualizer.component.ts b/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/recording-visualizer/tree-map-visualizer/tree-map-visualizer.component.ts index e979ffbf8ef..873ecf7a4d9 100644 --- a/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/recording-visualizer/tree-map-visualizer/tree-map-visualizer.component.ts +++ b/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/recording-visualizer/tree-map-visualizer/tree-map-visualizer.component.ts @@ -23,7 +23,7 @@ import {ProfilerFrame} from '../../../../../../../../protocol'; import {Subject, Subscription} from 'rxjs'; import {debounceTime} from 'rxjs/operators'; -import {render} from '../../../../../vendor/webtreemap/treemap'; +import {render} from 'webtreemap/build/treemap'; import {TreeMapFormatter, TreeMapNode} from '../../record-formatter/tree-map-formatter'; @Component({ diff --git a/devtools/projects/ng-devtools/src/lib/vendor/memo-decorator/BUILD.bazel b/devtools/projects/ng-devtools/src/lib/vendor/memo-decorator/BUILD.bazel deleted file mode 100644 index 5fecf95a2f3..00000000000 --- a/devtools/projects/ng-devtools/src/lib/vendor/memo-decorator/BUILD.bazel +++ /dev/null @@ -1,8 +0,0 @@ -load("//devtools/tools:typescript.bzl", "ts_project") - -package(default_visibility = ["//:__subpackages__"]) - -ts_project( - name = "memo-decorator", - srcs = ["index.ts"], -) diff --git a/devtools/projects/ng-devtools/src/lib/vendor/memo-decorator/README.md b/devtools/projects/ng-devtools/src/lib/vendor/memo-decorator/README.md deleted file mode 100644 index 741060f2e18..00000000000 --- a/devtools/projects/ng-devtools/src/lib/vendor/memo-decorator/README.md +++ /dev/null @@ -1,97 +0,0 @@ -[![Build Status](https://travis-ci.org/mgechev/memo-decorator.svg?branch=master)](https://travis-ci.org/mgechev/memo-decorator) - -# Memo Decorator - -This decorator applies memoization to a method of a class. - -## Usage - -Apply the decorator to a method of a class. The cache is local for the method but shared among all instances of the class. Strongly recommend you to **use this decorator only on pure methods.** - -Installation: - -```shell -npm i memo-decorator --save -``` - -### Configuration - -```ts -export interface Config { - resolver?: Resolver; - cache?: MapLike; -} -``` - -- `Resolver` is a function, which returns the key to be used for given set of arguments. By default, the resolver will use the first argument of the method as the key. -- `MapLike` is a cache instance. By default, the library would use `Map`. - -Example: - -```typescript -import memo from 'memo-decorator'; - -class Qux { - @memo({ - resolver: (...args: any[]) => args[1], - cache: new WeakMap(), - }) - foo(a: number, b: number) { - return a * b; - } -} -``` - -### Demo - -```typescript -import memo from 'memo-decorator'; - -class Qux { - @memo() - foo(a: number) { - console.log('foo: called'); - return 42; - } - - @memo({ - resolver: (_) => 1, - }) - bar(a: number) { - console.log('bar: called'); - return 42; - } -} - -const a = new Qux(); -// Create a new cache entry and associate `1` with the result `42`. -a.foo(1); -// Do not invoke the original method `foo` because there's already a cache -// entry for the key `1` associated with the result of the method. -a.foo(1); -// Invoke the original `foo` because the cache doesn't contain an entry -// for the key `2`. -a.foo(2); - -// Invoke `bar` and return the result `42` gotten from the original `bar` implementation. -a.bar(1); -// Does not invoke the original `bar` implementation because of the specified `resolver` -// which is passed to `memo`. For any arguments of the function, the resolver will return -// result `1` which will be used as the key. -a.bar(2); - -const b = new Qux(); -// Does not invoke the method `foo` because there's already an entry -// in the cache which associates the key `1` to the result `42` from the -// invocation of the method `foo` by the instance `a`. -b.foo(1); - -// Outputs: -// foo: called -// foo: called -// bar: called -``` - -## License - -MIT diff --git a/devtools/projects/ng-devtools/src/lib/vendor/memo-decorator/index.ts b/devtools/projects/ng-devtools/src/lib/vendor/memo-decorator/index.ts deleted file mode 100644 index 58eab0f9c67..00000000000 --- a/devtools/projects/ng-devtools/src/lib/vendor/memo-decorator/index.ts +++ /dev/null @@ -1,48 +0,0 @@ -export type Resolver = (...args: any[]) => any; - -export interface MapLike { - set(key: K, v: V): MapLike; - get(key: K): V; - has(key: K): boolean; -} - -export interface Config { - resolver?: Resolver; - cache?: MapLike; -} - -function memoize(func: Function, resolver: Resolver, cache: MapLike) { - const memoized = function () { - const args = arguments; - // @ts-ignore: ignore implicit any type - const key = resolver.apply(this, args); - const cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - - // @ts-ignore: ignore implicit any type - const result = func.apply(this, args); - memoized.cache = cache.set(key, result) ?? cache; - return result; - }; - memoized.cache = cache; - return memoized; -} - -const defaultResolver: Resolver = (...args: any[]) => args[0]; - -export const memo = - (config: Config = {}) => - (_: any, __: string, descriptor: PropertyDescriptor): PropertyDescriptor => { - if (typeof descriptor.value !== 'function') { - throw new Error('Memoization can be applied only to methods'); - } - - const resolver = config.resolver ?? defaultResolver; - const cache = config.cache ?? new Map(); - - descriptor.value = memoize(descriptor.value, resolver, cache); - return descriptor; - }; diff --git a/devtools/projects/ng-devtools/src/lib/vendor/webtreemap/BUILD.bazel b/devtools/projects/ng-devtools/src/lib/vendor/webtreemap/BUILD.bazel deleted file mode 100644 index 088a6d04dc6..00000000000 --- a/devtools/projects/ng-devtools/src/lib/vendor/webtreemap/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("//devtools/tools:typescript.bzl", "ts_project") - -package(default_visibility = ["//:__subpackages__"]) - -ts_project( - name = "webtreemap", - srcs = [ - "tree.ts", - "treemap.ts", - ], -) diff --git a/devtools/projects/ng-devtools/src/lib/vendor/webtreemap/LICENSE b/devtools/projects/ng-devtools/src/lib/vendor/webtreemap/LICENSE deleted file mode 100644 index 7a4a3ea2424..00000000000 --- a/devtools/projects/ng-devtools/src/lib/vendor/webtreemap/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/devtools/projects/ng-devtools/src/lib/vendor/webtreemap/README.md b/devtools/projects/ng-devtools/src/lib/vendor/webtreemap/README.md deleted file mode 100644 index 7c69585bec6..00000000000 --- a/devtools/projects/ng-devtools/src/lib/vendor/webtreemap/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# webtreemap - -> **New 2017-Oct-16**: master is now webtreemap v2, a complete rewrite with -> bug fixes, more features, and a different (simpler) API. If you're looking -> for the old webtreemap, see the [v1] branch. - -[v1]: https://github.com/evmar/webtreemap/tree/v1 - -A simple treemap implementation using web technologies (DOM nodes, CSS styling -and transitions) rather than a big canvas/svg/plugin. It's usable as a library -as part of a larger web app, but it also includes a command-line app that dumps -a self-contained HTML file that displays a map. - -Play with a [demo]. - -[demo]: http://evmar.github.io/webtreemap/demo.html - -## Usage - -### Web - -The data format is a tree of `Node`, where each node is an object in the shape -described at the top of [tree.ts]. - -[tree.ts]: https://github.com/evmar/webtreemap/blob/master/tree.ts - -```html - -