@genexus/mercury 1.2.0 → 1.2.1

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.
@@ -28,7 +28,7 @@ export declare const getIconPath: (iconMetadata: AssetsMetadata, vendorAlias?: s
28
28
  * transforms both metadata into a string that contains the given information.
29
29
  */
30
30
  export declare const getIconPathExpanded: (iconMetadata: AssetsMetadata, iconMetadataExpanded: AssetsMetadata, vendorAlias?: string) => `${string}/${string}/${string}${string}:${string}/${string}/${string}${string}`;
31
- export declare const getImagePathCallback: (iconPath: string) => GxImageMultiState | undefined;
31
+ export declare const getImagePathCallback: (iconPath: string) => GxImageMultiState;
32
32
  export declare const getActionMenuImagePathCallback: ActionMenuImagePathCallback;
33
33
  export declare const getActionListImagePathCallback: (additionalItem: ActionListItemAdditionalBase) => GxImageMultiState | undefined;
34
34
  export declare const getNavigationListImagePathCallback: (itemModel: NavigationListItemModel) => GxImageMultiState | undefined;
@@ -1 +1 @@
1
- "use strict";const a={},d={},I="/",i=":";export const MERCURY_ALIAS="mer",registerAssets=(e,t,r)=>{a[e]||d[t]||(a[e]=r,d[t]=e)},getAsset=(e,t)=>{const r=d[e]??e,n=a[r];if(!n)return;const o=n.icons[t.category];if(!o)return;const c=o[t.name];if(c)return t.colorType?c[t.colorType]:c},getIconPath=(e,t="mer")=>{const r=e.colorType?`/${e.colorType}`:"";return`${t}/${e.category}/${e.name}${r}`},getIconPathExpanded=(e,t,r="mer")=>`${getIconPath(e,r)}:${getIconPath(t,r)}`;const g=(e,t,r)=>{const n=t==="mer"?"":`-${t}`;return r?`var(--icon${n}__${e}--${r})`:`var(--icon${n}__${e})`},m=e=>{const t=e.split("/"),r=t[0],n=d[r]??r;if(!a[n]){const A=t[0],l=t[1],u=t[2];return{vendor:"mer",category:A,name:l,colorType:u}}const c=t[1],s=t[2],S=t[3];return{vendor:r,category:c,name:s,colorType:S}};export const getImagePathCallback=e=>{const{vendor:t,category:r,name:n,colorType:o}=m(e),c=getAsset(t,o?{category:r,name:n,colorType:o}:{category:r,name:n});if(!c)return;const s={base:g(c.enabled.name,t)};return c.hover&&(s.hover=g(c.hover.name,t)),c.active&&(s.active=g(c.active.name,t)),c.disabled&&(s.disabled=g(c.disabled.name,t)),s},getActionMenuImagePathCallback=(e,t)=>{if(!e.startImgSrc&&t==="start"||!e.endImgSrc&&t==="end")return;const r=t==="start"?e.startImgSrc:e.endImgSrc;return getImagePathCallback(r)},getActionListImagePathCallback=e=>e.imgSrc?getImagePathCallback(e.imgSrc):void 0,getNavigationListImagePathCallback=e=>e.startImgSrc?getImagePathCallback(e.startImgSrc):void 0,getTreeViewImagePathCallback=(e,t)=>{if(!e.startImgSrc&&t==="start"||!e.endImgSrc&&t==="end")return;const n=(t==="start"?e.startImgSrc:e.endImgSrc).split(":"),o=getImagePathCallback(n[0]);if(o)return n[1]?{default:o,expanded:getImagePathCallback(n[1])}:{default:o}},getComboBoxImagePathCallback=(e,t)=>{if(!e.startImgSrc&&t==="start"||!e.endImgSrc&&t==="end")return;const r=t==="start"?e.startImgSrc:e.endImgSrc;return getImagePathCallback(r)},getImagePathCallbackDefinitions={"ch-accordion-render":getImagePathCallback,"ch-action-menu-render":getActionMenuImagePathCallback,"ch-action-list-render":getActionListImagePathCallback,"ch-combo-box-render":getComboBoxImagePathCallback,"ch-checkbox":getImagePathCallback,"ch-edit":getImagePathCallback,"ch-image":getImagePathCallback,"ch-navigation-list-render":getNavigationListImagePathCallback,"ch-tab-render":getImagePathCallback,"ch-tree-view-render":getTreeViewImagePathCallback};
1
+ "use strict";const a={},d={},I="/",p=":";export const MERCURY_ALIAS="mer",registerAssets=(e,t,r)=>{a[e]||d[t]||(a[e]=r,d[t]=e)},getAsset=(e,t)=>{const r=d[e]??e,n=a[r];if(!n)return;const o=n.icons[t.category];if(!o)return;const c=o[t.name];if(c)return t.colorType?c[t.colorType]:c},getIconPath=(e,t="mer")=>{const r=e.colorType?`/${e.colorType}`:"";return`${t}/${e.category}/${e.name}${r}`},getIconPathExpanded=(e,t,r="mer")=>`${getIconPath(e,r)}:${getIconPath(t,r)}`;const g=(e,t,r)=>{const n=t==="mer"?"":`-${t}`;return r?`var(--icon${n}__${e}--${r})`:`var(--icon${n}__${e})`},m=e=>{const t=e.split("/"),r=t[0],n=d[r]??r;if(!a[n]){const A=t[0],l=t[1],u=t[2];return{vendor:"mer",category:A,name:l,colorType:u}}const c=t[1],s=t[2],S=t[3];return{vendor:r,category:c,name:s,colorType:S}};export const getImagePathCallback=e=>{const{vendor:t,category:r,name:n,colorType:o}=m(e),c=getAsset(t,o?{category:r,name:n,colorType:o}:{category:r,name:n});if(!c)return{base:e};const s={base:g(c.enabled.name,t)};return c.hover&&(s.hover=g(c.hover.name,t)),c.active&&(s.active=g(c.active.name,t)),c.disabled&&(s.disabled=g(c.disabled.name,t)),s},getActionMenuImagePathCallback=(e,t)=>{if(!e.startImgSrc&&t==="start"||!e.endImgSrc&&t==="end")return;const r=t==="start"?e.startImgSrc:e.endImgSrc;return getImagePathCallback(r)},getActionListImagePathCallback=e=>e.imgSrc?getImagePathCallback(e.imgSrc):void 0,getNavigationListImagePathCallback=e=>e.startImgSrc?getImagePathCallback(e.startImgSrc):void 0,getTreeViewImagePathCallback=(e,t)=>{if(!e.startImgSrc&&t==="start"||!e.endImgSrc&&t==="end")return;const n=(t==="start"?e.startImgSrc:e.endImgSrc).split(":"),o=getImagePathCallback(n[0]);if(o)return n[1]?{default:o,expanded:getImagePathCallback(n[1])}:{default:o}},getComboBoxImagePathCallback=(e,t)=>{if(!e.startImgSrc&&t==="start"||!e.endImgSrc&&t==="end")return;const r=t==="start"?e.startImgSrc:e.endImgSrc;return getImagePathCallback(r)},getImagePathCallbackDefinitions={"ch-accordion-render":getImagePathCallback,"ch-action-menu-render":getActionMenuImagePathCallback,"ch-action-list-render":getActionListImagePathCallback,"ch-combo-box-render":getComboBoxImagePathCallback,"ch-checkbox":getImagePathCallback,"ch-edit":getImagePathCallback,"ch-image":getImagePathCallback,"ch-navigation-list-render":getNavigationListImagePathCallback,"ch-tab-render":getImagePathCallback,"ch-tree-view-render":getTreeViewImagePathCallback};
@@ -1,7 +1,7 @@
1
1
  import { LitElement } from "lit";
2
2
  export declare class MerAnimatedDots extends LitElement {
3
3
  static styles: import("lit").CSSResult;
4
- render(): import("lit-html").TemplateResult<1>;
4
+ render(): import("lit").TemplateResult<1>;
5
5
  }
6
6
  declare global {
7
7
  interface HTMLElementTagNameMap {
@@ -1,7 +1,7 @@
1
1
  import { LitElement } from "lit";
2
2
  export declare class MerSpinner extends LitElement {
3
3
  static styles: import("lit").CSSResult;
4
- render(): import("lit-html").TemplateResult<1>;
4
+ render(): import("lit").TemplateResult<1>;
5
5
  }
6
6
  declare global {
7
7
  interface HTMLElementTagNameMap {
@@ -7,10 +7,10 @@ export declare const renderItem: {
7
7
  readonly codeBlock: ChatCodeBlockRender;
8
8
  readonly content: ChatContentRender;
9
9
  readonly file: {
10
- readonly audio: (file: import("@genexus/chameleon-controls-library/dist/types/components/chat/types").ChatMessageFile) => TemplateResult;
11
- readonly video: (file: import("@genexus/chameleon-controls-library/dist/types/components/chat/types").ChatMessageFile) => TemplateResult;
12
- readonly image: (file: import("@genexus/chameleon-controls-library/dist/types/components/chat/types").ChatMessageFile) => TemplateResult;
13
- readonly file: (file: import("@genexus/chameleon-controls-library/dist/types/components/chat/types").ChatMessageFile) => TemplateResult;
10
+ readonly audio: (file: import("@genexus/chameleon-controls-library/dist/types/components/chat/types.js").ChatMessageFile) => TemplateResult;
11
+ readonly video: (file: import("@genexus/chameleon-controls-library/dist/types/components/chat/types.js").ChatMessageFile) => TemplateResult;
12
+ readonly image: (file: import("@genexus/chameleon-controls-library/dist/types/components/chat/types.js").ChatMessageFile) => TemplateResult;
13
+ readonly file: (file: import("@genexus/chameleon-controls-library/dist/types/components/chat/types.js").ChatMessageFile) => TemplateResult;
14
14
  };
15
15
  };
16
16
  export declare const sendContainerLayout: ChatSendContainerLayout;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genexus/mercury",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Mercury Design System is a robust and scalable solution designed to improve product development.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -41,11 +41,11 @@
41
41
  "./package.json": "./package.json"
42
42
  },
43
43
  "scripts": {
44
- "dev": "tsgo && node minify-literals.js && bun build.assets.icons",
45
- "build": "bun build.js && bun icons-svg && bun icons-sass && bun build.assets",
44
+ "dev": "tsgo && node minify-literals.js && pnpm run build.assets.icons",
45
+ "build": "pnpm run build.js && pnpm run icons-svg && pnpm run icons-sass && pnpm run build.assets",
46
46
  "build.js": "tsc && node minify-literals.js && esbuild dist/*.js --allow-overwrite --minify --outdir=dist --log-level=silent",
47
- "build-no-svg": "bun build.js && bun build.assets",
48
- "build.assets": "bun build.assets.icons && bun build.assets.bundles",
47
+ "build-no-svg": "pnpm run build.js && pnpm run build.assets",
48
+ "build.assets": "pnpm run build.assets.icons && pnpm run build.assets.bundles",
49
49
  "build.assets.icons": "scss-bundle -e ./src/icons/_generated/categories.scss -o src/icons/_generated/categories-bundled.scss --logLevel=silent && scss-bundle -e ./src/icons/_generated-globant/categories.scss -o src/icons/_generated-globant/categories-bundled.scss --logLevel=silent",
50
50
  "build.assets.bundles": "bun run build-scss-and-copy-assets.ts",
51
51
  "generate-bundle-report": "bun run scripts/generate-bundle-report.ts",
@@ -53,11 +53,11 @@
53
53
  "process-icons-globant": "ssg --configPath=./src/config/icons-globant.js",
54
54
  "icons-svg": "ssg-svg --srcDir=src/icons/svg-source --outDir=src/assets/icons/_generated/ --configFilePath=src/icons/svg-source/.config/color-states.json --showcaseDir=showcase/icons/ --showcaseBaseHref=../assets/icons/ --logDir=./log --objectFilePath=src/assets/MERCURY_ASSETS.ts --defaultColorType=on-surface",
55
55
  "icons-sass": "ssg-sass --srcDir=src/assets/icons/ --outDir=src/icons/_generated/ --configFilePath=src/icons/svg-source/.config/color-states.json --vendorPrefix=",
56
- "coverage": "bun playwright install && vitest watch run --coverage",
57
- "validate.ci": "bun lint && bun build-no-svg && bun run test.ci",
56
+ "coverage": "playwright install && vitest watch run --coverage",
57
+ "validate.ci": "pnpm run lint && pnpm run build-no-svg && pnpm run test.ci",
58
58
  "lint": "eslint src/**/*.ts --fix",
59
- "test": "bunx playwright install && vitest",
60
- "test.ci": "bun run test --watch=false --browser.headless"
59
+ "test": "playwright install && vitest",
60
+ "test.ci": "pnpm run test --watch=false --browser.headless"
61
61
  },
62
62
  "license": "Apache-2.0",
63
63
  "peerDependencies": {