@g9tm/aiassistant-svelte 1.1.0 → 1.2.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.
@@ -1,9 +1,5 @@
1
1
  /**
2
- * The few words of the person's pages the core catalogue does not have (its history.*, routine.*, csv.* and pdf.* keys
3
- * are shared with the other renderer): the host's texts and overrides win, then the core's, then these.
2
+ * The words of the person's pages now live in the core's "/pages" entry (with the history.*, routine.* keys the pages
3
+ * use), so every renderer shares one catalogue: the host's texts and the core's win, then the pages' own.
4
4
  */
5
- import { type Texts } from "@g9tm/aiassistant";
6
- /** The pages' texts over the assistant's: a key the host or the core knows keeps its text. */
7
- export declare function pageTexts(texts: Texts): Texts;
8
- /** Every key the pages add (for hosts that translate to another language). */
9
- export declare function pageKeys(): string[];
5
+ export { pageKeys, pageTexts } from "@g9tm/aiassistant/pages";
@@ -1,42 +1,5 @@
1
1
  /**
2
- * The few words of the person's pages the core catalogue does not have (its history.*, routine.*, csv.* and pdf.* keys
3
- * are shared with the other renderer): the host's texts and overrides win, then the core's, then these.
2
+ * The words of the person's pages now live in the core's "/pages" entry (with the history.*, routine.* keys the pages
3
+ * use), so every renderer shares one catalogue: the host's texts and the core's win, then the pages' own.
4
4
  */
5
- import { createTexts } from "@g9tm/aiassistant";
6
- const FA = {
7
- "history.tabs": "گفت‌وگوها",
8
- "history.empty": "چیزی اینجا نیست",
9
- "history.untitled": "بی‌نام",
10
- "routine.list": "روال‌ها",
11
- "routine.empty": "هنوز روالی نیست",
12
- "routine.search": "جست‌وجو…",
13
- "routine.none_found": "چیزی پیدا نشد",
14
- "routine.change": "تغییر",
15
- "routine.failed": "اجرا نشد",
16
- };
17
- const EN = {
18
- "history.tabs": "Conversations",
19
- "history.empty": "Nothing here",
20
- "history.untitled": "Untitled",
21
- "routine.list": "Routines",
22
- "routine.empty": "No routines yet",
23
- "routine.search": "Search…",
24
- "routine.none_found": "Nothing found",
25
- "routine.change": "Change",
26
- "routine.failed": "It did not run",
27
- };
28
- /** The pages' texts over the assistant's: a key the host or the core knows keeps its text. */
29
- export function pageTexts(texts) {
30
- const own = createTexts(texts.locale, texts.locale === "fa" ? FA : EN);
31
- return {
32
- locale: texts.locale,
33
- t(key, args) {
34
- const v = texts.t(key, args);
35
- return v !== key ? v : own.t(key, args);
36
- },
37
- };
38
- }
39
- /** Every key the pages add (for hosts that translate to another language). */
40
- export function pageKeys() {
41
- return Object.keys(EN).sort();
42
- }
5
+ export { pageKeys, pageTexts } from "@g9tm/aiassistant/pages";
@@ -17,8 +17,7 @@
17
17
  }
18
18
 
19
19
  async function attach(): Promise<void> {
20
- const f = await host.pickFile?.([".pdf", ".xlsx", ".csv", "image/*"]);
21
- if (f) await ui.assistant.attach(f.name, f.bytes);
20
+ await ui.assistant.attachFromDevice();
22
21
  }
23
22
 
24
23
  async function dictate(): Promise<void> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@g9tm/aiassistant-svelte",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Svelte 5 components for the G9 AI assistant, fully customisable (layouts, tokens, per-part classes, overrides, parts).",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -31,7 +31,7 @@
31
31
  "access": "public"
32
32
  },
33
33
  "dependencies": {
34
- "@g9tm/aiassistant": "1.1.0"
34
+ "@g9tm/aiassistant": "1.2.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@sveltejs/package": "2.5.8",