@nucleux/utils 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nucleux
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.cjs ADDED
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var clsx = require('clsx');
4
+ var tailwindMerge = require('tailwind-merge');
5
+
6
+ // src/utils.ts
7
+ function cn(...inputs) {
8
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
9
+ }
10
+
11
+ exports.cn = cn;
12
+ //# sourceMappingURL=index.cjs.map
13
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils.ts"],"names":["twMerge","clsx"],"mappings":";;;;;;AAOO,SAAS,MAAM,MAAA,EAA8B;AAClD,EAAA,OAAOA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;AAC7B","file":"index.cjs","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind-aware conflict resolution.\n * Later conflicting utilities win (e.g. `cn(\"p-2\", \"p-4\")` -> `\"p-4\"`).\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n"]}
@@ -0,0 +1,39 @@
1
+ import { ClassValue } from 'clsx';
2
+
3
+ /**
4
+ * Merge class names with Tailwind-aware conflict resolution.
5
+ * Later conflicting utilities win (e.g. `cn("p-2", "p-4")` -> `"p-4"`).
6
+ */
7
+ declare function cn(...inputs: ClassValue[]): string;
8
+
9
+ /** The author of a message in an agent conversation. */
10
+ type MessageRole = "user" | "assistant" | "system" | "tool";
11
+ /** Lifecycle state of a tool / function call made by an agent. */
12
+ type ToolCallStatus = "pending" | "running" | "success" | "error";
13
+ /** A single tool invocation surfaced by the agent. */
14
+ interface ToolCallData {
15
+ /** Stable id for the invocation. */
16
+ id: string;
17
+ /** Name of the tool/function being called. */
18
+ name: string;
19
+ /** Arguments passed to the tool (any JSON-serializable value). */
20
+ args?: unknown;
21
+ /** Result returned by the tool once it resolves. */
22
+ result?: unknown;
23
+ /** Current lifecycle state. */
24
+ status: ToolCallStatus;
25
+ }
26
+ /** A message in an agent conversation. */
27
+ interface ChatMessage {
28
+ id: string;
29
+ role: MessageRole;
30
+ content: string;
31
+ /** True while the assistant is still streaming this message's content. */
32
+ streaming?: boolean;
33
+ /** Tool calls associated with this message, if any. */
34
+ toolCalls?: ToolCallData[];
35
+ /** ISO timestamp or epoch millis for when the message was created. */
36
+ createdAt?: string | number;
37
+ }
38
+
39
+ export { type ChatMessage, type MessageRole, type ToolCallData, type ToolCallStatus, cn };
@@ -0,0 +1,39 @@
1
+ import { ClassValue } from 'clsx';
2
+
3
+ /**
4
+ * Merge class names with Tailwind-aware conflict resolution.
5
+ * Later conflicting utilities win (e.g. `cn("p-2", "p-4")` -> `"p-4"`).
6
+ */
7
+ declare function cn(...inputs: ClassValue[]): string;
8
+
9
+ /** The author of a message in an agent conversation. */
10
+ type MessageRole = "user" | "assistant" | "system" | "tool";
11
+ /** Lifecycle state of a tool / function call made by an agent. */
12
+ type ToolCallStatus = "pending" | "running" | "success" | "error";
13
+ /** A single tool invocation surfaced by the agent. */
14
+ interface ToolCallData {
15
+ /** Stable id for the invocation. */
16
+ id: string;
17
+ /** Name of the tool/function being called. */
18
+ name: string;
19
+ /** Arguments passed to the tool (any JSON-serializable value). */
20
+ args?: unknown;
21
+ /** Result returned by the tool once it resolves. */
22
+ result?: unknown;
23
+ /** Current lifecycle state. */
24
+ status: ToolCallStatus;
25
+ }
26
+ /** A message in an agent conversation. */
27
+ interface ChatMessage {
28
+ id: string;
29
+ role: MessageRole;
30
+ content: string;
31
+ /** True while the assistant is still streaming this message's content. */
32
+ streaming?: boolean;
33
+ /** Tool calls associated with this message, if any. */
34
+ toolCalls?: ToolCallData[];
35
+ /** ISO timestamp or epoch millis for when the message was created. */
36
+ createdAt?: string | number;
37
+ }
38
+
39
+ export { type ChatMessage, type MessageRole, type ToolCallData, type ToolCallStatus, cn };
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ import { clsx } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+
4
+ // src/utils.ts
5
+ function cn(...inputs) {
6
+ return twMerge(clsx(inputs));
7
+ }
8
+
9
+ export { cn };
10
+ //# sourceMappingURL=index.js.map
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils.ts"],"names":[],"mappings":";;;;AAOO,SAAS,MAAM,MAAA,EAA8B;AAClD,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B","file":"index.js","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind-aware conflict resolution.\n * Later conflicting utilities win (e.g. `cn(\"p-2\", \"p-4\")` -> `\"p-4\"`).\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n"]}
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@nucleux/utils",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "sideEffects": false,
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "devDependencies": {
20
+ "tsup": "^8.3.5",
21
+ "typescript": "^5.7.2"
22
+ },
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "license": "MIT",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/intelligaia-open-labs/nucleux.git",
30
+ "directory": "packages/utils"
31
+ },
32
+ "homepage": "https://github.com/intelligaia-open-labs/nucleux#readme",
33
+ "dependencies": {
34
+ "clsx": "^2.1.1",
35
+ "tailwind-merge": "^2.6.0"
36
+ },
37
+ "scripts": {
38
+ "build": "tsup"
39
+ }
40
+ }