sevago-library 1.7.12 → 1.7.13

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # sevago-library
2
2
 
3
+ ## 1.7.13
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: update logo
8
+
3
9
  ## 1.7.12
4
10
 
5
11
  ### Patch Changes
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./app-icons.const-Drcy5xOg.js"),c=(o,n="local")=>{const e=t.APP_ICONS[o];switch(n){case"local":case"dev":case"develop":return e.develop;case"staging":return e.staging;case"production":return e.production;default:throw new Error(`Unsupported app icon environment: ${n}`)}},a=o=>{let n;return{name:"sevago-app-icon",configResolved(e){const r=e.env.VITE_SERVER_BUILD??(e.command==="serve"?"local":e.mode);n=c(o,r)},transformIndexHtml(){return[{tag:"link",attrs:{rel:"icon",type:"image/png",href:n},injectTo:"head"}]}}};exports.APP_ICONS=t.APP_ICONS;exports.appIconPlugin=a;exports.getAppIcon=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./app-icons.const-Drcy5xOg.js"),l=(r,c)=>{const t=()=>{const n=window.location.pathname,e=Object.keys(c).sort((a,s)=>s.length-a.length).find(a=>n===a||n.startsWith(`${a}/`)),o=document.querySelector("link[data-sevago-app-icon]");o&&(o.href=e?c[e]:r)};for(const n of["pushState","replaceState"]){const e=window.history[n];window.history[n]=function(...o){e.apply(this,o),t()}}window.addEventListener("popstate",t),t()},i=(r,c="local")=>{const t=p.APP_ICONS[r];switch(c){case"local":case"dev":case"develop":return t.develop;case"staging":return t.staging;case"production":return t.production;default:throw new Error(`Unsupported app icon environment: ${c}`)}},d=(r,c={})=>{let t,n;return{name:"sevago-app-icon",configResolved(e){const o=e.env.VITE_SERVER_BUILD??(e.command==="serve"?"local":e.mode);t=i(r,o),n=Object.fromEntries(Object.entries(c).map(([a,s])=>[a,i(s,o)]))},transformIndexHtml(){const e=[{tag:"link",attrs:{rel:"icon",type:"image/png",href:t,"data-sevago-app-icon":""},injectTo:"head"}];if(!Object.keys(n).length)return e;const o=JSON.stringify([t,n]).replace(/</g,"\\u003c");return[...e,{tag:"script",children:`(${l.toString()})(...${o});`,injectTo:"head"}]}}};exports.APP_ICONS=p.APP_ICONS;exports.appIconPlugin=d;exports.getAppIcon=i;
@@ -1,33 +1,63 @@
1
- import { A as r } from "./app-icons.const-axoFlDtu.mjs";
2
- const a = (o, n = "local") => {
3
- const e = r[o];
4
- switch (n) {
1
+ import { A as p } from "./app-icons.const-axoFlDtu.mjs";
2
+ const l = (r, a) => {
3
+ const t = () => {
4
+ const n = window.location.pathname, e = Object.keys(a).sort((c, s) => s.length - c.length).find((c) => n === c || n.startsWith(`${c}/`)), o = document.querySelector("link[data-sevago-app-icon]");
5
+ o && (o.href = e ? a[e] : r);
6
+ };
7
+ for (const n of ["pushState", "replaceState"]) {
8
+ const e = window.history[n];
9
+ window.history[n] = function(...o) {
10
+ e.apply(this, o), t();
11
+ };
12
+ }
13
+ window.addEventListener("popstate", t), t();
14
+ }, i = (r, a = "local") => {
15
+ const t = p[r];
16
+ switch (a) {
5
17
  case "local":
6
18
  case "dev":
7
19
  case "develop":
8
- return e.develop;
20
+ return t.develop;
9
21
  case "staging":
10
- return e.staging;
22
+ return t.staging;
11
23
  case "production":
12
- return e.production;
24
+ return t.production;
13
25
  default:
14
- throw new Error(`Unsupported app icon environment: ${n}`);
26
+ throw new Error(`Unsupported app icon environment: ${a}`);
15
27
  }
16
- }, s = (o) => {
17
- let n;
28
+ }, g = (r, a = {}) => {
29
+ let t, n;
18
30
  return {
19
31
  name: "sevago-app-icon",
20
32
  configResolved(e) {
21
- const t = e.env.VITE_SERVER_BUILD ?? (e.command === "serve" ? "local" : e.mode);
22
- n = a(o, t);
33
+ const o = e.env.VITE_SERVER_BUILD ?? (e.command === "serve" ? "local" : e.mode);
34
+ t = i(r, o), n = Object.fromEntries(
35
+ Object.entries(a).map(([c, s]) => [c, i(s, o)])
36
+ );
23
37
  },
24
38
  transformIndexHtml() {
25
- return [{ tag: "link", attrs: { rel: "icon", type: "image/png", href: n }, injectTo: "head" }];
39
+ const e = [
40
+ {
41
+ tag: "link",
42
+ attrs: { rel: "icon", type: "image/png", href: t, "data-sevago-app-icon": "" },
43
+ injectTo: "head"
44
+ }
45
+ ];
46
+ if (!Object.keys(n).length) return e;
47
+ const o = JSON.stringify([t, n]).replace(/</g, "\\u003c");
48
+ return [
49
+ ...e,
50
+ {
51
+ tag: "script",
52
+ children: `(${l.toString()})(...${o});`,
53
+ injectTo: "head"
54
+ }
55
+ ];
26
56
  }
27
57
  };
28
58
  };
29
59
  export {
30
- r as APP_ICONS,
31
- s as appIconPlugin,
32
- a as getAppIcon
60
+ p as APP_ICONS,
61
+ g as appIconPlugin,
62
+ i as getAppIcon
33
63
  };
@@ -0,0 +1,2 @@
1
+ /** Runs in the document so direct loads and History API navigation share the same selection. */
2
+ export declare const updateRouteIcon: (fallback: string, routes: Record<string, string>) => void;
@@ -5,16 +5,21 @@ export type { AppIconApp } from './app-icons.const';
5
5
  /** Returns a self-contained PNG URL, usable in HTML and Next.js metadata without copying assets. */
6
6
  export declare const getAppIcon: (app: AppIconApp, environment?: string) => string;
7
7
  /** Vite loads mode-specific .env files before configResolved, including environment variable overrides. */
8
- export declare const appIconPlugin: (app: AppIconApp) => {
8
+ export declare const appIconPlugin: (app: AppIconApp, routeApps?: Record<string, AppIconApp>) => {
9
9
  name: string;
10
10
  configResolved(config: AppIconPluginConfig): void;
11
- transformIndexHtml(): {
11
+ transformIndexHtml(): ({
12
12
  tag: string;
13
13
  attrs: {
14
14
  rel: string;
15
15
  type: string;
16
16
  href: string;
17
+ 'data-sevago-app-icon': string;
17
18
  };
18
19
  injectTo: "head";
19
- }[];
20
+ } | {
21
+ tag: string;
22
+ children: string;
23
+ injectTo: "head";
24
+ })[];
20
25
  };
@@ -6,7 +6,7 @@ export interface AvatarOnlineStatusElementProps {
6
6
  online?: boolean;
7
7
  children?: React.ReactNode;
8
8
  }
9
- export declare const OnlineBadge: import('@emotion/styled').StyledComponent<import('@mui/material').BadgeOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "components" | "style" | "color" | "className" | "classes" | "children" | "sx" | "variant" | "slots" | "slotProps" | "componentsProps" | "max" | "invisible" | "anchorOrigin" | "badgeContent" | "overlap" | "showZero"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
9
+ export declare const OnlineBadge: import('@emotion/styled').StyledComponent<import('@mui/material').BadgeOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style" | "children" | "components" | "color" | "className" | "classes" | "sx" | "variant" | "slots" | "slotProps" | "componentsProps" | "max" | "invisible" | "anchorOrigin" | "badgeContent" | "overlap" | "showZero"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
10
10
  component?: React.ElementType;
11
11
  }, {}, {}>;
12
12
  export declare const AvatarOnlineStatusElement: React.FC<AvatarOnlineStatusElementProps>;
@@ -1 +1 @@
1
- export declare const InputLabelCustom: import('@emotion/styled').StyledComponent<import('@mui/material').InputLabelOwnProps & Pick<import('@mui/material').FormLabelOwnProps, "color" | "filled"> & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "error" | "size" | "style" | "color" | "margin" | "className" | "classes" | "children" | "disabled" | "sx" | "variant" | "filled" | "focused" | "required" | "disableAnimation" | "shrink"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
1
+ export declare const InputLabelCustom: import('@emotion/styled').StyledComponent<import('@mui/material').InputLabelOwnProps & Pick<import('@mui/material').FormLabelOwnProps, "color" | "filled"> & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "error" | "style" | "children" | "size" | "color" | "margin" | "className" | "classes" | "disabled" | "sx" | "variant" | "filled" | "focused" | "required" | "disableAnimation" | "shrink"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
@@ -3,5 +3,5 @@ interface PaperSelectProps {
3
3
  autoWidth?: boolean;
4
4
  isTreeSelect?: boolean;
5
5
  }
6
- export declare const PaperSelect: import('@emotion/styled').StyledComponent<import('@mui/material').PaperOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style" | "className" | "classes" | "children" | "sx" | "variant" | "elevation" | "square"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & PaperSelectProps, {}, {}>;
6
+ export declare const PaperSelect: import('@emotion/styled').StyledComponent<import('@mui/material').PaperOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style" | "children" | "className" | "classes" | "sx" | "variant" | "elevation" | "square"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & PaperSelectProps, {}, {}>;
7
7
  export {};
@@ -1 +1 @@
1
- export declare const TypographyFilter: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "zIndex" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "textTransform" | "left" | "right" | "p" | "style" | "color" | "border" | "boxShadow" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "className" | "classes" | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
1
+ export declare const TypographyFilter: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "p" | "style" | "children" | "zIndex" | "typography" | "fontFamily" | "fontSize" | "fontWeight" | "textTransform" | "left" | "right" | "color" | "border" | "boxShadow" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "className" | "classes" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sevago-library",
3
- "version": "1.7.12",
3
+ "version": "1.7.13",
4
4
  "description": "Sevago SSO Frontend Library - A comprehensive SSO solution with React components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",