@alia.onl/sdk 21.5.2 → 21.5.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @alia.onl/sdk
2
2
 
3
+ ## 21.5.3
4
+
5
+ ### Fixed
6
+
7
+ - **Every entry type-checks on its own.** `@alia.onl/sdk/text`, `/ask`, `/ask/text` and `/voice`
8
+ reach components that use NativeWind's `className`, but only the root entry carried
9
+ `/// <reference types="nativewind/types" />`. Expo apps load NativeWind's types themselves and
10
+ never noticed; a consumer that does not (a Vite app) got 65 `className` errors importing
11
+ `@alia.onl/sdk/text`. Each of those entries now carries the reference.
12
+ - `@alia.onl/sdk/avatar` no longer needs the host to declare Node's `process`: the one
13
+ `process.env.EXPO_PUBLIC_ALIA_API_URL` read declares its own type (Metro still inlines it).
14
+
15
+ ### Added
16
+
17
+ - `check:entry-types` (in `prepublishOnly` and CI): compiles a consumer of each entry in
18
+ `exports` alone, through a real `node_modules` link, with nothing loaded globally and the
19
+ strictest consumer's options.
20
+
3
21
  ## 21.5.2
4
22
 
5
23
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alia.onl/sdk",
3
- "version": "21.5.2",
3
+ "version": "21.5.4",
4
4
  "description": "Alia AI chat SDK — the conversation runtime, chat UI, voice calls and dictation for Oxy apps",
5
5
  "main": "src/index.ts",
6
6
  "react-native": "src/index.ts",
@@ -41,8 +41,8 @@
41
41
  "typecheck": "tsc --noEmit",
42
42
  "test": "vitest run",
43
43
  "check:entries": "node scripts/check-entry-isolation.mjs",
44
- "render:avatar-still": "bun scripts/render-avatar-still.ts",
45
- "prepublishOnly": "bun run typecheck && bun run test && bun run check:entries"
44
+ "check:entry-types": "node scripts/check-entry-types.mjs",
45
+ "render:avatar-still": "bun scripts/render-avatar-still.ts"
46
46
  },
47
47
  "dependencies": {
48
48
  "clsx": "^2.1.1",
package/src/ask-text.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /// <reference types="nativewind/types" />
1
2
  // @alia.onl/sdk/ask/text — `@alia.onl/sdk/ask` without the voice call, and without bundling it
2
3
  // The provider and its hook; the sheet loads with the first `ask`, and neither reaches the call's
3
4
  // modules. `useAskAgent` is the same hook as `@alia.onl/sdk/ask`'s.
package/src/ask.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /// <reference types="nativewind/types" />
1
2
  // @alia.onl/sdk/ask — the app's one Alia sheet, without the chat in the entry bundle
2
3
  // `AliaAskProvider` and `useAskAgent` alone: the sheet they open is loaded with the first `ask`.
3
4
  // An app mounts the provider at its root from here rather than from the root entry, which
@@ -5,7 +5,10 @@ import {
5
5
  DropdownMenuItem,
6
6
  DropdownMenuTrigger,
7
7
  } from '@oxy.so/bloom/dropdown-menu';
8
- import { RiArrowLeftLine, RiDeleteBin6Line, RiMoreFill, RiShare2Line } from '@oxy.so/bloom/icons';
8
+ import { RiArrowLeftLine } from '@oxy.so/bloom/icons/RiArrowLeftLine';
9
+ import { RiDeleteBin6Line } from '@oxy.so/bloom/icons/RiDeleteBin6Line';
10
+ import { RiMoreFill } from '@oxy.so/bloom/icons/RiMoreFill';
11
+ import { RiShare2Line } from '@oxy.so/bloom/icons/RiShare2Line';
9
12
  import { PageHeader } from '@oxy.so/bloom/page-header';
10
13
  import { memo, type ReactNode } from 'react';
11
14
  import { useLabels } from '../lib/labels';
@@ -1,5 +1,5 @@
1
1
  import { Card, CardBody, CardHeader, CardTitle } from '@oxy.so/bloom/card';
2
- import { RiListCheck3 } from '@oxy.so/bloom/icons';
2
+ import { RiListCheck3 } from '@oxy.so/bloom/icons/RiListCheck3';
3
3
  import { Item } from '@oxy.so/bloom/item';
4
4
  import { useTheme } from '@oxy.so/bloom/theme';
5
5
  import { Text } from '@oxy.so/bloom/typography';
@@ -4,6 +4,11 @@
4
4
  * origin the SDK uses is an origin it declares.
5
5
  */
6
6
 
7
+ // Declared here, not taken from the host's globals: Expo apps get `process` from Expo's types, a
8
+ // Vite app has none unless it installs Node's, and every entry that reaches this file must
9
+ // type-check alone (`check:entry-types`). Type-only; Metro still inlines the static access below.
10
+ declare const process: { readonly env: { readonly EXPO_PUBLIC_ALIA_API_URL?: string } };
11
+
7
12
  /** Alia's API: `EXPO_PUBLIC_ALIA_API_URL`, then production. Chat, dictation, speech, voice. */
8
13
  export const ALIA_API_URL = process.env.EXPO_PUBLIC_ALIA_API_URL ?? 'https://api.alia.onl';
9
14
 
@@ -1,11 +1,9 @@
1
- import {
2
- RiBookOpenLine,
3
- RiFileTextLine,
4
- RiGlobalLine,
5
- RiSearchLine,
6
- RiTerminalBoxLine,
7
- RiToolsLine,
8
- } from '@oxy.so/bloom/icons';
1
+ import { RiBookOpenLine } from '@oxy.so/bloom/icons/RiBookOpenLine';
2
+ import { RiFileTextLine } from '@oxy.so/bloom/icons/RiFileTextLine';
3
+ import { RiGlobalLine } from '@oxy.so/bloom/icons/RiGlobalLine';
4
+ import { RiSearchLine } from '@oxy.so/bloom/icons/RiSearchLine';
5
+ import { RiTerminalBoxLine } from '@oxy.so/bloom/icons/RiTerminalBoxLine';
6
+ import { RiToolsLine } from '@oxy.so/bloom/icons/RiToolsLine';
9
7
  import type { TaskListChip, TaskListStep, TaskListTask } from '@oxy.so/bloom/task-list';
10
8
  import type { WebSearchBrand, WebSearchSource, WebSearchStep } from '@oxy.so/bloom/web-search';
11
9
  import type { ToolInvocation } from '../runtime/types';
package/src/text.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /// <reference types="nativewind/types" />
1
2
  // @alia.onl/sdk/text — the chat without the voice call, and without bundling it
2
3
  // The same `AliaChatSheet`, `AliaChatScreen` and `AliaChatContent` as the root entry, but none of
3
4
  // them reaches the call's modules (its socket, protocol and audio engine): a text-only app takes
package/src/voice.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /// <reference types="nativewind/types" />
1
2
  // @alia.onl/sdk/voice — Alia voice surface
2
3
  // The voice call (speech to speech through Alia's /v1/voice/session and Kaana),
3
4
  // its audio engine, audio visualisation, ambient wave and sound effects. Split