@magmonium/one 0.4.46 → 0.4.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/assets/i18n/af.json +53 -11
  2. package/assets/i18n/am.json +61 -15
  3. package/assets/i18n/ar.json +59 -27
  4. package/assets/i18n/as.json +56 -16
  5. package/assets/i18n/az.json +56 -14
  6. package/assets/i18n/ba.json +50 -11
  7. package/assets/i18n/be.json +53 -12
  8. package/assets/i18n/bg.json +54 -13
  9. package/assets/i18n/bn.json +64 -13
  10. package/assets/i18n/br.json +51 -10
  11. package/assets/i18n/brx.json +50 -1
  12. package/assets/i18n/bs.json +55 -14
  13. package/assets/i18n/ca.json +53 -11
  14. package/assets/i18n/ceb.json +57 -14
  15. package/assets/i18n/cnr.json +54 -12
  16. package/assets/i18n/co.json +56 -14
  17. package/assets/i18n/cs.json +54 -11
  18. package/assets/i18n/cy.json +49 -11
  19. package/assets/i18n/da.json +54 -11
  20. package/assets/i18n/de.json +50 -21
  21. package/assets/i18n/doi.json +55 -13
  22. package/assets/i18n/el.json +55 -14
  23. package/assets/i18n/en.json +2 -2
  24. package/assets/i18n/eo.json +55 -12
  25. package/assets/i18n/es.json +51 -24
  26. package/assets/i18n/et.json +50 -8
  27. package/assets/i18n/eu.json +54 -12
  28. package/assets/i18n/fa.json +53 -12
  29. package/assets/i18n/fi.json +53 -11
  30. package/assets/i18n/fr.json +54 -24
  31. package/assets/i18n/fy.json +56 -12
  32. package/assets/i18n/ga.json +50 -11
  33. package/assets/i18n/gd.json +52 -13
  34. package/assets/i18n/gl.json +56 -12
  35. package/assets/i18n/gu.json +64 -13
  36. package/assets/i18n/ha.json +58 -13
  37. package/assets/i18n/haw.json +48 -12
  38. package/assets/i18n/he.json +51 -10
  39. package/assets/i18n/hi.json +61 -26
  40. package/assets/i18n/hmn.json +53 -12
  41. package/assets/i18n/hr.json +54 -11
  42. package/assets/i18n/hu.json +54 -13
  43. package/assets/i18n/hy.json +59 -12
  44. package/assets/i18n/id.json +48 -9
  45. package/assets/i18n/ie.json +48 -2
  46. package/assets/i18n/ig.json +50 -9
  47. package/assets/i18n/ilo.json +40 -9
  48. package/assets/i18n/is.json +53 -11
  49. package/assets/i18n/it.json +50 -21
  50. package/assets/i18n/iw.json +51 -10
  51. package/assets/i18n/ja.json +56 -26
  52. package/assets/i18n/jw.json +48 -10
  53. package/assets/i18n/ka.json +54 -10
  54. package/assets/i18n/kk.json +49 -10
  55. package/assets/i18n/km.json +53 -12
  56. package/assets/i18n/kn.json +62 -11
  57. package/assets/i18n/ko.json +53 -22
  58. package/assets/i18n/kok.json +53 -11
  59. package/assets/i18n/ks.json +49 -1
  60. package/assets/i18n/ku.json +52 -13
  61. package/assets/i18n/ky.json +52 -12
  62. package/assets/i18n/la.json +52 -9
  63. package/assets/i18n/lb.json +54 -9
  64. package/assets/i18n/lo.json +50 -9
  65. package/assets/i18n/lt.json +55 -10
  66. package/assets/i18n/lv.json +54 -9
  67. package/assets/i18n/ma.json +54 -1
  68. package/assets/i18n/mai.json +50 -10
  69. package/assets/i18n/me.json +49 -0
  70. package/assets/i18n/mg.json +55 -10
  71. package/assets/i18n/mi.json +55 -12
  72. package/assets/i18n/mk.json +52 -8
  73. package/assets/i18n/ml.json +59 -8
  74. package/assets/i18n/mn.json +54 -10
  75. package/assets/i18n/mni.json +52 -0
  76. package/assets/i18n/mr.json +61 -10
  77. package/assets/i18n/ms.json +52 -8
  78. package/assets/i18n/mt.json +54 -10
  79. package/assets/i18n/my.json +54 -11
  80. package/assets/i18n/ne.json +53 -10
  81. package/assets/i18n/nl.json +51 -22
  82. package/assets/i18n/no.json +52 -9
  83. package/assets/i18n/ny.json +53 -11
  84. package/assets/i18n/or.json +61 -9
  85. package/assets/i18n/pa.json +61 -9
  86. package/assets/i18n/pl.json +48 -20
  87. package/assets/i18n/ps.json +50 -8
  88. package/assets/i18n/pt.json +50 -20
  89. package/assets/i18n/rm.json +50 -1
  90. package/assets/i18n/ro.json +52 -10
  91. package/assets/i18n/ru.json +50 -20
  92. package/assets/i18n/sa.json +54 -11
  93. package/assets/i18n/sat.json +55 -11
  94. package/assets/i18n/sc.json +50 -1
  95. package/assets/i18n/sd.json +48 -10
  96. package/assets/i18n/si.json +50 -12
  97. package/assets/i18n/sk.json +48 -9
  98. package/assets/i18n/sl.json +46 -7
  99. package/assets/i18n/sm.json +52 -12
  100. package/assets/i18n/sn.json +48 -9
  101. package/assets/i18n/so.json +50 -11
  102. package/assets/i18n/sq.json +57 -9
  103. package/assets/i18n/sr.json +49 -11
  104. package/assets/i18n/st.json +47 -10
  105. package/assets/i18n/su.json +49 -11
  106. package/assets/i18n/sv.json +44 -6
  107. package/assets/i18n/sw.json +33 -10
  108. package/assets/i18n/ta.json +61 -10
  109. package/assets/i18n/te.json +62 -11
  110. package/assets/i18n/tg.json +50 -11
  111. package/assets/i18n/th.json +51 -12
  112. package/assets/i18n/tl.json +51 -9
  113. package/assets/i18n/tr.json +49 -23
  114. package/assets/i18n/uk.json +47 -9
  115. package/assets/i18n/ur.json +54 -11
  116. package/assets/i18n/uz.json +49 -11
  117. package/assets/i18n/vi.json +47 -7
  118. package/assets/i18n/xh.json +50 -13
  119. package/assets/i18n/yi.json +51 -11
  120. package/assets/i18n/yo.json +51 -11
  121. package/assets/i18n/zh.json +52 -25
  122. package/assets/i18n/zu.json +48 -10
  123. package/assets/icons/svg.json +1 -0
  124. package/assets/icons/wrench.svg +3 -0
  125. package/assets/index.json +1 -1
  126. package/assets/modal/authenticate.json +1 -1
  127. package/fesm2022/{magmonium-one-attribute-value-C1lqou2L.mjs → magmonium-one-attribute-value-DnctyCKp.mjs} +3 -3
  128. package/fesm2022/{magmonium-one-attribute-value-C1lqou2L.mjs.map → magmonium-one-attribute-value-DnctyCKp.mjs.map} +1 -1
  129. package/fesm2022/{magmonium-one-base-checkbox-CIxAiA4Q.mjs → magmonium-one-base-checkbox-D3Z1FTXU.mjs} +2 -2
  130. package/fesm2022/{magmonium-one-base-checkbox-CIxAiA4Q.mjs.map → magmonium-one-base-checkbox-D3Z1FTXU.mjs.map} +1 -1
  131. package/fesm2022/{magmonium-one-base-dropdown-XpTWe4Ii.mjs → magmonium-one-base-dropdown-DIaimBpG.mjs} +10 -10
  132. package/fesm2022/{magmonium-one-base-dropdown-XpTWe4Ii.mjs.map → magmonium-one-base-dropdown-DIaimBpG.mjs.map} +1 -1
  133. package/fesm2022/{magmonium-one-base-input-C1Ek0Ezm.mjs → magmonium-one-base-input-CZyIcKrn.mjs} +2 -2
  134. package/fesm2022/{magmonium-one-base-input-C1Ek0Ezm.mjs.map → magmonium-one-base-input-CZyIcKrn.mjs.map} +1 -1
  135. package/fesm2022/{magmonium-one-base-text-Di2V2ojp.mjs → magmonium-one-base-text-6T8KrJbz.mjs} +2 -2
  136. package/fesm2022/{magmonium-one-base-text-Di2V2ojp.mjs.map → magmonium-one-base-text-6T8KrJbz.mjs.map} +1 -1
  137. package/fesm2022/{magmonium-one-button-DZ4wCJgb.mjs → magmonium-one-button-BKGxIBhw.mjs} +7 -7
  138. package/fesm2022/{magmonium-one-button-DZ4wCJgb.mjs.map → magmonium-one-button-BKGxIBhw.mjs.map} +1 -1
  139. package/fesm2022/{magmonium-one-checkbox-R-hPZrCa.mjs → magmonium-one-checkbox-D1W18OGo.mjs} +5 -5
  140. package/fesm2022/{magmonium-one-checkbox-R-hPZrCa.mjs.map → magmonium-one-checkbox-D1W18OGo.mjs.map} +1 -1
  141. package/fesm2022/{magmonium-one-color-utl-DI5p24iQ.mjs → magmonium-one-color-utl-DklqRa3m.mjs} +38 -13
  142. package/fesm2022/magmonium-one-color-utl-DklqRa3m.mjs.map +1 -0
  143. package/fesm2022/{magmonium-one-directives-B93p5bAL.mjs → magmonium-one-directives-R099YTUd.mjs} +217 -217
  144. package/fesm2022/magmonium-one-directives-R099YTUd.mjs.map +1 -0
  145. package/fesm2022/{magmonium-one-group-B7YeUd1u.mjs → magmonium-one-group-Blvejahi.mjs} +7 -7
  146. package/fesm2022/{magmonium-one-group-B7YeUd1u.mjs.map → magmonium-one-group-Blvejahi.mjs.map} +1 -1
  147. package/fesm2022/{magmonium-one-header-DUiBhPUP.mjs → magmonium-one-header-qoXWebFN.mjs} +4 -4
  148. package/fesm2022/{magmonium-one-header-DUiBhPUP.mjs.map → magmonium-one-header-qoXWebFN.mjs.map} +1 -1
  149. package/fesm2022/{magmonium-one-icon-C3jwzbb2.mjs → magmonium-one-icon-Ce44a1mo.mjs} +5 -4
  150. package/fesm2022/magmonium-one-icon-Ce44a1mo.mjs.map +1 -0
  151. package/fesm2022/{magmonium-one-image-editor-BRTk8i4O.mjs → magmonium-one-image-editor-DKiscgQU.mjs} +4 -4
  152. package/fesm2022/{magmonium-one-image-editor-BRTk8i4O.mjs.map → magmonium-one-image-editor-DKiscgQU.mjs.map} +1 -1
  153. package/fesm2022/{magmonium-one-label-D_rU82nD.mjs → magmonium-one-label-lYMBMB7p.mjs} +2 -2
  154. package/fesm2022/{magmonium-one-label-D_rU82nD.mjs.map → magmonium-one-label-lYMBMB7p.mjs.map} +1 -1
  155. package/fesm2022/{magmonium-one-m-ref-CEms7B6-.mjs → magmonium-one-m-ref-DVe-WAYR.mjs} +2 -2
  156. package/fesm2022/{magmonium-one-m-ref-CEms7B6-.mjs.map → magmonium-one-m-ref-DVe-WAYR.mjs.map} +1 -1
  157. package/fesm2022/{magmonium-one-menu-cO34OcJc.mjs → magmonium-one-menu-DcqfcU1p.mjs} +6 -6
  158. package/fesm2022/{magmonium-one-menu-cO34OcJc.mjs.map → magmonium-one-menu-DcqfcU1p.mjs.map} +1 -1
  159. package/fesm2022/{magmonium-one-multi-range-Bq3_3NHg.mjs → magmonium-one-multi-range-m86SzSZO.mjs} +3 -3
  160. package/fesm2022/{magmonium-one-multi-range-Bq3_3NHg.mjs.map → magmonium-one-multi-range-m86SzSZO.mjs.map} +1 -1
  161. package/fesm2022/{magmonium-one-options-asset-BMd7W0Mk.mjs → magmonium-one-options-asset-CIKSNq4B.mjs} +2 -2
  162. package/fesm2022/{magmonium-one-options-asset-BMd7W0Mk.mjs.map → magmonium-one-options-asset-CIKSNq4B.mjs.map} +1 -1
  163. package/fesm2022/{magmonium-one-otp-V2tFztLx.mjs → magmonium-one-otp-BrR0mijm.mjs} +5 -5
  164. package/fesm2022/{magmonium-one-otp-V2tFztLx.mjs.map → magmonium-one-otp-BrR0mijm.mjs.map} +1 -1
  165. package/fesm2022/{magmonium-one-password-IdllPMUw.mjs → magmonium-one-password-CKIAFzs9.mjs} +6 -6
  166. package/fesm2022/{magmonium-one-password-IdllPMUw.mjs.map → magmonium-one-password-CKIAFzs9.mjs.map} +1 -1
  167. package/fesm2022/{magmonium-one-radio-BAL3-3j5.mjs → magmonium-one-radio-6oN9j_F6.mjs} +3 -3
  168. package/fesm2022/{magmonium-one-radio-BAL3-3j5.mjs.map → magmonium-one-radio-6oN9j_F6.mjs.map} +1 -1
  169. package/fesm2022/{magmonium-one-range-Cf7yUnhN.mjs → magmonium-one-range-BmimLpG6.mjs} +4 -4
  170. package/fesm2022/{magmonium-one-range-Cf7yUnhN.mjs.map → magmonium-one-range-BmimLpG6.mjs.map} +1 -1
  171. package/fesm2022/{magmonium-one-selector-DAEI_0JX.mjs → magmonium-one-selector-CLSwVQCJ.mjs} +4 -4
  172. package/fesm2022/{magmonium-one-selector-DAEI_0JX.mjs.map → magmonium-one-selector-CLSwVQCJ.mjs.map} +1 -1
  173. package/fesm2022/{magmonium-one-size-converter-BOBD8nHy.mjs → magmonium-one-size-converter-DFIowQHO.mjs} +13 -2
  174. package/fesm2022/magmonium-one-size-converter-DFIowQHO.mjs.map +1 -0
  175. package/fesm2022/{magmonium-one-text-BnTkYLJe.mjs → magmonium-one-text-evdqwPEz.mjs} +6 -6
  176. package/fesm2022/{magmonium-one-text-BnTkYLJe.mjs.map → magmonium-one-text-evdqwPEz.mjs.map} +1 -1
  177. package/fesm2022/{magmonium-one-text-output-BZU61QIF.mjs → magmonium-one-text-output-BnS5Skz-.mjs} +4 -4
  178. package/fesm2022/{magmonium-one-text-output-BZU61QIF.mjs.map → magmonium-one-text-output-BnS5Skz-.mjs.map} +1 -1
  179. package/fesm2022/magmonium-one-theme-DPBeYB-G.mjs +1 -0
  180. package/fesm2022/{magmonium-one-toggle-V_YnZXx5.mjs → magmonium-one-toggle-BIoiSggh.mjs} +3 -3
  181. package/fesm2022/{magmonium-one-toggle-V_YnZXx5.mjs.map → magmonium-one-toggle-BIoiSggh.mjs.map} +1 -1
  182. package/fesm2022/magmonium-one.mjs +13780 -13130
  183. package/fesm2022/magmonium-one.mjs.map +1 -1
  184. package/package.json +1 -1
  185. package/types/magmonium-one.d.ts +194 -39
  186. package/fesm2022/magmonium-one-color-utl-DI5p24iQ.mjs.map +0 -1
  187. package/fesm2022/magmonium-one-directives-B93p5bAL.mjs.map +0 -1
  188. package/fesm2022/magmonium-one-icon-C3jwzbb2.mjs.map +0 -1
  189. package/fesm2022/magmonium-one-size-converter-BOBD8nHy.mjs.map +0 -1
  190. package/fesm2022/magmonium-one-theme-DYvNIWmo.mjs +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magmonium/one",
3
- "version": "0.4.46",
3
+ "version": "0.4.48",
4
4
  "description": "Magmonium One — Angular design-system primitives for mm Apps",
5
5
  "author": "magmonium",
6
6
  "license": "MIT",
@@ -711,6 +711,11 @@ export interface LoadingActionsApi {
711
711
  reset: () => void;
712
712
  cancelLoading: () => void;
713
713
  }
714
+ /**
715
+ * Renews the session the LoginStore holds — the refresh token, else the login
716
+ * modal — settling once fresh tokens are in it, rejecting when it cannot.
717
+ */
718
+ export type SessionRenewal = () => Promise<void>;
714
719
  export declare class SharedStoreRegistry {
715
720
  static setNavStore(store: unknown): void;
716
721
  static getNavStore(): unknown;
@@ -718,6 +723,13 @@ export declare class SharedStoreRegistry {
718
723
  static getAppLogoState(): unknown;
719
724
  static setLoginStore(store: unknown): void;
720
725
  static getLoginStore(): unknown;
726
+ /**
727
+ * First-write-wins: the app that owns the LoginStore registers how it renews
728
+ * it. A WC bundle mounted in that app shares its tokens, so it renews through
729
+ * this — never through its own Auth URL, which may not know them.
730
+ */
731
+ static setSessionRenewal(renew: SessionRenewal): void;
732
+ static getSessionRenewal(): SessionRenewal | undefined;
721
733
  /** First-write-wins: host registers its store; WC bundles reuse it so popups render in the host outlet. */
722
734
  static setNotificationStore(store: unknown): void;
723
735
  static getNotificationStore(): unknown;
@@ -741,6 +753,12 @@ export declare class SharedStoreRegistry {
741
753
  * honours a Declared Permission only for the App it names.
742
754
  */
743
755
  export declare const CALLING_APP_HEADER = "X-Mag-App";
756
+ /**
757
+ * Hands this app's session renewal to the WC bundles mounted in it
758
+ * (`HOST_SESSION`). They share its LoginStore, so its tokens; only this app's
759
+ * Auth URL is sure to know them.
760
+ */
761
+ export declare function registerSessionRenewal(): void;
744
762
  export declare const mInterceptor: (incoming: HttpRequest<unknown>, next: HttpHandlerFn) => Observable<HttpEvent<unknown>>;
745
763
  export interface RemoteSelectorConfig {
746
764
  appName: string;
@@ -809,6 +827,23 @@ export interface MountRoute {
809
827
  navId: string;
810
828
  params: Record<string, string>;
811
829
  }
830
+ /**
831
+ * What a Store App says about itself (nx ADR 0007), as `GET
832
+ * store/v1/identity/<link>` answers it. The one source of an app's name,
833
+ * description, AppLogo and App Color — never a WebComponentConfig.
834
+ */
835
+ export type AppIdentity = {
836
+ id: string;
837
+ link: string;
838
+ name: string;
839
+ description: string | null;
840
+ /** The LogoGlyph, rebuilt from the shape allowlist; null until the Owner sets one. */
841
+ logoGlyph: string | null;
842
+ /** App Color, `#rrggbb`; null until the Owner sets one. */
843
+ appColor: string | null;
844
+ /** Availability `open` — AppLogo optional, never released as a PWA. */
845
+ open: boolean;
846
+ };
812
847
  export interface NavStoreRef {
813
848
  /** Current NavId — route's NavId plus any open Murl segments. */
814
849
  id: Signal<string | undefined>;
@@ -883,6 +918,12 @@ export interface NavStoreRef {
883
918
  * forgets it. Optional: a host built before it existed provides none.
884
919
  */
885
920
  setMountRoute?: (name: string, route: MountRoute | undefined) => void;
921
+ /**
922
+ * Writes an app's App Identity over the one held — what an Owner's save
923
+ * hands back, so every AppLogo drawn from it follows. Optional: a host built
924
+ * before it existed provides none.
925
+ */
926
+ setIdentity?: (identity: AppIdentity) => void;
886
927
  }
887
928
  export declare enum AppRelationType {
888
929
  OWNER = 1,
@@ -1005,6 +1046,12 @@ export declare const LOGIN_STORE: InjectionToken<LoginStoreContract>;
1005
1046
  * is the host's MountPattern, so the base href no longer tells a Remote apart.
1006
1047
  */
1007
1048
  export declare const WC_BUNDLE: InjectionToken<boolean>;
1049
+ /**
1050
+ * The session renewal of the app this one is mounted in, or `null` when this
1051
+ * app owns its session. Set, the session is that host's: this app never calls
1052
+ * `auth/*` itself — no `init`, no `refresh` — and renews through the host.
1053
+ */
1054
+ export declare const HOST_SESSION: InjectionToken<SessionRenewal | null>;
1008
1055
  export declare const ASSET_BASE_URL: InjectionToken<string>;
1009
1056
  export declare const ONE_ASSET_BASE_URL: InjectionToken<string>;
1010
1057
  export declare const SEARCH_QUERY: InjectionToken<WritableSignal<string>>;
@@ -2604,12 +2651,25 @@ export declare function rebuildLogoGlyph(markup: string): LogoGlyphResult;
2604
2651
  export declare const normalizeAppColor: (value: string) => string | undefined;
2605
2652
  /** The AppLogo's shadow: App Color mixed with 20% black. */
2606
2653
  export declare const appLogoShadowColor: (color: string) => string;
2654
+ /**
2655
+ * Whether `color` reads on `ground` (3:1). Either not one hex — nothing to
2656
+ * measure — counts as reading.
2657
+ */
2658
+ export declare const isReadableOn: (color: string, ground: string | undefined) => boolean;
2659
+ /**
2660
+ * App Color as a mark standing on `ground` (the theme's background) draws it:
2661
+ * itself where it reads, else moved toward whichever of white or black stands
2662
+ * further from the ground, only as far as it takes to read — a dark App Color
2663
+ * on a dark theme lifts, a pale one on a light theme deepens.
2664
+ */
2665
+ export declare const readableAppColor: (color: string, ground: string | undefined) => string;
2607
2666
  /**
2608
2667
  * The theme's brand tokens (`mm`, `mmLite`, `mmDark`) as one App Color draws
2609
2668
  * them — what an app's own boundary paints its `mm` with in place of the
2610
- * theme's.
2669
+ * theme's. `mm` stands on the theme's background (`ground`), so it is the
2670
+ * App Color made readable there; the theme's own `mm` is picked per mode.
2611
2671
  */
2612
- export declare const appColorBrand: (color: string) => {
2672
+ export declare const appColorBrand: (color: string, ground?: string) => {
2613
2673
  mm: string;
2614
2674
  mmLite: string;
2615
2675
  mmDark: string;
@@ -2621,23 +2681,6 @@ export declare const appColorBrand: (color: string) => {
2621
2681
  export declare const isLightAppColor: (color: string) => boolean;
2622
2682
  /** A LogoGlyph as a CSS `url(...)`, for painting it through a mask. */
2623
2683
  export declare const logoGlyphMaskUrl: (svg: string) => string;
2624
- /**
2625
- * What a Store App says about itself (nx ADR 0007), as `GET
2626
- * store/v1/identity/<link>` answers it. The one source of an app's name,
2627
- * description, AppLogo and App Color — never a WebComponentConfig.
2628
- */
2629
- export type AppIdentity = {
2630
- id: string;
2631
- link: string;
2632
- name: string;
2633
- description: string | null;
2634
- /** The LogoGlyph, rebuilt from the shape allowlist; null until the Owner sets one. */
2635
- logoGlyph: string | null;
2636
- /** App Color, `#rrggbb`; null until the Owner sets one. */
2637
- appColor: string | null;
2638
- /** Availability `open` — AppLogo optional, never released as a PWA. */
2639
- open: boolean;
2640
- };
2641
2684
  /**
2642
2685
  * Reads App Identity from Store — the one read every surface shares (host
2643
2686
  * nav, a standalone app's chrome, store cards that hold only a link). One
@@ -2706,8 +2749,9 @@ export declare const appThemeColorFactory: () => Signal<string | undefined>;
2706
2749
  /**
2707
2750
  * Paints an App Color's brand tokens onto the element that bounds the app —
2708
2751
  * every `m.$mm` inside it reads them — or clears them, leaving the theme's.
2752
+ * `ground` is the theme's background, which the brand must read on.
2709
2753
  */
2710
- export declare const paintAppColor: (element: HTMLElement, color: string | undefined) => void;
2754
+ export declare const paintAppColor: (element: HTMLElement, color: string | undefined, ground: string | undefined) => void;
2711
2755
  /**
2712
2756
  * The element id of a page's Splash (GLOSSARY.md Splash). `OneApp` hides it
2713
2757
  * once the theme is ready, so an emitted page only has to carry it.
@@ -7280,7 +7324,7 @@ declare class DropdownBoxComponent {
7280
7324
  }
7281
7325
  /** The trigger both option Fields draw: a searchable text input and a chevron. */
7282
7326
  declare const DROPDOWN_TEMPLATE = "\n @if (config(); as dropdown) {\n @if (dropdown.label) {\n <m-label\n [for]=\"dropdown.name ?? ''\"\n [placeholder]=\"dropdown.label\"\n [params]=\"dropdown.params\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n />\n }\n <div\n class=\"trigger-wrap\"\n #wrapper\n [mSelector]=\"selectorConfig()\"\n [disabled]=\"disabled() || readonly() || !!config()?.readonly\"\n (opened)=\"onOpened()\"\n (closed)=\"onClosed()\"\n (focusin)=\"isFocused.set(true)\"\n (focusout)=\"isFocused.set(false)\"\n >\n <m-text-input\n [config]=\"triggerInputConfig()\"\n [value]=\"displayValue()\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid()\"\n [hideErrors]=\"true\"\n [(touched)]=\"touched\"\n [focused]=\"focused()\"\n (valueChange)=\"onInput($event)\"\n (click)=\"preventToggleWhenOpen($event)\"\n (keydown.space)=\"$event.stopPropagation()\"\n (keydown.enter)=\"onEnter($event)\"\n (keydown.arrowdown)=\"onArrow($event, 1)\"\n (keydown.arrowup)=\"onArrow($event, -1)\"\n (keydown.tab)=\"$event.stopPropagation()\"\n />\n <m-button [disabled]=\"disabled()\" [config]=\"chevron()\" />\n </div>\n @if (showErrors()) {\n @for (error of errors(); track $index) {\n <m-text-output\n variant=\"footer\"\n color=\"error\"\n [label]=\"error.message\"\n />\n }\n }\n }\n";
7283
- declare const DROPDOWN_IMPORTS: (typeof ButtonComponent | typeof LabelComponent | typeof TextOutputComponent | typeof SelectorDirective | typeof TextInputComponent)[];
7327
+ declare const DROPDOWN_IMPORTS: (typeof ButtonComponent | typeof LabelComponent | typeof SelectorDirective | typeof TextOutputComponent | typeof TextInputComponent)[];
7284
7328
  /**
7285
7329
  * Everything a Dropdown and a Multiselect share: the options, the search, the
7286
7330
  * keyboard walk and the panel. What differs is only what the Field holds — one
@@ -9830,8 +9874,8 @@ export declare class LogoComponent {
9830
9874
  protected readonly resolvedBorder: import("@angular/core").Signal<string | null>;
9831
9875
  protected readonly resolvedColor: import("@angular/core").Signal<string | null>;
9832
9876
  private readonly grain;
9833
- protected readonly topGrain: import("@angular/core").Signal<string | null>;
9834
- protected readonly bottomGrain: import("@angular/core").Signal<string | null>;
9877
+ protected readonly darkGrain: import("@angular/core").Signal<string | null>;
9878
+ protected readonly lightGrain: import("@angular/core").Signal<string | null>;
9835
9879
  darkGradient: import("@angular/core").Signal<string>;
9836
9880
  lightGradient: import("@angular/core").Signal<string>;
9837
9881
  darkGradientInv: import("@angular/core").Signal<string>;
@@ -10326,7 +10370,14 @@ export declare class RemoteComponent implements OnDestroy {
10326
10370
  private readonly reloadPage;
10327
10371
  private readonly assetStore;
10328
10372
  private readonly appLogoState;
10373
+ private readonly handoff;
10329
10374
  private loadedElement?;
10375
+ /** The config the element was loaded from, handed on with it. */
10376
+ private loadedConfig?;
10377
+ /** Where the element parks when this mount goes ({@link RemoteHandoff}). */
10378
+ private handoffKey?;
10379
+ /** The key this mount has told the handoff it holds an element under. */
10380
+ private heldKey?;
10330
10381
  /** Bumped per load, so an answer for a link since replaced is dropped. */
10331
10382
  private loadId;
10332
10383
  /** The link whose segment the URL holds now, cleared when another replaces it. */
@@ -10337,6 +10388,8 @@ export declare class RemoteComponent implements OnDestroy {
10337
10388
  private replaceNext;
10338
10389
  /** The remote's own last word on where it stands, never echoed back to it. */
10339
10390
  private lastReported?;
10391
+ /** The Nav that report stood on — the next mount of the element starts from it. */
10392
+ private lastRoute?;
10340
10393
  private lastSent?;
10341
10394
  /**
10342
10395
  * Set while a load handed the remote an `extra` path it has not confirmed
@@ -10413,6 +10466,17 @@ export declare class RemoteComponent implements OnDestroy {
10413
10466
  }>;
10414
10467
  constructor();
10415
10468
  ngOnDestroy(): void;
10469
+ /**
10470
+ * An App that has drawn goes to the next mount of it rather than away: a
10471
+ * Side App expanded or swapped arrives as it stood ({@link RemoteHandoff}).
10472
+ */
10473
+ private park;
10474
+ /**
10475
+ * The App another mount just left, mounted here as it stood — no Splash, no
10476
+ * boot. The move that brought it wrote the URL, so its next report is a move
10477
+ * of its own, and the host path it is handed is one it already stands on.
10478
+ */
10479
+ private adopt;
10416
10480
  private mountName;
10417
10481
  /** The host page that mounts this app, asked for at its beta tier. */
10418
10482
  protected openBeta: () => void;
@@ -10446,6 +10510,8 @@ export declare class RemoteComponent implements OnDestroy {
10446
10510
  */
10447
10511
  private reloadForTier;
10448
10512
  private dismountElement;
10513
+ private holdAs;
10514
+ private releaseHeld;
10449
10515
  static ɵfac: i0.ɵɵFactoryDeclaration<RemoteComponent, never>;
10450
10516
  static ɵcmp: i0.ɵɵComponentDeclaration<RemoteComponent, "m-remote", never, {
10451
10517
  "config": {
@@ -11360,6 +11426,36 @@ type TableConfig = Config & {
11360
11426
  selectionActions?: SelectionAction[];
11361
11427
  selectDisableExpression?: string;
11362
11428
  hiddenColumns?: number[];
11429
+ /** The menu every [TableGroup] header carries, by asset name. */
11430
+ groupMenuName?: string;
11431
+ /** Rows drag: within the table, or from one [TableGroup] into another. */
11432
+ draggableRows?: boolean;
11433
+ };
11434
+ /**
11435
+ * One group of a grouped Table: a full-width header row, then its own rows
11436
+ * under the Table's columns. A grouped Table neither pages nor sorts — the
11437
+ * groups and their order are the caller's.
11438
+ */
11439
+ type TableGroup = {
11440
+ id: string;
11441
+ label: string;
11442
+ rows: unknown[][];
11443
+ noTranslate?: boolean;
11444
+ /** The header reads as broken. */
11445
+ error?: boolean;
11446
+ /** No header menu on this group, though the Table names one. */
11447
+ noMenu?: boolean;
11448
+ /** Header menu items this group leaves out. */
11449
+ menuExclude?: string[];
11450
+ /** A trailing ghost button on the header. */
11451
+ actionLabel?: string;
11452
+ actionIcon?: string;
11453
+ /** What an empty group says, over the Table's own `emptyMessage`. */
11454
+ emptyMessage?: string;
11455
+ /** The header drags, among the other draggable headers. */
11456
+ draggable?: boolean;
11457
+ /** Rows may not be dropped into this group. */
11458
+ noDrop?: boolean;
11363
11459
  };
11364
11460
  type SelectionChangeEvent = {
11365
11461
  selectedRows: unknown[][];
@@ -11378,6 +11474,31 @@ type ContextMenuEvent = {
11378
11474
  actionName: string;
11379
11475
  columnKey: string;
11380
11476
  rowData: unknown[];
11477
+ /** The [TableGroup] the row sits in, on a grouped Table. */
11478
+ groupId?: string;
11479
+ };
11480
+ type GroupMenuEvent = {
11481
+ groupId: string;
11482
+ actionName: string;
11483
+ };
11484
+ type GroupActionEvent = {
11485
+ groupId: string;
11486
+ };
11487
+ /**
11488
+ * A row dropped. `toIndex` is the place it lands at in the target group (or
11489
+ * the table), counted before it left: a drop on a header lands first.
11490
+ */
11491
+ type RowDropEvent = {
11492
+ fromGroupId?: string;
11493
+ fromIndex: number;
11494
+ toGroupId?: string;
11495
+ toIndex: number;
11496
+ rowData: unknown[];
11497
+ };
11498
+ /** A group header dropped on another: it takes that header's place. */
11499
+ type GroupDropEvent = {
11500
+ groupId: string;
11501
+ toGroupId: string;
11381
11502
  };
11382
11503
  type CellChangeEvent = {
11383
11504
  rowIndex: number;
@@ -11436,6 +11557,16 @@ export declare class TableComponent extends ConfigComponent<TableConfig> {
11436
11557
  readonly searchChanged: import("@angular/core").OutputEmitterRef<SearchChangeEvent>;
11437
11558
  readonly selectionChanged: import("@angular/core").OutputEmitterRef<SelectionChangeEvent>;
11438
11559
  readonly selectionActionClicked: import("@angular/core").OutputEmitterRef<SelectionActionEvent>;
11560
+ /**
11561
+ * The Table drawn as groups ([TableGroup]) rather than from `data`: one
11562
+ * header row and its rows per group, in the order given, unpaged and
11563
+ * unsorted.
11564
+ */
11565
+ readonly groups: import("@angular/core").InputSignal<TableGroup[] | undefined>;
11566
+ readonly groupMenuClicked: import("@angular/core").OutputEmitterRef<GroupMenuEvent>;
11567
+ readonly groupActionClicked: import("@angular/core").OutputEmitterRef<GroupActionEvent>;
11568
+ readonly rowDropped: import("@angular/core").OutputEmitterRef<RowDropEvent>;
11569
+ readonly groupDropped: import("@angular/core").OutputEmitterRef<GroupDropEvent>;
11439
11570
  readonly selectedRows: import("@angular/core").WritableSignal<Set<unknown[]>>;
11440
11571
  readonly selectedCount: import("@angular/core").Signal<number>;
11441
11572
  readonly showSelectionBar: import("@angular/core").Signal<boolean>;
@@ -11479,6 +11610,7 @@ export declare class TableComponent extends ConfigComponent<TableConfig> {
11479
11610
  columnKey: string;
11480
11611
  item: MenuItem;
11481
11612
  rowData: unknown[];
11613
+ groupId?: string;
11482
11614
  }) => void;
11483
11615
  readonly onCellChanged: (event: CellChangeEvent) => void;
11484
11616
  readonly onPageChange: (page: number) => void;
@@ -11534,6 +11666,11 @@ export declare class TableComponent extends ConfigComponent<TableConfig> {
11534
11666
  "required": false;
11535
11667
  "isSignal": true;
11536
11668
  };
11669
+ "groups": {
11670
+ "alias": "groups";
11671
+ "required": false;
11672
+ "isSignal": true;
11673
+ };
11537
11674
  "hiddenColumns": {
11538
11675
  "alias": "hiddenColumns";
11539
11676
  "required": false;
@@ -11554,6 +11691,10 @@ export declare class TableComponent extends ConfigComponent<TableConfig> {
11554
11691
  "searchChanged": "searchChanged";
11555
11692
  "selectionChanged": "selectionChanged";
11556
11693
  "selectionActionClicked": "selectionActionClicked";
11694
+ "groupMenuClicked": "groupMenuClicked";
11695
+ "groupActionClicked": "groupActionClicked";
11696
+ "rowDropped": "rowDropped";
11697
+ "groupDropped": "groupDropped";
11557
11698
  }, never, never, true, never>;
11558
11699
  }
11559
11700
  /**
@@ -12285,6 +12426,13 @@ export declare class AppLogoComponent {
12285
12426
  protected readonly color: import("@angular/core").Signal<string | null>;
12286
12427
  protected readonly label: import("@angular/core").Signal<string>;
12287
12428
  protected readonly shadow: import("@angular/core").Signal<string | null>;
12429
+ /**
12430
+ * A `glow` mark has no tile under it, so its colour must read on the theme's
12431
+ * background: App Color (or the theme's `mm`) made readable there; `light`
12432
+ * keeps its white wherever white reads and takes that colour where it
12433
+ * cannot, as on a light theme. Null leaves the sass default.
12434
+ */
12435
+ protected readonly mark: import("@angular/core").Signal<string | null>;
12288
12436
  protected readonly mask: import("@angular/core").Signal<string | undefined>;
12289
12437
  protected readonly letter: import("@angular/core").Signal<string>;
12290
12438
  static ɵfac: i0.ɵɵFactoryDeclaration<AppLogoComponent, never>;
@@ -12648,6 +12796,8 @@ export type Modal = Config & {
12648
12796
  resizable?: true;
12649
12797
  noBackdrop?: true;
12650
12798
  fullscreen?: true;
12799
+ /** Edge to edge below the tablet width; the ordinary card above it. */
12800
+ fullscreenOnMobile?: true;
12651
12801
  backdropClose?: boolean;
12652
12802
  maxWidth?: number | string;
12653
12803
  };
@@ -13090,7 +13240,8 @@ export declare class ConfirmComponent {
13090
13240
  cancelLabel: import("@angular/core").InputSignal<string>;
13091
13241
  protected readonly confirmText: import("@angular/core").Signal<string>;
13092
13242
  protected readonly cancelText: import("@angular/core").Signal<string>;
13093
- protected readonly iconName: import("@angular/core").Signal<"info" | "exclamation-triangle" | "trash" | "check-circle">;
13243
+ protected readonly accent: import("@angular/core").Signal<"error" | "mm" | "success" | "warning">;
13244
+ protected readonly iconName: import("@angular/core").Signal<"exclamation-triangle" | "info" | "trash" | "check-circle">;
13094
13245
  protected accept(): void;
13095
13246
  protected decline(): void;
13096
13247
  static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmComponent, never>;
@@ -13175,10 +13326,6 @@ export type BreadCrumb = {
13175
13326
  trail?: BreadcrumbTrail[];
13176
13327
  header: BreadcrumbTrail;
13177
13328
  };
13178
- /**
13179
- * Nav model — see libs/one/GLOSSARY.md (NavId, NavKind, Address, Anchor, NavRef)
13180
- * and docs/adr/0014.
13181
- */
13182
13329
  /** How a Nav is reached. A property of the node, never of the link. */
13183
13330
  export type NavKind = 'url' | 'murl';
13184
13331
  /** How a Nav fills its panel. Orthogonal to whether it has children. */
@@ -13234,6 +13381,8 @@ export type NavRow = {
13234
13381
  value: string;
13235
13382
  label: string;
13236
13383
  icon?: string;
13384
+ /** A row standing for an app draws its AppLogo instead of `icon`. */
13385
+ appLogo?: BreadcrumbTrail['appLogo'];
13237
13386
  };
13238
13387
  /**
13239
13388
  * The parameter name a `dynamic` Nav carries when it authored none. One
@@ -13501,11 +13650,11 @@ export declare class FrameComponent {
13501
13650
  navOpenedByUser: import("@angular/core").Signal<boolean>;
13502
13651
  menuNavId: import("@angular/core").Signal<string | undefined>;
13503
13652
  menuParams: import("@angular/core").Signal<Record<string, string | number> | undefined>;
13504
- browsedApp: import("@ngrx/signals").DeepSignal<{
13653
+ browsedApp: import("@angular/core").Signal<undefined> | import("@ngrx/signals").DeepSignal<{
13505
13654
  name: string;
13506
13655
  appNavId: string;
13507
13656
  slot: "main" | "side";
13508
- }> | import("@angular/core").Signal<undefined>;
13657
+ }>;
13509
13658
  keepPanelOnPathChange: import("@angular/core").Signal<boolean>;
13510
13659
  panelPushed: import("@angular/core").Signal<boolean>;
13511
13660
  navScrolledDown: import("@angular/core").Signal<boolean>;
@@ -13924,11 +14073,11 @@ export declare const NavStore: import("@angular/core").Type<{
13924
14073
  navOpenedByUser: Signal<boolean>;
13925
14074
  menuNavId: Signal<string | undefined>;
13926
14075
  menuParams: Signal<Record<string, string | number> | undefined>;
13927
- browsedApp: import("@ngrx/signals").DeepSignal<{
14076
+ browsedApp: Signal<undefined> | import("@ngrx/signals").DeepSignal<{
13928
14077
  name: string;
13929
14078
  appNavId: string;
13930
14079
  slot: AppSlot;
13931
- }> | Signal<undefined>;
14080
+ }>;
13932
14081
  keepPanelOnPathChange: Signal<boolean>;
13933
14082
  panelPushed: Signal<boolean>;
13934
14083
  navScrolledDown: Signal<boolean>;
@@ -14416,11 +14565,11 @@ export declare class NavDetailsComponent {
14416
14565
  navOpenedByUser: import("@angular/core").Signal<boolean>;
14417
14566
  menuNavId: import("@angular/core").Signal<string | undefined>;
14418
14567
  menuParams: import("@angular/core").Signal<Record<string, string | number> | undefined>;
14419
- browsedApp: import("@ngrx/signals").DeepSignal<{
14568
+ browsedApp: import("@angular/core").Signal<undefined> | import("@ngrx/signals").DeepSignal<{
14420
14569
  name: string;
14421
14570
  appNavId: string;
14422
14571
  slot: "main" | "side";
14423
- }> | import("@angular/core").Signal<undefined>;
14572
+ }>;
14424
14573
  keepPanelOnPathChange: import("@angular/core").Signal<boolean>;
14425
14574
  panelPushed: import("@angular/core").Signal<boolean>;
14426
14575
  navScrolledDown: import("@angular/core").Signal<boolean>;
@@ -14677,11 +14826,11 @@ export declare class NavHeaderComponent {
14677
14826
  navOpenedByUser: import("@angular/core").Signal<boolean>;
14678
14827
  menuNavId: import("@angular/core").Signal<string | undefined>;
14679
14828
  menuParams: import("@angular/core").Signal<Record<string, string | number> | undefined>;
14680
- browsedApp: import("@ngrx/signals").DeepSignal<{
14829
+ browsedApp: import("@angular/core").Signal<undefined> | import("@ngrx/signals").DeepSignal<{
14681
14830
  name: string;
14682
14831
  appNavId: string;
14683
14832
  slot: "main" | "side";
14684
- }> | import("@angular/core").Signal<undefined>;
14833
+ }>;
14685
14834
  keepPanelOnPathChange: import("@angular/core").Signal<boolean>;
14686
14835
  panelPushed: import("@angular/core").Signal<boolean>;
14687
14836
  navScrolledDown: import("@angular/core").Signal<boolean>;
@@ -14871,6 +15020,12 @@ export declare class NavHeaderComponent {
14871
15020
  * has a header of its own never also draws the breadcrumb's.
14872
15021
  */
14873
15022
  _header: import("@angular/core").Signal<import("@magmonium/one").BreadcrumbTrail | null>;
15023
+ /**
15024
+ * Follows the Nav the header titles, the way a menu row naming it would: to
15025
+ * its Page, or — already standing there — only closing the panel. A dynamic
15026
+ * header carries no instance of its own, so the panel's is the one it names.
15027
+ */
15028
+ _followHeader: () => void;
14874
15029
  constructor();
14875
15030
  static ɵfac: i0.ɵɵFactoryDeclaration<NavHeaderComponent, never>;
14876
15031
  static ɵcmp: i0.ɵɵComponentDeclaration<NavHeaderComponent, "m-nav-header", never, {}, {}, never, never, true, never>;
@@ -16203,7 +16358,7 @@ export declare class AuthActivityPageComponent {
16203
16358
  showTerms: import("@angular/core").Signal<boolean | undefined>;
16204
16359
  signUp: import("@angular/core").Signal<boolean | undefined>;
16205
16360
  tokens: import("@angular/core").Signal<undefined> | import("@ngrx/signals").DeepSignal<import("@magmonium/one").Tokens>;
16206
- user: import("@angular/core").Signal<undefined> | import("@ngrx/signals").DeepSignal<import("@magmonium/one").AuthUser>;
16361
+ user: import("@ngrx/signals").DeepSignal<import("@magmonium/one").AuthUser> | import("@angular/core").Signal<undefined>;
16207
16362
  wrongPassword: import("@angular/core").Signal<boolean | undefined>;
16208
16363
  deployToken: import("@angular/core").Signal<string | undefined>;
16209
16364
  hostUserTabs: Record<string, import("@angular/core").Type<unknown>>;
@@ -16383,7 +16538,7 @@ export declare const AuthStore: Type<{
16383
16538
  showTerms: import("@angular/core").Signal<boolean | undefined>;
16384
16539
  signUp: import("@angular/core").Signal<boolean | undefined>;
16385
16540
  tokens: import("@angular/core").Signal<undefined> | import("@ngrx/signals").DeepSignal<Tokens>;
16386
- user: import("@angular/core").Signal<undefined> | import("@ngrx/signals").DeepSignal<import("@magmonium/one").AuthUser>;
16541
+ user: import("@ngrx/signals").DeepSignal<import("@magmonium/one").AuthUser> | import("@angular/core").Signal<undefined>;
16387
16542
  wrongPassword: import("@angular/core").Signal<boolean | undefined>;
16388
16543
  deployToken: import("@angular/core").Signal<string | undefined>;
16389
16544
  hostUserTabs: Record<string, Type<unknown>>;
@@ -16824,4 +16979,4 @@ export declare const toggleUid: (audience: Audience, uid: string) => Audience;
16824
16979
  export declare const toggleGroup: (audience: Audience, groupId: string) => Audience;
16825
16980
  /** How many Users and Groups an Audience names. */
16826
16981
  export declare const pickCount: (audience: Audience) => number;
16827
- 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 };
16982
+ 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, GroupActionEvent, GroupDropEvent, GroupKind, GroupMenuEvent, 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, RowDropEvent, 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, TableGroup, TextOrNumberInput, Timeline, TimelineItem, TreeGridCellClickEvent, TreeGridLoadChildrenEvent, TreeGridRow, TreeGridRowSelectEvent, TreeGridToggleEvent, User };
@@ -1 +0,0 @@
1
- {"version":3,"file":"magmonium-one-color-utl-DI5p24iQ.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/app-identity/logo-glyph.ts","../../../../libs/one/src/lib/shared/lib/app-identity/app-logo-source.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","/**\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, '&amp;').replace(/\"/g, '&quot;').replace(/</g, '&lt;');\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/** App Color moved `amount` of the way toward white (255) or black (0). */\nconst mixAppColor = (color: string, toward: 0 | 255, amount: number): string =>\n `#${channels(color)\n .map((channel) =>\n Math.round(channel + (toward - channel) * amount)\n .toString(16)\n .padStart(2, '0')\n )\n .join('')}`;\n\n/** The AppLogo's shadow: App Color mixed with 20% black. */\nexport const appLogoShadowColor = (color: string): string =>\n mixAppColor(color, 0, 0.2);\n\n/**\n * The theme's brand tokens (`mm`, `mmLite`, `mmDark`) as one App Color draws\n * them — what an app's own boundary paints its `mm` with in place of the\n * theme's.\n */\nexport const appColorBrand = (\n color: string\n): { mm: string; mmLite: string; mmDark: string } => ({\n mm: color,\n mmLite: mixAppColor(color, 255, 0.35),\n mmDark: mixAppColor(color, 0, 0.2),\n});\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 computed,\n inject,\n Injectable,\n InjectionToken,\n Signal,\n signal,\n} from '@angular/core';\nimport { AssetStore } from '../../stores/asset.store';\nimport { APP_LINK } from '../../config/tokens';\nimport { appColorBrand, normalizeAppColor } from './logo-glyph';\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 /** App Color, `#rrggbb`, as Store holds it; null until the Owner sets one. */\n color?: string | null;\n};\n\n/**\n * Where NavStore publishes the AppLogo. Shared rather than read off NavStore\n * because `m-icon` sits below features and cannot import it — and handed to a\n * mounted WC through SharedStoreRegistry, since a WC reads the host's NavStore.\n * `logos` is every app NavStore knows the identity of, by AppLink: a host may\n * mount several at once, so each WC looks up its own. `source` is the fallback.\n */\n@Injectable({ providedIn: 'root' })\nexport class AppLogoState {\n readonly #source = signal<AppLogoSource | undefined>(undefined);\n readonly #logos = signal<Record<string, AppLogoSource>>({});\n readonly source = this.#source.asReadonly();\n readonly logos = this.#logos.asReadonly();\n readonly set = (source: AppLogoSource | undefined): void =>\n this.#source.set(source);\n readonly setLogos = (logos: Record<string, AppLogoSource>): void =>\n this.#logos.set(logos);\n}\n\n/**\n * What `m-icon name=\"app_logo\"` draws: this app's own entry, by the AppLink\n * AssetStore holds (a mounted WC's, from `bindApp`), else the fallback. 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: () => {\n const state = inject(AppLogoState);\n const assets = inject(AssetStore);\n return computed(() => {\n const link = assets.appLink();\n const own = link ? state.logos()[link] : undefined;\n // An entry with no `glyph` key carries only an Open App's App Color:\n // its logo is the host's, so it falls back like an unknown app.\n return own && own.glyph !== undefined ? own : state.source();\n });\n },\n});\n\n/**\n * This app's App Color, which its own boundary paints as the theme's `mm`\n * (ThemeStore `color`). Unset at the host's root, so the host's chrome keeps\n * the theme's brand; a WC and a standalone Run provide it from\n * `appThemeColorFactory`. Unset too while the Owner has set none, and the\n * theme's own `mm` stands.\n */\nexport const APP_THEME_COLOR = new InjectionToken<Signal<string | undefined>>(\n 'APP_THEME_COLOR',\n { providedIn: 'root', factory: () => signal<string | undefined>(undefined) }\n);\n\n/** This app's App Color off the identities NavStore publishes, by its AppLink. */\nexport const appThemeColorFactory = (): Signal<string | undefined> => {\n const state = inject(AppLogoState);\n const appLink = inject(APP_LINK);\n const assets = inject(AssetStore);\n return computed(() => {\n const link = appLink() ?? assets.appLink();\n const color = link ? state.logos()[link]?.color : undefined;\n return color ? normalizeAppColor(color) : undefined;\n });\n};\n\nconst BRAND_VARS = [\n ['mm', '--m-mm'],\n ['mmLite', '--m-mm-lite'],\n ['mmDark', '--m-mm-dark'],\n] as const;\n\n/**\n * Paints an App Color's brand tokens onto the element that bounds the app —\n * every `m.$mm` inside it reads them — or clears them, leaving the theme's.\n */\nexport const paintAppColor = (\n element: HTMLElement,\n color: string | undefined\n): void => {\n const brand = color ? appColorBrand(color) : undefined;\n for (const [key, cssVar] of BRAND_VARS) {\n if (brand) element.style.setProperty(cssVar, brand[key]);\n else element.style.removeProperty(cssVar);\n }\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';\nimport { APP_THEME_COLOR } from '../../app-identity/app-logo-source';\nimport { appColorBrand } from '../../app-identity/logo-glyph';\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(\n (\n state,\n themeDetector = inject(ThemeDetector),\n appColor = inject(APP_THEME_COLOR)\n ) => {\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 // Inside an app's own boundary its App Color is the brand: every `mm` a\n // component resolves here draws it. Only the JS read — `renderTheme`\n // paints the raw theme, since a WC's document root is the host's.\n const color = computed(() => {\n const themeColor = theme()?.color;\n const app = appColor();\n return themeColor && app\n ? { ...themeColor, ...appColorBrand(app) }\n : themeColor;\n });\n return {\n theme,\n color,\n osTheme,\n };\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,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