@g9tm/aiassistant 0.0.0-stage → 1.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/dist/types.js ADDED
@@ -0,0 +1,28 @@
1
+ /** Small shared types of the client core. */
2
+ export const DEFAULT_THRESHOLDS = { compact: 360, sheet: 720 };
3
+ /** The layout "auto" picks for a container width. */
4
+ export function pickLayout(layout, containerWidth, thresholds = DEFAULT_THRESHOLDS) {
5
+ if (layout !== "auto")
6
+ return layout;
7
+ if (containerWidth < thresholds.compact)
8
+ return "compact";
9
+ return containerWidth < thresholds.sheet ? "sheet" : "side";
10
+ }
11
+ /** The stable part names hosts style and replace (layer 3): part of the public, versioned contract. */
12
+ export const PARTS = [
13
+ "panel", "panel.header", "panel.body", "panel.footer", "hero", "bar-button", "ask-about", "chat",
14
+ "messages", "message", "message.user", "message.assistant", "message.text", "message.provenance", "message.feedback",
15
+ "composer", "composer.input", "composer.attach", "composer.mic", "composer.send", "composer.stop", "file-chips", "file-chip",
16
+ "work", "work.stage", "work.progress", "work.tool", "work.elapsed",
17
+ "card.approval", "card.approval.step", "card.approval.fact", "card.approval.code", "card.approval.confirm", "card.approval.refuse",
18
+ "card.undo", "card.ask", "card.choice", "secret-field",
19
+ "block", "block.text", "block.callout", "block.table", "block.table.card", "block.chart", "block.chart.bar", "block.chart.line",
20
+ "block.kpi", "block.steps", "block.actions", "block.action", "block.flow", "block.image", "block.open", "block.fallback",
21
+ "mode-banner", "usage-chip", "thinking-orb", "stages-thinking", "reveal-text",
22
+ ];
23
+ /** The class of a part: the library's stable class plus the host's. */
24
+ export function partClass(part, styles, unstyled = false) {
25
+ const own = styles?.classes ? new Map(Object.entries(styles.classes)).get(part) : undefined;
26
+ const base = "g9a-" + part.replace(/\./gu, "__");
27
+ return [unstyled ? base + " g9a-unstyled" : base, own].filter((x) => typeof x === "string" && x.length > 0).join(" ");
28
+ }
package/package.json CHANGED
@@ -1,6 +1,42 @@
1
1
  {
2
2
  "name": "@g9tm/aiassistant",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.1.0",
4
+ "description": "Headless client of the G9 AI assistant: API client, run state, transports, block view models, safe text and Persian helpers. No DOM, no framework.",
5
+ "license": "MIT",
6
+ "author": {
7
+ "name": "Iman Kari",
8
+ "url": "G9TM"
9
+ },
10
+ "type": "module",
11
+ "sideEffects": false,
12
+ "main": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "import": "./dist/index.js"
18
+ },
19
+ "./admin": {
20
+ "types": "./dist/admin.d.ts",
21
+ "import": "./dist/admin.js"
22
+ },
23
+ "./pages": {
24
+ "types": "./dist/pages.d.ts",
25
+ "import": "./dist/pages.js"
26
+ }
27
+ },
28
+ "files": [
29
+ "dist",
30
+ "README.md"
31
+ ],
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "dependencies": {
36
+ "@g9tm/aiassistant-contracts": "1.1.0"
37
+ },
38
+ "scripts": {
39
+ "build": "tsc -p tsconfig.json",
40
+ "typecheck": "tsc -p tsconfig.json --noEmit"
41
+ }
6
42
  }