@veltra/utils 1.13.1 → 1.13.3

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.
@@ -1,7 +1,7 @@
1
1
  import { makeBEM } from "../helper/make-bem.js";
2
- import { CLS_PREFIX } from "../shared/constants.js";
2
+ import "../shared/constants.js";
3
3
  //#region src/dom/class-name.ts
4
- const bem = makeBEM(CLS_PREFIX);
4
+ const bem = makeBEM("u-");
5
5
  function addClass(el, className) {
6
6
  if (Array.isArray(className)) className.forEach((c) => el.classList.add(c));
7
7
  else el.classList.add(className);
@@ -1 +1 @@
1
- {"version":3,"file":"class-name.js","names":[],"sources":["../../src/dom/class-name.ts"],"sourcesContent":["import { makeBEM, type BEMFactory } from '../helper/make-bem'\nimport { CLS_PREFIX } from '../shared/constants'\n\nexport const bem: BEMFactory<typeof CLS_PREFIX> = makeBEM(CLS_PREFIX)\n\nexport function addClass(el: HTMLElement, className: string | string[]): void {\n if (Array.isArray(className)) {\n className.forEach((c) => el.classList.add(c))\n } else {\n el.classList.add(className)\n }\n}\n\nexport function removeClass(el: HTMLElement, className: string | string[]): void {\n if (Array.isArray(className)) {\n className.forEach((c) => el.classList.remove(c))\n } else {\n el.classList.remove(className)\n }\n}\n"],"mappings":";;;AAGA,MAAa,MAAqC,QAAQ,UAAU;AAEpE,SAAgB,SAAS,IAAiB,WAAoC;CAC5E,IAAI,MAAM,QAAQ,SAAS,GACzB,UAAU,SAAS,MAAM,GAAG,UAAU,IAAI,CAAC,CAAC;MAE5C,GAAG,UAAU,IAAI,SAAS;AAE9B;AAEA,SAAgB,YAAY,IAAiB,WAAoC;CAC/E,IAAI,MAAM,QAAQ,SAAS,GACzB,UAAU,SAAS,MAAM,GAAG,UAAU,OAAO,CAAC,CAAC;MAE/C,GAAG,UAAU,OAAO,SAAS;AAEjC"}
1
+ {"version":3,"file":"class-name.js","names":[],"sources":["../../src/dom/class-name.ts"],"sourcesContent":["import { makeBEM, type BEMFactory } from '../helper/make-bem'\nimport { CLS_PREFIX } from '../shared/constants'\n\nexport const bem: BEMFactory<typeof CLS_PREFIX> = makeBEM(CLS_PREFIX)\n\nexport function addClass(el: HTMLElement, className: string | string[]): void {\n if (Array.isArray(className)) {\n className.forEach((c) => el.classList.add(c))\n } else {\n el.classList.add(className)\n }\n}\n\nexport function removeClass(el: HTMLElement, className: string | string[]): void {\n if (Array.isArray(className)) {\n className.forEach((c) => el.classList.remove(c))\n } else {\n el.classList.remove(className)\n }\n}\n"],"mappings":";;;AAGA,MAAa,MAAqC,QAAA,IAAkB;AAEpE,SAAgB,SAAS,IAAiB,WAAoC;CAC5E,IAAI,MAAM,QAAQ,SAAS,GACzB,UAAU,SAAS,MAAM,GAAG,UAAU,IAAI,CAAC,CAAC;MAE5C,GAAG,UAAU,IAAI,SAAS;AAE9B;AAEA,SAAgB,YAAY,IAAiB,WAAoC;CAC/E,IAAI,MAAM,QAAQ,SAAS,GACzB,UAAU,SAAS,MAAM,GAAG,UAAU,OAAO,CAAC,CAAC;MAE/C,GAAG,UAAU,OAAO,SAAS;AAEjC"}
@@ -10,4 +10,5 @@ interface HighlightChunk {
10
10
  */
11
11
  export declare function getHighlightChunks(str: string, substrings: string[]): HighlightChunk[];
12
12
  //#endregion
13
+ export {};
13
14
  //# sourceMappingURL=highlight.d.ts.map
@@ -25,4 +25,5 @@ export declare function scrollIntoContainerView(el: HTMLElement, container: HTML
25
25
  inline?: ScrollViewPosition;
26
26
  }): void;
27
27
  //#endregion
28
+ export {};
28
29
  //# sourceMappingURL=position.d.ts.map
@@ -11,4 +11,5 @@ type ToggleReturn = [{
11
11
  */
12
12
  export declare function createToggle(initial?: boolean, onChange?: (active: boolean) => void): ToggleReturn;
13
13
  //#endregion
14
+ export {};
14
15
  //# sourceMappingURL=create-toggle.d.ts.map
@@ -37,4 +37,5 @@ export declare function scrollElementIntoView(vp: HTMLElement, el: HTMLElement,
37
37
  */
38
38
  export declare function applyWheelHorizontalScroll(e: WheelEvent, vp: HTMLElement, navActive: boolean): void;
39
39
  //#endregion
40
+ export {};
40
41
  //# sourceMappingURL=overflow-nav.d.ts.map
@@ -51,4 +51,5 @@ export declare function fieldKey(key: string | null | undefined, fallback: strin
51
51
  export declare function renderLabelTemplate(template: string | undefined, row: Record<string, any> | undefined | null): string | undefined;
52
52
  export declare function shallowComputed<T>(getter: () => T): ShallowRef<T>;
53
53
  //#endregion
54
+ export {};
54
55
  //# sourceMappingURL=vue.d.ts.map
@@ -47,4 +47,5 @@ export declare function injectFormContext(): {
47
47
  inForm: boolean;
48
48
  } & Partial<DIContext>;
49
49
  //#endregion
50
+ export {};
50
51
  //# sourceMappingURL=form-context.d.ts.map
@@ -1,2 +1 @@
1
- import { injectFormContext, provideFormContext } from "./form-context.js";
2
- export { injectFormContext, provideFormContext };
1
+ export { injectFormContext, provideFormContext } from "./form-context.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltra/utils",
3
- "version": "1.13.1",
3
+ "version": "1.13.3",
4
4
  "homepage": "https://github.com/cabinet-fe/ultra-ui#readme",
5
5
  "bugs": {
6
6
  "url": "https://github.com/cabinet-fe/ultra-ui/issues"
@@ -1,3 +1,5 @@
1
+ // @vitest-environment happy-dom
2
+
1
3
  import { describe, expect, it, vi } from 'vite-plus/test'
2
4
 
3
5
  import { ExpandTransition } from '../expand-transition'