@kopexa/shared-utils 1.0.0 → 1.1.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.
@@ -0,0 +1,4 @@
1
+ type Booleanish = boolean | "true" | "false";
2
+ declare const dataAttr: (condition: boolean | undefined) => Booleanish;
3
+
4
+ export { dataAttr };
@@ -0,0 +1,4 @@
1
+ type Booleanish = boolean | "true" | "false";
2
+ declare const dataAttr: (condition: boolean | undefined) => Booleanish;
3
+
4
+ export { dataAttr };
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/assertion.ts
21
+ var assertion_exports = {};
22
+ __export(assertion_exports, {
23
+ dataAttr: () => dataAttr
24
+ });
25
+ module.exports = __toCommonJS(assertion_exports);
26
+ var dataAttr = (condition) => condition ? "true" : void 0;
27
+ // Annotate the CommonJS export names for ESM import in node:
28
+ 0 && (module.exports = {
29
+ dataAttr
30
+ });
@@ -0,0 +1,5 @@
1
+ // src/assertion.ts
2
+ var dataAttr = (condition) => condition ? "true" : void 0;
3
+ export {
4
+ dataAttr
5
+ };
package/dist/index.d.mts CHANGED
@@ -1,3 +1,4 @@
1
+ export { dataAttr } from './assertion.mjs';
1
2
  export { cn } from './clsx.mjs';
2
3
  export { getUniqueID } from './functions.mjs';
3
4
  export { clamp } from './numbers.mjs';
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export { dataAttr } from './assertion.js';
1
2
  export { cn } from './clsx.js';
2
3
  export { getUniqueID } from './functions.js';
3
4
  export { clamp } from './numbers.js';
package/dist/index.js CHANGED
@@ -22,10 +22,14 @@ var index_exports = {};
22
22
  __export(index_exports, {
23
23
  clamp: () => clamp,
24
24
  cn: () => cn,
25
+ dataAttr: () => dataAttr,
25
26
  getUniqueID: () => getUniqueID
26
27
  });
27
28
  module.exports = __toCommonJS(index_exports);
28
29
 
30
+ // src/assertion.ts
31
+ var dataAttr = (condition) => condition ? "true" : void 0;
32
+
29
33
  // src/clsx.ts
30
34
  var import_clsx = require("clsx");
31
35
  var import_tailwind_merge = require("tailwind-merge");
@@ -46,5 +50,6 @@ function clamp(value, min, max) {
46
50
  0 && (module.exports = {
47
51
  clamp,
48
52
  cn,
53
+ dataAttr,
49
54
  getUniqueID
50
55
  });
package/dist/index.mjs CHANGED
@@ -1,3 +1,6 @@
1
+ // src/assertion.ts
2
+ var dataAttr = (condition) => condition ? "true" : void 0;
3
+
1
4
  // src/clsx.ts
2
5
  import { clsx } from "clsx";
3
6
  import { twMerge } from "tailwind-merge";
@@ -17,5 +20,6 @@ function clamp(value, min, max) {
17
20
  export {
18
21
  clamp,
19
22
  cn,
23
+ dataAttr,
20
24
  getUniqueID
21
25
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kopexa/shared-utils",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "A set of kopexa shared utilities",
5
5
  "keywords": [
6
6
  "system"