minerva-design 1.9.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +2 -0
  3. package/custom-elements.json +356 -0
  4. package/dist/angular/fesm2022/minerva-angular.mjs +743 -40
  5. package/dist/angular/fesm2022/minerva-angular.mjs.map +1 -1
  6. package/dist/angular/types/minerva-angular.d.ts +211 -0
  7. package/dist/core/contracts.cjs +1 -1
  8. package/dist/core/contracts.cjs.map +1 -1
  9. package/dist/core/contracts.js +1 -1
  10. package/dist/core/contracts.js.map +1 -1
  11. package/dist/vue/icon/DynamicIcon.vue.d.ts +68 -0
  12. package/dist/vue/icon/DynamicIcon.vue.js +7 -0
  13. package/dist/vue/icon/DynamicIcon.vue.js.map +1 -0
  14. package/dist/vue/icon/DynamicIcon.vue_vue_type_script_setup_true_lang.js +43 -0
  15. package/dist/vue/icon/DynamicIcon.vue_vue_type_script_setup_true_lang.js.map +1 -0
  16. package/dist/vue/icon/Icon.vue.d.ts +69 -0
  17. package/dist/vue/icon/Icon.vue.js +7 -0
  18. package/dist/vue/icon/Icon.vue.js.map +1 -0
  19. package/dist/vue/icon/Icon.vue_vue_type_script_setup_true_lang.js +95 -0
  20. package/dist/vue/icon/Icon.vue_vue_type_script_setup_true_lang.js.map +1 -0
  21. package/dist/vue/icon/IconCanvas.vue.d.ts +70 -0
  22. package/dist/vue/icon/IconCanvas.vue.js +7 -0
  23. package/dist/vue/icon/IconCanvas.vue.js.map +1 -0
  24. package/dist/vue/icon/IconCanvas.vue_vue_type_script_setup_true_lang.js +64 -0
  25. package/dist/vue/icon/IconCanvas.vue_vue_type_script_setup_true_lang.js.map +1 -0
  26. package/dist/vue/icon/createIcon.d.ts +30 -0
  27. package/dist/vue/icon/createIcon.js +15 -0
  28. package/dist/vue/icon/createIcon.js.map +1 -0
  29. package/dist/vue/icon/icons.d.ts +202 -0
  30. package/dist/vue/icon/icons.js +8 -0
  31. package/dist/vue/icon/icons.js.map +1 -0
  32. package/dist/vue/icon/index.d.ts +6 -0
  33. package/dist/vue/icon/index.js +6 -0
  34. package/dist/vue/icon/props.d.ts +38 -0
  35. package/dist/vue/icon/props.js +28 -0
  36. package/dist/vue/icon/props.js.map +1 -0
  37. package/dist/vue/icons-global.d.ts +9 -0
  38. package/dist/vue/icons.d.ts +20 -0
  39. package/dist/vue/icons.js +23 -0
  40. package/dist/vue/icons.js.map +1 -0
  41. package/dist/web-components/components/icon/icon-canvas.d.ts +59 -0
  42. package/dist/web-components/components/icon/icon-canvas.js +89 -0
  43. package/dist/web-components/components/icon/icon-canvas.js.map +1 -0
  44. package/dist/web-components/components/icon/icon.d.ts +63 -0
  45. package/dist/web-components/components/icon/icon.js +116 -0
  46. package/dist/web-components/components/icon/icon.js.map +1 -0
  47. package/dist/web-components/components/icon/renderer.d.ts +25 -0
  48. package/dist/web-components/components/icon/renderer.js +21 -0
  49. package/dist/web-components/components/icon/renderer.js.map +1 -0
  50. package/dist/web-components/elements/icon.d.ts +4 -0
  51. package/dist/web-components/elements/icon.js +8 -0
  52. package/dist/web-components/elements/icon.js.map +1 -0
  53. package/dist/web-components/html-custom-data.json +110 -0
  54. package/dist/web-components/types/react.d.ts +18 -0
  55. package/dist/web-components/types/solid.d.ts +12 -0
  56. package/dist/web-components/types/svelte.d.ts +12 -0
  57. package/dist/web-components/types/vue.d.ts +14 -0
  58. package/package.json +12 -1
@@ -4,6 +4,7 @@ import { ColorScheme, ComponentTheme, CustomBilingualTheme, DefaultTheme, Densit
4
4
  import { ControlValueAccessor } from "@angular/forms";
5
5
  import { Placement, ReadingDirection } from "../../dom/index.js";
6
6
  import { Bar3DSeries, BoxplotGroup, BulletDatum, CalendarDate, CalendarDatum, Chart3DAxisOptions, Chart3DCameraOptions, Chart3DCameraState, Chart3DColorBarOptions, Chart3DColorScale, Chart3DHoverEvent, Chart3DInstance, Chart3DLegendOptions, Chart3DOptions, Chart3DSeries, Chart3DTooltipOptions, ChartAnnotation, ChartAxisOptions, ChartColorScheme, ChartConnectorOptions, ChartCurve, ChartDragEvent, ChartHoverEvent, ChartInstance, ChartInteractionOptions, ChartLegendOptions, ChartOptions, ChartOrientation, ChartPadding, ChartPlotClickEvent, ChartRendererKind, ChartRendererPreference, ChartSeries, ChartSeriesType, ChartTooltipOptions, ChartView, ChordGroup, ChordLink, DepthChartHoverEvent, DepthChartInstance, DepthChartOptions, GanttTask, GaugeBand, GraphChartInstance, GraphChartLabels, GraphChartOptions, GraphCircularOptions, GraphDagOptions, GraphData, GraphDirection, GraphEdge, GraphEdgeStyle, GraphForceOptions, GraphGroup, GraphGroupToggleEvent, GraphHoverEvent, GraphInteractionOptions, GraphLayoutEndEvent, GraphLayoutType, GraphLegendOptions, GraphNode, GraphNodeShape, GraphPoint, GraphToggleEvent, GraphTooltipOptions, GraphTreeOptions, HeatmapCell, HistogramBinning, Line3DSeries, OrderBookDelta, OrderBookHeatmapHoverEvent, OrderBookHeatmapInstance, OrderBookHeatmapOptions, OrderBookInstance, OrderBookLevelEvent, OrderBookOptions, OrderBookSnapshot, QuadrantAxisLabels, QuadrantCorner, QuadrantPoint, QuadrantRegions, RadarIndicator, RadarSeries, RadialBarDatum, SankeyLink, SankeyNode, Scatter3DSeries, ShapeChartCommonOptions, ShapeChartInstance, ShapeChartOptions, ShapeDatum, ShapeDrillEvent, ShapeHoverEvent, ShapeLegendOptions, ShapeToggleEvent, ShapeTooltipOptions, Surface3DContourOptions, Surface3DSeries, Surface3DWireframeOptions, TimeAndSalesInstance, TimeAndSalesOptions, TimeAndSalesRowEvent, TradingBar, TradingBarsInput, TradingChartInstance, TradingChartOptions, TradingChartStyle, TradingClickEvent, TradingCrosshairEvent, TradingDrawing, TradingDrawingPatch, TradingDrawingTool, TradingHistoryRequestEvent, TradingIndicator, TradingIndicatorToggleEvent, TradingOrderCancelEvent, TradingOrderCreateEvent, TradingOrderMoveEvent, TradingReplayState, TradingScaleMode, TradingTimeframe, TradingUndoState, TradingVisibleRange, TreemapNode, WaterfallStep } from "../../charts/core.js";
7
+ import { IconCanvasItem, IconDefinition, IconRendererKind, IconRendererPreference } from "../../icons/core.js";
7
8
  /**
8
9
  * Accepted `theme` values: "auto" / "system" (follow
9
10
  * `prefers-color-scheme`), a built-in theme name, a theme object, or a
@@ -10236,6 +10237,216 @@ export declare class MnTreeChart extends MnGraphChartBase {
10236
10237
  };
10237
10238
  }, {}, never, never, true, never>;
10238
10239
  }
10240
+ /** How an icon is drawn: inline SVG, or a canvas backend */
10241
+ export type IconRenderer = "svg" | IconRendererPreference;
10242
+ /**
10243
+ * Base of `MnIcon` and `MnDynamicIcon`: the style inputs, the inline SVG,
10244
+ * and the canvas mode. The host is `display: contents` (the inner `<svg>` /
10245
+ * `<canvas class="minerva-icon">` is the box, like React's `Icon`); its
10246
+ * `title` / `aria-label` / `aria-labelledby` attributes move to that element.
10247
+ *
10248
+ * The canvas renderers (`minerva-design/icons/surface`) are loaded in the
10249
+ * browser with the first canvas icon: SVG-only applications never download
10250
+ * them, and nothing runs on the server.
10251
+ */
10252
+ export declare abstract class MnIconBase {
10253
+ /** Width and height (a number is in pixels; canvas renderers also follow CSS sizes such as `"1em"`) */
10254
+ readonly size: import("@angular/core").InputSignalWithTransform<string | number, string | number>;
10255
+ /** Stroke color, any CSS color */
10256
+ readonly color: import("@angular/core").InputSignal<string>;
10257
+ /** Stroke width on the 24×24 grid (scales with the size) */
10258
+ readonly strokeWidth: import("@angular/core").InputSignalWithTransform<number, unknown>;
10259
+ /** Keeps `strokeWidth` in pixels whatever the size */
10260
+ readonly absoluteStrokeWidth: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
10261
+ /** Accessible name: the icon becomes `role="img"`; without it (or an `aria-label`) the icon is hidden from assistive technologies */
10262
+ readonly title: import("@angular/core").InputSignal<string | undefined>;
10263
+ /** Accessible name without a `<title>` (the icon becomes `role="img"`) */
10264
+ readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
10265
+ /** id(s) of the element(s) naming the icon (the icon becomes `role="img"`) */
10266
+ readonly ariaLabelledby: import("@angular/core").InputSignal<string | undefined>;
10267
+ /**
10268
+ * Inline SVG (default), or a `<canvas>` drawn by a backend shared by every
10269
+ * canvas icon of the page: `auto` (the global default, see
10270
+ * `setDefaultIconRenderer`), `webgpu`, `webgl2`, `webgl` or `canvas2d`
10271
+ */
10272
+ readonly renderer: import("@angular/core").InputSignal<IconRenderer>;
10273
+ /** Canvas renderers: the backend that drew the icon */
10274
+ readonly rendererChange: import("@angular/core").OutputEmitterRef<IconRendererKind>;
10275
+ /** The icon drawn (`null`: nothing is rendered) */
10276
+ protected abstract readonly definition: Signal<IconDefinition | null>;
10277
+ protected readonly labelled: Signal<boolean>;
10278
+ protected readonly cssSize: Signal<string>;
10279
+ private readonly canvas;
10280
+ private readonly measured;
10281
+ private readonly factory;
10282
+ constructor();
10283
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnIconBase, never>;
10284
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MnIconBase, never, never, {
10285
+ "size": {
10286
+ "alias": "size";
10287
+ "required": false;
10288
+ "isSignal": true;
10289
+ };
10290
+ "color": {
10291
+ "alias": "color";
10292
+ "required": false;
10293
+ "isSignal": true;
10294
+ };
10295
+ "strokeWidth": {
10296
+ "alias": "strokeWidth";
10297
+ "required": false;
10298
+ "isSignal": true;
10299
+ };
10300
+ "absoluteStrokeWidth": {
10301
+ "alias": "absoluteStrokeWidth";
10302
+ "required": false;
10303
+ "isSignal": true;
10304
+ };
10305
+ "title": {
10306
+ "alias": "title";
10307
+ "required": false;
10308
+ "isSignal": true;
10309
+ };
10310
+ "ariaLabel": {
10311
+ "alias": "aria-label";
10312
+ "required": false;
10313
+ "isSignal": true;
10314
+ };
10315
+ "ariaLabelledby": {
10316
+ "alias": "aria-labelledby";
10317
+ "required": false;
10318
+ "isSignal": true;
10319
+ };
10320
+ "renderer": {
10321
+ "alias": "renderer";
10322
+ "required": false;
10323
+ "isSignal": true;
10324
+ };
10325
+ }, {
10326
+ "rendererChange": "rendererChange";
10327
+ }, never, never, true, never>;
10328
+ }
10329
+ /**
10330
+ * An icon of minerva-design/icons: inline SVG by default (crisp, styled by
10331
+ * CSS, server-rendered), or a canvas drawn with WebGPU, WebGL2, WebGL or
10332
+ * Canvas2D (`renderer`). The color follows the text color unless set.
10333
+ * Pass a built-in icon constant of `minerva-design/icons/core` (e.g.
10334
+ * `searchIcon`) or a `defineIcon` result.
10335
+ */
10336
+ export declare class MnIcon extends MnIconBase {
10337
+ /** The icon to draw: a built-in one (e.g. `searchIcon`) or a `defineIcon` result */
10338
+ readonly icon: import("@angular/core").InputSignal<IconDefinition>;
10339
+ protected readonly definition: Signal<IconDefinition | null>;
10340
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnIcon, never>;
10341
+ static ɵcmp: i0.ɵɵComponentDeclaration<MnIcon, "mn-icon", never, {
10342
+ "icon": {
10343
+ "alias": "icon";
10344
+ "required": true;
10345
+ "isSignal": true;
10346
+ };
10347
+ }, {}, never, never, true, never>;
10348
+ }
10349
+ /**
10350
+ * A built-in icon chosen by name at runtime (from data, a CMS…). It bundles
10351
+ * the whole set: prefer `MnIcon` with an icon constant when the icon is
10352
+ * known when writing the code.
10353
+ */
10354
+ export declare class MnDynamicIcon extends MnIconBase {
10355
+ /** Name of a built-in icon (e.g. `"arrow-up"`); unknown names render nothing */
10356
+ readonly name: import("@angular/core").InputSignal<string>;
10357
+ protected readonly definition: Signal<IconDefinition | null>;
10358
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnDynamicIcon, never>;
10359
+ static ɵcmp: i0.ɵɵComponentDeclaration<MnDynamicIcon, "mn-dynamic-icon", never, {
10360
+ "name": {
10361
+ "alias": "name";
10362
+ "required": true;
10363
+ "isSignal": true;
10364
+ };
10365
+ }, {}, never, never, true, never>;
10366
+ }
10367
+ /**
10368
+ * Many icons on one canvas: one instanced GPU draw per run of identical
10369
+ * icons (WebGPU, WebGL2, WebGL) or Canvas2D. For dense pictures, maps,
10370
+ * particles, animations of thousands of icons; for icons in the UI, use
10371
+ * `MnIcon`. With `renderer` `auto`, it follows the global default
10372
+ * (`setDefaultIconRenderer`) live.
10373
+ */
10374
+ export declare class MnIconCanvas {
10375
+ /** Icons to draw, in painting order (later ones on top), positions in CSS pixels */
10376
+ readonly items: import("@angular/core").InputSignal<readonly IconCanvasItem[]>;
10377
+ /** Backend preference; `auto` follows the global default */
10378
+ readonly renderer: import("@angular/core").InputSignal<IconRendererPreference>;
10379
+ /** Width (a number is in pixels) */
10380
+ readonly width: import("@angular/core").InputSignal<string | number>;
10381
+ /** Height (a number is in pixels) */
10382
+ readonly height: import("@angular/core").InputSignal<string | number>;
10383
+ /** Device pixel ratio (`window.devicePixelRatio` by default) */
10384
+ readonly pixelRatio: import("@angular/core").InputSignal<number | undefined>;
10385
+ /** Accessible name of the whole picture (`role="img"`); without it the canvas is hidden from assistive technologies */
10386
+ readonly title: import("@angular/core").InputSignal<string | undefined>;
10387
+ /** Accessible name without `title` (the picture becomes `role="img"`) */
10388
+ readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
10389
+ /** id(s) of the element(s) naming the picture (it becomes `role="img"`) */
10390
+ readonly ariaLabelledby: import("@angular/core").InputSignal<string | undefined>;
10391
+ /** The backend started, and again after a fallback */
10392
+ readonly rendererChange: import("@angular/core").OutputEmitterRef<IconRendererKind>;
10393
+ protected readonly labelled: import("@angular/core").Signal<boolean>;
10394
+ protected readonly cssWidth: import("@angular/core").Signal<string>;
10395
+ protected readonly cssHeight: import("@angular/core").Signal<string>;
10396
+ private controller;
10397
+ constructor();
10398
+ /** The backend drawing (null until it started) */
10399
+ getRenderer(): IconRendererKind | null;
10400
+ /** The `<canvas>` element (null before the first render in the browser) */
10401
+ getCanvas(): HTMLCanvasElement | null;
10402
+ /** Resolves once the backend started and the current items are drawn */
10403
+ ready(): Promise<IconRendererKind>;
10404
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnIconCanvas, never>;
10405
+ static ɵcmp: i0.ɵɵComponentDeclaration<MnIconCanvas, "mn-icon-canvas", never, {
10406
+ "items": {
10407
+ "alias": "items";
10408
+ "required": true;
10409
+ "isSignal": true;
10410
+ };
10411
+ "renderer": {
10412
+ "alias": "renderer";
10413
+ "required": false;
10414
+ "isSignal": true;
10415
+ };
10416
+ "width": {
10417
+ "alias": "width";
10418
+ "required": false;
10419
+ "isSignal": true;
10420
+ };
10421
+ "height": {
10422
+ "alias": "height";
10423
+ "required": false;
10424
+ "isSignal": true;
10425
+ };
10426
+ "pixelRatio": {
10427
+ "alias": "pixelRatio";
10428
+ "required": false;
10429
+ "isSignal": true;
10430
+ };
10431
+ "title": {
10432
+ "alias": "title";
10433
+ "required": false;
10434
+ "isSignal": true;
10435
+ };
10436
+ "ariaLabel": {
10437
+ "alias": "aria-label";
10438
+ "required": false;
10439
+ "isSignal": true;
10440
+ };
10441
+ "ariaLabelledby": {
10442
+ "alias": "aria-labelledby";
10443
+ "required": false;
10444
+ "isSignal": true;
10445
+ };
10446
+ }, {
10447
+ "rendererChange": "rendererChange";
10448
+ }, never, never, true, never>;
10449
+ }
10239
10450
  /** Shares tooltip timing within a subtree. Recently opened tooltips skip the
10240
10451
  * initial delay when the pointer moves between controls. Nested providers isolate timing. */
10241
10452
  export declare class MnTooltipProvider {