@magmonium/one 0.4.42 → 0.4.44
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/fesm2022/{magmonium-one-attribute-value-DCTXt4Sr.mjs → magmonium-one-attribute-value-C1lqou2L.mjs} +3 -3
- package/fesm2022/{magmonium-one-attribute-value-DCTXt4Sr.mjs.map → magmonium-one-attribute-value-C1lqou2L.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-base-checkbox-BNQAkyYU.mjs → magmonium-one-base-checkbox-CIxAiA4Q.mjs} +2 -2
- package/fesm2022/{magmonium-one-base-checkbox-BNQAkyYU.mjs.map → magmonium-one-base-checkbox-CIxAiA4Q.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-base-dropdown-CcZ0lBQv.mjs → magmonium-one-base-dropdown-XpTWe4Ii.mjs} +10 -10
- package/fesm2022/{magmonium-one-base-dropdown-CcZ0lBQv.mjs.map → magmonium-one-base-dropdown-XpTWe4Ii.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-base-input-BTxhUtYO.mjs → magmonium-one-base-input-C1Ek0Ezm.mjs} +2 -2
- package/fesm2022/{magmonium-one-base-input-BTxhUtYO.mjs.map → magmonium-one-base-input-C1Ek0Ezm.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-base-text-BCSqKmVs.mjs → magmonium-one-base-text-Di2V2ojp.mjs} +2 -2
- package/fesm2022/{magmonium-one-base-text-BCSqKmVs.mjs.map → magmonium-one-base-text-Di2V2ojp.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-button-BZQOf-Pm.mjs → magmonium-one-button-DZ4wCJgb.mjs} +7 -7
- package/fesm2022/{magmonium-one-button-BZQOf-Pm.mjs.map → magmonium-one-button-DZ4wCJgb.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-checkbox-D5-5WhJ-.mjs → magmonium-one-checkbox-R-hPZrCa.mjs} +5 -5
- package/fesm2022/{magmonium-one-checkbox-D5-5WhJ-.mjs.map → magmonium-one-checkbox-R-hPZrCa.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-color-utl-D86GGpz5.mjs → magmonium-one-color-utl-DI5p24iQ.mjs} +209 -6
- package/fesm2022/magmonium-one-color-utl-DI5p24iQ.mjs.map +1 -0
- package/fesm2022/{magmonium-one-directives-DePukAj8.mjs → magmonium-one-directives-B93p5bAL.mjs} +4 -4
- package/fesm2022/{magmonium-one-directives-DePukAj8.mjs.map → magmonium-one-directives-B93p5bAL.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-group-Dl2bp-y-.mjs → magmonium-one-group-B7YeUd1u.mjs} +7 -7
- package/fesm2022/{magmonium-one-group-Dl2bp-y-.mjs.map → magmonium-one-group-B7YeUd1u.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-header-DhK9NuZW.mjs → magmonium-one-header-DUiBhPUP.mjs} +4 -4
- package/fesm2022/{magmonium-one-header-DhK9NuZW.mjs.map → magmonium-one-header-DUiBhPUP.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-icon-BgbtOdMv.mjs → magmonium-one-icon-C3jwzbb2.mjs} +13 -165
- package/fesm2022/magmonium-one-icon-C3jwzbb2.mjs.map +1 -0
- package/fesm2022/{magmonium-one-image-editor-oGxg59hV.mjs → magmonium-one-image-editor-BRTk8i4O.mjs} +4 -4
- package/fesm2022/{magmonium-one-image-editor-oGxg59hV.mjs.map → magmonium-one-image-editor-BRTk8i4O.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-label-DjvJthAB.mjs → magmonium-one-label-D_rU82nD.mjs} +2 -2
- package/fesm2022/{magmonium-one-label-DjvJthAB.mjs.map → magmonium-one-label-D_rU82nD.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-m-ref-C8c4Vf1G.mjs → magmonium-one-m-ref-CEms7B6-.mjs} +2 -2
- package/fesm2022/{magmonium-one-m-ref-C8c4Vf1G.mjs.map → magmonium-one-m-ref-CEms7B6-.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-menu-bI7lVUYI.mjs → magmonium-one-menu-cO34OcJc.mjs} +6 -6
- package/fesm2022/{magmonium-one-menu-bI7lVUYI.mjs.map → magmonium-one-menu-cO34OcJc.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-multi-range-o57TiVJU.mjs → magmonium-one-multi-range-Bq3_3NHg.mjs} +3 -3
- package/fesm2022/{magmonium-one-multi-range-o57TiVJU.mjs.map → magmonium-one-multi-range-Bq3_3NHg.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-options-asset-EVsv0DL7.mjs → magmonium-one-options-asset-BMd7W0Mk.mjs} +2 -2
- package/fesm2022/{magmonium-one-options-asset-EVsv0DL7.mjs.map → magmonium-one-options-asset-BMd7W0Mk.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-otp-CE4L1RcG.mjs → magmonium-one-otp-V2tFztLx.mjs} +5 -5
- package/fesm2022/{magmonium-one-otp-CE4L1RcG.mjs.map → magmonium-one-otp-V2tFztLx.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-password-BIs_YxJ5.mjs → magmonium-one-password-IdllPMUw.mjs} +6 -6
- package/fesm2022/{magmonium-one-password-BIs_YxJ5.mjs.map → magmonium-one-password-IdllPMUw.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-radio-C2wOB_Nb.mjs → magmonium-one-radio-BAL3-3j5.mjs} +3 -3
- package/fesm2022/{magmonium-one-radio-C2wOB_Nb.mjs.map → magmonium-one-radio-BAL3-3j5.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-range-rgDe4O8u.mjs → magmonium-one-range-Cf7yUnhN.mjs} +4 -4
- package/fesm2022/{magmonium-one-range-rgDe4O8u.mjs.map → magmonium-one-range-Cf7yUnhN.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-selector-DeRIUUBA.mjs → magmonium-one-selector-DAEI_0JX.mjs} +4 -4
- package/fesm2022/{magmonium-one-selector-DeRIUUBA.mjs.map → magmonium-one-selector-DAEI_0JX.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-size-converter-C5fG_dgw.mjs → magmonium-one-size-converter-BOBD8nHy.mjs} +8 -1
- package/fesm2022/magmonium-one-size-converter-BOBD8nHy.mjs.map +1 -0
- package/fesm2022/{magmonium-one-text-BvXdAX0i.mjs → magmonium-one-text-BnTkYLJe.mjs} +6 -6
- package/fesm2022/{magmonium-one-text-BvXdAX0i.mjs.map → magmonium-one-text-BnTkYLJe.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-text-output-Ci93Hi9Y.mjs → magmonium-one-text-output-BZU61QIF.mjs} +4 -4
- package/fesm2022/{magmonium-one-text-output-Ci93Hi9Y.mjs.map → magmonium-one-text-output-BZU61QIF.mjs.map} +1 -1
- package/fesm2022/magmonium-one-theme-DYvNIWmo.mjs +1 -0
- package/fesm2022/{magmonium-one-toggle-BTK2lzqA.mjs → magmonium-one-toggle-V_YnZXx5.mjs} +3 -3
- package/fesm2022/{magmonium-one-toggle-BTK2lzqA.mjs.map → magmonium-one-toggle-V_YnZXx5.mjs.map} +1 -1
- package/fesm2022/magmonium-one.mjs +669 -234
- package/fesm2022/magmonium-one.mjs.map +1 -1
- package/package.json +1 -1
- package/types/magmonium-one.d.ts +171 -8
- package/fesm2022/magmonium-one-color-utl-D86GGpz5.mjs.map +0 -1
- package/fesm2022/magmonium-one-icon-BgbtOdMv.mjs.map +0 -1
- package/fesm2022/magmonium-one-size-converter-C5fG_dgw.mjs.map +0 -1
- package/fesm2022/magmonium-one-theme-CT4cWpe7.mjs +0 -1
package/package.json
CHANGED
package/types/magmonium-one.d.ts
CHANGED
|
@@ -714,6 +714,8 @@ export interface LoadingActionsApi {
|
|
|
714
714
|
export declare class SharedStoreRegistry {
|
|
715
715
|
static setNavStore(store: unknown): void;
|
|
716
716
|
static getNavStore(): unknown;
|
|
717
|
+
static setAppLogoState(state: unknown): void;
|
|
718
|
+
static getAppLogoState(): unknown;
|
|
717
719
|
static setLoginStore(store: unknown): void;
|
|
718
720
|
static getLoginStore(): unknown;
|
|
719
721
|
/** First-write-wins: host registers its store; WC bundles reuse it so popups render in the host outlet. */
|
|
@@ -2602,6 +2604,16 @@ export declare function rebuildLogoGlyph(markup: string): LogoGlyphResult;
|
|
|
2602
2604
|
export declare const normalizeAppColor: (value: string) => string | undefined;
|
|
2603
2605
|
/** The AppLogo's shadow: App Color mixed with 20% black. */
|
|
2604
2606
|
export declare const appLogoShadowColor: (color: string) => string;
|
|
2607
|
+
/**
|
|
2608
|
+
* The theme's brand tokens (`mm`, `mmLite`, `mmDark`) as one App Color draws
|
|
2609
|
+
* them — what an app's own boundary paints its `mm` with in place of the
|
|
2610
|
+
* theme's.
|
|
2611
|
+
*/
|
|
2612
|
+
export declare const appColorBrand: (color: string) => {
|
|
2613
|
+
mm: string;
|
|
2614
|
+
mmLite: string;
|
|
2615
|
+
mmDark: string;
|
|
2616
|
+
};
|
|
2605
2617
|
/**
|
|
2606
2618
|
* Whether a white glyph reads poorly over this App Color: contrast under 3:1,
|
|
2607
2619
|
* the WCAG floor for graphical objects. A warning, never a refusal.
|
|
@@ -2656,23 +2668,65 @@ export type AppLogoSource = {
|
|
|
2656
2668
|
glyph?: string | null;
|
|
2657
2669
|
src?: string;
|
|
2658
2670
|
name?: string | null;
|
|
2671
|
+
/** App Color, `#rrggbb`, as Store holds it; null until the Owner sets one. */
|
|
2672
|
+
color?: string | null;
|
|
2659
2673
|
};
|
|
2660
2674
|
/**
|
|
2661
|
-
* Where NavStore publishes the
|
|
2662
|
-
*
|
|
2675
|
+
* Where NavStore publishes the AppLogo. Shared rather than read off NavStore
|
|
2676
|
+
* because `m-icon` sits below features and cannot import it — and handed to a
|
|
2677
|
+
* mounted WC through SharedStoreRegistry, since a WC reads the host's NavStore.
|
|
2678
|
+
* `logos` is every app NavStore knows the identity of, by AppLink: a host may
|
|
2679
|
+
* mount several at once, so each WC looks up its own. `source` is the fallback.
|
|
2663
2680
|
*/
|
|
2664
2681
|
export declare class AppLogoState {
|
|
2665
2682
|
#private;
|
|
2666
2683
|
readonly source: Signal<AppLogoSource | undefined>;
|
|
2684
|
+
readonly logos: Signal<Record<string, AppLogoSource>>;
|
|
2667
2685
|
readonly set: (source: AppLogoSource | undefined) => void;
|
|
2686
|
+
readonly setLogos: (logos: Record<string, AppLogoSource>) => void;
|
|
2668
2687
|
static ɵfac: i0.ɵɵFactoryDeclaration<AppLogoState, never>;
|
|
2669
2688
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
2670
2689
|
}
|
|
2671
2690
|
/**
|
|
2672
|
-
* What `m-icon name="app_logo"` draws
|
|
2691
|
+
* What `m-icon name="app_logo"` draws: this app's own entry, by the AppLink
|
|
2692
|
+
* AssetStore holds (a mounted WC's, from `bindApp`), else the fallback. A
|
|
2673
2693
|
* visual editor provides its own so the Canvas shows the AppTarget's logo.
|
|
2674
2694
|
*/
|
|
2675
2695
|
export declare const APP_LOGO_SOURCE: InjectionToken<Signal<AppLogoSource | undefined>>;
|
|
2696
|
+
/**
|
|
2697
|
+
* This app's App Color, which its own boundary paints as the theme's `mm`
|
|
2698
|
+
* (ThemeStore `color`). Unset at the host's root, so the host's chrome keeps
|
|
2699
|
+
* the theme's brand; a WC and a standalone Run provide it from
|
|
2700
|
+
* `appThemeColorFactory`. Unset too while the Owner has set none, and the
|
|
2701
|
+
* theme's own `mm` stands.
|
|
2702
|
+
*/
|
|
2703
|
+
export declare const APP_THEME_COLOR: InjectionToken<Signal<string | undefined>>;
|
|
2704
|
+
/** This app's App Color off the identities NavStore publishes, by its AppLink. */
|
|
2705
|
+
export declare const appThemeColorFactory: () => Signal<string | undefined>;
|
|
2706
|
+
/**
|
|
2707
|
+
* Paints an App Color's brand tokens onto the element that bounds the app —
|
|
2708
|
+
* every `m.$mm` inside it reads them — or clears them, leaving the theme's.
|
|
2709
|
+
*/
|
|
2710
|
+
export declare const paintAppColor: (element: HTMLElement, color: string | undefined) => void;
|
|
2711
|
+
/**
|
|
2712
|
+
* The element id of a page's Splash (GLOSSARY.md Splash). `OneApp` hides it
|
|
2713
|
+
* once the theme is ready, so an emitted page only has to carry it.
|
|
2714
|
+
*/
|
|
2715
|
+
export declare const SPLASH_ID = "m-splash";
|
|
2716
|
+
/** What a Splash is drawn from: App Color, LogoGlyph, and the letter fallback. */
|
|
2717
|
+
export type SplashSource = {
|
|
2718
|
+
appColor: string;
|
|
2719
|
+
glyph?: string | null;
|
|
2720
|
+
/** The AppLink: its first letter stands in when there is no glyph. */
|
|
2721
|
+
link: string;
|
|
2722
|
+
};
|
|
2723
|
+
/**
|
|
2724
|
+
* A page's Splash as static markup, for an emitted `index.html`: App Color
|
|
2725
|
+
* fills the page and the LogoGlyph breathes white at its centre. The glyph is
|
|
2726
|
+
* a CSS mask (as `m-app-logo` draws it), never inserted markup. Its own file
|
|
2727
|
+
* so codegen can read it without Angular.
|
|
2728
|
+
*/
|
|
2729
|
+
export declare const splashHtml: ({ appColor, glyph, link }: SplashSource) => string;
|
|
2676
2730
|
type ButtonBadge = {
|
|
2677
2731
|
count?: number;
|
|
2678
2732
|
variant?: 'default' | 'primary' | 'danger';
|
|
@@ -5681,7 +5735,7 @@ export declare class SectionHeaderComponent {
|
|
|
5681
5735
|
"actionClick": "actionClick";
|
|
5682
5736
|
"action": "action";
|
|
5683
5737
|
"back": "back";
|
|
5684
|
-
}, never, ["*", "m-section-filter-group"], true, never>;
|
|
5738
|
+
}, never, ["m-app-logo", "*", "m-section-filter-group"], true, never>;
|
|
5685
5739
|
}
|
|
5686
5740
|
/**
|
|
5687
5741
|
* Config for `m-section-button-group`. Carries no `names` and no `buttons` —
|
|
@@ -10217,6 +10271,8 @@ export declare const REMOTE_PAGE_RELOAD: InjectionToken<() => void>;
|
|
|
10217
10271
|
* the sent `extra` confirms the boot; only then do reports count as moves.
|
|
10218
10272
|
*/
|
|
10219
10273
|
export declare const isBootRedirect: (pending: boolean, sent: string | undefined, path: string) => boolean;
|
|
10274
|
+
/** How long a mounted remote may go without reporting a route before its Splash lifts. */
|
|
10275
|
+
export declare const REMOTE_BOOT_TIMEOUT_MS = 10000;
|
|
10220
10276
|
export declare class RemoteComponent implements OnDestroy {
|
|
10221
10277
|
/** A resolved config, as m-ui hands it — or a Store link `m-remote` resolves itself. */
|
|
10222
10278
|
readonly config: import("@angular/core").InputSignal<WebComponentConfig$1 | undefined>;
|
|
@@ -10249,6 +10305,13 @@ export declare class RemoteComponent implements OnDestroy {
|
|
|
10249
10305
|
private readonly pattern;
|
|
10250
10306
|
/** Loads the Remote's beta tier rather than its status folder. */
|
|
10251
10307
|
readonly beta: import("@angular/core").InputSignal<boolean>;
|
|
10308
|
+
/**
|
|
10309
|
+
* The LogoGlyph the host chose for this mount: its Splash draws it, over the
|
|
10310
|
+
* app's own from Store (GLOSSARY.md Splash). Rebuilt from the allowlist.
|
|
10311
|
+
*/
|
|
10312
|
+
readonly glyph: import("@angular/core").InputSignal<string | null | undefined>;
|
|
10313
|
+
/** The App Color the host chose for this mount: Splash ground and `mm` both. */
|
|
10314
|
+
readonly appColor: import("@angular/core").InputSignal<string | null | undefined>;
|
|
10252
10315
|
/** The config of the app now mounted — m-ui titles its page after it. */
|
|
10253
10316
|
readonly loaded: import("@angular/core").OutputEmitterRef<WebComponentConfig$1>;
|
|
10254
10317
|
/** Why a load drew the broken state — m-ui's Beta gate reads `config-not-found`. */
|
|
@@ -10262,6 +10325,7 @@ export declare class RemoteComponent implements OnDestroy {
|
|
|
10262
10325
|
private readonly navRef;
|
|
10263
10326
|
private readonly reloadPage;
|
|
10264
10327
|
private readonly assetStore;
|
|
10328
|
+
private readonly appLogoState;
|
|
10265
10329
|
private loadedElement?;
|
|
10266
10330
|
/** Bumped per load, so an answer for a link since replaced is dropped. */
|
|
10267
10331
|
private loadId;
|
|
@@ -10287,6 +10351,14 @@ export declare class RemoteComponent implements OnDestroy {
|
|
|
10287
10351
|
private pinnedLink?;
|
|
10288
10352
|
protected readonly state: import("@angular/core").WritableSignal<"idle" | "loading" | "loaded" | "failed" | "self-beta">;
|
|
10289
10353
|
protected readonly failure: import("@angular/core").WritableSignal<RemoteLoadResult>;
|
|
10354
|
+
/**
|
|
10355
|
+
* Mounted, but the app's own Router has not reported its first route yet:
|
|
10356
|
+
* the Splash stays over it until then (GLOSSARY.md Splash), or until
|
|
10357
|
+
* REMOTE_BOOT_TIMEOUT_MS for a remote that never reports.
|
|
10358
|
+
*/
|
|
10359
|
+
protected readonly booting: import("@angular/core").WritableSignal<boolean>;
|
|
10360
|
+
private bootTimer?;
|
|
10361
|
+
private readonly endBoot;
|
|
10290
10362
|
/** The host URL's query and fragment, as of the last navigation — a `tail` mount's to read. */
|
|
10291
10363
|
private readonly hostQuery;
|
|
10292
10364
|
/** The host's primary path, segment by segment, as of the last navigation. */
|
|
@@ -10314,6 +10386,24 @@ export declare class RemoteComponent implements OnDestroy {
|
|
|
10314
10386
|
private readonly carriesQuery;
|
|
10315
10387
|
private readonly remotePath;
|
|
10316
10388
|
private readonly ownTail;
|
|
10389
|
+
/**
|
|
10390
|
+
* The mounted app's App Color — the `mm` everything inside this mount draws:
|
|
10391
|
+
* the host's `appColor` when it set one, else the app's own from Store.
|
|
10392
|
+
*/
|
|
10393
|
+
private readonly mountColor;
|
|
10394
|
+
/** The host's `glyph` as stored (allowlist-rebuilt), or none when refused. */
|
|
10395
|
+
private readonly chosenGlyph;
|
|
10396
|
+
/**
|
|
10397
|
+
* The mounted app's Splash (GLOSSARY.md Splash) while it loads: its AppLogo
|
|
10398
|
+
* on the theme's background. The host's `glyph` first, then the app's own
|
|
10399
|
+
* entry when it has a `glyph` key, else the host's own AppLogo glyph; no
|
|
10400
|
+
* glyph draws the name's first letter. App Color: `appColor`, then Store.
|
|
10401
|
+
*/
|
|
10402
|
+
protected readonly splash: import("@angular/core").Signal<{
|
|
10403
|
+
glyph: string | null;
|
|
10404
|
+
color: string | null;
|
|
10405
|
+
name: string;
|
|
10406
|
+
}>;
|
|
10317
10407
|
constructor();
|
|
10318
10408
|
ngOnDestroy(): void;
|
|
10319
10409
|
private mountName;
|
|
@@ -10426,6 +10516,16 @@ export declare class RemoteComponent implements OnDestroy {
|
|
|
10426
10516
|
"required": false;
|
|
10427
10517
|
"isSignal": true;
|
|
10428
10518
|
};
|
|
10519
|
+
"glyph": {
|
|
10520
|
+
"alias": "glyph";
|
|
10521
|
+
"required": false;
|
|
10522
|
+
"isSignal": true;
|
|
10523
|
+
};
|
|
10524
|
+
"appColor": {
|
|
10525
|
+
"alias": "appColor";
|
|
10526
|
+
"required": false;
|
|
10527
|
+
"isSignal": true;
|
|
10528
|
+
};
|
|
10429
10529
|
}, {
|
|
10430
10530
|
"loaded": "loaded";
|
|
10431
10531
|
"failed": "failed";
|
|
@@ -12135,21 +12235,47 @@ export declare class AppCardComponent {
|
|
|
12135
12235
|
"actionClick": "actionClick";
|
|
12136
12236
|
}, never, never, true, never>;
|
|
12137
12237
|
}
|
|
12238
|
+
/**
|
|
12239
|
+
* How an AppLogo is drawn: `tile` — the white mark on an App Color tile, as a
|
|
12240
|
+
* PWA icon is; `glow` — no tile, the mark itself in App Color with a soft
|
|
12241
|
+
* App Color glow, for a mark standing alone on a wide ground (a Splash).
|
|
12242
|
+
*/
|
|
12243
|
+
type AppLogoVariant = 'tile' | 'glow';
|
|
12244
|
+
/**
|
|
12245
|
+
* The colour of a `glow` mark: `app` — App Color; `light` — white, the glow
|
|
12246
|
+
* around it still App Color. A `tile` mark is always white.
|
|
12247
|
+
*/
|
|
12248
|
+
type AppLogoTone = 'app' | 'light';
|
|
12138
12249
|
/**
|
|
12139
12250
|
* The one renderer of an AppLogo (nx ADR 0007): the LogoGlyph painted white
|
|
12140
12251
|
* over App Color, with a shadow in App Color mixed with 20% black. The glyph
|
|
12141
12252
|
* is a mask, never inserted markup — its own colours never show and nothing
|
|
12142
12253
|
* in it can run. Without a glyph it draws the name's first letter instead.
|
|
12143
|
-
* Fills its box
|
|
12254
|
+
* Fills its box unless `size` is set.
|
|
12255
|
+
*
|
|
12256
|
+
* What it draws is handed in or looked up: `glyph`, `appColor` and `name`
|
|
12257
|
+
* win when set; `link` reads the rest for that app from Store (AppLogoState);
|
|
12258
|
+
* none of the four reads the running app's own AppLogo, as `m-icon app_logo`
|
|
12259
|
+
* does (APP_LOGO_SOURCE).
|
|
12144
12260
|
*/
|
|
12145
12261
|
export declare class AppLogoComponent {
|
|
12262
|
+
#private;
|
|
12146
12263
|
/** The LogoGlyph as Store holds it — already rebuilt from the allowlist. */
|
|
12147
12264
|
readonly glyph: import("@angular/core").InputSignal<string | null | undefined>;
|
|
12148
12265
|
/** App Color, `#rrggbb`. A neutral ground when unset. */
|
|
12149
12266
|
readonly appColor: import("@angular/core").InputSignal<string | null | undefined>;
|
|
12150
12267
|
/** The app's name (or AppLink): the accessible label and the letter fallback. */
|
|
12151
12268
|
readonly name: import("@angular/core").InputSignal<string | null | undefined>;
|
|
12269
|
+
/** Whose AppLogo to read from Store when `glyph`/`appColor`/`name` are unset. */
|
|
12270
|
+
readonly link: import("@angular/core").InputSignal<string | null | undefined>;
|
|
12271
|
+
readonly variant: import("@angular/core").InputSignal<AppLogoVariant>;
|
|
12272
|
+
readonly tone: import("@angular/core").InputSignal<AppLogoTone>;
|
|
12273
|
+
/** One CSS length for both sides; unset, the logo fills its box. */
|
|
12274
|
+
readonly size: import("@angular/core").InputSignal<string | null | undefined>;
|
|
12275
|
+
/** Store's answer for `link`, or the running app's own when nothing is handed in. */
|
|
12276
|
+
protected readonly lookup: import("@angular/core").Signal<AppLogoSource | undefined>;
|
|
12152
12277
|
protected readonly color: import("@angular/core").Signal<string | null>;
|
|
12278
|
+
protected readonly label: import("@angular/core").Signal<string>;
|
|
12153
12279
|
protected readonly shadow: import("@angular/core").Signal<string | null>;
|
|
12154
12280
|
protected readonly mask: import("@angular/core").Signal<string | undefined>;
|
|
12155
12281
|
protected readonly letter: import("@angular/core").Signal<string>;
|
|
@@ -12170,6 +12296,26 @@ export declare class AppLogoComponent {
|
|
|
12170
12296
|
"required": false;
|
|
12171
12297
|
"isSignal": true;
|
|
12172
12298
|
};
|
|
12299
|
+
"link": {
|
|
12300
|
+
"alias": "link";
|
|
12301
|
+
"required": false;
|
|
12302
|
+
"isSignal": true;
|
|
12303
|
+
};
|
|
12304
|
+
"variant": {
|
|
12305
|
+
"alias": "variant";
|
|
12306
|
+
"required": false;
|
|
12307
|
+
"isSignal": true;
|
|
12308
|
+
};
|
|
12309
|
+
"tone": {
|
|
12310
|
+
"alias": "tone";
|
|
12311
|
+
"required": false;
|
|
12312
|
+
"isSignal": true;
|
|
12313
|
+
};
|
|
12314
|
+
"size": {
|
|
12315
|
+
"alias": "size";
|
|
12316
|
+
"required": false;
|
|
12317
|
+
"isSignal": true;
|
|
12318
|
+
};
|
|
12173
12319
|
}, {}, never, never, true, never>;
|
|
12174
12320
|
}
|
|
12175
12321
|
/**
|
|
@@ -13007,6 +13153,15 @@ export type BreadcrumbTrail = {
|
|
|
13007
13153
|
* Browses into it while the row itself follows it (GLOSSARY.md Browse).
|
|
13008
13154
|
*/
|
|
13009
13155
|
browsable?: boolean;
|
|
13156
|
+
/**
|
|
13157
|
+
* A row standing for a mounted app draws that app's AppLogo instead of an
|
|
13158
|
+
* icon (nx ADR 0007) — its root carries no `icon:` of its own.
|
|
13159
|
+
*/
|
|
13160
|
+
appLogo?: {
|
|
13161
|
+
glyph: string | null;
|
|
13162
|
+
color: string | null;
|
|
13163
|
+
name: string;
|
|
13164
|
+
};
|
|
13010
13165
|
};
|
|
13011
13166
|
export type BreadCrumb = {
|
|
13012
13167
|
trail?: BreadcrumbTrail[];
|
|
@@ -13385,7 +13540,9 @@ export declare class FrameComponent {
|
|
|
13385
13540
|
navHasContent: import("@angular/core").Signal<boolean>;
|
|
13386
13541
|
currentWcConfig: import("@angular/core").Signal<import("dist/libs/cli/src").WebComponentConfig | undefined>;
|
|
13387
13542
|
currentIdentity: import("@angular/core").Signal<import("@magmonium/one").AppIdentity | undefined>;
|
|
13543
|
+
appLogoLink: import("@angular/core").Signal<string | undefined>;
|
|
13388
13544
|
appLogo: import("@angular/core").Signal<import("@magmonium/one").AppLogoSource | undefined>;
|
|
13545
|
+
appLogos: import("@angular/core").Signal<Record<string, import("@magmonium/one").AppLogoSource>>;
|
|
13389
13546
|
activeAppOpen: import("@angular/core").Signal<boolean>;
|
|
13390
13547
|
transparentNavIds: import("@angular/core").Signal<ReadonlySet<string>>;
|
|
13391
13548
|
resolvedNavMenuConfig: import("@angular/core").Signal<import("@magmonium/one").NavMenuConfig | null>;
|
|
@@ -13802,11 +13959,13 @@ export declare const NavStore: import("@angular/core").Type<{
|
|
|
13802
13959
|
}) | null>;
|
|
13803
13960
|
searchLabel: Signal<string | null>;
|
|
13804
13961
|
breadcrumb: Signal<BreadCrumb>;
|
|
13805
|
-
navMenus: Signal<
|
|
13962
|
+
navMenus: Signal<BreadcrumbTrail[]>;
|
|
13806
13963
|
navHasContent: Signal<boolean>;
|
|
13807
13964
|
currentWcConfig: Signal<WebComponentConfig$1 | undefined>;
|
|
13808
13965
|
currentIdentity: Signal<AppIdentity | undefined>;
|
|
13966
|
+
appLogoLink: Signal<string | undefined>;
|
|
13809
13967
|
appLogo: Signal<AppLogoSource | undefined>;
|
|
13968
|
+
appLogos: Signal<Record<string, AppLogoSource>>;
|
|
13810
13969
|
activeAppOpen: Signal<boolean>;
|
|
13811
13970
|
transparentNavIds: Signal<ReadonlySet<string>>;
|
|
13812
13971
|
resolvedNavMenuConfig: Signal<NavMenuConfig | null>;
|
|
@@ -14296,7 +14455,9 @@ export declare class NavDetailsComponent {
|
|
|
14296
14455
|
navHasContent: import("@angular/core").Signal<boolean>;
|
|
14297
14456
|
currentWcConfig: import("@angular/core").Signal<import("dist/libs/cli/src").WebComponentConfig | undefined>;
|
|
14298
14457
|
currentIdentity: import("@angular/core").Signal<import("@magmonium/one").AppIdentity | undefined>;
|
|
14458
|
+
appLogoLink: import("@angular/core").Signal<string | undefined>;
|
|
14299
14459
|
appLogo: import("@angular/core").Signal<import("@magmonium/one").AppLogoSource | undefined>;
|
|
14460
|
+
appLogos: import("@angular/core").Signal<Record<string, import("@magmonium/one").AppLogoSource>>;
|
|
14300
14461
|
activeAppOpen: import("@angular/core").Signal<boolean>;
|
|
14301
14462
|
transparentNavIds: import("@angular/core").Signal<ReadonlySet<string>>;
|
|
14302
14463
|
resolvedNavMenuConfig: import("@angular/core").Signal<import("@magmonium/one").NavMenuConfig | null>;
|
|
@@ -14555,7 +14716,9 @@ export declare class NavHeaderComponent {
|
|
|
14555
14716
|
navHasContent: import("@angular/core").Signal<boolean>;
|
|
14556
14717
|
currentWcConfig: import("@angular/core").Signal<import("dist/libs/cli/src").WebComponentConfig | undefined>;
|
|
14557
14718
|
currentIdentity: import("@angular/core").Signal<import("@magmonium/one").AppIdentity | undefined>;
|
|
14719
|
+
appLogoLink: import("@angular/core").Signal<string | undefined>;
|
|
14558
14720
|
appLogo: import("@angular/core").Signal<import("@magmonium/one").AppLogoSource | undefined>;
|
|
14721
|
+
appLogos: import("@angular/core").Signal<Record<string, import("@magmonium/one").AppLogoSource>>;
|
|
14559
14722
|
activeAppOpen: import("@angular/core").Signal<boolean>;
|
|
14560
14723
|
transparentNavIds: import("@angular/core").Signal<ReadonlySet<string>>;
|
|
14561
14724
|
resolvedNavMenuConfig: import("@angular/core").Signal<import("@magmonium/one").NavMenuConfig | null>;
|
|
@@ -15547,7 +15710,7 @@ type AvatarUser = {
|
|
|
15547
15710
|
};
|
|
15548
15711
|
export declare class UserAvatarComponent {
|
|
15549
15712
|
user: import("@angular/core").InputSignal<AvatarUser | null | undefined>;
|
|
15550
|
-
variant: import("@angular/core").InputSignal<"
|
|
15713
|
+
variant: import("@angular/core").InputSignal<"square" | "rounded">;
|
|
15551
15714
|
protected readonly name: import("@angular/core").Signal<string>;
|
|
15552
15715
|
protected readonly abbr: import("@angular/core").Signal<string>;
|
|
15553
15716
|
protected readonly profilePic: import("@angular/core").Signal<string | undefined>;
|
|
@@ -16653,4 +16816,4 @@ export declare const toggleUid: (audience: Audience, uid: string) => Audience;
|
|
|
16653
16816
|
export declare const toggleGroup: (audience: Audience, groupId: string) => Audience;
|
|
16654
16817
|
/** How many Users and Groups an Audience names. */
|
|
16655
16818
|
export declare const pickCount: (audience: Audience) => number;
|
|
16656
|
-
export type { Accordion, AccordionGroup, AccordionVariant, AppCardData, AppCardInputs, AppCardVariant, AppManifest, AppTileData, AssetOption, Audience, AudienceLevel, AudienceMember, AudiencePicker, AuthResult, Badge, BadgePosition, BadgeVariant, Button, ButtonGroup, CellChangeEvent, CellClickEvent, ColBreakpoint, ColSpan, ColorPallet, ColumnDef, Comment, CommentItem, Config, ContextMenu, ContextMenuEvent, Cursor, CustomIcon, DragListReorder, Draggable, DraggableState, FileUploadConfig, FileUploadEvent, FilterGroupContext, FilterGroupMember, FilterOption, FilterPanel, FilterPanelIo, FilterRangeMode, FilterSelectionMap, FilterValue, FilterVariant, FilteredTreeGrid, FlatTreeGridRow, FlexAlign, FlexAlignSelf, FlexConfig, FlexDirection, FlexItemConfig, FlexJustify, FlexVariant, GridAlignX, GridAlignY, GroupKind, Header, HeaderLevel, Icon, KeyValueVariant, LabelSegment, ListConfig, ListContext, ListItem, ListOrientation, ListVariant, MenuItem, MoneySystem, NavInstanceConfig, NavMenuConfig, NavRowsConfig, NavVisibilityConfig, NavVisibleAnswer, NavWidgetConfig, NavWidgetEntry, NavWidgetMap, OverlayWidgetLoader, OverlayWidgetMap, PageChangeEvent, Pagination, PaginationWindow, ResolvedUserTab, SearchChangeEvent, SectionAccordion, SectionAccordionGroup, SectionAccordionGroupContext, SectionAccordionRef, SectionButtonGroupConfig, SectionFilterGroupConfig, SectionHero, SectionHeroVariant, SectionTableAlign, SectionTableColumn, SectionTableConfig, SectionTableDataType, SectionTableSort, SectionTableSortDirection, SectionTableVariant, SectionToggleItem, SectionToggleItemContext, SelectionAction, SelectionActionEvent, SelectionChangeEvent, SelectorConfig, SharingClient, SharingGroup, SocketMessage, Sort, SortChange, SortChangeEvent, SortOption, SortOrder, SourceAudience, SpacingInward, SqueezeMode, StatAlign, StatCornerEdge, StatCornerPosition, StatCornerSide, StatSurface, StatVariant, TabGroup, TableConfig, TableFilterCondition, TableFilterDef, TextOrNumberInput, Timeline, TimelineItem, TreeGridCellClickEvent, TreeGridLoadChildrenEvent, TreeGridRow, TreeGridRowSelectEvent, TreeGridToggleEvent, User };
|
|
16819
|
+
export type { Accordion, AccordionGroup, AccordionVariant, AppCardData, AppCardInputs, AppCardVariant, AppLogoTone, AppLogoVariant, AppManifest, AppTileData, AssetOption, Audience, AudienceLevel, AudienceMember, AudiencePicker, AuthResult, Badge, BadgePosition, BadgeVariant, Button, ButtonGroup, CellChangeEvent, CellClickEvent, ColBreakpoint, ColSpan, ColorPallet, ColumnDef, Comment, CommentItem, Config, ContextMenu, ContextMenuEvent, Cursor, CustomIcon, DragListReorder, Draggable, DraggableState, FileUploadConfig, FileUploadEvent, FilterGroupContext, FilterGroupMember, FilterOption, FilterPanel, FilterPanelIo, FilterRangeMode, FilterSelectionMap, FilterValue, FilterVariant, FilteredTreeGrid, FlatTreeGridRow, FlexAlign, FlexAlignSelf, FlexConfig, FlexDirection, FlexItemConfig, FlexJustify, FlexVariant, GridAlignX, GridAlignY, GroupKind, Header, HeaderLevel, Icon, KeyValueVariant, LabelSegment, ListConfig, ListContext, ListItem, ListOrientation, ListVariant, MenuItem, MoneySystem, NavInstanceConfig, NavMenuConfig, NavRowsConfig, NavVisibilityConfig, NavVisibleAnswer, NavWidgetConfig, NavWidgetEntry, NavWidgetMap, OverlayWidgetLoader, OverlayWidgetMap, PageChangeEvent, Pagination, PaginationWindow, ResolvedUserTab, SearchChangeEvent, SectionAccordion, SectionAccordionGroup, SectionAccordionGroupContext, SectionAccordionRef, SectionButtonGroupConfig, SectionFilterGroupConfig, SectionHero, SectionHeroVariant, SectionTableAlign, SectionTableColumn, SectionTableConfig, SectionTableDataType, SectionTableSort, SectionTableSortDirection, SectionTableVariant, SectionToggleItem, SectionToggleItemContext, SelectionAction, SelectionActionEvent, SelectionChangeEvent, SelectorConfig, SharingClient, SharingGroup, SocketMessage, Sort, SortChange, SortChangeEvent, SortOption, SortOrder, SourceAudience, SpacingInward, SqueezeMode, StatAlign, StatCornerEdge, StatCornerPosition, StatCornerSide, StatSurface, StatVariant, TabGroup, TableConfig, TableFilterCondition, TableFilterDef, TextOrNumberInput, Timeline, TimelineItem, TreeGridCellClickEvent, TreeGridLoadChildrenEvent, TreeGridRow, TreeGridRowSelectEvent, TreeGridToggleEvent, User };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"magmonium-one-color-utl-D86GGpz5.mjs","names":["map","switchMap"],"sources":["../../../../libs/one/src/lib/shared/lib/theme/api/theme-data.ts","../../../../libs/one/src/lib/shared/lib/theme/lib/theme-detector.ts","../../../../libs/one/src/lib/shared/lib/theme/type/state.ts","../../../../libs/one/src/lib/shared/lib/theme/lib/theme-store.ts","../../../../libs/one/src/lib/shared/functions/css/property-names.ts","../../../../libs/one/src/lib/shared/functions/color/parsers.ts","../../../../libs/one/src/lib/shared/functions/color/converters.ts","../../../../libs/one/src/lib/shared/functions/color/operations.ts","../../../../libs/one/src/lib/shared/lib/theme/lib/color-utl.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { catchError, forkJoin, map, of } from 'rxjs';\nimport { Theme, ThemeList } from '@magmonium/cli';\nimport { AssetStore } from '../../../stores/asset.store';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ThemeDataService {\n private readonly assetStore = inject(AssetStore);\n\n public fetchThemeList = (source: 'one' | 'host') =>\n this.assetStore\n .resolve<ThemeList>('theme', 'theme', source === 'one')\n .pipe(catchError(() => of(<ThemeList>[])));\n\n public fetchThemes = () =>\n forkJoin({\n one: this.fetchThemeList('one'),\n local: this.fetchThemeList('host'),\n }).pipe(\n map(({ one, local }) => {\n const themeMap: Record<string, Theme & { sources: string[] }> = {};\n\n const processList = (list: ThemeList, sourceKey: string) => {\n if (!list || !Array.isArray(list)) return;\n list.forEach((t) => {\n const name = t.name || t.fileName;\n if (name) {\n if (themeMap[name]) {\n if (!themeMap[name].sources.includes(sourceKey)) {\n themeMap[name].sources.push(sourceKey);\n }\n } else {\n themeMap[name] = { ...t, sources: [sourceKey] } as Theme & {\n sources: string[];\n };\n }\n }\n });\n };\n\n processList(one, 'one');\n processList(local, 'host');\n\n return themeMap;\n })\n );\n\n public fetchTheme = (theme: Theme, isOne = false) =>\n theme.fileName\n ? this.assetStore\n .resolve<Theme>('theme', theme.fileName, isOne)\n .pipe(map((data: Theme) => ({ ...theme, ...data })))\n : of(theme);\n}\n","import { Injectable, signal } from '@angular/core';\nimport { OsTheme } from '../type/state';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ThemeDetector {\n public readonly osTheme = signal<OsTheme>('dark');\n private mediaQueryList!: MediaQueryList;\n\n public onInit(): void {\n this.mediaQueryList = window.matchMedia('(prefers-color-scheme: dark)');\n this.osTheme.set(this.mediaQueryList.matches ? 'dark' : 'light');\n this.mediaQueryList.addEventListener('change', this.listener);\n }\n\n public onDestroy(): void {\n this.mediaQueryList.removeEventListener('change', this.listener);\n }\n\n private listener = (event: MediaQueryListEvent) => {\n this.osTheme.set(event.matches ? 'dark' : 'light');\n };\n}\n","import { Theme } from '@magmonium/cli';\n\nexport type OsTheme = 'light' | 'dark';\n\nexport type ThemeState = {\n themeMap: Record<string, Theme>;\n selected: string | undefined;\n userAdopted: true | undefined;\n // The theme the app declares it boots with — `theme:` on its\n // WebComponentConfig, read out of `app-wc.json` at bootstrap. Stands in for\n // the OS auto-match rather than for the person's own pick: `userAdopted`\n // still wins, and an app that declares nothing keeps the OS behaviour.\n configDefault: string | undefined;\n sources: string[];\n isReady: boolean;\n};\n\nexport const initialState: ThemeState = {\n themeMap: {},\n selected: 'light',\n userAdopted: undefined,\n configDefault: undefined,\n sources: [],\n isReady: false,\n};\n","import {\n patchState,\n signalStore,\n withComputed,\n withHooks,\n withMethods,\n withState,\n} from '@ngrx/signals';\nimport { computed, DOCUMENT, inject } from '@angular/core';\nimport { ThemeDataService } from '../api/theme-data';\nimport { rxMethod } from '@ngrx/signals/rxjs-interop';\nimport { forkJoin, of, pipe, tap, catchError } from 'rxjs';\nimport { switchMap, map } from 'rxjs/operators';\nimport { Theme } from '@magmonium/cli';\nimport { ThemeDetector } from './theme-detector';\nimport { initialState } from '../type/state';\nimport { ASSET_BASE_URL, ONE_ASSET_BASE_URL } from '../../../config/tokens';\n\nfunction toThemeCssVar(key: string): string {\n return '--m-' + key.replace(/([A-Z])/g, '-$1').toLowerCase();\n}\n\nfunction applyThemeVars(\n colors: Record<string, string>,\n target: HTMLElement\n): void {\n Object.entries(colors).forEach(([key, value]) => {\n target.style.setProperty(toThemeCssVar(key), value);\n });\n}\n\nexport const ThemeStore = signalStore(\n { providedIn: 'root' },\n withState(initialState),\n withComputed((state, themeDetector = inject(ThemeDetector)) => {\n const osTheme = computed(themeDetector.osTheme);\n const theme = computed<Theme | undefined>(() => {\n const themeMap = state.themeMap();\n const selected = state.selected();\n return selected ? themeMap[selected] : undefined;\n });\n const color = computed(() => theme()?.color);\n return {\n theme,\n color,\n osTheme,\n };\n }),\n withMethods(\n (\n state,\n themeDataService = inject(ThemeDataService),\n document = inject(DOCUMENT),\n themeDetector = inject(ThemeDetector),\n oneAssetBaseUrl = inject(ONE_ASSET_BASE_URL, { optional: true }) ||\n '/assets/one',\n assetBaseUrl = inject(ASSET_BASE_URL, { optional: true }) || '/assets'\n ) => {\n const renderTheme = (colors: Record<string, string>) => {\n applyThemeVars(colors, document.documentElement);\n };\n\n const normalizeThemeSources = (\n themeMap: Record<string, Theme & { sources: string[] }>\n ) => {\n const normalized: Record<string, Theme & { sources: string[] }> = {};\n for (const [name, theme] of Object.entries(themeMap)) {\n normalized[name] = {\n ...theme,\n sources: theme.sources.map((s) =>\n s === 'one' ? oneAssetBaseUrl : s === 'host' ? assetBaseUrl : s\n ),\n };\n }\n return normalized;\n };\n\n const fetchAndMergeTheme = (themeName: string) => {\n const themeEntry = state.themeMap()[themeName] as\n | (Theme & { sources: string[] })\n | undefined;\n if (!themeEntry || !themeEntry.sources.length) return of(undefined);\n\n const requests = themeEntry.sources.map((source) =>\n themeDataService\n .fetchTheme(themeEntry, source === oneAssetBaseUrl)\n .pipe(catchError(() => of(undefined)))\n );\n\n return forkJoin(requests).pipe(\n map((results) => {\n const validResults = results.filter((r) => !!r) as Theme[];\n if (validResults.length === 0) return undefined;\n\n const mergedColor = validResults.reduce(\n (acc, curr) => ({\n ...acc,\n ...(curr.color || {}),\n }),\n {} as Record<string, unknown>\n );\n\n return {\n ...validResults[validResults.length - 1],\n color: mergedColor,\n sources: themeEntry.sources,\n } as Theme & { sources: string[] };\n })\n );\n };\n\n return {\n /**\n * Paints a set of DesignTokens straight onto the page without a theme\n * behind them. What a visual editor needs to show a theme it holds in\n * memory and has not written anywhere yet — every other path here\n * resolves a name against an asset first, and an unsaved theme has no\n * asset to resolve.\n */\n applyTheme(colors: Record<string, string>): void {\n renderTheme(colors);\n },\n /**\n * The theme the app declares it boots with (`theme:` on its\n * WebComponentConfig). Read out of `app-wc.json` after bootstrap, so it\n * lands either side of `init` finishing — hence both halves: it is\n * recorded for `init` to prefer, and applied now in case `init` has\n * already chosen the OS theme.\n *\n * Never overrides a person who has picked for themselves: `userAdopted`\n * is checked here the same way `init` checks it.\n */\n setConfigDefault(name: string | undefined): void {\n patchState(state, { configDefault: name });\n if (!name || state.userAdopted()) return;\n if (!state.themeMap()[name] || state.selected() === name) return;\n patchState(state, { selected: name });\n fetchAndMergeTheme(name).subscribe((fullTheme) => {\n if (!fullTheme?.name) return;\n patchState(state, {\n themeMap: { ...state.themeMap(), [fullTheme.name]: fullTheme },\n isReady: true,\n });\n if (fullTheme.color) {\n renderTheme(fullTheme.color as Record<string, string>);\n }\n });\n },\n setTheme: rxMethod<string | undefined>(\n pipe(\n tap((selected) => patchState(state, { selected })),\n switchMap((selected) => {\n if (!selected) return of(undefined);\n return fetchAndMergeTheme(selected);\n }),\n tap((fullTheme: (Theme & { sources: string[] }) | undefined) => {\n if (fullTheme && fullTheme.name) {\n patchState(state, {\n themeMap: {\n ...state.themeMap(),\n [fullTheme.name]: fullTheme as Theme,\n },\n });\n if (fullTheme.color) {\n renderTheme(fullTheme.color as Record<string, string>);\n }\n }\n })\n )\n ),\n addSource: rxMethod<string>(\n pipe(\n tap((baseUrl) => {\n const sources = state.sources();\n if (!sources.includes(baseUrl)) {\n patchState(state, { sources: [...sources, baseUrl] });\n }\n }),\n switchMap((baseUrl) => {\n const source = baseUrl === oneAssetBaseUrl ? 'one' : 'host';\n return themeDataService\n .fetchThemeList(source)\n .pipe(map((list) => ({ list, baseUrl })));\n }),\n tap(({ list, baseUrl }) => {\n const themeMap = { ...state.themeMap() } as Record<\n string,\n Theme & { sources: string[] }\n >;\n list.forEach((t) => {\n const name = t.name || t.fileName;\n if (name) {\n if (themeMap[name]) {\n if (!themeMap[name].sources.includes(baseUrl)) {\n themeMap[name].sources.push(baseUrl);\n }\n } else {\n themeMap[name] = { ...t, sources: [baseUrl] } as Theme & {\n sources: string[];\n };\n }\n }\n });\n patchState(state, {\n themeMap: themeMap as Record<string, Theme>,\n });\n\n const selected = state.selected();\n if (selected && themeMap[selected]?.sources.includes(baseUrl)) {\n fetchAndMergeTheme(selected).subscribe(\n (fullTheme: (Theme & { sources: string[] }) | undefined) => {\n if (fullTheme && fullTheme.name) {\n patchState(state, {\n themeMap: {\n ...state.themeMap(),\n [fullTheme.name]: fullTheme as Theme,\n },\n });\n if (fullTheme.color) {\n renderTheme(fullTheme.color as Record<string, string>);\n }\n }\n }\n );\n }\n })\n )\n ),\n init$: () => {\n return themeDataService.fetchThemes().pipe(\n map((themeMap) =>\n normalizeThemeSources(\n themeMap as Record<string, Theme & { sources: string[] }>\n )\n ),\n tap((themeMap) => {\n patchState(state, {\n themeMap: themeMap as Record<string, Theme>,\n });\n })\n );\n },\n init: rxMethod<void>(\n pipe(\n switchMap(() => themeDataService.fetchThemes()),\n map((map) =>\n normalizeThemeSources(\n map as Record<string, Theme & { sources: string[] }>\n )\n ),\n tap((map) =>\n patchState(state, { themeMap: map as Record<string, Theme> })\n ),\n switchMap((map) => {\n if (state.userAdopted()) return of(undefined);\n // The app's own declaration stands in for the OS auto-match, and\n // only for it — a name naming nothing falls through to the OS\n // rather than leaving the app unthemed.\n const declared = state.configDefault();\n const preferred = themeDetector.osTheme();\n const name =\n declared && map[declared]\n ? declared\n : preferred && map[preferred]\n ? preferred\n : Object.keys(map)[0];\n if (!name) return of(undefined);\n patchState(state, { selected: name });\n return fetchAndMergeTheme(name);\n }),\n tap((fullTheme: (Theme & { sources: string[] }) | undefined) => {\n if (fullTheme && fullTheme.name) {\n patchState(state, {\n themeMap: {\n ...state.themeMap(),\n [fullTheme.name]: fullTheme as Theme,\n },\n });\n if (fullTheme.color) {\n renderTheme(fullTheme.color as Record<string, string>);\n }\n patchState(state, { isReady: true });\n }\n })\n )\n ),\n };\n }\n ),\n withHooks((store) => {\n const themeDetector = inject(ThemeDetector);\n return {\n onInit() {\n themeDetector.onInit();\n\n store.init$().subscribe((map) => {\n if (!store.userAdopted()) {\n const declared = store.configDefault();\n const preferred = store.osTheme();\n const name =\n declared && map[declared]\n ? declared\n : preferred && map[preferred]\n ? preferred\n : Object.keys(map)[0];\n if (name) store.setTheme(name);\n }\n });\n },\n onDestroy() {\n themeDetector.onDestroy();\n },\n };\n })\n);\n","export type ColorPropertyType = 'color' | 'color-contrast' | 'color-opposite';\n\nexport function derivePropertyName(\n inputString: string,\n type: ColorPropertyType\n): string {\n const tagName = inputString.toLowerCase();\n\n const match = tagName.match(/^m(?:-one)?-(.+)$/);\n\n if (match) {\n const componentName = match[1];\n return `--m-${componentName}-${type}`;\n } else {\n return `--m-${type}`;\n }\n}\n\nexport function setProperty(\n element: HTMLElement,\n key: string,\n value: string | null\n) {\n element.style.setProperty(key, value);\n}\n\nexport function getProperty(element: HTMLElement, key: string) {\n return getComputedStyle(element).getPropertyValue(key);\n}\n","import { RgbColor, HslColor } from './types';\n\nexport function parseColor(color: string): RgbColor | null {\n const trimmedColor = color.trim();\n\n // Handle hex colors\n if (trimmedColor.startsWith('#')) {\n return hexToRgb(trimmedColor);\n }\n\n // Handle rgb() colors\n const rgbMatch = trimmedColor.match(\n /rgb\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/\n );\n if (rgbMatch) {\n return {\n r: parseInt(rgbMatch[1], 10),\n g: parseInt(rgbMatch[2], 10),\n b: parseInt(rgbMatch[3], 10),\n };\n }\n\n // Handle rgba() colors (ignore alpha)\n const rgbaMatch = trimmedColor.match(\n /rgba\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*[\\d.]+\\s*\\)/\n );\n if (rgbaMatch) {\n return {\n r: parseInt(rgbaMatch[1], 10),\n g: parseInt(rgbaMatch[2], 10),\n b: parseInt(rgbaMatch[3], 10),\n };\n }\n\n // Handle hsl() colors\n const hslMatch = trimmedColor.match(\n /hsl\\(\\s*(\\d+)\\s*,\\s*(\\d+)%\\s*,\\s*(\\d+)%\\s*\\)/\n );\n if (hslMatch) {\n const hsl: HslColor = {\n h: parseInt(hslMatch[1], 10),\n s: parseInt(hslMatch[2], 10),\n l: parseInt(hslMatch[3], 10),\n };\n return hslToRgb(hsl);\n }\n\n return null;\n}\n\nexport function hexToRgb(hex: string): RgbColor | null {\n const cleanHex = hex.replace('#', '');\n\n if (cleanHex.length === 3) {\n // Short hex format (e.g., #fff)\n return {\n r: parseInt(cleanHex[0] + cleanHex[0], 16),\n g: parseInt(cleanHex[1] + cleanHex[1], 16),\n b: parseInt(cleanHex[2] + cleanHex[2], 16),\n };\n } else if (cleanHex.length === 6) {\n // Long hex format (e.g., #ffffff)\n return {\n r: parseInt(cleanHex.slice(0, 2), 16),\n g: parseInt(cleanHex.slice(2, 4), 16),\n b: parseInt(cleanHex.slice(4, 6), 16),\n };\n }\n\n return null;\n}\n\nexport function hslToRgb(hsl: HslColor): RgbColor {\n // Normalize HSL values - handle both integer (0-360, 0-100, 0-100) and float inputs\n const h = (hsl.h % 360) / 360; // Ensure hue is in 0-1 range\n const s = Math.max(0, Math.min(100, hsl.s)) / 100; // Clamp saturation to 0-100, then normalize\n const l = Math.max(0, Math.min(100, hsl.l)) / 100; // Clamp lightness to 0-100, then normalize\n\n const hue2rgb = (p: number, q: number, t: number): number => {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n };\n\n let r: number, g: number, b: number;\n\n if (s === 0) {\n r = g = b = l; // achromatic\n } else {\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n\n return {\n r: Math.round(Math.max(0, Math.min(255, r * 255))),\n g: Math.round(Math.max(0, Math.min(255, g * 255))),\n b: Math.round(Math.max(0, Math.min(255, b * 255))),\n };\n}\n","import { RgbColor, HslColor } from './types';\n\nexport function rgbToHex(rgb: RgbColor): string {\n const toHex = (n: number) => {\n const hex = Math.round(Math.max(0, Math.min(255, n))).toString(16);\n return hex.length === 1 ? '0' + hex : hex;\n };\n\n return `#${toHex(rgb.r)}${toHex(rgb.g)}${toHex(rgb.b)}`;\n}\n\nexport function rgbToHsl(rgb: RgbColor): HslColor {\n const r = rgb.r / 255;\n const g = rgb.g / 255;\n const b = rgb.b / 255;\n\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n let h = 0;\n let s = 0;\n const l = (max + min) / 2;\n\n if (max !== min) {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n\n return {\n h: h * 360,\n s: s * 100,\n l: l * 100,\n };\n}\n\nexport function calculateLuminance(rgb: RgbColor): number {\n // Convert to linear RGB\n const toLinear = (c: number): number => {\n const normalized = c / 255;\n return normalized <= 0.03928\n ? normalized / 12.92\n : Math.pow((normalized + 0.055) / 1.055, 2.4);\n };\n\n const r = toLinear(rgb.r);\n const g = toLinear(rgb.g);\n const b = toLinear(rgb.b);\n\n // Calculate relative luminance using WCAG formula\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n}\n","import { parseColor } from './parsers';\nimport { rgbToHex, rgbToHsl, calculateLuminance } from './converters';\nimport { hslToRgb } from './parsers';\n\nexport function deriveContrastColor(color: string): string {\n try {\n // Input validation\n if (!color || color.trim() === '') {\n return '#ffffff'; // fallback to white for invalid input\n }\n\n const rgb = parseColor(color);\n if (!rgb) {\n return '#ffffff'; // fallback to white if parsing fails\n }\n\n // Validate RGB values\n if (\n rgb.r < 0 ||\n rgb.r > 255 ||\n rgb.g < 0 ||\n rgb.g > 255 ||\n rgb.b < 0 ||\n rgb.b > 255\n ) {\n return '#ffffff'; // fallback to white for invalid RGB values\n }\n\n // Calculate relative luminance using WCAG formula\n const luminance = calculateLuminance(rgb);\n\n // WCAG contrast ratio threshold: use white text on dark backgrounds, black on light\n return luminance > 0.5 ? '#000000' : '#ffffff';\n } catch (error) {\n console.warn('Error in deriveContrastColor:', error);\n return '#ffffff'; // fallback to white on error\n }\n}\n\nexport function deriveOppositeColor(color: string): string {\n try {\n // Input validation\n if (!color || color.trim() === '') {\n return color; // return original for invalid input\n }\n\n const rgb = parseColor(color);\n if (!rgb) {\n return color; // return original if parsing fails\n }\n\n // Validate RGB values\n if (\n rgb.r < 0 ||\n rgb.r > 255 ||\n rgb.g < 0 ||\n rgb.g > 255 ||\n rgb.b < 0 ||\n rgb.b > 255\n ) {\n return color; // return original if invalid RGB values\n }\n\n const hsl = rgbToHsl(rgb);\n\n // Rotate hue 180 degrees for complementary color\n // Handle the floating-point hue value properly\n const oppositeHsl = {\n h: (hsl.h + 180) % 360,\n s: hsl.s,\n l: hsl.l,\n };\n\n const oppositeRgb = hslToRgb(oppositeHsl);\n return rgbToHex(oppositeRgb);\n } catch (error) {\n console.warn('Error in deriveOppositeColor:', error);\n return color; // return original on error\n }\n}\n","import { ThemeColor } from '@magmonium/cli';\nimport {\n ColorPropertyType,\n derivePropertyName,\n} from '../../../functions/css/property-names';\nimport {\n deriveContrastColor,\n deriveOppositeColor,\n} from '../../../functions/color/operations';\n\nconst colorPalletMap = new Map();\n\nexport interface ColorPallet {\n color: string;\n contrastColor: string;\n oppositeColor: string;\n}\n\nexport function resolvePallet(\n currentColor: string | keyof ThemeColor,\n themeColors?: ThemeColor\n): ColorPallet {\n // An unset colour is `mm` *before* the theme lookup, not after: falling back\n // afterwards leaves the literal key `mm` as the resolved colour, which is not\n // a CSS colour — the element then keeps whatever it painted last, and picking\n // `default` in a colour dropdown reads as the change not landing.\n const key = (currentColor || 'mm') as keyof ThemeColor;\n let color = (themeColors?.[key] ?? key) as string;\n\n // Prepend # if it's a hex code without the hash\n if (/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$/.test(color)) {\n color = `#${color}`;\n }\n\n const savedPallet = colorPalletMap.get(color);\n if (savedPallet) {\n return savedPallet;\n }\n const pallet = {\n color,\n contrastColor: deriveContrastColor(color),\n oppositeColor: deriveOppositeColor(color),\n };\n colorPalletMap.set(color, pallet);\n return pallet;\n}\n\nexport function applyColorsToElement(\n inputColor: keyof ThemeColor | string = 'mm',\n themeColors: ThemeColor | undefined,\n element: HTMLElement\n): ColorPallet | undefined {\n const pallet = resolvePallet(inputColor, themeColors),\n { color, contrastColor, oppositeColor } = pallet;\n \n const colorProp = derivePropertyName(element.tagName, 'color');\n const contrastProp = derivePropertyName(element.tagName, 'color-contrast');\n const oppositeProp = derivePropertyName(element.tagName, 'color-opposite');\n\n element.style.setProperty(colorProp, color);\n element.style.setProperty(contrastProp, contrastColor);\n element.style.setProperty(oppositeProp, oppositeColor);\n\n return pallet;\n}\n\nexport function addColorProperty(\n key: ColorPropertyType,\n value: string,\n element: HTMLElement\n): void {\n const inputString = element.tagName;\n element.style.setProperty(derivePropertyName(inputString, key), value);\n}\n"],"mappings":";;;;;;;AAQA,IAAa,mBAAb,MAAa,iBAAgB;CACV,aAAa,OAAO,UAAU;CAExC,kBAAkB,WACvB,KAAK,WACF,QAAmB,SAAS,SAAS,WAAW,KAAK,CAAC,CACtD,KAAK,iBAAiB,GAAc,CAAA,CAAE,CAAC,CAAC;CAEtC,oBACL,SAAS;EACP,KAAK,KAAK,eAAe,KAAK;EAC9B,OAAO,KAAK,eAAe,MAAM;CAClC,CAAA,CAAC,CAAC,KACD,KAAK,EAAE,KAAK,YAAW;EACrB,MAAM,WAA0D,CAAA;EAEhE,MAAM,eAAe,MAAiB,cAAqB;GACzD,IAAI,CAAC,QAAQ,CAAC,MAAM,QAAQ,IAAI,GAAG;GACnC,KAAK,SAAS,MAAK;IACjB,MAAM,OAAO,EAAE,QAAQ,EAAE;IACzB,IAAI,MAAM;KACR,IAAI,SAAS,OACX;UAAI,CAAC,SAAS,KAAK,CAAC,QAAQ,SAAS,SAAS,GAC5C,SAAS,KAAK,CAAC,QAAQ,KAAK,SAAS;KACvC,OAEA,SAAS,QAAQ;MAAE,GAAG;MAAG,SAAS,CAAC,SAAS;KAAC;IAIjD;GACF,CAAC;EACH;EAEA,YAAY,KAAK,KAAK;EACtB,YAAY,OAAO,MAAM;EAEzB,OAAO;CACT,CAAC,CAAC;CAGC,cAAc,OAAc,QAAQ,UACzC,MAAM,WACF,KAAK,WACF,QAAe,SAAS,MAAM,UAAU,KAAK,CAAC,CAC9C,KAAK,KAAK,UAAiB;EAAE,GAAG;EAAO,GAAG;CAAI,EAAG,CAAC,IACrD,GAAG,KAAK;CA9CH,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAgB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAhB,OAAA,QA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AW;CAC7B,SAAS,OAAO;EACd,QAAQ,KAAK,iCAAiC,KAAK;EACnD,OAAO;CACT;AACF;ACrEA,MAAM,iCAAiB,IAAI,IAAG;AAQ9B,SAAgB,cACd,cACA,aAAwB;CAMxB,MAAM,MAAO,gBAAgB;CAC7B,IAAI,QAAS,cAAc,QAAQ;CAGnC,IAAI,oCAAoC,KAAK,KAAK,GAChD,QAAQ,IAAI;CAGd,MAAM,cAAc,eAAe,IAAI,KAAK;CAC5C,IAAI,aACF,OAAO;CAET,MAAM,SAAS;EACb;EACA,eAAe,oBAAoB,KAAK;EACxC,eAAe,oBAAoB,KAAK;CACzC;CACD,eAAe,IAAI,OAAO,MAAM;CAChC,OAAO;AACT;AAEA,SAAgB,qBACd,aAAwC,MACxC,aACA,SAAoB;CAEpB,MAAM,SAAS,cAAc,YAAY,WAAW,GAClD,EAAE,OAAO,eAAe,kBAAkB;CAE5C,MAAM,YAAY,mBAAmB,QAAQ,SAAS,OAAO;CAC7D,MAAM,eAAe,mBAAmB,QAAQ,SAAS,gBAAgB;CACzE,MAAM,eAAe,mBAAmB,QAAQ,SAAS,gBAAgB;CAEzE,QAAQ,MAAM,YAAY,WAAW,KAAK;CAC1C,QAAQ,MAAM,YAAY,cAAc,aAAa;CACrD,QAAQ,MAAM,YAAY,cAAc,aAAa;CAErD,OAAO;AACT"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"magmonium-one-icon-BgbtOdMv.mjs","names":["catchError"],"sources":["../../../../libs/one/src/lib/shared/lib/app-identity/app-logo-source.ts","../../../../libs/one/src/lib/shared/ui/icon/type/magmonium.ts","../../../../libs/one/src/lib/shared/ui/icon/model/shared-icons.ts","../../../../libs/one/src/lib/shared/ui/icon/lib/lib-icon.ts","../../../../libs/one/src/lib/shared/config/size-context.token.ts","../../../../libs/one/src/lib/shared/lib/app-identity/app-logo-icon.ts","../../../../libs/one/src/lib/shared/lib/app-identity/logo-glyph.ts","../../../../libs/one/src/lib/shared/ui/icon/ui/icon.ts","../../../../libs/one/src/lib/shared/ui/icon/lib/custom-icon.ts","../../../../libs/one/src/lib/shared/ui/icon/ui/custom-icon.ts","../../../../libs/one/src/lib/shared/ui/icon/ui/custom-icon-edit.ts"],"sourcesContent":["import {\n inject,\n Injectable,\n InjectionToken,\n Signal,\n signal,\n} from '@angular/core';\n\n/**\n * The running app's AppLogo as an icon draws it. `glyph` is a Store App's\n * LogoGlyph (already rebuilt from the allowlist); `src` is the host's\n * file-based AppLogo; neither is the first letter of `name`.\n */\nexport type AppLogoSource = {\n glyph?: string | null;\n src?: string;\n name?: string | null;\n};\n\n/**\n * Where NavStore publishes the running app's AppLogo. Shared rather than read\n * off NavStore because `m-icon` sits below features and cannot import it.\n */\n@Injectable({ providedIn: 'root' })\nexport class AppLogoState {\n readonly #source = signal<AppLogoSource | undefined>(undefined);\n readonly source = this.#source.asReadonly();\n readonly set = (source: AppLogoSource | undefined): void =>\n this.#source.set(source);\n}\n\n/**\n * What `m-icon name=\"app_logo\"` draws. Defaults to what NavStore published; a\n * visual editor provides its own so the Canvas shows the AppTarget's logo.\n */\nexport const APP_LOGO_SOURCE = new InjectionToken<\n Signal<AppLogoSource | undefined>\n>('APP_LOGO_SOURCE', {\n providedIn: 'root',\n factory: () => inject(AppLogoState).source,\n});\n","export const MAGMONIUM = `\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-15 -15 120 165\">\n <g>\n <path fill=\"#color\" style=\"opacity: 0.7;\" d=\"M5 5 L5 65 L85 65 Z\" />\n <path fill=\"#color\" style=\"opacity: 0.3;\" d=\"M85 5 L5 65 L85 65 Z\" />\n </g>\n <g>\n <path fill=\"#color\" style=\"opacity: 0.3;\" d=\"M5 70 L85 70 L5 130 Z\" />\n <path fill=\"#color\" style=\"opacity: 0.7;\" d=\"M85 70 L5 70 L85 130 Z\" />\n </g>\n </svg>\n `;\n","// AUTO-GENERATED by assets:compile — do not edit manually\nexport const SHARED_ICONS = [\n 'accordion_chevron',\n 'account_balance_wallet',\n 'activity',\n 'add-image',\n 'adjust',\n 'alert-circle',\n 'analytics',\n 'apps',\n 'arrow-down',\n 'arrow-left',\n 'arrow-left-right',\n 'arrow-right',\n 'arrow-up',\n 'arrow_back',\n 'bell',\n 'bold',\n 'books',\n 'calendar',\n 'calendar-open',\n 'camera',\n 'chat',\n 'check',\n 'chevron-down',\n 'chevron-left',\n 'chevron-right',\n 'chevron-up',\n 'chevron_left',\n 'chevrons-down',\n 'chevrons-left',\n 'chevrons-right',\n 'chevrons-up',\n 'clipboard',\n 'code',\n 'coins',\n 'color-picker',\n 'copy',\n 'copyright',\n 'corner-left-up',\n 'currency_exchange',\n 'dot',\n 'download',\n 'ellipsis-vertical',\n 'exclamation-triangle',\n 'eye',\n 'eye_close',\n 'file-code',\n 'file-data',\n 'file-image',\n 'file-markup',\n 'file-style',\n 'file-text',\n 'fixed',\n 'flower',\n 'folder',\n 'games',\n 'gear',\n 'heading',\n 'heart',\n 'heart_filled',\n 'help',\n 'hero',\n 'info',\n 'install',\n 'instrument',\n 'investments',\n 'italic',\n 'language',\n 'layers',\n 'layouts',\n 'link',\n 'link-broken',\n 'list',\n 'loading',\n 'loading-bars',\n 'loading-dots',\n 'loading-logo',\n 'loading-pulse',\n 'location',\n 'lock',\n 'logo',\n 'magazines',\n 'mail',\n 'menu',\n 'mic',\n 'minus',\n 'monitor',\n 'more',\n 'notification',\n 'notification_off',\n 'open',\n 'pause',\n 'pencil',\n 'play',\n 'plus',\n 'posts',\n 'quote',\n 'redo',\n 'reload',\n 'reset',\n 'save',\n 'scissors',\n 'search',\n 'section',\n 'security',\n 'settings',\n 'shield',\n 'smartphone',\n 'sort-alpha-asc',\n 'sort-alpha-desc',\n 'sparkles',\n 'square',\n 'star',\n 'store',\n 'strategies',\n 'strikethrough',\n 'sun',\n 'table',\n 'tablet',\n 'target',\n 'theme',\n 'trash',\n 'trash-2',\n 'trending-down',\n 'trending-up',\n 'undo',\n 'user',\n 'users',\n 'wallet_manager',\n 'wallet_owner',\n 'wallet_shareholder',\n 'wand',\n 'wifi',\n 'x',\n 'zap',\n];\n","import { Icon, MAGMONIUM } from '../type/icon';\nimport { ElementRef } from '@angular/core';\nimport { SHARED_ICONS } from '../model/shared-icons';\nexport { SHARED_ICONS };\n\nexport function isOneIcon(element: ElementRef<HTMLElement>, config?: Icon) {\n if (typeof config?.one !== 'undefined') {\n return !!config.one;\n }\n\n // cast SHARED_ICONS to a generic string array for runtime includes check\n if (config?.name && (SHARED_ICONS as readonly string[]).includes(config.name)) {\n return true;\n }\n\n const tagName = element.nativeElement.tagName;\n return tagName === 'M-ONE-ICON';\n}\n\nfunction textToSvg(str = MAGMONIUM, color: string): string {\n if (typeof str !== 'string') return str as unknown as string;\n return str.replace(/#color/g, color).replace(/currentColor/g, color);\n}\n\nexport function svgElementFromString(str: string, color: string): SVGElement {\n const parser = new DOMParser();\n const doc = parser.parseFromString(textToSvg(str, color), 'image/svg+xml');\n const svg = doc.documentElement;\n\n if (svg && svg.nodeName === 'svg') {\n return svg as unknown as SVGElement;\n }\n\n const errorSvg = parser.parseFromString(textToSvg(MAGMONIUM, color), 'image/svg+xml');\n return errorSvg.documentElement as unknown as SVGElement;\n}\n","import { inject, InjectionToken, Provider, Signal, Type } from '@angular/core';\nimport { Size } from '../enum/scaling/size';\n\n/**\n * The Size in force for a subtree. Provided by the only components that may\n * declare one — Section, ButtonGroup, and the markup-composed SectionButtonGroup\n * (the last two are one seat, ADR 0008) — and injected `{ optional: true }` by\n * each of them (so a declarer falls back to the nearest one above it) and by\n * the few primitives whose size is a box dimension rather than a font size.\n *\n * Most components need nothing: a declarer also sets `font-size` on its own\n * host, so anything measured in `em` follows through ordinary CSS inheritance.\n * The token exists for what inheritance cannot do — a ButtonGroup or\n * SectionButtonGroup overriding its Section, and Icon sizing a square glyph.\n * See ADR 0008.\n */\nexport interface SizeContext {\n readonly size: Signal<Size>;\n}\n\nexport const SIZE_CONTEXT = new InjectionToken<SizeContext>('SIZE_CONTEXT');\n\nexport interface SizeDeclarer {\n readonly resolvedSize: Signal<Size>;\n}\n\n/**\n * Publishes a declarer's resolved Size to its subtree. Goes in `providers` and\n * never `viewProviders`: a Section's Cols and a ButtonGroup's Buttons are\n * projected content, which only `providers` reaches.\n */\nexport function provideSizeContext(\n declarer: Type<SizeDeclarer>\n): Provider {\n return {\n provide: SIZE_CONTEXT,\n useFactory: (): SizeContext => ({ size: inject(declarer).resolvedSize }),\n };\n}\n\n/**\n * The Size in force above a declarer. `skipSelf` because a declarer provides\n * SIZE_CONTEXT itself, and injecting its own provider would be circular — what\n * it wants is the nearest declarer *above* it, so that a Section with no Size\n * of its own takes its parent Section's and a ButtonGroup takes its Section's.\n */\nexport function injectParentSize(): SizeContext | null {\n return inject(SIZE_CONTEXT, { optional: true, skipSelf: true });\n}\n","/**\n * The reserved icon name that draws the running app's own AppLogo as a glyph\n * (GLOSSARY.md AppLogoIcon). Never an IconAsset or a file in `icons/`: `m-icon`\n * reads it from APP_LOGO_SOURCE instead of fetching anything. Its own file so\n * codegen can read it without Angular.\n */\nexport const APP_LOGO_ICON = 'app_logo';\n","/**\n * LogoGlyph rules (nx ADR 0007) — the same allowlist rebuild api runs on\n * save, so the editor refuses what api would refuse before anything is sent.\n * api's rebuild is the rule; this one is the early answer.\n */\n\n/** The size bound on a LogoGlyph's markup, in UTF-8 bytes. */\nexport const LOGO_GLYPH_MAX_BYTES = 16 * 1024;\n\nconst SVG_NS = 'http://www.w3.org/2000/svg';\n\nconst SHAPE_TAGS = new Set([\n 'path',\n 'circle',\n 'ellipse',\n 'line',\n 'polyline',\n 'polygon',\n 'rect',\n]);\n\n/** Geometry only — no attribute here can carry a script or a link. */\nconst GEOMETRY = new Set([\n 'd',\n 'cx',\n 'cy',\n 'r',\n 'rx',\n 'ry',\n 'x',\n 'y',\n 'x1',\n 'y1',\n 'x2',\n 'y2',\n 'width',\n 'height',\n 'points',\n 'transform',\n]);\n\nconst ENUMS: Record<string, ReadonlySet<string>> = {\n 'stroke-linecap': new Set(['butt', 'round', 'square']),\n 'stroke-linejoin': new Set(['miter', 'round', 'bevel']),\n 'fill-rule': new Set(['nonzero', 'evenodd']),\n 'clip-rule': new Set(['nonzero', 'evenodd']),\n};\n\nconst GEOMETRY_VALUE = /^[0-9A-Za-z.,\\s+\\-()%]*$/;\nconst NUMBER = /^\\s*[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?\\s*$/;\nconst APP_COLOR = /^#[0-9a-fA-F]{6}$/;\n\n/** Why a glyph was refused — the codes api answers with. */\nexport type LogoGlyphError = '' | 'logo_invalid' | 'logo_too_large';\n\n/**\n * A rebuilt glyph. Flat rather than a union: the wc build does not narrow\n * discriminated unions. `error` is empty on success, `svg` empty on refusal.\n */\nexport type LogoGlyphResult = { svg: string; error: LogoGlyphError };\n\nconst escapeAttribute = (value: string): string =>\n value.replace(/&/g, '&').replace(/\"/g, '"').replace(/</g, '<');\n\n/**\n * Paint survives only as on/off: the AppLogo paints the glyph white, so a\n * colour is kept as `#fff` and `none` as `none` — never a `url(...)`.\n */\nconst paint = (element: Element): string => {\n let out = '';\n for (const name of ['fill', 'stroke']) {\n const value = element.getAttribute(name);\n if (value !== null) {\n out += ` ${name}=\"${value.trim() === 'none' ? 'none' : '#fff'}\"`;\n }\n }\n const width = element.getAttribute('stroke-width');\n if (width !== null && NUMBER.test(width)) {\n out += ` stroke-width=\"${width.trim()}\"`;\n }\n for (const [name, allowed] of Object.entries(ENUMS)) {\n const value = element.getAttribute(name)?.trim();\n if (value && allowed.has(value)) out += ` ${name}=\"${value}\"`;\n }\n return out;\n};\n\nconst shape = (element: Element): string => {\n const tag = element.localName;\n if (tag === 'g') {\n const children = Array.from(element.children).map(shape).join('');\n if (!children) return '';\n const transform = element.getAttribute('transform');\n const attrs =\n transform && GEOMETRY_VALUE.test(transform)\n ? ` transform=\"${escapeAttribute(transform)}\"`\n : '';\n return `<g${attrs}${paint(element)}>${children}</g>`;\n }\n if (!SHAPE_TAGS.has(tag)) return '';\n const geometry = Array.from(element.attributes)\n .filter(({ name, value }) => GEOMETRY.has(name) && GEOMETRY_VALUE.test(value))\n .map(({ name, value }) => ` ${name}=\"${escapeAttribute(value)}\"`)\n .join('');\n return geometry ? `<${tag}${geometry}${paint(element)}/>` : '';\n};\n\nconst viewBoxOf = (root: Element): string | undefined => {\n const viewBox = root.getAttribute('viewBox');\n if (viewBox !== null) {\n const parts = viewBox.replace(/,/g, ' ').trim().split(/\\s+/);\n const ok =\n parts.length === 4 &&\n parts.every((part) => NUMBER.test(part)) &&\n Number(parts[2]) > 0 &&\n Number(parts[3]) > 0;\n return ok ? parts.join(' ') : undefined;\n }\n const width = root.getAttribute('width') ?? '';\n const height = root.getAttribute('height') ?? '';\n return NUMBER.test(width) && NUMBER.test(height)\n ? `0 0 ${width.trim()} ${height.trim()}`\n : undefined;\n};\n\nconst refused = (error: LogoGlyphError): LogoGlyphResult => ({\n svg: '',\n error,\n});\n\n/**\n * The LogoGlyph as it will be stored: shape elements, their geometry and\n * on/off paint inside a fresh `<svg>` root. Refuses `logo_too_large` over\n * the size bound and `logo_invalid` for anything not a drawable SVG.\n */\nexport function rebuildLogoGlyph(markup: string): LogoGlyphResult {\n if (!markup.trim()) return refused('logo_invalid');\n if (new TextEncoder().encode(markup).length > LOGO_GLYPH_MAX_BYTES) {\n return refused('logo_too_large');\n }\n const lowered = markup.toLowerCase();\n if (lowered.includes('<!doctype') || lowered.includes('<!entity')) {\n return refused('logo_invalid');\n }\n const doc = new DOMParser().parseFromString(markup, 'image/svg+xml');\n const root = doc.documentElement;\n if (root.localName !== 'svg' || doc.getElementsByTagName('parsererror').length) {\n return refused('logo_invalid');\n }\n const viewBox = viewBoxOf(root);\n const body = Array.from(root.children).map(shape).join('');\n if (!viewBox || !body) return refused('logo_invalid');\n return {\n svg: `<svg xmlns=\"${SVG_NS}\" viewBox=\"${viewBox}\"${paint(root)}>${body}</svg>`,\n error: '',\n };\n}\n\n/** App Color as stored: `#rrggbb`, lowercased — or undefined when it is not one. */\nexport const normalizeAppColor = (value: string): string | undefined =>\n APP_COLOR.test(value.trim()) ? value.trim().toLowerCase() : undefined;\n\nconst channels = (color: string): [number, number, number] => {\n const hex = color.replace('#', '');\n return [0, 2, 4].map((i) => parseInt(hex.slice(i, i + 2), 16)) as [\n number,\n number,\n number,\n ];\n};\n\n/** The AppLogo's shadow: App Color mixed with 20% black. */\nexport const appLogoShadowColor = (color: string): string =>\n `#${channels(color)\n .map((channel) =>\n Math.round(channel * 0.8)\n .toString(16)\n .padStart(2, '0')\n )\n .join('')}`;\n\n/**\n * Whether a white glyph reads poorly over this App Color: contrast under 3:1,\n * the WCAG floor for graphical objects. A warning, never a refusal.\n */\nexport const isLightAppColor = (color: string): boolean => {\n const [r, g, b] = channels(color).map((channel) => {\n const c = channel / 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n const luminance = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n return 1.05 / (luminance + 0.05) < 3;\n};\n\n/** A LogoGlyph as a CSS `url(...)`, for painting it through a mask. */\nexport const logoGlyphMaskUrl = (svg: string): string =>\n `url(\"data:image/svg+xml;utf8,${encodeURIComponent(svg)}\")`;\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n model,\n untracked,\n} from '@angular/core';\nimport { Icon, MAGMONIUM } from '../type/icon';\nimport { isOneIcon, svgElementFromString } from '../lib/lib-icon';\nimport { SIZE_CONTEXT } from '../../../config/size-context.token';\nimport { resolveIconSize } from '../../../functions/size/size-converter';\nimport { AssetStore } from '../../../stores/asset.store';\nimport { HttpService } from '../../../services/http';\nimport { rxResource } from '@angular/core/rxjs-interop';\nimport { catchError } from 'rxjs/operators';\nimport { of } from 'rxjs';\nimport { applyColorsToElement, ThemeStore } from '../../../lib/theme';\nimport { ICON_SOURCE } from '../../../config/tokens';\nimport { APP_LOGO_ICON } from '../../../lib/app-identity/app-logo-icon';\nimport {\n APP_LOGO_SOURCE,\n AppLogoSource,\n} from '../../../lib/app-identity/app-logo-source';\nimport { logoGlyphMaskUrl } from '../../../lib/app-identity/logo-glyph';\n\n@Component({\n selector: 'm-icon, m-one-icon',\n template: `<ng-content></ng-content>`,\n styleUrls: ['./icon.sass'],\n host: {\n '[class.has-color]': 'resolvedConfig()?.color',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IconComponent {\n // Kept for the callers that hand an Icon a whole object rather than write it\n // out — a Button naming its own glyph, a SectionFormItem passing a Field's.\n config = model<Icon | undefined>(undefined);\n\n // `name` is the SVG's filename in `mag_assets/icons/`, not a config asset:\n // an Icon resolves artwork, so it is the one primitive whose name points at\n // a picture rather than at a description of itself (ADR 0010). `size` is a\n // free length (number → em), not a Size — Size stays on Section / ButtonGroup\n // (ADR 0008); set here only to overwrite the box SIZE_CONTEXT would give.\n readonly name = input<string | undefined>();\n readonly color = input<string | undefined>();\n readonly size = input<number | string | undefined>();\n readonly one = input<boolean | undefined>();\n readonly baseUrl = input<string | undefined>();\n readonly remote = input<string | undefined>();\n readonly shadow = input<boolean | undefined, unknown>(undefined, {\n transform: booleanAttribute,\n });\n\n // Attributes win over the bound object, and an omitted one leaves the\n // object's key standing rather than blanking it.\n protected readonly resolvedConfig = computed<Icon | undefined>(() => {\n const config = this.config();\n const overrides: Icon = {};\n const name = this.name();\n if (name !== undefined) overrides.name = name;\n const color = this.color();\n if (color !== undefined) overrides.color = color;\n const one = this.one();\n if (one !== undefined) overrides.one = one;\n const baseUrl = this.baseUrl();\n if (baseUrl !== undefined) overrides.baseUrl = baseUrl;\n const remote = this.remote();\n if (remote !== undefined) overrides.remote = remote;\n const shadow = this.shadow();\n if (shadow !== undefined) overrides.shadow = shadow;\n if (!config && !Object.keys(overrides).length) return undefined;\n return { ...config, ...overrides };\n });\n\n private readonly elementRef = inject(ElementRef);\n // Icon sizes a square glyph through width/height, which no amount of\n // inherited font-size can set — so it is one of the few primitives that\n // reads the Size in force directly (ADR 0008).\n private readonly sizeContext = inject(SIZE_CONTEXT, { optional: true });\n private readonly assetStore = inject(AssetStore);\n private readonly http = inject(HttpService);\n private currentSvgElement: Element | null = null;\n private readonly themeStore = inject(ThemeStore);\n private readonly isOneIcon = computed(() =>\n isOneIcon(this.elementRef, this.resolvedConfig())\n );\n private readonly remoteBaseUrl = computed<string | undefined>(() => {\n const remoteId = this.resolvedConfig()?.remote;\n return remoteId ? this.http.buildWcAssetBaseUrl(remoteId) : undefined;\n });\n\n // Icons supplied by name from memory (e.g. a visual editor's unsaved glyphs).\n // Read as a signal rather than through the resource below so that changing the\n // markup under an unchanged name repaints every icon already using it.\n private readonly iconSource = inject(ICON_SOURCE, { optional: true });\n private readonly inlineSvg = computed(() => {\n const name = this.resolvedConfig()?.name;\n return name ? this.iconSource?.()?.[name] : undefined;\n });\n\n // `app_logo` draws the running app's own AppLogo (GLOSSARY.md AppLogoIcon):\n // nothing to fetch, and the LogoGlyph is painted through a mask rather than\n // inserted, so its markup never reaches the page (nx ADR 0007).\n private readonly appLogoSource = inject(APP_LOGO_SOURCE);\n private readonly appLogo = computed(() =>\n this.resolvedConfig()?.name === APP_LOGO_ICON\n ? this.appLogoSource() ?? {}\n : undefined\n );\n\n private readonly text = rxResource({\n params: computed(\n () => ({\n name: this.resolvedConfig()?.name,\n isOneIcon: untracked(() => this.isOneIcon()),\n remoteBaseUrl: this.remoteBaseUrl(),\n }),\n { equal: (a, b) => a?.name === b?.name && a?.remoteBaseUrl === b?.remoteBaseUrl }\n ),\n stream: ({ params: { name, isOneIcon, remoteBaseUrl } }) => {\n if (name === APP_LOGO_ICON) return of(undefined);\n if (!name) return untracked(() =>\n this.assetStore.resolve<string>('icons', 'logo', true).pipe(catchError(() => of(MAGMONIUM)))\n );\n // Skips the request entirely for an in-memory glyph — there is no asset\n // behind it, so fetching only ever produces a 404 and the fallback logo.\n const inline = untracked(() => this.inlineSvg());\n if (inline) return of(inline);\n return untracked(() =>\n this.assetStore\n .resolve<string>('icons', name, isOneIcon, remoteBaseUrl)\n .pipe(catchError(() => of(MAGMONIUM)))\n );\n },\n });\n\n private readonly pallet = computed(() =>\n applyColorsToElement(\n this.resolvedConfig()?.color ?? this.themeStore.color()?.mm ?? '#fff',\n this.themeStore.color(),\n this.elementRef.nativeElement\n )\n );\n\n constructor() {\n effect(this.updateElement);\n effect(this.applySize);\n effect(this.applyShadow);\n }\n\n // On the host, not the glyph: a filter on the masked AppLogoIcon would be\n // clipped by its own mask. Sized off the icon box so it scales with it.\n private readonly applyShadow = (): void => {\n const style = this.elementRef.nativeElement.style;\n if (!this.resolvedConfig()?.shadow) {\n style.removeProperty('filter');\n return;\n }\n const color =\n this.pallet()?.color ?? this.themeStore.color()?.mm ?? '#fff';\n style.setProperty(\n 'filter',\n `drop-shadow(0 calc(var(--m-icon-size, 1em) * 0.08) calc(var(--m-icon-size, 1em) * 0.06) color-mix(in srgb, ${color} 80%, black))`\n );\n };\n\n private readonly applySize = (): void => {\n this.elementRef.nativeElement.style.setProperty(\n '--m-icon-size',\n resolveIconSize(this.size(), this.sizeContext?.size())\n );\n };\n\n private readonly updateElement = (): void => {\n const element = this.elementRef.nativeElement;\n if (this.currentSvgElement) {\n this.currentSvgElement.remove();\n this.currentSvgElement = null;\n }\n const color = this.pallet()?.color ?? this.themeStore.color()?.mm ?? '#fff';\n const appLogo = this.appLogo();\n if (appLogo) {\n this.currentSvgElement = appLogoElement(appLogo, color);\n element.prepend(this.currentSvgElement);\n return;\n }\n const svg = svgElementFromString(\n this.inlineSvg() ?? (this.text.value() as string),\n color\n );\n if (!svg) return;\n this.currentSvgElement = svg;\n svg.removeAttribute('width');\n svg.removeAttribute('height');\n svg.style.width = 'var(--m-icon-size, 1em)';\n svg.style.height = 'var(--m-icon-size, 1em)';\n svg.style.flexShrink = '0';\n svg.removeAttribute('stroke-width');\n svg.style.setProperty('stroke-width', '2px');\n svg.querySelectorAll('*').forEach((el) => {\n el.removeAttribute('stroke-width');\n if (el instanceof HTMLElement || el instanceof SVGElement) {\n el.style.removeProperty('stroke-width');\n }\n });\n element.prepend(svg);\n };\n}\n\n// Inline styles, like the SVG above: an element built here carries no\n// encapsulation attribute, so the component's sass never reaches it.\nconst appLogoElement = (logo: AppLogoSource, color: string): HTMLElement => {\n const mark = document.createElement('span');\n mark.className = 'm-icon__app-logo';\n const style = mark.style;\n style.width = 'var(--m-icon-size, 1em)';\n style.height = 'var(--m-icon-size, 1em)';\n style.flexShrink = '0';\n const mask = logo.glyph\n ? logoGlyphMaskUrl(logo.glyph)\n : logo.src\n ? `url(\"${encodeURI(logo.src)}\")`\n : undefined;\n if (mask) {\n style.backgroundColor = color;\n style.setProperty('mask-image', mask);\n style.setProperty('mask-size', 'contain');\n style.setProperty('mask-repeat', 'no-repeat');\n style.setProperty('mask-position', 'center');\n return mark;\n }\n // No LogoGlyph yet: the first letter, as an AppLogo shows it.\n mark.textContent = (logo.name?.trim().charAt(0) ?? '').toUpperCase();\n style.display = 'inline-flex';\n style.alignItems = 'center';\n style.justifyContent = 'center';\n style.color = color;\n style.fontSize = 'calc(var(--m-icon-size, 1em) * 0.8)';\n style.fontWeight = '600';\n style.lineHeight = '1';\n return mark;\n};\n","import { CustomIcon } from '../type/icon';\nimport { ThemeColor } from '@magmonium/cli';\n\nfunction genColor(colors: ThemeColor, color: string) {\n return colors[color as keyof ThemeColor] ?? color;\n}\n\nexport function isLargeImage(svg: CustomIcon): boolean {\n const width = svg.width || 0;\n const height = svg.height || 0;\n const area = width * height;\n return area > 2000000 || width > 2000 || height > 2000;\n}\n\nexport function genViewPort(svg: CustomIcon | undefined) {\n if (!svg) return '0 0 0 0';\n const width = svg.width || 0;\n const height = svg.height || 0;\n return `0 0 ${width} ${height}`;\n}\n\nexport function computedFillColor(\n svg: CustomIcon,\n colors?: ThemeColor,\n fillColor?: string\n) {\n const { lineColor, backgroundColor, invertSvg } = svg.edit;\n if (!colors) {\n return fillColor ?? backgroundColor;\n }\n return genColor(\n colors,\n invertSvg ? lineColor : (fillColor ?? backgroundColor)\n );\n}\n\nexport function computeLineColor(\n svg: CustomIcon,\n colors?: ThemeColor,\n strokeColor?: string\n) {\n const { lineColor, backgroundColor, invertSvg } = svg.edit;\n if (!colors) {\n return strokeColor ?? lineColor;\n }\n return genColor(\n colors,\n invertSvg ? backgroundColor : (strokeColor ?? lineColor)\n );\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n} from '@angular/core';\nimport { CustomIcon } from '../type/icon';\nimport {\n computedFillColor,\n computeLineColor,\n genViewPort,\n isLargeImage,\n} from '../lib/custom-icon';\nimport { ThemeStore } from '../../../lib/theme';\n\n@Component({\n selector: 'm-custom-icon',\n template: `\n <!-- eslint-disable local/no-raw-svg -->\n @if (svg(); as svg) {\n <svg\n xmlns=\"http:/www.w3.org/2000/svg\"\n [attr.viewBox]=\"viewBox()\"\n [attr.width]=\"svg.width\"\n [attr.height]=\"svg.height\"\n preserveAspectRatio=\"xMidYMid meet\"\n >\n @if (_fillColor(); as fillColor) {\n <rect\n [attr.width]=\"svg.width\"\n [attr.height]=\"svg.height\"\n [attr.fill]=\"fillColor\"\n />\n }\n @if (_strokeColor(); as stroke) {\n @for (path of svg?.paths; track $index) {\n <path\n class=\"svg-path\"\n [attr.d]=\"path\"\n [attr.fill]=\"'none'\"\n [attr.stroke]=\"stroke\"\n [attr.stroke-linecap]=\"svg?.edit?.linecap\"\n [attr.stroke-linejoin]=\"svg?.edit?.linejoin\"\n [attr.stroke-width]=\"svg.edit.strokeWidth\"\n [attr.vector-effect]=\"vectorEffect()\"\n />\n }\n }\n </svg>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CustomIconClass {\n svg = input.required<CustomIcon>();\n strokeColor = input<string | undefined>(undefined);\n fillColor = input<string | undefined>(undefined);\n strokeWidth = input<number | undefined>(undefined);\n\n protected readonly viewBox = computed(() => genViewPort(this.svg()));\n protected readonly vectorEffect = computed(() => {\n return isLargeImage(this.svg()) ? 'non-scaling-stroke' : null;\n });\n private readonly themeStore = inject(ThemeStore);\n protected readonly _fillColor = computed(() =>\n computedFillColor(this.svg(), this.themeStore.color(), this.fillColor())\n );\n protected readonly _strokeColor = computed(() => {\n return computeLineColor(\n this.svg(),\n this.themeStore.color(),\n this.strokeColor()\n );\n });\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n HostListener,\n computed,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { CustomIcon } from '../type/icon';\nimport {\n computedFillColor,\n computeLineColor,\n genViewPort,\n isLargeImage,\n} from '../lib/custom-icon';\nimport { ThemeStore } from '../../../lib/theme';\n\n@Component({\n selector: 'm-custom-icon-edit',\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <!-- eslint-disable local/no-raw-svg -->\n @if (svg(); as svg) {\n <svg\n xmlns=\"http:/www.w3.org/2000/svg\"\n [attr.viewBox]=\"_viewBox()\"\n [attr.width]=\"svg.width\"\n [attr.height]=\"svg.height\"\n preserveAspectRatio=\"xMidYMid meet\"\n >\n @if (_fillColor(); as fillColor) {\n <rect\n [attr.width]=\"svg.width\"\n [attr.height]=\"svg.height\"\n [attr.fill]=\"fillColor\"\n />\n }\n @for (path of svg.paths; track $index) {\n <path\n class=\"svg-path\"\n (click)=\"_onPathClick($index)\"\n [class.interactive]=\"svg.edit.canInteract\"\n [class.selected]=\"_selectedIndex.includes($index)\"\n [attr.d]=\"path\"\n [attr.fill]=\"'none'\"\n [attr.stroke]=\"_strokeColor()\"\n [attr.stroke-linecap]=\"svg.edit.linecap\"\n [attr.stroke-linejoin]=\"svg.edit.linejoin\"\n [attr.stroke-width]=\"svg.edit.strokeWidth\"\n [attr.vector-effect]=\"_vectorEffect()\"\n />\n }\n </svg>\n }\n `,\n styleUrl: './custom-icon-edit.sass',\n})\nexport class CustomIconEditComponent {\n svg = model<CustomIcon | undefined>(undefined);\n strokeColor = input<string | undefined>(undefined);\n fillColor = input<string | undefined>(undefined);\n\n private readonly themeStore = inject(ThemeStore);\n\n @HostListener('window:keydown', ['$event'])\n onKeydown(event: KeyboardEvent) {\n if (!this.svg()?.edit?.canInteract || this._selectedIndex.length === 0) {\n return;\n }\n if (event.key === ' ') {\n event.preventDefault();\n this.deleteSelectedPaths();\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this._selectedIndex = [];\n }\n }\n\n protected readonly _viewBox = computed(() => genViewPort(this.svg()));\n\n protected readonly _vectorEffect = computed(() => {\n const svg = this.svg();\n return svg && isLargeImage(svg) ? 'non-scaling-stroke' : null;\n });\n\n protected readonly _fillColor = computed(() => {\n const svg = this.svg();\n if (!svg) return undefined;\n return computedFillColor(svg, this.themeStore.color(), this.fillColor());\n });\n\n protected readonly _strokeColor = computed(() => {\n const svg = this.svg();\n if (!svg) return undefined;\n return computeLineColor(svg, this.themeStore.color(), this.strokeColor());\n });\n\n protected readonly _onPathClick = (index: number) => {\n if (!this.svg()?.edit?.canInteract) return;\n this._selectedIndex = Array.from(new Set([...this._selectedIndex, index]));\n };\n\n readonly deleteSelectedPaths = () => {\n this.svg.update((prev) => {\n if (!prev) return prev;\n return {\n ...prev,\n paths: prev.paths.filter((_, i) => !this._selectedIndex.includes(i)),\n };\n });\n this._selectedIndex = [];\n };\n\n protected _selectedIndex: number[] = [];\n}\n"],"mappings":";;;;;;;;AAwBA,IAAa,eAAb,MAAa,aAAY;CACd,UAAU,OAAkC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACtD,SAAS,KAAK,QAAQ,WAAU;CAChC,OAAO,WACd,KAAK,QAAQ,IAAI,MAAM;CAJd,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAY,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAZ,OAAA,QAAA,GAAA,sBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAY,YADC;CAAM,CAAA;;AACnB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAY,YAAA,CAAA;EADxB,MAAA;EAAW,MAAA,CAAA,EAAE,YAAY,OAAM,CAAE;;;AAYlC,MAAa,kBAAkB,IAAI,eAEjC,mBAAmB;CACnB,YAAY;CACZ,eAAe,OAAO,YAAY,CAAC,CAAC;AACrC,CAAA;ACxCD,MAAa,YAAY;;;;;;;;;;;;ACCzB,MAAa,eAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;ACnID,SAAgB,UAAU,SAAkC,QAAa;CACvE,IAAI,OAAO,QAAQ,QAAQ,aACzB,OAAO,CAAC,CAAC,OAAO;CAIlB,IAAI,QAAQ,QAAS,aAAmC,SAAS,OAAO,IAAI,GAC1E,OAAO;CAIT,OADgB,QAAQ,cAAc,YACnB;AACrB;AAEA,SAAS,UAAU,MAAM,WAAW,OAAa;CAC/C,IAAI,OAAO,QAAQ,UAAU,OAAO;CACpC,O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