@statoscope/webpack-ui
Advanced tools
Comparing version 5.6.2 to 5.7.0-alpha.0
{ | ||
"name": "@statoscope/webpack-ui", | ||
"version": "5.6.2", | ||
"version": "5.7.0-alpha.0", | ||
"description": "Webpack plugin and UI for analyzing webpack bundle with Statoscope", | ||
@@ -28,2 +28,6 @@ "main": "./dist/main.js", | ||
"homepage": "https://github.com/statoscope/statoscope/", | ||
"dependencies": { | ||
"@statoscope/stats-extension-stats-validation-result": "5.7.0-alpha.0", | ||
"@statoscope/types": "5.7.0-alpha.0" | ||
}, | ||
"devDependencies": { | ||
@@ -33,7 +37,7 @@ "@carrotsearch/foamtree": "3.5.0", | ||
"@popperjs/core": "^2.9.1", | ||
"@statoscope/helpers": "^5.6.1", | ||
"@statoscope/stats": "^5.3.0", | ||
"@statoscope/stats-extension-compressed": "^5.6.1", | ||
"@statoscope/stats-extension-package-info": "^5.6.1", | ||
"@statoscope/webpack-model": "^5.6.2", | ||
"@statoscope/helpers": "5.7.0-alpha.0", | ||
"@statoscope/stats": "5.7.0-alpha.0", | ||
"@statoscope/stats-extension-compressed": "5.7.0-alpha.0", | ||
"@statoscope/stats-extension-package-info": "5.7.0-alpha.0", | ||
"@statoscope/webpack-model": "5.7.0-alpha.0", | ||
"@wdxlab/events": "^1.1.0", | ||
@@ -45,3 +49,3 @@ "babel-loader": "^8.2.2", | ||
}, | ||
"gitHead": "d0ac649118f394b2dd8a22f2fb980a1e0483fc93" | ||
"gitHead": "d87b4b850ad9ff1f94110fb017bb915a77ed4c62" | ||
} |
141
types.d.ts
@@ -5,139 +5,4 @@ import { | ||
} from '@statoscope/webpack-model/dist/normalize'; | ||
import { Extension, PrepareFn, Widget } from '@statoscope/types'; | ||
export type ViewRenderFn<TData, TContext> = ( | ||
el: HTMLElement, | ||
config: ViewConfig<TData, TContext>, | ||
data?: TData, | ||
context?: TContext | ||
) => Promise<void> | void; | ||
export type ViewDefineConfig<TData, TContext> = | ||
| ViewRenderFn<TData, TContext> | ||
| ViewConfig<TData, TContext>; | ||
export type ViewConfig<TData, TContext> = | ||
| ViewConfigData | ||
| string | ||
| ViewConfig<TData, TContext>[]; | ||
export type QueryFn<TData, TContext> = (data: TData, TData: TContext) => unknown; | ||
export type Query<TData, TContext> = string | QueryFn<TData, TContext> | unknown; | ||
export type ClassNameFn<TData, TContext> = ( | ||
data: TData, | ||
context: TContext | ||
) => string | false | null | undefined; | ||
interface ViewOptions { | ||
tag?: string | false | null; | ||
} | ||
interface View<TData, TContext> { | ||
name: string; | ||
options: ViewOptions; | ||
render: ViewRenderFn<TData, TContext>; | ||
} | ||
type ViewConfigData = Record<string, unknown>; | ||
interface Page<TData, TContext> { | ||
name: string; | ||
options?: PageOptions; | ||
render: (el: HTMLElement, data?: TData, context?: TContext) => RenderState; | ||
} | ||
interface PageOptions { | ||
reuseEl?: boolean; | ||
init?: unknown; | ||
keepScrollOffset?: boolean; | ||
resolveLink?: string | unknown; | ||
} | ||
interface RenderState { | ||
pageEl: HTMLElement; | ||
renderState: Promise<void>; | ||
} | ||
type Extension = Extension[] | { [key: string]: Extension }; | ||
export interface WidgetOptions { | ||
defaultPageId?: string; | ||
isolateStyleMarker?: string; | ||
compact?: boolean; | ||
extensions?: Extension; | ||
} | ||
export type PrepareFn<TRawData, TData> = (data: TRawData) => TData; | ||
export type RenderContext<TContext> = { | ||
page: string; | ||
id?: string; | ||
params: Record<string, unknown>; | ||
} & TContext; | ||
export class PopupView { | ||
constructor(config: unknown); | ||
toggle(el: HTMLElement, fn: (popupEl: HTMLElement) => void): void; | ||
hide(): void; | ||
} | ||
export class Widget<TRawData, TData, TContext> { | ||
dom: Record<string, HTMLElement>; | ||
view: { | ||
define<TData, TContext>( | ||
name: string, | ||
render: ViewDefineConfig<TData, TContext>, | ||
options?: ViewOptions | ||
): void; | ||
render<TData, TContext>( | ||
...args: Parameters<ViewRenderFn<TData, TContext>> | ||
): ReturnType<ViewRenderFn<TData, TContext>>; | ||
Popup: new (config: unknown) => PopupView; | ||
}; | ||
page: { | ||
define( | ||
name: string, | ||
render: ViewDefineConfig<TData, TContext>, | ||
options?: PageOptions | ||
): void; | ||
render( | ||
prevPageEl: HTMLElement, | ||
name: string, | ||
data?: TData, | ||
context?: TContext | ||
): RenderState; | ||
}; | ||
data: TData; | ||
apply(extension: Extension): void; | ||
setData(data: TRawData, context?: TContext): Promise<void>; | ||
setPrepare<TRawData, TData>(fn: PrepareFn<TRawData, TData>): void; | ||
renderPage(): RenderState; | ||
getRenderContext(): RenderContext<TContext>; | ||
encodePageHash( | ||
pageId: string, | ||
pageRef?: string | number, | ||
pageParams?: Record<string, unknown> | ||
): string; | ||
addQueryHelpers(extensions: { [key: string]: unknown }): void; | ||
nav: { | ||
prepend(config: Omit<ViewConfigData, 'view'>): void; | ||
append(config: Omit<ViewConfigData, 'view'>): void; | ||
remove(name: string): void; | ||
primary: { | ||
append(config: Omit<ViewConfigData, 'view'>): void; | ||
}; | ||
menu: { | ||
append(config: ViewConfigData): void; | ||
}; | ||
}; | ||
constructor( | ||
container: HTMLElement, | ||
defaultPage?: ViewConfig<TData, TContext>, | ||
options?: WidgetOptions | ||
); | ||
} | ||
export type RawData = RawStatsFileDescriptor | RawStatsFileDescriptor[]; | ||
@@ -167,1 +32,5 @@ | ||
} | ||
declare module '@statoscope/ui-webpack' { | ||
export default function (data: RawData, element: HTMLElement): StatoscopeWidget; | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1148422
718
2
1
+ Added@statoscope/stats-extension-stats-validation-result@5.7.0-alpha.0
+ Added@discoveryjs/natural-compare@1.1.0(transitive)
+ Added@statoscope/extensions@5.7.0-alpha.0(transitive)
+ Added@statoscope/helpers@5.7.0-alpha.0(transitive)
+ Added@statoscope/stats@5.7.0-alpha.0(transitive)
+ Added@statoscope/stats-extension-stats-validation-result@5.7.0-alpha.0(transitive)
+ Added@statoscope/types@5.7.0-alpha.0(transitive)
+ Added@types/archy@0.0.32(transitive)
+ Added@types/semver@7.5.8(transitive)
+ Addedarchy@1.0.0(transitive)
+ Addedjora@1.0.0-beta.13(transitive)
+ Addedsemver@7.6.3(transitive)