@eagami/ui 5.74.0 → 5.76.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eagami/ui",
3
- "version": "5.74.0",
3
+ "version": "5.76.0",
4
4
  "description": "Lightweight, accessible, themeable Angular UI component library and icon set built on CSS custom properties",
5
5
  "author": "Michal Wiraszka <michal@eagami.com>",
6
6
  "license": "MIT",
@@ -33,7 +33,13 @@
33
33
  "peerDependencies": {
34
34
  "@angular/common": "^21.0.0 || ^22.0.0",
35
35
  "@angular/core": "^21.0.0 || ^22.0.0",
36
- "@angular/forms": "^21.0.0 || ^22.0.0"
36
+ "@angular/forms": "^21.0.0 || ^22.0.0",
37
+ "@angular/router": "^21.0.0 || ^22.0.0"
38
+ },
39
+ "peerDependenciesMeta": {
40
+ "@angular/router": {
41
+ "optional": true
42
+ }
37
43
  },
38
44
  "dependencies": {},
39
45
  "engines": {
@@ -49,6 +55,10 @@
49
55
  "types": "./types/eagami-ui.d.ts",
50
56
  "default": "./fesm2022/eagami-ui.mjs"
51
57
  },
58
+ "./router": {
59
+ "types": "./types/eagami-ui-router.d.ts",
60
+ "default": "./fesm2022/eagami-ui-router.mjs"
61
+ },
52
62
  "./testing": {
53
63
  "types": "./types/eagami-ui-testing.d.ts",
54
64
  "default": "./fesm2022/eagami-ui-testing.mjs"
@@ -61,6 +71,7 @@
61
71
  "src/styles",
62
72
  "schematics",
63
73
  "testing",
74
+ "router",
64
75
  "README.md"
65
76
  ],
66
77
  "schematics": "./schematics/collection.json"
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/eagami-ui-router.mjs",
3
+ "typings": "../types/eagami-ui-router.d.ts"
4
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schematics": {
3
3
  "ng-add": {
4
- "description": "Set up Eagami UI: register the global stylesheet and fonts in an Angular workspace.",
4
+ "description": "Set up Eagami UI: register the global stylesheet, the fonts, and provideStaleBuildReload() in an Angular workspace.",
5
5
  "factory": "./ng-add/index#ngAdd",
6
6
  "schema": "./ng-add/schema.json"
7
7
  }
@@ -2,10 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ngAdd = ngAdd;
4
4
  const schematics_1 = require("@angular-devkit/schematics");
5
+ const utility_1 = require("@schematics/angular/utility");
5
6
  const workspace_1 = require("@schematics/angular/utility/workspace");
6
7
  const utils_1 = require("./utils");
7
8
  function ngAdd(options) {
8
- return (0, schematics_1.chain)([registerStylesheet(options), registerFonts(options), logNextSteps()]);
9
+ return (0, schematics_1.chain)([
10
+ registerStylesheet(options),
11
+ registerFonts(options),
12
+ registerStaleBuildReload(options),
13
+ logNextSteps(),
14
+ ]);
9
15
  }
10
16
  function registerStylesheet(options) {
11
17
  return (0, workspace_1.updateWorkspace)(workspace => {
@@ -41,9 +47,15 @@ function registerFonts(options) {
41
47
  }
42
48
  };
43
49
  }
50
+ function registerStaleBuildReload(options) {
51
+ return async (tree) => {
52
+ const { name } = findProject(await (0, workspace_1.getWorkspace)(tree), options.project);
53
+ return (0, utility_1.addRootProvider)(name, ({ code, external }) => code `${external('provideStaleBuildReload', '@eagami/ui/router')}()`);
54
+ };
55
+ }
44
56
  function logNextSteps() {
45
57
  return (_tree, context) => {
46
- context.logger.info('Eagami UI is set up: the global stylesheet and fonts are registered.');
58
+ context.logger.info('Eagami UI is set up: the global stylesheet and fonts are registered, and provideStaleBuildReload() reloads a tab left open across a deploy into the new build.');
47
59
  context.logger.info('Optional: call provideEagamiUi() in app.config.ts for a custom brand palette or extra locales.');
48
60
  };
49
61
  }
@@ -0,0 +1,54 @@
1
+ import { EnvironmentProviders, InjectionToken } from "@angular/core";
2
+ /**
3
+ * How a reload into the current build turned out:
4
+ *
5
+ * - `'recovered'`: the reloaded page opened
6
+ * - `'failed-after-reload'`: the reloaded page failed to open too, so the error is left to surface
7
+ * - `'stayed'`: the visitor chose to stay when the browser asked them to confirm leaving
8
+ */
9
+ type StaleBuildReloadOutcome = 'recovered' | 'failed-after-reload' | 'stayed';
10
+ interface StaleBuildReloadReport {
11
+ outcome: StaleBuildReloadOutcome;
12
+ /** The path that failed to open, without its query or fragment. */
13
+ route: string;
14
+ /** The `version` configured in the build that failed to open the page. */
15
+ fromVersion?: string;
16
+ /** The `version` configured in the build making the report. */
17
+ toVersion?: string;
18
+ }
19
+ interface StaleBuildReloadConfig {
20
+ /** The app's version, carried across the reload so a report names both builds. */
21
+ version?: string;
22
+ /** Called once per reload with how it turned out, for example to log it. */
23
+ onReport?: (report: StaleBuildReloadReport) => void;
24
+ }
25
+ declare const LOAD_PAGE: InjectionToken<(url: string, replace: boolean) => void>;
26
+ /**
27
+ * Whether `error` is a failed page load that `provideStaleBuildReload()` has
28
+ * already answered by reloading. Error reporters can drop it, since the
29
+ * reload's outcome reaches `onReport` instead:
30
+ *
31
+ * ```ts
32
+ * Sentry.init({
33
+ * beforeSend: (event, hint) =>
34
+ * isStaleBuildReloadError(hint.originalException) ? null : event,
35
+ * });
36
+ * ```
37
+ */
38
+ export declare function isStaleBuildReloadError(error: unknown): boolean;
39
+ /**
40
+ * Loads the current build in full when the code of a page being opened fails
41
+ * to load, which is what a tab still running a build that a deploy has since
42
+ * replaced runs into. The reload opens the page the visitor asked for, and
43
+ * stops after one attempt if the new build fails as well.
44
+ *
45
+ * ```ts
46
+ * bootstrapApplication(AppComponent, {
47
+ * providers: [provideRouter(routes), provideStaleBuildReload()],
48
+ * });
49
+ * ```
50
+ *
51
+ * Does nothing during server rendering.
52
+ */
53
+ export declare function provideStaleBuildReload(config?: StaleBuildReloadConfig): EnvironmentProviders;
54
+ export type { StaleBuildReloadConfig, StaleBuildReloadOutcome, StaleBuildReloadReport };
@@ -9138,8 +9138,8 @@ export declare function iconDisplayName(iconOrSlug: IconComponentType | string):
9138
9138
  * sorted by `slug` so that consumers iterating it (the `/ui/icons` reference
9139
9139
  * page, the sandbox gallery, downstream pickers) get a stable alphabetical
9140
9140
  * order where a base icon always precedes its `-2` variant (e.g. `facebook`
9141
- * before `facebook-2`). The literal below is kept in class-name order so a new
9142
- * icon has one obvious insertion point; the `.sort()` at the bottom is the
9141
+ * before `facebook-2`). The imports and the class-name-ordered literal below
9142
+ * are generated by `pnpm regen-docs`; the `.sort()` at the bottom is the
9143
9143
  * source of truth for consumers.
9144
9144
  *
9145
9145
  * Bundle-size note: importing this constant brings every icon component into
@@ -9435,6 +9435,13 @@ export declare class BanIconComponent extends IconComponentBase {
9435
9435
  static ɵfac: i0.ɵɵFactoryDeclaration<BanIconComponent, never>;
9436
9436
  static ɵcmp: i0.ɵɵComponentDeclaration<BanIconComponent, "ea-icon-ban", never, {}, {}, never, never, true, never>;
9437
9437
  }
9438
+ export declare class BanknoteIconComponent extends IconComponentBase {
9439
+ static readonly slug = "banknote";
9440
+ static readonly category: IconCategory;
9441
+ static readonly tags: ReadonlyArray<string>;
9442
+ static ɵfac: i0.ɵɵFactoryDeclaration<BanknoteIconComponent, never>;
9443
+ static ɵcmp: i0.ɵɵComponentDeclaration<BanknoteIconComponent, "ea-icon-banknote", never, {}, {}, never, never, true, never>;
9444
+ }
9438
9445
  export declare class BarChartIconComponent extends IconComponentBase {
9439
9446
  static readonly slug = "bar-chart";
9440
9447
  static readonly category: IconCategory;
@@ -9639,6 +9646,13 @@ export declare class BuildingIconComponent extends IconComponentBase {
9639
9646
  static ɵfac: i0.ɵɵFactoryDeclaration<BuildingIconComponent, never>;
9640
9647
  static ɵcmp: i0.ɵɵComponentDeclaration<BuildingIconComponent, "ea-icon-building", never, {}, {}, never, never, true, never>;
9641
9648
  }
9649
+ export declare class BusIconComponent extends IconComponentBase {
9650
+ static readonly slug = "bus";
9651
+ static readonly category: IconCategory;
9652
+ static readonly tags: ReadonlyArray<string>;
9653
+ static ɵfac: i0.ɵɵFactoryDeclaration<BusIconComponent, never>;
9654
+ static ɵcmp: i0.ɵɵComponentDeclaration<BusIconComponent, "ea-icon-bus", never, {}, {}, never, never, true, never>;
9655
+ }
9642
9656
  export declare class CakeIconComponent extends IconComponentBase {
9643
9657
  static readonly slug = "cake";
9644
9658
  static readonly category: IconCategory;
@@ -10480,6 +10494,13 @@ export declare class FileIconComponent extends IconComponentBase {
10480
10494
  static ɵfac: i0.ɵɵFactoryDeclaration<FileIconComponent, never>;
10481
10495
  static ɵcmp: i0.ɵɵComponentDeclaration<FileIconComponent, "ea-icon-file", never, {}, {}, never, never, true, never>;
10482
10496
  }
10497
+ export declare class FileArchiveIconComponent extends IconComponentBase {
10498
+ static readonly slug = "file-archive";
10499
+ static readonly category: IconCategory;
10500
+ static readonly tags: ReadonlyArray<string>;
10501
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileArchiveIconComponent, never>;
10502
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileArchiveIconComponent, "ea-icon-file-archive", never, {}, {}, never, never, true, never>;
10503
+ }
10483
10504
  export declare class FileAudioIconComponent extends IconComponentBase {
10484
10505
  static readonly slug = "file-audio";
10485
10506
  static readonly category: IconCategory;
@@ -10991,6 +11012,13 @@ export declare class InboxIconComponent extends IconComponentBase {
10991
11012
  static ɵfac: i0.ɵɵFactoryDeclaration<InboxIconComponent, never>;
10992
11013
  static ɵcmp: i0.ɵɵComponentDeclaration<InboxIconComponent, "ea-icon-inbox", never, {}, {}, never, never, true, never>;
10993
11014
  }
11015
+ export declare class IndentIconComponent extends IconComponentBase {
11016
+ static readonly slug = "indent";
11017
+ static readonly category: IconCategory;
11018
+ static readonly tags: ReadonlyArray<string>;
11019
+ static ɵfac: i0.ɵɵFactoryDeclaration<IndentIconComponent, never>;
11020
+ static ɵcmp: i0.ɵɵComponentDeclaration<IndentIconComponent, "ea-icon-indent", never, {}, {}, never, never, true, never>;
11021
+ }
10994
11022
  export declare class InfoIconComponent extends IconComponentBase {
10995
11023
  static readonly slug = "info";
10996
11024
  static readonly category: IconCategory;
@@ -11597,6 +11625,13 @@ export declare class OctagonIconComponent extends IconComponentBase {
11597
11625
  static ɵfac: i0.ɵɵFactoryDeclaration<OctagonIconComponent, never>;
11598
11626
  static ɵcmp: i0.ɵɵComponentDeclaration<OctagonIconComponent, "ea-icon-octagon", never, {}, {}, never, never, true, never>;
11599
11627
  }
11628
+ export declare class OutdentIconComponent extends IconComponentBase {
11629
+ static readonly slug = "outdent";
11630
+ static readonly category: IconCategory;
11631
+ static readonly tags: ReadonlyArray<string>;
11632
+ static ɵfac: i0.ɵɵFactoryDeclaration<OutdentIconComponent, never>;
11633
+ static ɵcmp: i0.ɵɵComponentDeclaration<OutdentIconComponent, "ea-icon-outdent", never, {}, {}, never, never, true, never>;
11634
+ }
11600
11635
  export declare class PackageIconComponent extends IconComponentBase {
11601
11636
  static readonly slug = "package";
11602
11637
  static readonly category: IconCategory;
@@ -11752,6 +11787,13 @@ export declare class PiggyBankIconComponent extends IconComponentBase {
11752
11787
  static ɵfac: i0.ɵɵFactoryDeclaration<PiggyBankIconComponent, never>;
11753
11788
  static ɵcmp: i0.ɵɵComponentDeclaration<PiggyBankIconComponent, "ea-icon-piggy-bank", never, {}, {}, never, never, true, never>;
11754
11789
  }
11790
+ export declare class PillIconComponent extends IconComponentBase {
11791
+ static readonly slug = "pill";
11792
+ static readonly category: IconCategory;
11793
+ static readonly tags: ReadonlyArray<string>;
11794
+ static ɵfac: i0.ɵɵFactoryDeclaration<PillIconComponent, never>;
11795
+ static ɵcmp: i0.ɵɵComponentDeclaration<PillIconComponent, "ea-icon-pill", never, {}, {}, never, never, true, never>;
11796
+ }
11755
11797
  export declare class PinIconComponent extends IconComponentBase {
11756
11798
  static readonly slug = "pin";
11757
11799
  static readonly category: IconCategory;
@@ -12134,6 +12176,13 @@ export declare class SaveIconComponent extends IconComponentBase {
12134
12176
  static ɵfac: i0.ɵɵFactoryDeclaration<SaveIconComponent, never>;
12135
12177
  static ɵcmp: i0.ɵɵComponentDeclaration<SaveIconComponent, "ea-icon-save", never, {}, {}, never, never, true, never>;
12136
12178
  }
12179
+ export declare class ScaleIconComponent extends IconComponentBase {
12180
+ static readonly slug = "scale";
12181
+ static readonly category: IconCategory;
12182
+ static readonly tags: ReadonlyArray<string>;
12183
+ static ɵfac: i0.ɵɵFactoryDeclaration<ScaleIconComponent, never>;
12184
+ static ɵcmp: i0.ɵɵComponentDeclaration<ScaleIconComponent, "ea-icon-scale", never, {}, {}, never, never, true, never>;
12185
+ }
12137
12186
  export declare class ScanIconComponent extends IconComponentBase {
12138
12187
  static readonly slug = "scan";
12139
12188
  static readonly category: IconCategory;
@@ -12289,6 +12338,41 @@ export declare class SidebarIconComponent extends IconComponentBase {
12289
12338
  static ɵfac: i0.ɵɵFactoryDeclaration<SidebarIconComponent, never>;
12290
12339
  static ɵcmp: i0.ɵɵComponentDeclaration<SidebarIconComponent, "ea-icon-sidebar", never, {}, {}, never, never, true, never>;
12291
12340
  }
12341
+ export declare class SignalFullIconComponent extends IconComponentBase {
12342
+ static readonly slug = "signal-full";
12343
+ static readonly category: IconCategory;
12344
+ static readonly tags: ReadonlyArray<string>;
12345
+ static ɵfac: i0.ɵɵFactoryDeclaration<SignalFullIconComponent, never>;
12346
+ static ɵcmp: i0.ɵɵComponentDeclaration<SignalFullIconComponent, "ea-icon-signal-full", never, {}, {}, never, never, true, never>;
12347
+ }
12348
+ export declare class SignalHighIconComponent extends IconComponentBase {
12349
+ static readonly slug = "signal-high";
12350
+ static readonly category: IconCategory;
12351
+ static readonly tags: ReadonlyArray<string>;
12352
+ static ɵfac: i0.ɵɵFactoryDeclaration<SignalHighIconComponent, never>;
12353
+ static ɵcmp: i0.ɵɵComponentDeclaration<SignalHighIconComponent, "ea-icon-signal-high", never, {}, {}, never, never, true, never>;
12354
+ }
12355
+ export declare class SignalLowIconComponent extends IconComponentBase {
12356
+ static readonly slug = "signal-low";
12357
+ static readonly category: IconCategory;
12358
+ static readonly tags: ReadonlyArray<string>;
12359
+ static ɵfac: i0.ɵɵFactoryDeclaration<SignalLowIconComponent, never>;
12360
+ static ɵcmp: i0.ɵɵComponentDeclaration<SignalLowIconComponent, "ea-icon-signal-low", never, {}, {}, never, never, true, never>;
12361
+ }
12362
+ export declare class SignalMediumIconComponent extends IconComponentBase {
12363
+ static readonly slug = "signal-medium";
12364
+ static readonly category: IconCategory;
12365
+ static readonly tags: ReadonlyArray<string>;
12366
+ static ɵfac: i0.ɵɵFactoryDeclaration<SignalMediumIconComponent, never>;
12367
+ static ɵcmp: i0.ɵɵComponentDeclaration<SignalMediumIconComponent, "ea-icon-signal-medium", never, {}, {}, never, never, true, never>;
12368
+ }
12369
+ export declare class SignalNoneIconComponent extends IconComponentBase {
12370
+ static readonly slug = "signal-none";
12371
+ static readonly category: IconCategory;
12372
+ static readonly tags: ReadonlyArray<string>;
12373
+ static ɵfac: i0.ɵɵFactoryDeclaration<SignalNoneIconComponent, never>;
12374
+ static ɵcmp: i0.ɵɵComponentDeclaration<SignalNoneIconComponent, "ea-icon-signal-none", never, {}, {}, never, never, true, never>;
12375
+ }
12292
12376
  export declare class SineWaveIconComponent extends IconComponentBase {
12293
12377
  static readonly slug = "sine-wave";
12294
12378
  static readonly category: IconCategory;
@@ -12382,6 +12466,20 @@ export declare class SoccerBallIconComponent extends IconComponentBase {
12382
12466
  static ɵfac: i0.ɵɵFactoryDeclaration<SoccerBallIconComponent, never>;
12383
12467
  static ɵcmp: i0.ɵɵComponentDeclaration<SoccerBallIconComponent, "ea-icon-soccer-ball", never, {}, {}, never, never, true, never>;
12384
12468
  }
12469
+ export declare class SortAscendingIconComponent extends IconComponentBase {
12470
+ static readonly slug = "sort-ascending";
12471
+ static readonly category: IconCategory;
12472
+ static readonly tags: ReadonlyArray<string>;
12473
+ static ɵfac: i0.ɵɵFactoryDeclaration<SortAscendingIconComponent, never>;
12474
+ static ɵcmp: i0.ɵɵComponentDeclaration<SortAscendingIconComponent, "ea-icon-sort-ascending", never, {}, {}, never, never, true, never>;
12475
+ }
12476
+ export declare class SortDescendingIconComponent extends IconComponentBase {
12477
+ static readonly slug = "sort-descending";
12478
+ static readonly category: IconCategory;
12479
+ static readonly tags: ReadonlyArray<string>;
12480
+ static ɵfac: i0.ɵɵFactoryDeclaration<SortDescendingIconComponent, never>;
12481
+ static ɵcmp: i0.ɵɵComponentDeclaration<SortDescendingIconComponent, "ea-icon-sort-descending", never, {}, {}, never, never, true, never>;
12482
+ }
12385
12483
  export declare class SparklesIconComponent extends IconComponentBase {
12386
12484
  static readonly slug = "sparkles";
12387
12485
  static readonly category: IconCategory;