@versini/sassysaint-common 4.16.1 → 4.16.2
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/index.d.ts +98 -2
- package/dist/index.js +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enumeration of all possible UI elements that can be themed. These map to
|
|
3
|
+
* specific actions, UI components, or visual elements in the application.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ActionColor {
|
|
6
|
+
NewChat = 0,
|
|
7
|
+
Prompts = 1,
|
|
8
|
+
Attachment = 2,
|
|
9
|
+
PrivateChat = 3,
|
|
10
|
+
SaveChat = 4,
|
|
11
|
+
Reasoning = 5,
|
|
12
|
+
Send = 6,
|
|
13
|
+
Header = 7,
|
|
14
|
+
Provider = 8,
|
|
15
|
+
Logo = 9,
|
|
16
|
+
Placeholder = 10
|
|
17
|
+
}
|
|
18
|
+
|
|
1
19
|
/**
|
|
2
20
|
* List of all models available TODAY. This is used by the client to display the
|
|
3
21
|
* list of models.
|
|
@@ -56,6 +74,35 @@ export declare const CAPABILITIES: {
|
|
|
56
74
|
*/
|
|
57
75
|
export declare type CapabilityInput = string | readonly string[];
|
|
58
76
|
|
|
77
|
+
/**
|
|
78
|
+
* Color scheme constants based on system preference (light/dark mode).
|
|
79
|
+
*/
|
|
80
|
+
export declare const COLOR_SCHEME: {
|
|
81
|
+
readonly LIGHT: "light";
|
|
82
|
+
readonly DARK: "dark";
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Maps each ActionColor to its corresponding Tailwind CSS class string. These
|
|
87
|
+
* are complete class strings (e.g., "fill-[#7A9BC4]", "text-copy-medium") that
|
|
88
|
+
* can be directly applied to DOM elements.
|
|
89
|
+
*
|
|
90
|
+
* Partial mapping allows themes to define only the colors they want to
|
|
91
|
+
* customize, while inheriting defaults for undefined colors.
|
|
92
|
+
*/
|
|
93
|
+
export declare type ColorMap = Partial<Record<ActionColor, string>>;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Color scheme based on system preference (light/dark mode).
|
|
97
|
+
*/
|
|
98
|
+
export declare type ColorScheme = "light" | "dark";
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* CSS variables that can be dynamically applied to document.documentElement.
|
|
102
|
+
* Variable names must include the -- prefix (e.g., "--av-focus-light").
|
|
103
|
+
*/
|
|
104
|
+
export declare type CSSVariables = Record<string, string>;
|
|
105
|
+
|
|
59
106
|
export declare const DEFAULT_PROVIDER = "OpenAI";
|
|
60
107
|
|
|
61
108
|
/**
|
|
@@ -64,6 +111,28 @@ export declare const DEFAULT_PROVIDER = "OpenAI";
|
|
|
64
111
|
*/
|
|
65
112
|
export declare const DIGGIDY_CHAT_ID_HEADER = "x-diggidy-chat-id";
|
|
66
113
|
|
|
114
|
+
/**
|
|
115
|
+
* Display mode constants for OLED optimization.
|
|
116
|
+
*/
|
|
117
|
+
export declare const DISPLAY_MODE: {
|
|
118
|
+
readonly NORMAL: "normal";
|
|
119
|
+
readonly OLED: "oled";
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Display mode for OLED optimization.
|
|
124
|
+
*/
|
|
125
|
+
export declare type DisplayMode = "normal" | "oled";
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* All palettes for a single display mode (normal or oled), containing both
|
|
129
|
+
* light and dark color scheme variants.
|
|
130
|
+
*/
|
|
131
|
+
export declare interface DisplayModePalettes {
|
|
132
|
+
light: Palette;
|
|
133
|
+
dark: Palette;
|
|
134
|
+
}
|
|
135
|
+
|
|
67
136
|
/**
|
|
68
137
|
* Represents the shape of an entitlement state object, used for checking
|
|
69
138
|
* capability loading status. This interface is intentionally flexible to work
|
|
@@ -391,6 +460,15 @@ export declare const MODELS_PER_PROVIDER: {
|
|
|
391
460
|
readonly Perplexity: readonly ["sonar", "sonar-pro"];
|
|
392
461
|
};
|
|
393
462
|
|
|
463
|
+
/**
|
|
464
|
+
* Complete palette for a single display mode and color scheme combination.
|
|
465
|
+
* Contains both the color class mappings and CSS variables.
|
|
466
|
+
*/
|
|
467
|
+
export declare interface Palette {
|
|
468
|
+
colors: ColorMap;
|
|
469
|
+
cssVariables: CSSVariables;
|
|
470
|
+
}
|
|
471
|
+
|
|
394
472
|
/**
|
|
395
473
|
* List of all plans available.
|
|
396
474
|
*/
|
|
@@ -450,13 +528,31 @@ export declare const SORT_BY_TIMESTAMP = "timestamp";
|
|
|
450
528
|
export declare const SORT_BY_TOKEN_USAGE = "tokenUsage";
|
|
451
529
|
|
|
452
530
|
/**
|
|
453
|
-
* Theme constants
|
|
531
|
+
* Theme mode constants.
|
|
454
532
|
*/
|
|
455
533
|
export declare const THEME_STANDARD = "standard";
|
|
456
534
|
|
|
457
535
|
export declare const THEME_SUBTLE = "subtle";
|
|
458
536
|
|
|
459
|
-
|
|
537
|
+
/**
|
|
538
|
+
* Theme mode type.
|
|
539
|
+
*/
|
|
540
|
+
export declare type ThemeMode = "standard" | "subtle";
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Complete theme palette containing all variants. This is the structure sent
|
|
544
|
+
* from the server to the client via getUserPreferences.
|
|
545
|
+
*
|
|
546
|
+
* Structure:
|
|
547
|
+
* - normal.light: Regular display, light color scheme
|
|
548
|
+
* - normal.dark: Regular display, dark color scheme
|
|
549
|
+
* - oled.light: OLED display, light color scheme
|
|
550
|
+
* - oled.dark: OLED display, dark color scheme
|
|
551
|
+
*/
|
|
552
|
+
export declare interface ThemePalette {
|
|
553
|
+
normal: DisplayModePalettes;
|
|
554
|
+
oled: DisplayModePalettes;
|
|
555
|
+
}
|
|
460
556
|
|
|
461
557
|
/**
|
|
462
558
|
* Converts an array of capability strings into a Set for efficient lookup
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
let e="user",
|
|
1
|
+
let e="standard",t={LIGHT:"light",DARK:"dark"},r={NORMAL:"normal",OLED:"oled"};var a,E=((a={})[a.NewChat=0]="NewChat",a[a.Prompts=1]="Prompts",a[a.Attachment=2]="Attachment",a[a.PrivateChat=3]="PrivateChat",a[a.SaveChat=4]="SaveChat",a[a.Reasoning=5]="Reasoning",a[a.Send=6]="Send",a[a.Header=7]="Header",a[a.Provider=8]="Provider",a[a.Logo=9]="Logo",a[a.Placeholder=10]="Placeholder",a);let n="system",i="user",o="assistant",s="hidden",O="data",l="OpenAI",_="Anthropic",R="Google",A="Summary",P="Memory",L="Perplexity",M="Mistral",D=l,d=[l,_,R],I="gpt-5",S="gpt-5-mini",T="gpt-5-nano",N="gpt-4.1-nano",g="claude-haiku-4-5",u="claude-sonnet-4-5",h="gemini-2.5-flash",m="gemini-2.5-pro",c="sonar",p="sonar-pro",f="mistralai/mistral-small-3.2-24b-instruct:free",C="gpt-4o-mini",G="text-embedding-3-small",H={[I]:"GPT-5",[S]:"GPT-5 Mini",[T]:"GPT-5 Nano",[N]:"GPT-4.1 Nano",[g]:"Claude Haiku 4.5",[u]:"Claude Sonnet 4.5",[h]:"Gemini 2.5 Flash",[m]:"Gemini 2.5 Pro",[c]:"Sonar",[p]:"Sonar Pro"},y=[I,S,T,g,u,h,m],U=[I,S,T,u,m],v={[l]:[N,I,S,T],[_]:[g,u],[R]:[h,m],[L]:[c,p]},b={[l]:[n,i,o],[_]:[i,o],[A]:[i,o],[P]:[i,o],[R]:[i,o],[L]:[i,o]},V={[_]:["claude-sonnet-4","claude-haiku-4","claude-3"],[l]:["gpt-","o3","o4"],[R]:["gemini"],[L]:["sonar"]},Y="x-diggidy-chat-id",B="timestamp",k="tokenUsage",w="Diggidy",F="sassy:basic",x="sassy:plus",W="sassy:advanced",j={TOOL:{DATETIME:"getDateTime",IMAGES:"getImages",POLLUTION:"getAirPollution",WEATHER:"getWeather",URLCONTENTPARSER:"getUrlContent",MEMORIES:"getUserMemories",HUMANIZE:"humanize",WEBSEARCH:"getWebSearch",GITREPOSITORY:"getGitRepoDetails",HOTELS:"getHotelDetails"},ADDON:{ATTACHMENTS:"addon:attachments",REASONING:"addon:reasoning",CODEINTERPRETER:"addon:codeinterpreter"}},K=e=>{for(let[t,r]of Object.entries(V))if(r.some(t=>e.startsWith(t)))return t;return null},X=e=>{if(!e||0===e.length)return[];let t=new Set;for(let r of e)for(let[e,a]of Object.entries(v))a.includes(r)&&(e===l||e===_||e===R)&&t.add(e);return d.filter(e=>t.has(e))},z=e=>{let t=new Map;if(!e||0===e.length)return t;for(let r of e)for(let[e,a]of Object.entries(v))if(a.includes(r)){t.has(e)||t.set(e,[]),t.get(e)?.push(r);break}return t},Z=e=>{for(let t of z(e).values())if(t.length>1)return!0;return!1},q=(e,t)=>!!e&&!!t&&0!==t.length&&t.includes(e);function J(e){return!!e&&Array.isArray(e.capabilities)&&e.capabilities.length>=0}function Q(e){return e?new Set(e):null}function $(e,t,r){if(!t||Array.isArray(t)&&0===t.length)return!0;let a=e instanceof Set?e:Q(e);return!!a&&0!==a.size&&("string"==typeof t?a.has(t):r?.any===!0?t.some(e=>a.has(e)):t.every(e=>a.has(e)))}var ee="subtle";export{y as ALL_MODELS,d as ALL_PROVIDERS,U as ALL_REASONING_MODELS,w as APPLICATION_NAME,V as APPROXIMATE_MODELS_PER_PROVIDER,E as ActionColor,j as CAPABILITIES,t as COLOR_SCHEME,D as DEFAULT_PROVIDER,Y as DIGGIDY_CHAT_ID_HEADER,r as DISPLAY_MODE,v as MODELS_PER_PROVIDER,g as MODEL_CLAUDE_HAIKU,u as MODEL_CLAUDE_SONNET,f as MODEL_DEV,H as MODEL_DISPLAY_NAMES,G as MODEL_EMBEDDING_TEXT,h as MODEL_GEMINI_FLASH,m as MODEL_GEMINI_PRO,N as MODEL_GPT4_NANO,I as MODEL_GPT5,S as MODEL_GPT5_MINI,T as MODEL_GPT5_NANO,C as MODEL_MEMORY_INFERENCE,c as MODEL_SONAR,p as MODEL_SONAR_PRO,F as PLAN_BASIC,x as PLAN_PLUS,W as PLAN_PREMIUM,_ as PROVIDER_ANTHROPIC,R as PROVIDER_GOOGLE,P as PROVIDER_MEMORY,M as PROVIDER_MISTRAL,l as PROVIDER_OPENAI,L as PROVIDER_PERPLEXITY,b as PROVIDER_ROLE_MAP,A as PROVIDER_SUMMARY,o as ROLE_ASSISTANT,s as ROLE_HIDDEN,O as ROLE_INTERNAL,n as ROLE_SYSTEM,i as ROLE_USER,B as SORT_BY_TIMESTAMP,k as SORT_BY_TOKEN_USAGE,e as THEME_STANDARD,K as findProvider,z as getModelsGroupedByProvider,X as getProvidersFromModels,Z as hasMultipleModelsPerProvider,$ as isEntitled,J as isEntitlementLoaded,q as isModelAllowedForPlan,Q as toCapabilitySet,ee as THEME_SUBTLE};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/sassysaint-common",
|
|
3
|
-
"version": "4.16.
|
|
3
|
+
"version": "4.16.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"watch": "npm-run-all dev"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@microsoft/api-extractor": "7.
|
|
37
|
-
"@rslib/core": "0.17.
|
|
36
|
+
"@microsoft/api-extractor": "7.55.0",
|
|
37
|
+
"@rslib/core": "0.17.2"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "dc1feee469a9212f3f78e180720514dab70f2806"
|
|
40
40
|
}
|