@corenel/web-ui 0.13.2 → 0.14.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/Composer.d.ts +30 -1
- package/dist/Composer.d.ts.map +1 -1
- package/dist/Composer.js +111 -19
- package/dist/Composer.js.map +1 -1
- package/dist/ContextBar.d.ts +9 -3
- package/dist/ContextBar.d.ts.map +1 -1
- package/dist/ContextBar.js +14 -7
- package/dist/ContextBar.js.map +1 -1
- package/dist/ContextManager.d.ts +10 -2
- package/dist/ContextManager.d.ts.map +1 -1
- package/dist/ContextManager.js +14 -10
- package/dist/ContextManager.js.map +1 -1
- package/dist/DictateButton.d.ts +21 -1
- package/dist/DictateButton.d.ts.map +1 -1
- package/dist/DictateButton.js +73 -10
- package/dist/DictateButton.js.map +1 -1
- package/dist/PickChips.d.ts +6 -0
- package/dist/PickChips.d.ts.map +1 -0
- package/dist/PickChips.js +55 -0
- package/dist/PickChips.js.map +1 -0
- package/dist/ProcessDock.d.ts +10 -0
- package/dist/ProcessDock.d.ts.map +1 -1
- package/dist/ProcessDock.js +24 -1
- package/dist/ProcessDock.js.map +1 -1
- package/dist/RichContent.d.ts.map +1 -1
- package/dist/RichContent.js +102 -24
- package/dist/RichContent.js.map +1 -1
- package/dist/SummaryTranscript.d.ts +5 -1
- package/dist/SummaryTranscript.d.ts.map +1 -1
- package/dist/SummaryTranscript.js +5 -3
- package/dist/SummaryTranscript.js.map +1 -1
- package/dist/TodoBar.d.ts +2 -0
- package/dist/TodoBar.d.ts.map +1 -1
- package/dist/TodoBar.js +8 -0
- package/dist/TodoBar.js.map +1 -1
- package/dist/TodoLine.d.ts +11 -0
- package/dist/TodoLine.d.ts.map +1 -0
- package/dist/TodoLine.js +55 -0
- package/dist/TodoLine.js.map +1 -0
- package/dist/ToolFold.js +1 -1
- package/dist/ToolFold.js.map +1 -1
- package/dist/Transcript.d.ts +19 -1
- package/dist/Transcript.d.ts.map +1 -1
- package/dist/Transcript.js +127 -58
- package/dist/Transcript.js.map +1 -1
- package/dist/agentChat/AgentChat.d.ts +42 -0
- package/dist/agentChat/AgentChat.d.ts.map +1 -1
- package/dist/agentChat/AgentChat.js +573 -100
- package/dist/agentChat/AgentChat.js.map +1 -1
- package/dist/agentChat/ChatSettingsSheet.d.ts +9 -0
- package/dist/agentChat/ChatSettingsSheet.d.ts.map +1 -0
- package/dist/agentChat/ChatSettingsSheet.js +103 -0
- package/dist/agentChat/ChatSettingsSheet.js.map +1 -0
- package/dist/agentChat/OptionsDrawer.d.ts +8 -0
- package/dist/agentChat/OptionsDrawer.d.ts.map +1 -1
- package/dist/agentChat/OptionsDrawer.js +24 -215
- package/dist/agentChat/OptionsDrawer.js.map +1 -1
- package/dist/agentChat/PlanReview.d.ts +1 -1
- package/dist/agentChat/PlanReview.d.ts.map +1 -1
- package/dist/agentChat/PlanReview.js +1 -1
- package/dist/agentChat/PlanReview.js.map +1 -1
- package/dist/agentChat/SourceGroups.d.ts +24 -0
- package/dist/agentChat/SourceGroups.d.ts.map +1 -0
- package/dist/agentChat/SourceGroups.js +117 -0
- package/dist/agentChat/SourceGroups.js.map +1 -0
- package/dist/agentChat/controller.d.ts +30 -1
- package/dist/agentChat/controller.d.ts.map +1 -1
- package/dist/agentChat/controller.js.map +1 -1
- package/dist/agentChat/pendingQueue.d.ts +4 -0
- package/dist/agentChat/pendingQueue.d.ts.map +1 -1
- package/dist/agentChat/pendingQueue.js +7 -0
- package/dist/agentChat/pendingQueue.js.map +1 -1
- package/dist/agentChat/planTool.d.ts +4 -0
- package/dist/agentChat/planTool.d.ts.map +1 -0
- package/dist/agentChat/planTool.js +4 -0
- package/dist/agentChat/planTool.js.map +1 -0
- package/dist/agentChat/testSheetHost.d.ts +3 -0
- package/dist/agentChat/testSheetHost.d.ts.map +1 -0
- package/dist/agentChat/testSheetHost.js +9 -0
- package/dist/agentChat/testSheetHost.js.map +1 -0
- package/dist/agentChat/useChatOptions.d.ts +63 -0
- package/dist/agentChat/useChatOptions.d.ts.map +1 -0
- package/dist/agentChat/useChatOptions.js +156 -0
- package/dist/agentChat/useChatOptions.js.map +1 -0
- package/dist/chatRefreshContext.d.ts +8 -0
- package/dist/chatRefreshContext.d.ts.map +1 -0
- package/dist/chatRefreshContext.js +14 -0
- package/dist/chatRefreshContext.js.map +1 -0
- package/dist/chatSkinContext.d.ts +13 -6
- package/dist/chatSkinContext.d.ts.map +1 -1
- package/dist/chatSkinContext.js +18 -4
- package/dist/chatSkinContext.js.map +1 -1
- package/dist/chatSkinCss.d.ts.map +1 -1
- package/dist/chatSkinCss.js +108 -22
- package/dist/chatSkinCss.js.map +1 -1
- package/dist/composerAction.d.ts +16 -0
- package/dist/composerAction.d.ts.map +1 -0
- package/dist/composerAction.js +20 -0
- package/dist/composerAction.js.map +1 -0
- package/dist/composerHistory.d.ts.map +1 -1
- package/dist/composerHistory.js +4 -1
- package/dist/composerHistory.js.map +1 -1
- package/dist/fx/LiveAnswer.d.ts.map +1 -1
- package/dist/fx/LiveAnswer.js +324 -59
- package/dist/fx/LiveAnswer.js.map +1 -1
- package/dist/fx/arrivalModes.d.ts +17 -2
- package/dist/fx/arrivalModes.d.ts.map +1 -1
- package/dist/fx/arrivalModes.js +46 -4
- package/dist/fx/arrivalModes.js.map +1 -1
- package/dist/fx/pacer.d.ts +41 -0
- package/dist/fx/pacer.d.ts.map +1 -0
- package/dist/fx/pacer.js +66 -0
- package/dist/fx/pacer.js.map +1 -0
- package/dist/fx/useReveal.d.ts +16 -1
- package/dist/fx/useReveal.d.ts.map +1 -1
- package/dist/fx/useReveal.js +101 -41
- package/dist/fx/useReveal.js.map +1 -1
- package/dist/localAddress.d.ts +2 -0
- package/dist/localAddress.d.ts.map +1 -0
- package/dist/localAddress.js +56 -0
- package/dist/localAddress.js.map +1 -0
- package/dist/steps/AfterReply.d.ts +67 -0
- package/dist/steps/AfterReply.d.ts.map +1 -0
- package/dist/steps/AfterReply.js +217 -0
- package/dist/steps/AfterReply.js.map +1 -0
- package/dist/steps/ChatApproval.d.ts +18 -0
- package/dist/steps/ChatApproval.d.ts.map +1 -0
- package/dist/steps/ChatApproval.js +35 -0
- package/dist/steps/ChatApproval.js.map +1 -0
- package/dist/steps/Delegation.d.ts +77 -0
- package/dist/steps/Delegation.d.ts.map +1 -0
- package/dist/steps/Delegation.js +188 -0
- package/dist/steps/Delegation.js.map +1 -0
- package/dist/steps/LiveRail.d.ts +14 -0
- package/dist/steps/LiveRail.d.ts.map +1 -0
- package/dist/steps/LiveRail.js +16 -0
- package/dist/steps/LiveRail.js.map +1 -0
- package/dist/steps/StepDetail.d.ts +23 -0
- package/dist/steps/StepDetail.d.ts.map +1 -0
- package/dist/steps/StepDetail.js +195 -0
- package/dist/steps/StepDetail.js.map +1 -0
- package/dist/steps/StepDetailHost.d.ts +54 -0
- package/dist/steps/StepDetailHost.d.ts.map +1 -0
- package/dist/steps/StepDetailHost.js +175 -0
- package/dist/steps/StepDetailHost.js.map +1 -0
- package/dist/steps/StepRail.d.ts +38 -0
- package/dist/steps/StepRail.d.ts.map +1 -0
- package/dist/steps/StepRail.js +238 -0
- package/dist/steps/StepRail.js.map +1 -0
- package/dist/steps/approval.d.ts +73 -0
- package/dist/steps/approval.d.ts.map +1 -0
- package/dist/steps/approval.js +81 -0
- package/dist/steps/approval.js.map +1 -0
- package/dist/steps/model.d.ts +140 -0
- package/dist/steps/model.d.ts.map +1 -0
- package/dist/steps/model.js +433 -0
- package/dist/steps/model.js.map +1 -0
- package/dist/steps/outcome.d.ts +5 -0
- package/dist/steps/outcome.d.ts.map +1 -0
- package/dist/steps/outcome.js +34 -0
- package/dist/steps/outcome.js.map +1 -0
- package/dist/steps/peek.d.ts +35 -0
- package/dist/steps/peek.d.ts.map +1 -0
- package/dist/steps/peek.js +219 -0
- package/dist/steps/peek.js.map +1 -0
- package/dist/steps/plan.d.ts +50 -0
- package/dist/steps/plan.d.ts.map +1 -0
- package/dist/steps/plan.js +242 -0
- package/dist/steps/plan.js.map +1 -0
- package/dist/steps/useRailDetail.d.ts +25 -0
- package/dist/steps/useRailDetail.d.ts.map +1 -0
- package/dist/steps/useRailDetail.js +108 -0
- package/dist/steps/useRailDetail.js.map +1 -0
- package/dist/steps/words.d.ts +40 -0
- package/dist/steps/words.d.ts.map +1 -0
- package/dist/steps/words.js +247 -0
- package/dist/steps/words.js.map +1 -0
- package/dist/toolRender.d.ts +27 -1
- package/dist/toolRender.d.ts.map +1 -1
- package/dist/toolRender.js +72 -4
- package/dist/toolRender.js.map +1 -1
- package/dist/transcriptSkin.d.ts.map +1 -1
- package/dist/transcriptSkin.js +66 -0
- package/dist/transcriptSkin.js.map +1 -1
- package/dist/transcriptSkinCss.d.ts +35 -0
- package/dist/transcriptSkinCss.d.ts.map +1 -1
- package/dist/transcriptSkinCss.js +360 -19
- package/dist/transcriptSkinCss.js.map +1 -1
- package/dist/useHoldPress.d.ts +24 -0
- package/dist/useHoldPress.d.ts.map +1 -0
- package/dist/useHoldPress.js +85 -0
- package/dist/useHoldPress.js.map +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/* The refreshed-chat switch as AgentChat hands it down to parts that sit in
|
|
3
|
+
* the composer area (the TodoBar), so their call sites need no gate prop.
|
|
4
|
+
* Outside an AgentChat it is off, which is today's rendering. */
|
|
5
|
+
import { createContext, useContext } from 'react';
|
|
6
|
+
const Ctx = createContext(false);
|
|
7
|
+
export function ChatRefreshScope(p) {
|
|
8
|
+
return _jsx(Ctx.Provider, { value: p.on, children: p.children });
|
|
9
|
+
}
|
|
10
|
+
/** True inside an AgentChat running with the refreshed transcript. */
|
|
11
|
+
export function useChatRefreshScope() {
|
|
12
|
+
return useContext(Ctx);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=chatRefreshContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatRefreshContext.js","sourceRoot":"","sources":["../chatRefreshContext.tsx"],"names":[],"mappings":";AAAA;;iEAEiE;AACjE,OAAO,EAAE,aAAa,EAAE,UAAU,EAA4B,MAAM,OAAO,CAAC;AAE5E,MAAM,GAAG,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAEjC,MAAM,UAAU,gBAAgB,CAAC,CAAuC;IACtE,OAAO,KAAC,GAAG,CAAC,QAAQ,IAAC,KAAK,EAAE,CAAC,CAAC,EAAE,YAAG,CAAC,CAAC,QAAQ,GAAgB,CAAC;AAChE,CAAC;AAED,sEAAsE;AACtE,MAAM,UAAU,mBAAmB;IACjC,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { TranscriptSkin } from './transcriptSkin';
|
|
2
2
|
/** A skin's words for chat parts. Every field is optional: a missing one means
|
|
3
|
-
* the part keeps today's words. Parts that show one of these
|
|
4
|
-
*
|
|
5
|
-
* reading the idiom. */
|
|
3
|
+
* the part keeps today's words. Parts that show one of these are named by the
|
|
4
|
+
* skin's word and then their plain words (skinName), so the meaning never
|
|
5
|
+
* depends on reading the idiom. */
|
|
6
6
|
export interface ChatWords {
|
|
7
7
|
send?: string;
|
|
8
8
|
queue?: string;
|
|
@@ -45,9 +45,16 @@ export interface ChatSkinValue {
|
|
|
45
45
|
}
|
|
46
46
|
export declare const ChatSkinContext: import("react").Context<ChatSkinValue>;
|
|
47
47
|
export declare function useChatSkin(): ChatSkinValue;
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
48
|
+
/** The accessible name of a control that shows a skin's word: the word it
|
|
49
|
+
* shows, then its plain meaning ("GO, Allow"), so voice control finds it by
|
|
50
|
+
* what is on screen (label in name) and a screen reader still hears what it
|
|
51
|
+
* does. Undefined when there is no skin word, or when the word already says
|
|
52
|
+
* the plain meaning ("allow once" for "Allow once"): the visible text is then
|
|
53
|
+
* the name. */
|
|
54
|
+
export declare function skinName(word: string | undefined, plain: string): string | undefined;
|
|
55
|
+
/** Props for a control showing a skin's word: the skinName as its accessible
|
|
56
|
+
* name, its plain meaning as its tooltip. With no skin word it adds nothing,
|
|
57
|
+
* so an unskinned control is exactly as before. */
|
|
51
58
|
export declare function plainName(word: string | undefined, label: string): {
|
|
52
59
|
'aria-label'?: string;
|
|
53
60
|
title?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatSkinContext.d.ts","sourceRoot":"","sources":["../chatSkinContext.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;;
|
|
1
|
+
{"version":3,"file":"chatSkinContext.d.ts","sourceRoot":"","sources":["../chatSkinContext.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;;mCAGmC;AACnC,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mFAAmF;IACnF,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACtC,gFAAgF;IAChF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;sFACkF;IAClF,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACxD,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,cAAc,CAAC;IACrB,+DAA+D;IAC/D,IAAI,EAAE,OAAO,CAAC;IACd,gDAAgD;IAChD,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,SAAS,CAAC;CAClB;AAED,eAAO,MAAM,eAAe,wCAA2F,CAAC;AAExH,wBAAgB,WAAW,IAAI,aAAa,CAE3C;AAED;;;;;eAKe;AACf,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGpF;AAED;;mDAEmD;AACnD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAI5G"}
|
package/dist/chatSkinContext.js
CHANGED
|
@@ -7,10 +7,24 @@ export const ChatSkinContext = createContext({ skin: 'default', chat: false, hea
|
|
|
7
7
|
export function useChatSkin() {
|
|
8
8
|
return useContext(ChatSkinContext);
|
|
9
9
|
}
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
/** The accessible name of a control that shows a skin's word: the word it
|
|
11
|
+
* shows, then its plain meaning ("GO, Allow"), so voice control finds it by
|
|
12
|
+
* what is on screen (label in name) and a screen reader still hears what it
|
|
13
|
+
* does. Undefined when there is no skin word, or when the word already says
|
|
14
|
+
* the plain meaning ("allow once" for "Allow once"): the visible text is then
|
|
15
|
+
* the name. */
|
|
16
|
+
export function skinName(word, plain) {
|
|
17
|
+
if (!word || word.toLowerCase().includes(plain.toLowerCase()))
|
|
18
|
+
return undefined;
|
|
19
|
+
return `${word}, ${plain}`;
|
|
20
|
+
}
|
|
21
|
+
/** Props for a control showing a skin's word: the skinName as its accessible
|
|
22
|
+
* name, its plain meaning as its tooltip. With no skin word it adds nothing,
|
|
23
|
+
* so an unskinned control is exactly as before. */
|
|
13
24
|
export function plainName(word, label) {
|
|
14
|
-
|
|
25
|
+
if (!word)
|
|
26
|
+
return {};
|
|
27
|
+
const name = skinName(word, label);
|
|
28
|
+
return name ? { 'aria-label': name, title: label } : { title: label };
|
|
15
29
|
}
|
|
16
30
|
//# sourceMappingURL=chatSkinContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatSkinContext.js","sourceRoot":"","sources":["../chatSkinContext.ts"],"names":[],"mappings":"AAAA;;;mCAGmC;AACnC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AA6ClD,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAgB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;AAExH,MAAM,UAAU,WAAW;IACzB,OAAO,UAAU,CAAC,eAAe,CAAC,CAAC;AACrC,CAAC;AAED;;
|
|
1
|
+
{"version":3,"file":"chatSkinContext.js","sourceRoot":"","sources":["../chatSkinContext.ts"],"names":[],"mappings":"AAAA;;;mCAGmC;AACnC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AA6ClD,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAgB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;AAExH,MAAM,UAAU,WAAW;IACzB,OAAO,UAAU,CAAC,eAAe,CAAC,CAAC;AACrC,CAAC;AAED;;;;;eAKe;AACf,MAAM,UAAU,QAAQ,CAAC,IAAwB,EAAE,KAAa;IAC9D,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QAAE,OAAO,SAAS,CAAC;IAChF,OAAO,GAAG,IAAI,KAAK,KAAK,EAAE,CAAC;AAC7B,CAAC;AAED;;mDAEmD;AACnD,MAAM,UAAU,SAAS,CAAC,IAAwB,EAAE,KAAa;IAC/D,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACnC,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AACxE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatSkinCss.d.ts","sourceRoot":"","sources":["../chatSkinCss.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"chatSkinCss.d.ts","sourceRoot":"","sources":["../chatSkinCss.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA+RvD,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAYnD,CAAC"}
|
package/dist/chatSkinCss.js
CHANGED
|
@@ -1,30 +1,57 @@
|
|
|
1
|
+
import { RETRO_PILL } from './transcriptSkinCss';
|
|
1
2
|
const C = (skin) => `[data-chat-skin="${skin}"]`;
|
|
2
3
|
const P = (skin, part) => `${C(skin)} [data-chat-part="${part}"]`;
|
|
4
|
+
/* The approval card (packages/ui-kit ApprovalCard) in all three places it
|
|
5
|
+
* renders: on the rail, alone under the transcript (summary view, no live
|
|
6
|
+
* rail), and under a sub-agent's row. The alone card sits outside every
|
|
7
|
+
* transcript skin rule, so its rules live here. Deny stays an outline in the
|
|
8
|
+
* skin's own red and Allow a filled button, so they never read as twins; the
|
|
9
|
+
* buttons keep the kit's 44px height (no rule here sizes them). On a mark
|
|
10
|
+
* skin no rule sets content on the wrapper's ::before: that is where the
|
|
11
|
+
* transcript skin puts the needs-you mark. On the VT323 skins (crt, handheld)
|
|
12
|
+
* the card takes the chat's mono face (--chat-font): on the rail it sits in
|
|
13
|
+
* the transcript's VT323, which reads at about half the kit's 12-15px.
|
|
14
|
+
*
|
|
15
|
+
* The run's "Recovering" line ([data-chat-part="recovery"], AgentChat) reads
|
|
16
|
+
* its inline colour from --chat-recovery, falling back to --warning. A skin
|
|
17
|
+
* whose --warning does not reach 4.5:1 on its ground sets it there, and the
|
|
18
|
+
* VT323 skins give the line the mono face too (chatSkinRecovery.test.ts). */
|
|
19
|
+
const A = (skin) => `${C(skin)} :is([data-tx-part="approval"], [data-tx-part="subagent-approval"])`;
|
|
3
20
|
const M = 'mission';
|
|
4
21
|
/* The header's status reads from data-chat-running, which AgentChat sets only
|
|
5
22
|
* while a run is live: LIVE is never shown for an idle chat. The transcript's
|
|
6
23
|
* own log heading says LIVE unconditionally, so under the chat skin it drops
|
|
7
24
|
* the word and leaves live state to the header. Buttons do not inherit the
|
|
8
25
|
* font by default; inside the chat's own parts they take the skin's (not in
|
|
9
|
-
* the header, where a host's buttons live).
|
|
26
|
+
* the header, where a host's buttons live). The approval card is a GO / NO-GO
|
|
27
|
+
* poll on the console panel, under an amber rule; GO is filled green and
|
|
28
|
+
* NO-GO outlined red. The budget card's own title already says GO / NO-GO POLL,
|
|
29
|
+
* so its heading is left off: that card is the one whose Allow is named
|
|
30
|
+
* "GO, Continue" (skinName, steps/approval.ts), and a screen reader hears the
|
|
31
|
+
* poll once. */
|
|
10
32
|
const mission = `
|
|
11
33
|
${C(M)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
12
34
|
${C(M)} [data-tx-skin] [data-tx-part="list"]::before { content: "MISSION LOG"; color: #7890a5; }
|
|
13
35
|
${P(M, 'header')} { background: #0f1821; text-transform: uppercase; letter-spacing: 0.06em; }
|
|
14
|
-
${P(M, 'header')}::before { content: "\\25CB STANDBY"; color: #7890a5; font-size:
|
|
36
|
+
${P(M, 'header')}::before { content: "\\25CB STANDBY"; color: #7890a5; font-size: 12px; letter-spacing: 0.14em; white-space: nowrap; }
|
|
15
37
|
${P(M, 'header')}[data-chat-running]::before { content: "\\25CF LIVE"; color: #3ddc84; }
|
|
16
38
|
${P(M, 'ctx')} { --accent: #3ddc84; --surface-3: #16222d; --surface-1: #0f1821; }
|
|
17
39
|
${P(M, 'ctx-fill')} { -webkit-mask: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 8px); mask: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 8px); }
|
|
18
|
-
${P(M, 'ctx-label')} { color: #7890a5; font-size:
|
|
40
|
+
${P(M, 'ctx-label')} { color: #7890a5; font-size: 12px; letter-spacing: 0.14em; }
|
|
19
41
|
${P(M, 'perm')} { --grad-brand: #3ddc84; --text-on-accent: #0b1117; --warning-soft: #1a1409; }
|
|
20
42
|
${P(M, 'perm-head')} { text-transform: uppercase; letter-spacing: 0.12em; --text-primary: #ffb454; }
|
|
21
43
|
${P(M, 'perm-head')}::before { content: ""; display: inline-block; width: 8px; height: 8px; background: #ffb454; animation: chat-mc-blink 1s steps(1) infinite; }
|
|
22
44
|
${P(M, 'perm-session')} { --text-secondary: #3ddc84; --border-default: #3ddc84; letter-spacing: 0.1em; }
|
|
23
45
|
${P(M, 'perm-deny')} { --text-secondary: #ff5d5d; --border-default: #ff5d5d; letter-spacing: 0.1em; }
|
|
24
46
|
${P(M, 'perm-go')} { letter-spacing: 0.1em; }
|
|
25
|
-
${P(M, 'tray')} > :first-child::before { content: "CONSOLE"; margin-right: 8px; color: #7890a5; font-size:
|
|
47
|
+
${P(M, 'tray')} > :first-child::before { content: "CONSOLE"; margin-right: 8px; color: #7890a5; font-size: 12px; letter-spacing: 0.14em; }
|
|
26
48
|
${P(M, 'send')}, ${P(M, 'stop')}, ${P(M, 'queue')} { letter-spacing: 0.12em; }
|
|
27
49
|
${P(M, 'tasks')} { text-transform: uppercase; letter-spacing: 0.08em; }
|
|
50
|
+
${A(M)} .kit-approval { border: 1px solid #22313f; border-radius: 0; background: #0f1821; box-shadow: inset 0 2px 0 #ffb454; }
|
|
51
|
+
${A(M)} .kit-approval:not(:has([aria-label$=", Continue"]))::before { content: "GO / NO-GO"; display: block; color: #ffb454; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; }
|
|
52
|
+
${A(M)} .kit-approval__title { text-transform: uppercase; letter-spacing: 0.06em; }
|
|
53
|
+
${A(M)} .kit-btn--primary { background: #3ddc84; color: #0b1117; border-radius: 3px; letter-spacing: 0.1em; }
|
|
54
|
+
${A(M)} .kit-btn--danger { background: transparent; color: #ff5d5d; border-color: #ff5d5d; border-radius: 3px; letter-spacing: 0.1em; }
|
|
28
55
|
@keyframes chat-mc-blink { 50% { opacity: 0; } }
|
|
29
56
|
@media (prefers-reduced-motion: reduce) {
|
|
30
57
|
${P(M, 'perm-head')}::before { animation: none; }
|
|
@@ -37,21 +64,26 @@ const T = 'terminal';
|
|
|
37
64
|
const terminal = `
|
|
38
65
|
${C(T)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
39
66
|
${P(T, 'header')} { background: #0d1014; }
|
|
40
|
-
${P(T, 'header')}::before { content: "[idle]"; color: #7d8a9a; font-size:
|
|
67
|
+
${P(T, 'header')}::before { content: "[idle]"; color: #7d8a9a; font-size: 12px; white-space: nowrap; }
|
|
41
68
|
${P(T, 'header')}[data-chat-running]::before { content: "[running]"; color: #7ee787; }
|
|
42
69
|
${P(T, 'ctx')} { --surface-1: #0d1014; --accent: #7ee787; }
|
|
43
70
|
${P(T, 'ctx-fill')} { -webkit-mask: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 9px); mask: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 9px); }
|
|
44
|
-
${P(T, 'ctx-label')} { color: #5fb3f9; font-size:
|
|
71
|
+
${P(T, 'ctx-label')} { color: #5fb3f9; font-size: 12px; }
|
|
45
72
|
${P(T, 'perm')} { --warning: transparent; --warning-soft: transparent; box-shadow: inset 2px 0 0 #f2c46d; }
|
|
46
73
|
${P(T, 'perm-head')} { --text-primary: #f2c46d; }
|
|
47
74
|
${P(T, 'perm-go')} { --grad-brand: transparent; --text-on-accent: #7ee787; }
|
|
48
75
|
${P(T, 'perm-session')} { --surface-1: transparent; --border-default: #26303b; --text-secondary: #a3afbe; }
|
|
49
76
|
${P(T, 'perm-deny')} { --surface-1: transparent; --border-default: #26303b; --text-secondary: #ff7b72; }
|
|
77
|
+
${A(T)} .kit-approval { border: 1px dashed #f2c46d; border-radius: 0; background: transparent; }
|
|
78
|
+
${A(T)} .kit-approval__title::before { content: "? "; color: #f2c46d; }
|
|
79
|
+
${A(T)} .kit-btn--primary { background: #7ee787; color: #0d1014; border-radius: 0; }
|
|
80
|
+
${A(T)} .kit-btn--danger { background: transparent; color: #ff7b72; border-color: #ff7b72; border-radius: 0; }
|
|
50
81
|
`;
|
|
51
82
|
const PA = 'paper';
|
|
52
83
|
/* A memo in a serif reading column: small capitals for headings, a double
|
|
53
84
|
* rule over the approval, italic asides. Paper shows no idle status; while a
|
|
54
|
-
* run is live the header says "Working", which is what the agent is doing.
|
|
85
|
+
* run is live the header says "Working", which is what the agent is doing.
|
|
86
|
+
* The approval card is ruled top and bottom, its title in the serif face. */
|
|
55
87
|
const paper = `
|
|
56
88
|
${C(PA)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
57
89
|
${P(PA, 'header')} { background: #f7f3ea; font-variant: small-caps; letter-spacing: 0.03em; }
|
|
@@ -63,6 +95,11 @@ ${P(PA, 'perm-head')} { --text-primary: #2a2621; font-variant: small-caps; lette
|
|
|
63
95
|
${P(PA, 'perm-go')} { --grad-brand: #8a5a2b; --text-on-accent: #fffdf7; }
|
|
64
96
|
${P(PA, 'perm-deny')} { --text-secondary: #a8412f; }
|
|
65
97
|
${P(PA, 'tasks')}, ${P(PA, 'followups')} { font-style: italic; }
|
|
98
|
+
${A(PA)} .kit-approval { border-color: transparent; border-top: 1px solid #ddd3c2; border-bottom: 1px solid #ddd3c2; border-radius: 0; background: #fffdf7; }
|
|
99
|
+
${A(PA)} .kit-approval__title { font-family: var(--tx-font); }
|
|
100
|
+
${P(PA, 'recovery')} { --chat-recovery: #745c24; }
|
|
101
|
+
${A(PA)} .kit-btn--primary { background: #8a5a2b; color: #fffdf7; border-radius: 2px; }
|
|
102
|
+
${A(PA)} .kit-btn--danger { background: transparent; color: #a23f2d; border-color: #a23f2d; border-radius: 2px; }
|
|
66
103
|
`;
|
|
67
104
|
const CR = 'crt';
|
|
68
105
|
/* Amber phosphor over the whole chat: one scanline layer and one glow on the
|
|
@@ -80,16 +117,22 @@ ${C(CR)} [data-tx-skin="crt"]::after { content: none; }
|
|
|
80
117
|
${C(CR)} [data-chat-part] { --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace; }
|
|
81
118
|
${C(CR)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
82
119
|
${P(CR, 'header')} { background: #120c05; }
|
|
83
|
-
${P(CR, 'header')}::before { content: "[IDLE]"; color: #b8843a; font-size:
|
|
120
|
+
${P(CR, 'header')}::before { content: "[IDLE]"; color: #b8843a; font-size: 12px; white-space: nowrap; }
|
|
84
121
|
${P(CR, 'header')}[data-chat-running]::before { content: "[BUSY]"; color: #ffd08a; }
|
|
85
122
|
${P(CR, 'ctx')} { --surface-1: #120c05; --accent: #ffb347; }
|
|
86
123
|
${P(CR, 'ctx-fill')} { -webkit-mask: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 9px); mask: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 9px); }
|
|
87
|
-
${P(CR, 'ctx-label')} { color: #ffd08a; font-size:
|
|
124
|
+
${P(CR, 'ctx-label')} { color: #ffd08a; font-size: 12px; }
|
|
88
125
|
${P(CR, 'perm')} { --warning: transparent; --warning-soft: transparent; box-shadow: inset 2px 0 0 #ffd08a; }
|
|
89
126
|
${P(CR, 'perm-head')} { --text-primary: #ffd08a; }
|
|
90
127
|
${P(CR, 'perm-go')} { --grad-brand: transparent; --text-on-accent: #ffd08a; }
|
|
91
128
|
${P(CR, 'perm-session')} { --surface-1: transparent; --border-default: #3a2a12; --text-secondary: #d99a3f; }
|
|
92
129
|
${P(CR, 'perm-deny')} { --surface-1: transparent; --border-default: #3a2a12; --text-secondary: #ff6a3d; }
|
|
130
|
+
${A(CR)} .kit-approval { border: 1px solid #ffd08a; border-radius: 0; background: #120c05; font-family: var(--chat-font); }
|
|
131
|
+
${P(CR, 'recovery')} { font-family: var(--chat-font); }
|
|
132
|
+
${A(CR)} .kit-approval__title { text-transform: uppercase; }
|
|
133
|
+
${A(CR)} .kit-approval__title::before { content: "??"; display: inline-block; margin-right: 1ch; padding: 0 4px; background: #ffd08a; color: #0a0703; text-shadow: none; }
|
|
134
|
+
${A(CR)} .kit-btn--primary { background: #ffb347; color: #0a0703; border-radius: 0; text-shadow: none; }
|
|
135
|
+
${A(CR)} .kit-btn--danger { background: transparent; color: #ff6a3d; border-color: #ff6a3d; border-radius: 0; }
|
|
93
136
|
`;
|
|
94
137
|
const IR = 'irc';
|
|
95
138
|
/* A chat client: the header and the task line are blue status bars, the
|
|
@@ -97,7 +140,7 @@ const IR = 'irc';
|
|
|
97
140
|
const irc = `
|
|
98
141
|
${C(IR)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
99
142
|
${P(IR, 'header')} { background: #1c2b3a; }
|
|
100
|
-
${P(IR, 'header')}::before { content: "-!- idle"; color: #8b949e; font-size:
|
|
143
|
+
${P(IR, 'header')}::before { content: "-!- idle"; color: #8b949e; font-size: 12px; white-space: nowrap; }
|
|
101
144
|
${P(IR, 'header')}[data-chat-running]::before { content: "-!- busy"; color: #3fb950; }
|
|
102
145
|
${P(IR, 'ctx')} { --surface-1: #151b21; --accent: #79c0ff; }
|
|
103
146
|
${P(IR, 'ctx-label')} { color: #e6edf3; }
|
|
@@ -107,23 +150,32 @@ ${P(IR, 'perm-go')} { --grad-brand: transparent; --text-on-accent: #3fb950; }
|
|
|
107
150
|
${P(IR, 'perm-session')} { --surface-1: transparent; --border-default: #262e36; --text-secondary: #79c0ff; }
|
|
108
151
|
${P(IR, 'perm-deny')} { --surface-1: transparent; --border-default: #262e36; --text-secondary: #ff7b72; }
|
|
109
152
|
${P(IR, 'tasks')} { --surface-2: #1c2b3a; --border-subtle: #1c2b3a; }
|
|
153
|
+
${A(IR)} .kit-approval { border-color: transparent; border-radius: 0; background: transparent; padding-left: 0; padding-right: 0; }
|
|
154
|
+
${A(IR)} .kit-approval__title::before { content: "-!- "; color: #e3b341; }
|
|
155
|
+
${A(IR)} .kit-btn--primary { background: #3fb950; color: #101418; border-radius: 0; }
|
|
156
|
+
${A(IR)} .kit-btn--danger { background: transparent; color: #ff7b72; border-color: #ff7b72; border-radius: 0; }
|
|
110
157
|
`;
|
|
111
158
|
const BP = 'blueprint';
|
|
112
159
|
/* A drafting sheet: uppercase labels with tracking, the approval a dashed
|
|
113
|
-
* callout, the composer a title block. "IN PROGRESS"
|
|
114
|
-
* live; an idle sheet shows no status. */
|
|
160
|
+
* callout (its title a REQ line), the composer a title block. "IN PROGRESS"
|
|
161
|
+
* shows only while a run is live; an idle sheet shows no status. */
|
|
115
162
|
const blueprint = `
|
|
116
163
|
${C(BP)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
117
164
|
${P(BP, 'header')} { background: rgba(14,58,107,0.94); text-transform: uppercase; letter-spacing: 0.08em; }
|
|
118
|
-
${P(BP, 'header')}[data-chat-running]::before { content: "IN PROGRESS"; color: #ffe28a; font-size:
|
|
165
|
+
${P(BP, 'header')}[data-chat-running]::before { content: "IN PROGRESS"; color: #ffe28a; font-size: 12px; letter-spacing: 0.12em; white-space: nowrap; }
|
|
119
166
|
${P(BP, 'ctx')} { --surface-1: rgba(14,58,107,0.94); --accent: #9fd0ff; }
|
|
120
|
-
${P(BP, 'ctx-label')} { color: #7fc4ff; font-size:
|
|
167
|
+
${P(BP, 'ctx-label')} { color: #7fc4ff; font-size: 12px; letter-spacing: 0.12em; }
|
|
121
168
|
${P(BP, 'perm')} { --warning: transparent; outline: 1px dashed #ffe28a; outline-offset: -1px; }
|
|
122
169
|
${P(BP, 'perm-head')} { --text-primary: #ffe28a; text-transform: uppercase; letter-spacing: 0.1em; }
|
|
123
170
|
${P(BP, 'perm-go')} { --grad-brand: #9fd0ff; --text-on-accent: #0e3a6b; letter-spacing: 0.08em; }
|
|
124
171
|
${P(BP, 'perm-session')} { --border-default: #9fd0ff; letter-spacing: 0.08em; }
|
|
125
172
|
${P(BP, 'perm-deny')} { --text-secondary: #ff9f7a; --border-default: #ff9f7a; letter-spacing: 0.08em; }
|
|
126
173
|
${P(BP, 'send')}, ${P(BP, 'stop')}, ${P(BP, 'queue')}, ${P(BP, 'tasks')} { letter-spacing: 0.1em; }
|
|
174
|
+
${A(BP)} .kit-approval { border: 1px dashed #ffe28a; border-radius: 0; background: #0e3a6b; }
|
|
175
|
+
${A(BP)} .kit-approval__title { text-transform: uppercase; letter-spacing: 0.06em; }
|
|
176
|
+
${A(BP)} .kit-approval__title::before { content: "REQ "; color: #ffe28a; letter-spacing: 0.1em; }
|
|
177
|
+
${A(BP)} .kit-btn--primary { background: #9fd0ff; color: #0e3a6b; border-radius: 0; }
|
|
178
|
+
${A(BP)} .kit-btn--danger { background: transparent; color: #ffa481; border-color: #ffa481; border-radius: 0; }
|
|
127
179
|
`;
|
|
128
180
|
const MI = 'minimal';
|
|
129
181
|
/* Quiet: no cards. The permission prompt is a line with a warm left rule. */
|
|
@@ -132,31 +184,50 @@ ${C(MI)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: i
|
|
|
132
184
|
${P(MI, 'ctx')} { --accent: #8a857e; --surface-3: #262422; }
|
|
133
185
|
${P(MI, 'perm')} { --warning: transparent; box-shadow: inset 2px 0 0 #d9b36c; }
|
|
134
186
|
${P(MI, 'perm-go')} { --grad-brand: #e9e6e1; --text-on-accent: #191817; }
|
|
187
|
+
${A(MI)} .kit-approval { border-color: transparent; border-radius: 0; background: transparent; box-shadow: inset 2px 0 0 #d9b36c; }
|
|
188
|
+
${A(MI)} .kit-btn--primary { background: #e9e6e1; color: #191817; }
|
|
189
|
+
${A(MI)} .kit-btn--danger { background: transparent; color: #e0776b; border-color: #e0776b; }
|
|
135
190
|
`;
|
|
136
191
|
const HH = 'handheld';
|
|
137
192
|
/* Four greens. The permission prompt is a dialogue box with a double border;
|
|
138
|
-
* the header shows "RUNNING" only while a run is live.
|
|
193
|
+
* the header shows "RUNNING" only while a run is live. The approval card is
|
|
194
|
+
* the same text box as an answer, with its bobbing arrow (moved, never faded;
|
|
195
|
+
* still under reduced motion), on the card, not its wrapper, where the
|
|
196
|
+
* transcript skin puts the ! mark. */
|
|
139
197
|
const handheld = `
|
|
140
198
|
${C(HH)} [data-chat-part] { --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace; }
|
|
141
199
|
${C(HH)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
142
200
|
${P(HH, 'header')} { background: #8bac0f; }
|
|
143
|
-
${P(HH, 'header')}[data-chat-running]::before { content: "RUNNING"; color: #0f380f; font-size:
|
|
201
|
+
${P(HH, 'header')}[data-chat-running]::before { content: "RUNNING"; color: #0f380f; font-size: 12px; white-space: nowrap; }
|
|
144
202
|
${P(HH, 'ctx')} { --surface-1: #8bac0f; --surface-3: #9bbc0f; --accent: #0f380f; }
|
|
145
203
|
${P(HH, 'ctx-fill')} { -webkit-mask: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 9px); mask: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 9px); }
|
|
146
|
-
${P(HH, 'ctx-label')} { color: #0f380f; font-size:
|
|
204
|
+
${P(HH, 'ctx-label')} { color: #0f380f; font-size: 12px; }
|
|
147
205
|
${P(HH, 'perm')} { --warning: #0f380f; box-shadow: inset 0 0 0 2px #9bbc0f, inset 0 0 0 4px #306230; }
|
|
148
206
|
${P(HH, 'perm-head')} { --text-primary: #0f380f; }
|
|
149
207
|
${P(HH, 'perm-go')} { --grad-brand: #0f380f; --text-on-accent: #9bbc0f; }
|
|
150
208
|
${P(HH, 'perm-session')} { --surface-1: #9bbc0f; --border-default: #306230; --text-secondary: #0f380f; }
|
|
151
209
|
${P(HH, 'perm-deny')} { --surface-1: #9bbc0f; --border-default: #306230; --text-secondary: #0f380f; }
|
|
210
|
+
${A(HH)} .kit-approval { position: relative; margin: 3px; border: 0; border-radius: 0; background: #9bbc0f; color: #0f380f; box-shadow: 0 0 0 3px #0f380f, inset 0 0 0 2px #9bbc0f, inset 0 0 0 4px #306230; font-family: var(--chat-font); }
|
|
211
|
+
${A(HH)} .kit-approval::after { content: ""; position: absolute; right: 12px; bottom: 6px; border: 5px solid transparent; border-top: 6px solid #0f380f; border-bottom: 0; pointer-events: none; animation: chat-hh-bob 1s steps(2) infinite; }
|
|
212
|
+
${A(HH)} .kit-approval__who, ${A(HH)} .kit-approval__folder { opacity: 1; }
|
|
213
|
+
${P(HH, 'recovery')} { --chat-recovery: #0f380f; font-family: var(--chat-font); }
|
|
214
|
+
${A(HH)} .kit-btn--primary { background: #0f380f; color: #9bbc0f; border-radius: 0; }
|
|
215
|
+
${A(HH)} .kit-btn--danger { background: transparent; color: #0f380f; border-color: #0f380f; border-radius: 0; }
|
|
216
|
+
@keyframes chat-hh-bob { 50% { transform: translateY(2px); } }
|
|
217
|
+
@media (prefers-reduced-motion: reduce) {
|
|
218
|
+
${A(HH)} .kit-approval::after { animation: none; }
|
|
219
|
+
}
|
|
152
220
|
`;
|
|
153
221
|
const RC = 'receipt';
|
|
154
|
-
/* A thermal slip: the approval is a dashed authorization block
|
|
155
|
-
*
|
|
222
|
+
/* A thermal slip: the approval is a dashed authorization block headed SIGN
|
|
223
|
+
* HERE (on the card, not on its wrapper, where the transcript skin puts the
|
|
224
|
+
* SIGN mark), the header says "PRINTING" only while a run is live (the reply
|
|
225
|
+
* is being printed). On the rail the wrapper already reads SIGN, so the card
|
|
226
|
+
* there has no heading: the word is said once. */
|
|
156
227
|
const receipt = `
|
|
157
228
|
${C(RC)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
158
229
|
${P(RC, 'header')} { background: #fbfaf6; text-transform: uppercase; letter-spacing: 0.06em; }
|
|
159
|
-
${P(RC, 'header')}[data-chat-running]::before { content: "PRINTING"; color: #444444; font-size:
|
|
230
|
+
${P(RC, 'header')}[data-chat-running]::before { content: "PRINTING"; color: #444444; font-size: 12px; white-space: nowrap; }
|
|
160
231
|
${P(RC, 'ctx')} { --surface-1: #fbfaf6; --surface-3: #e7e2d8; --accent: #222222; text-transform: uppercase; }
|
|
161
232
|
${P(RC, 'ctx-fill')} { -webkit-mask: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 3px); mask: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 3px); }
|
|
162
233
|
${P(RC, 'perm')} { --warning: transparent; outline: 1px dashed #999999; outline-offset: -1px; }
|
|
@@ -164,16 +235,23 @@ ${P(RC, 'perm-head')} { --text-primary: #222222; letter-spacing: 0.06em; }
|
|
|
164
235
|
${P(RC, 'perm-go')} { --grad-brand: #222222; --text-on-accent: #fbfaf6; letter-spacing: 0.06em; }
|
|
165
236
|
${P(RC, 'perm-deny')} { --text-secondary: #a3261b; letter-spacing: 0.06em; }
|
|
166
237
|
${P(RC, 'send')}, ${P(RC, 'stop')}, ${P(RC, 'queue')} { letter-spacing: 0.06em; }
|
|
238
|
+
${A(RC)} .kit-approval { border-color: transparent; border-radius: 0; outline: 1px dashed #999999; outline-offset: -1px; background: #fbfaf6; }
|
|
239
|
+
${C(RC)} [data-tx-part="approval"]:not([data-tx-status="needs-you"]) .kit-approval::before, ${C(RC)} [data-tx-part="subagent-approval"] .kit-approval::before { content: "SIGN HERE"; display: block; padding-bottom: 4px; border-bottom: 1px dashed #999999; text-align: center; font-weight: 700; letter-spacing: 0.2em; }
|
|
240
|
+
${A(RC)} .kit-btn--primary { background: #222222; color: #fbfaf6; border-radius: 0; }
|
|
241
|
+
${A(RC)} .kit-btn--danger { background: transparent; color: #8c1f16; border-color: #8c1f16; border-radius: 0; }
|
|
167
242
|
`;
|
|
168
243
|
const RT = 'retro';
|
|
169
244
|
const BEVEL_OUT = 'inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf';
|
|
170
245
|
const BEVEL_IN = 'inset 1px 1px #808080, inset -1px -1px #ffffff, inset 2px 2px #0a0a0a, inset -2px -2px #dfdfdf';
|
|
171
246
|
/* Grey bevels on a teal desktop: the header is a navy title bar, buttons are
|
|
172
|
-
* raised, the composer's text field is sunken white.
|
|
247
|
+
* raised, the composer's text field is sunken white. The approval card is a
|
|
248
|
+
* dialog window titled Confirm (the title on the card itself, inside the
|
|
249
|
+
* window). The step detail's status pill sits on white: its kit tint mixes
|
|
250
|
+
* into the teal desktop, where no status colour reads at 4.5:1 (M6). */
|
|
173
251
|
const retro = `
|
|
174
252
|
${C(RT)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
175
253
|
${P(RT, 'header')} { background: linear-gradient(90deg, #000080, #1084d0); --text-primary: #ffffff; --text-secondary: #ffffff; --text-tertiary: #dfe6f5; --border-subtle: #000080; }
|
|
176
|
-
${P(RT, 'header')}[data-chat-running]::before { content: "Busy"; color: #ffffff; font-size:
|
|
254
|
+
${P(RT, 'header')}[data-chat-running]::before { content: "Busy"; color: #ffffff; font-size: 12px; white-space: nowrap; }
|
|
177
255
|
${P(RT, 'ctx')} { --surface-1: #c0c0c0; --surface-3: #ffffff; --accent: #000080; --text-tertiary: #000000; }
|
|
178
256
|
${P(RT, 'ctx-fill')} { -webkit-mask: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 10px); mask: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 10px); }
|
|
179
257
|
${P(RT, 'perm')} { --warning: #808080; box-shadow: ${BEVEL_OUT}; }
|
|
@@ -185,6 +263,14 @@ ${P(RT, 'composer-box')} { --surface-2: #ffffff; box-shadow: ${BEVEL_IN}; }
|
|
|
185
263
|
${P(RT, 'composer-title')} { background: linear-gradient(90deg, #000080, #1084d0); --text-tertiary: #ffffff; --success: #ffffff; }
|
|
186
264
|
${P(RT, 'send')}, ${P(RT, 'stop')} { box-shadow: ${BEVEL_OUT}; }
|
|
187
265
|
${P(RT, 'tasks')} { --surface-2: #c0c0c0; --text-primary: #000000; --text-secondary: #000000; }
|
|
266
|
+
${A(RT)} .kit-approval { gap: 8px; padding: 3px 3px 10px; border: 0; border-radius: 0; background: #c0c0c0; color: #000000; box-shadow: ${BEVEL_OUT}; }
|
|
267
|
+
${A(RT)} .kit-approval::before { content: "Confirm"; display: block; padding: 2px 6px; background: linear-gradient(90deg, #000080, #0e6cb8); color: #ffffff; font-weight: 700; font-size: 12px; line-height: 16px; }
|
|
268
|
+
${A(RT)} .kit-approval > * { margin-left: 8px; margin-right: 8px; }
|
|
269
|
+
${A(RT)} .kit-approval__detail { border-radius: 0; background: #ffffff; box-shadow: ${BEVEL_IN}; }
|
|
270
|
+
${P(RT, 'recovery')} { --chat-recovery: #000000; padding: 2px 6px; background: #ffffff; box-shadow: ${BEVEL_IN}; }
|
|
271
|
+
${A(RT)} .kit-btn--primary { background: #c0c0c0; color: #000000; border-radius: 0; box-shadow: ${BEVEL_OUT}; outline: 1px solid #000000; outline-offset: -1px; }
|
|
272
|
+
${A(RT)} .kit-btn--danger { background: transparent; color: #800000; border-color: #800000; border-radius: 0; }
|
|
273
|
+
${C(RT)} ${RETRO_PILL}
|
|
188
274
|
`;
|
|
189
275
|
export const CHAT_CSS = {
|
|
190
276
|
default: '',
|
package/dist/chatSkinCss.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatSkinCss.js","sourceRoot":"","sources":["../chatSkinCss.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chatSkinCss.js","sourceRoot":"","sources":["../chatSkinCss.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,CAAC,GAAG,CAAC,IAAoB,EAAU,EAAE,CAAC,oBAAoB,IAAI,IAAI,CAAC;AACzE,MAAM,CAAC,GAAG,CAAC,IAAoB,EAAE,IAAY,EAAU,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,qBAAqB,IAAI,IAAI,CAAC;AAClG;;;;;;;;;;;;;;6EAc6E;AAC7E,MAAM,CAAC,GAAG,CAAC,IAAoB,EAAU,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,qEAAqE,CAAC;AAE5H,MAAM,CAAC,GAAmB,SAAS,CAAC;AACpC;;;;;;;;;;gBAUgB;AAChB,MAAM,OAAO,GAAG;EACd,CAAC,CAAC,CAAC,CAAC;EACJ,CAAC,CAAC,CAAC,CAAC;EACJ,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC;EACd,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC;EACd,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC;EACd,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC;EACX,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC;EAChB,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC;EACjB,CAAC,CAAC,CAAC,EAAE,MAAM,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CAAC,EAAE,EAAE,UAAU,CAAC,mFAAmF,QAAQ;EAC5G,CAAC,CAAC,EAAE,CAAC,2FAA2F,SAAS;EACzG,CAAC,CAAC,EAAE,CAAC;EACL,CAAC,CAAC,EAAE,CAAC,IAAI,UAAU;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAmC;IACtD,OAAO,EAAE,EAAE;IACX,QAAQ;IACR,GAAG;IACH,OAAO;IACP,KAAK;IACL,SAAS;IACT,GAAG;IACH,QAAQ;IACR,OAAO;IACP,OAAO;IACP,KAAK;CACN,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type ComposerAction = 'dictate' | 'send' | 'stop' | 'queue';
|
|
2
|
+
export interface ComposerState {
|
|
3
|
+
running: boolean;
|
|
4
|
+
hasContent: boolean;
|
|
5
|
+
dictating: boolean;
|
|
6
|
+
canQueue: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** Which verb the composer's one action button carries right now. A live mic
|
|
9
|
+
* holds it; a mic still getting ready (consent, download) does not, so Send and
|
|
10
|
+
* Stop stay reachable; its notice carries the progress and Cancel. */
|
|
11
|
+
export declare function composerAction(s: ComposerState): ComposerAction;
|
|
12
|
+
/** The send button's word: an ON toggle's sendLabel wins ("Generate"), else the host's sendLabel. */
|
|
13
|
+
export declare function sendWord(toggles: readonly {
|
|
14
|
+
sendLabel?: string;
|
|
15
|
+
}[], sendLabel: string): string;
|
|
16
|
+
//# sourceMappingURL=composerAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composerAction.d.ts","sourceRoot":"","sources":["../composerAction.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEnE,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;sEAEsE;AACtE,wBAAgB,cAAc,CAAC,CAAC,EAAE,aAAa,GAAG,cAAc,CAK/D;AAED,qGAAqG;AACrG,wBAAgB,QAAQ,CAAC,OAAO,EAAE,SAAS;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAG9F"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Which verb the composer's one action button carries right now. A live mic
|
|
2
|
+
* holds it; a mic still getting ready (consent, download) does not, so Send and
|
|
3
|
+
* Stop stay reachable; its notice carries the progress and Cancel. */
|
|
4
|
+
export function composerAction(s) {
|
|
5
|
+
if (s.dictating)
|
|
6
|
+
return 'dictate';
|
|
7
|
+
if (!s.running)
|
|
8
|
+
return s.hasContent ? 'send' : 'dictate';
|
|
9
|
+
if (!s.hasContent)
|
|
10
|
+
return 'stop';
|
|
11
|
+
return s.canQueue ? 'queue' : 'stop';
|
|
12
|
+
}
|
|
13
|
+
/** The send button's word: an ON toggle's sendLabel wins ("Generate"), else the host's sendLabel. */
|
|
14
|
+
export function sendWord(toggles, sendLabel) {
|
|
15
|
+
for (const t of toggles)
|
|
16
|
+
if (t.sendLabel)
|
|
17
|
+
return t.sendLabel;
|
|
18
|
+
return sendLabel;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=composerAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composerAction.js","sourceRoot":"","sources":["../composerAction.ts"],"names":[],"mappings":"AASA;;sEAEsE;AACtE,MAAM,UAAU,cAAc,CAAC,CAAgB;IAC7C,IAAI,CAAC,CAAC,SAAS;QAAE,OAAO,SAAS,CAAC;IAClC,IAAI,CAAC,CAAC,CAAC,OAAO;QAAE,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IACzD,IAAI,CAAC,CAAC,CAAC,UAAU;QAAE,OAAO,MAAM,CAAC;IACjC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;AACvC,CAAC;AAED,qGAAqG;AACrG,MAAM,UAAU,QAAQ,CAAC,OAA0C,EAAE,SAAiB;IACpF,KAAK,MAAM,CAAC,IAAI,OAAO;QAAE,IAAI,CAAC,CAAC,SAAS;YAAE,OAAO,CAAC,CAAC,SAAS,CAAC;IAC7D,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composerHistory.d.ts","sourceRoot":"","sources":["../composerHistory.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"composerHistory.d.ts","sourceRoot":"","sources":["../composerHistory.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA0BtE;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,MAAM,EAAE,CAYnE"}
|
package/dist/composerHistory.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { readCommandTurn } from './commandTurn';
|
|
2
|
+
import { splitPicks } from '@corenel/tools-web/composerPicks';
|
|
2
3
|
/** The prefix that makes a line a command. Kept in step with the host's
|
|
3
4
|
* COMMAND_PREFIX by the test that round-trips a recorded command. */
|
|
4
5
|
const COMMAND_PREFIX = '>';
|
|
@@ -32,7 +33,9 @@ export function composerHistory(turns) {
|
|
|
32
33
|
const out = [];
|
|
33
34
|
for (const turn of turns) {
|
|
34
35
|
const cmd = readCommandTurn(turn);
|
|
35
|
-
|
|
36
|
+
// A message sent with picks recalls its typed text only: the picks were
|
|
37
|
+
// one-shot, and their marked blocks are not something to edit and resend.
|
|
38
|
+
const entry = cmd ? `${COMMAND_PREFIX}${cmd.command}` : splitPicks(userText(turn) ?? '').text;
|
|
36
39
|
if (!entry)
|
|
37
40
|
continue;
|
|
38
41
|
if (out[out.length - 1] === entry)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composerHistory.js","sourceRoot":"","sources":["../composerHistory.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"composerHistory.js","sourceRoot":"","sources":["../composerHistory.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D;qEACqE;AACrE,MAAM,cAAc,GAAG,GAAG,CAAC;AAE3B,iEAAiE;AACjE,SAAS,QAAQ,CAAC,IAAsB;IACtC,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAqD,CAAC;IACnF,IAAI,KAAK,EAAE,IAAI,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IACxC,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC,OAAO,CAAC;IAC5D,4EAA4E;IAC5E,wCAAwC;IACxC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,GAAI,KAAK,CAAC,OAA8C;aAC/D,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,MAAM,IAAI,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC;aAC/D,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;aAClB,IAAI,CAAC,IAAI,CAAC;aACV,IAAI,EAAE,CAAC;QACV,OAAO,IAAI,IAAI,IAAI,CAAC;IACtB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,KAAyB;IACvD,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,GAAG,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;QAClC,wEAAwE;QACxE,0EAA0E;QAC1E,MAAM,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,cAAc,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;QAC9F,IAAI,CAAC,KAAK;YAAE,SAAS;QACrB,IAAI,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,KAAK;YAAE,SAAS;QAC5C,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveAnswer.d.ts","sourceRoot":"","sources":["../../fx/LiveAnswer.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"LiveAnswer.d.ts","sourceRoot":"","sources":["../../fx/LiveAnswer.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAyK5E,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAe,EAAE,OAAW,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE;IAC7F,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,aAAa,CAAC;IACtB;;6EAEyE;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,qBAuUA"}
|