@chai-ui/react 0.8.0 → 0.9.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/DESIGN.md +1 -0
- package/dist/Composer.d.ts +14 -4
- package/dist/Composer.d.ts.map +1 -1
- package/dist/Composer.js +70 -30
- package/dist/Composer.js.map +1 -1
- package/dist/MediaAnalyzer.js +1 -4
- package/dist/MediaAnalyzer.js.map +1 -1
- package/dist/ResultCard.d.ts.map +1 -1
- package/dist/ResultCard.js +1 -5
- package/dist/ResultCard.js.map +1 -1
- package/dist/icons.d.ts +4 -0
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +8 -0
- package/dist/icons.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/primitives/SearchMenu.d.ts.map +1 -1
- package/dist/primitives/SearchMenu.js +1 -4
- package/dist/primitives/SearchMenu.js.map +1 -1
- package/dist/style.css +93 -0
- package/dist/useComposer.d.ts +1 -1
- package/package.json +3 -3
- package/src/Composer.tsx +140 -36
- package/src/MediaAnalyzer.tsx +1 -9
- package/src/ResultCard.tsx +1 -13
- package/src/icons.tsx +21 -0
- package/src/index.ts +4 -0
- package/src/primitives/SearchMenu.tsx +1 -12
- package/src/style.css +93 -0
package/dist/icons.js
CHANGED
|
@@ -56,4 +56,12 @@ export function CloseSymbolIcon() {
|
|
|
56
56
|
export function StopIcon() {
|
|
57
57
|
return (_jsx("svg", { viewBox: "0 -960 960 960", "aria-hidden": "true", children: _jsx("path", { d: "M240-240v-480h480v480H240Z", fill: "currentColor" }) }));
|
|
58
58
|
}
|
|
59
|
+
/** Material Symbols "arrow_forward": Composer's submit and Media Analyzer's. */
|
|
60
|
+
export function ArrowForwardIcon() {
|
|
61
|
+
return (_jsx("svg", { viewBox: "0 -960 960 960", "aria-hidden": "true", children: _jsx("path", { d: "M686-450H160v-60h526L438-758l42-42 320 320-320 320-42-42 248-248Z", fill: "currentColor" }) }));
|
|
62
|
+
}
|
|
63
|
+
/** MD3 "check" (traced from Figma): a selected option row, a passed evaluation. Not `CheckSymbolIcon`, the Material Symbols path. */
|
|
64
|
+
export function CheckIcon() {
|
|
65
|
+
return (_jsx("svg", { viewBox: "0 0 18 18", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M7.1625 13.5L2.8875 9.225L3.95625 8.15625L7.1625 11.3625L14.0438 4.48125L15.1125 5.55L7.1625 13.5Z", fill: "currentColor" }) }));
|
|
66
|
+
}
|
|
59
67
|
//# sourceMappingURL=icons.js.map
|
package/dist/icons.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../src/icons.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AAEH,MAAM,UAAU,YAAY;IAC1B,OAAO,CACL,cAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,iBAAa,MAAM,YACrD,eACE,CAAC,EAAC,qNAAqN,EACvN,IAAI,EAAC,cAAc,GACnB,GACE,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,SAAS;IACvB,OAAO,CACL,cAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,iBAAa,MAAM,YACrD,eACE,CAAC,EAAC,uPAAuP,EACzP,IAAI,EAAC,cAAc,GACnB,GACE,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,OAAO,CACL,cAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,iBAAa,MAAM,YACrD,eACE,CAAC,EAAC,wCAAwC,EAC1C,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACtB,GACE,CACP,CAAC;AACJ,CAAC;AAED,kCAAkC;AAClC,MAAM,UAAU,UAAU;IACxB,OAAO,CACL,cAAK,OAAO,E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AAuD,EAAC,IAAI,EAAC,cAAc,GAAG,GAClF,CACP,CAAC;AACJ,CAAC;AAED,gCAAgC;AAChC,MAAM,UAAU,eAAe;IAC7B,OAAO,CACL,cAAK,OAAO,EAAC,gBAAgB,iBAAa,MAAM,YAC9C,eAAM,CAAC,EAAC,mGAAmG,EAAC,IAAI,EAAC,cAAc,GAAG,GAC9H,CACP,CAAC;AACJ,CAAC;AAED,sEAAsE;AACtE,uEAAuE;AACvE,sEAAsE;AACtE,mEAAmE;AACnE,2EAA2E;AAC3E,iDAAiD;AACjD,MAAM,UAAU,QAAQ;IACtB,OAAO,CACL,cAAK,OAAO,EAAC,gBAAgB,iBAAa,MAAM,YAC9C,eAAM,CAAC,EAAC,4BAA4B,EAAC,IAAI,EAAC,cAAc,GAAG,GACvD,CACP,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,gBAAgB;IAC9B,OAAO,CACL,cAAK,OAAO,EAAC,gBAAgB,iBAAa,MAAM,YAC9C,eAAM,CAAC,EAAC,mEAAmE,EAAC,IAAI,EAAC,cAAc,GAAG,GAC9F,CACP,CAAC;AACJ,CAAC;AAED,qIAAqI;AACrI,MAAM,UAAU,SAAS;IACvB,OAAO,CACL,cAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,iBAAa,MAAM,YACrD,eACE,CAAC,EAAC,oGAAoG,EACtG,IAAI,EAAC,cAAc,GACnB,GACE,CACP,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,6 @@ export * from "./EditCard.js";
|
|
|
6
6
|
export * from "./useComposer.js";
|
|
7
7
|
export * from "./ChaiProvider.js";
|
|
8
8
|
export * from "./useMediaAnalyzer.js";
|
|
9
|
-
export { createFalEngine, createOpenRouterEngine, createMockEngine, mockEngine, buildRegionEditPrompt, DEFAULT_MAX_REGIONS, PRECISE_EDIT_MODELS, ROUTING_MODEL_ID, GenerationError, DEFAULT_MEDIA_ANALYSIS_PROMPT_LENGTH, MEDIA_ANALYSIS_PROMPTS, MEDIA_ANALYSIS_PROMPT_LENGTHS, SUGGESTED_IMAGE_MODELS, SUGGESTED_TEXT_TO_VIDEO_MODELS, SUGGESTED_IMAGE_TO_VIDEO_MODELS, SUGGESTED_EDIT_MODELS, SUGGESTED_ANALYSIS_MODELS, suggestedModels, checkSuggestedModels, } from "@chai-ui/core";
|
|
10
|
-
export type { DroppedMedia, EditRegion, Evaluation, GenerationEngine, GenerationUseCase, MediaAnalysisKind, MediaAnalysisPromptLength, MediaKind, ModelOption, OutputKind, ParameterOption, RegionBox, RegionFormat, Request, Result, ResultStatus, Run, SuggestedModelProblem, SuggestedModelsCheck, FalInputFormat, Usage, } from "@chai-ui/core";
|
|
9
|
+
export { createFalEngine, createFalTranscriber, createOpenRouterEngine, createMockEngine, mockEngine, buildRegionEditPrompt, DEFAULT_MAX_REGIONS, PRECISE_EDIT_MODELS, ROUTING_MODEL_ID, GenerationError, DEFAULT_MEDIA_ANALYSIS_PROMPT_LENGTH, MEDIA_ANALYSIS_PROMPTS, MEDIA_ANALYSIS_PROMPT_LENGTHS, SUGGESTED_IMAGE_MODELS, SUGGESTED_TEXT_TO_VIDEO_MODELS, SUGGESTED_IMAGE_TO_VIDEO_MODELS, SUGGESTED_EDIT_MODELS, SUGGESTED_ANALYSIS_MODELS, suggestedModels, checkSuggestedModels, } from "@chai-ui/core";
|
|
10
|
+
export type { DroppedMedia, EditRegion, Evaluation, GenerationEngine, GenerationUseCase, MediaAnalysisKind, MediaAnalysisPromptLength, MediaKind, ModelOption, OutputKind, Transcribe, VoiceClip, VoiceInputConfig, ParameterOption, RegionBox, RegionFormat, Request, Result, ResultStatus, Run, SuggestedModelProblem, SuggestedModelsCheck, FalInputFormat, Usage, } from "@chai-ui/core";
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AAItC,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,oCAAoC,EACpC,sBAAsB,EACtB,6BAA6B,EAC7B,sBAAsB,EACtB,8BAA8B,EAC9B,+BAA+B,EAC/B,qBAAqB,EACrB,yBAAyB,EACzB,eAAe,EACf,oBAAoB,GACrB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,YAAY,EACZ,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,EACzB,SAAS,EACT,WAAW,EACX,UAAU,EACV,eAAe,EACf,SAAS,EACT,YAAY,EACZ,OAAO,EACP,MAAM,EACN,YAAY,EACZ,GAAG,EACH,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,KAAK,GACN,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AAItC,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,oCAAoC,EACpC,sBAAsB,EACtB,6BAA6B,EAC7B,sBAAsB,EACtB,8BAA8B,EAC9B,+BAA+B,EAC/B,qBAAqB,EACrB,yBAAyB,EACzB,eAAe,EACf,oBAAoB,GACrB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,YAAY,EACZ,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,EACzB,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,YAAY,EACZ,OAAO,EACP,MAAM,EACN,YAAY,EACZ,GAAG,EACH,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,KAAK,GACN,MAAM,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,5 +8,5 @@ export * from "./ChaiProvider.js";
|
|
|
8
8
|
export * from "./useMediaAnalyzer.js";
|
|
9
9
|
// Re-export the core engines and types so a consumer typically only needs
|
|
10
10
|
// to import from @chai-ui/react.
|
|
11
|
-
export { createFalEngine, createOpenRouterEngine, createMockEngine, mockEngine, buildRegionEditPrompt, DEFAULT_MAX_REGIONS, PRECISE_EDIT_MODELS, ROUTING_MODEL_ID, GenerationError, DEFAULT_MEDIA_ANALYSIS_PROMPT_LENGTH, MEDIA_ANALYSIS_PROMPTS, MEDIA_ANALYSIS_PROMPT_LENGTHS, SUGGESTED_IMAGE_MODELS, SUGGESTED_TEXT_TO_VIDEO_MODELS, SUGGESTED_IMAGE_TO_VIDEO_MODELS, SUGGESTED_EDIT_MODELS, SUGGESTED_ANALYSIS_MODELS, suggestedModels, checkSuggestedModels, } from "@chai-ui/core";
|
|
11
|
+
export { createFalEngine, createFalTranscriber, createOpenRouterEngine, createMockEngine, mockEngine, buildRegionEditPrompt, DEFAULT_MAX_REGIONS, PRECISE_EDIT_MODELS, ROUTING_MODEL_ID, GenerationError, DEFAULT_MEDIA_ANALYSIS_PROMPT_LENGTH, MEDIA_ANALYSIS_PROMPTS, MEDIA_ANALYSIS_PROMPT_LENGTHS, SUGGESTED_IMAGE_MODELS, SUGGESTED_TEXT_TO_VIDEO_MODELS, SUGGESTED_IMAGE_TO_VIDEO_MODELS, SUGGESTED_EDIT_MODELS, SUGGESTED_ANALYSIS_MODELS, suggestedModels, checkSuggestedModels, } from "@chai-ui/core";
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AAEtC,0EAA0E;AAC1E,iCAAiC;AACjC,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,oCAAoC,EACpC,sBAAsB,EACtB,6BAA6B,EAC7B,sBAAsB,EACtB,8BAA8B,EAC9B,+BAA+B,EAC/B,qBAAqB,EACrB,yBAAyB,EACzB,eAAe,EACf,oBAAoB,GACrB,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AAEtC,0EAA0E;AAC1E,iCAAiC;AACjC,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,oCAAoC,EACpC,sBAAsB,EACtB,6BAA6B,EAC7B,sBAAsB,EACtB,8BAA8B,EAC9B,+BAA+B,EAC/B,qBAAqB,EACrB,yBAAyB,EACzB,eAAe,EACf,oBAAoB,GACrB,MAAM,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchMenu.d.ts","sourceRoot":"","sources":["../../src/primitives/SearchMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SearchMenu.d.ts","sourceRoot":"","sources":["../../src/primitives/SearchMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA4B/B,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,4HAA4H;IAC5H,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,uLAAuL;AACvL,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,gBAAgB;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,EAAE,CAAC;CACd;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACnC;AAED,UAAU,eAAe,CAAC,CAAC,SAAS,gBAAgB;IAClD,0DAA0D;IAC1D,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC;IACd,iKAAiK;IACjK,QAAQ,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;IAClC,YAAY,CAAC,EAAE,sBAAsB,CAAC;IACtC,uGAAuG;IACvG,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC;IAChC,0PAA0P;IAC1P,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wCAAwC;IACxC,YAAY,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mLAAmL;IACnL,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,uKAAuK;IACvK,cAAc,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACrC,yKAAyK;IACzK,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,gBAAgB,EAAE,EACrD,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,QAAgB,EAChB,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,UAAiB,EACjB,cAA2B,EAC3B,UAAgB,GACjB,EAAE,eAAe,CAAC,CAAC,CAAC,qBA+KpB"}
|
|
@@ -5,6 +5,7 @@ import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } fr
|
|
|
5
5
|
import { MdOutlinedTextField } from "@material/web/textfield/outlined-text-field.js";
|
|
6
6
|
import { MdCheckbox } from "@material/web/checkbox/checkbox.js";
|
|
7
7
|
import { Toggle } from "./Toggle.js";
|
|
8
|
+
import { CheckIcon } from "../icons.js";
|
|
8
9
|
const MdOutlinedTextFieldElement = createComponent({
|
|
9
10
|
react: React,
|
|
10
11
|
tagName: "md-outlined-text-field",
|
|
@@ -24,10 +25,6 @@ const MdCheckboxElement = createComponent({
|
|
|
24
25
|
tagName: "md-checkbox",
|
|
25
26
|
elementClass: MdCheckbox,
|
|
26
27
|
});
|
|
27
|
-
/** MD3 "check" symbol (Figma) — marking the selected row in any option list below. */
|
|
28
|
-
function CheckIcon() {
|
|
29
|
-
return (_jsx("svg", { viewBox: "0 0 18 18", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M7.1625 13.5L2.8875 9.225L3.95625 8.15625L7.1625 11.3625L14.0438 4.48125L15.1125 5.55L7.1625 13.5Z", fill: "currentColor" }) }));
|
|
30
|
-
}
|
|
31
28
|
/**
|
|
32
29
|
* The searchable menu-button pattern behind every Model/option menu
|
|
33
30
|
* (reference: Media Analyze - Model Menu) — a trigger styled as MD3's outlined button, opening an anchored panel with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchMenu.js","sourceRoot":"","sources":["../../src/primitives/SearchMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"SearchMenu.js","sourceRoot":"","sources":["../../src/primitives/SearchMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CA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,IACvE,IACD,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
|
package/dist/style.css
CHANGED
|
@@ -751,6 +751,99 @@
|
|
|
751
751
|
flex-wrap: wrap;
|
|
752
752
|
}
|
|
753
753
|
|
|
754
|
+
.chai-composer__controls-end {
|
|
755
|
+
display: flex;
|
|
756
|
+
align-items: center;
|
|
757
|
+
gap: var(--chai-space-2);
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
/* Voice input: the mic left of submit. While recording it becomes a stop
|
|
761
|
+
button (a filled square in a ringed circle) and a waveform replaces the
|
|
762
|
+
prompt; while transcribing, a spinner. */
|
|
763
|
+
.chai-composer__voice {
|
|
764
|
+
display: flex;
|
|
765
|
+
align-items: center;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
.chai-composer__voice-button {
|
|
769
|
+
display: flex;
|
|
770
|
+
align-items: center;
|
|
771
|
+
justify-content: center;
|
|
772
|
+
width: 40px;
|
|
773
|
+
height: 40px;
|
|
774
|
+
padding: 0;
|
|
775
|
+
border: 2px solid transparent;
|
|
776
|
+
border-radius: var(--chai-radius-full);
|
|
777
|
+
background: transparent;
|
|
778
|
+
color: var(--chai-composer-text);
|
|
779
|
+
cursor: pointer;
|
|
780
|
+
transition: background-color var(--chai-motion-duration-fast) var(--chai-motion-easing-standard);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.chai-composer__voice-button:hover:not(:disabled) {
|
|
784
|
+
background: var(--chai-composer-hover);
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
.chai-composer__voice-button:disabled {
|
|
788
|
+
cursor: not-allowed;
|
|
789
|
+
opacity: 0.5;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
.chai-composer__voice-button svg {
|
|
793
|
+
width: 24px;
|
|
794
|
+
height: 24px;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
.chai-composer__voice[data-status="recording"] .chai-composer__voice-button {
|
|
798
|
+
border-color: var(--chai-composer-text);
|
|
799
|
+
background: var(--chai-composer-hover);
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
.chai-composer__voice[data-status="recording"] .chai-composer__voice-button svg {
|
|
803
|
+
width: 18px;
|
|
804
|
+
height: 18px;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
/* Same row height as the prompt it stands in for. */
|
|
808
|
+
.chai-composer__waveform {
|
|
809
|
+
display: flex;
|
|
810
|
+
align-items: center;
|
|
811
|
+
gap: var(--chai-space-3);
|
|
812
|
+
min-height: var(--chai-type-leading-body-large);
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.chai-composer__waveform-bars {
|
|
816
|
+
flex: 1;
|
|
817
|
+
display: flex;
|
|
818
|
+
align-items: center;
|
|
819
|
+
justify-content: space-between;
|
|
820
|
+
height: var(--chai-type-leading-body-large);
|
|
821
|
+
min-width: 0;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
.chai-composer__waveform-bar {
|
|
825
|
+
width: 2px;
|
|
826
|
+
border-radius: var(--chai-radius-full);
|
|
827
|
+
background: var(--chai-composer-text);
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
.chai-composer__waveform-time {
|
|
831
|
+
color: var(--chai-composer-text);
|
|
832
|
+
font-family: var(--chai-type-family-material);
|
|
833
|
+
font-size: var(--chai-type-size-label-large);
|
|
834
|
+
font-weight: var(--chai-type-weight-material-medium);
|
|
835
|
+
font-variant-numeric: tabular-nums;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
.chai-composer__voice-spinner {
|
|
839
|
+
width: 20px;
|
|
840
|
+
height: 20px;
|
|
841
|
+
border-radius: 50%;
|
|
842
|
+
border: 2px solid var(--chai-color-semantic-control-border-faint);
|
|
843
|
+
border-top-color: var(--chai-color-semantic-accent);
|
|
844
|
+
animation: chai-spin var(--chai-motion-duration-steep) linear infinite;
|
|
845
|
+
}
|
|
846
|
+
|
|
754
847
|
/* Neutral trigger text, not `--md-sys-color-primary` green (account
|
|
755
848
|
holder correction: "don't make dropdown select menu buttons green when
|
|
756
849
|
they don't need to be"). */
|
package/dist/useComposer.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare function useComposer(options?: UseComposerOptions): {
|
|
|
11
11
|
runs: import("@chai-ui/core").Run[];
|
|
12
12
|
submit: (payload: import("@chai-ui/core").ComposerSubmitPayload) => void;
|
|
13
13
|
cancel: () => void;
|
|
14
|
-
enhance: ((value: string, field?: import("@chai-ui/core").ComposerPromptField) => Promise<string>) | undefined;
|
|
14
|
+
enhance: ((value: string, field?: import("@chai-ui/core").ComposerPromptField, mode?: import("@chai-ui/core").GenerationUseCase) => Promise<string>) | undefined;
|
|
15
15
|
enhancing: boolean;
|
|
16
16
|
routing: boolean;
|
|
17
17
|
/** Props for an `EditCard` (spread them in), and `regions` for `Composer`. `null` when there's no `editImage`. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chai-ui/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "CHAI UI React components — smart, drop-in UI for AI apps: Composer, Media Analyzer, Result Card, and the useComposer hook.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "kazarazat",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"@fontsource/roboto": "^5.3.0",
|
|
49
49
|
"@lit/react": "^1.0.8",
|
|
50
50
|
"@material/web": "^2.5.0",
|
|
51
|
-
"@chai-ui/core": "0.
|
|
52
|
-
"@chai-ui/tokens": "0.
|
|
51
|
+
"@chai-ui/core": "0.9.0",
|
|
52
|
+
"@chai-ui/tokens": "0.9.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@material-symbols/svg-400": "^0.47.5",
|
package/src/Composer.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StopIcon } from "./icons.js";
|
|
2
|
-
import { useEffect, useId, useRef, useState, type ChangeEvent } from "react";
|
|
1
|
+
import { AddIcon, ArrowForwardIcon, CloseSymbolIcon, StopIcon } from "./icons.js";
|
|
2
|
+
import { useEffect, useId, useRef, useState, useSyncExternalStore, type ChangeEvent } from "react";
|
|
3
3
|
import { createComponent } from "@lit/react";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { MdFab } from "@material/web/fab/fab.js";
|
|
@@ -7,14 +7,19 @@ import {
|
|
|
7
7
|
composerAttachmentsFromFiles,
|
|
8
8
|
composerAttachMenuItems,
|
|
9
9
|
composerView,
|
|
10
|
+
createVoiceInput,
|
|
10
11
|
enhanceRevealDurationMs,
|
|
12
|
+
formatVoiceElapsed,
|
|
13
|
+
VOICE_LEVEL_COUNT,
|
|
11
14
|
MAX_ANIMATE_ENHANCE_LENGTH,
|
|
12
15
|
regionColor,
|
|
13
16
|
TEXT_USE_CASE,
|
|
14
17
|
type ComposerAttachMenuAction,
|
|
15
18
|
type ComposerPromptField,
|
|
19
|
+
type VoiceInputConfig,
|
|
16
20
|
} from "@chai-ui/core";
|
|
17
|
-
import
|
|
21
|
+
import { useLatest } from "./use-latest.js";
|
|
22
|
+
import type { EditRegion, GenerationUseCase, ModelOption, ParameterOption, MediaKind, OutputKind } from "@chai-ui/core";
|
|
18
23
|
import { SearchMenu } from "./primitives/SearchMenu.js";
|
|
19
24
|
import type { ComposerAttachment, ComposerSubmitPayload, ComposerUseCase } from "@chai-ui/core";
|
|
20
25
|
|
|
@@ -124,8 +129,10 @@ export interface ComposerProps {
|
|
|
124
129
|
* world use case each field has its own button: `field` is "environment"
|
|
125
130
|
* or "character" (otherwise "prompt"), so the rewrite can fit the field,
|
|
126
131
|
* and the handler calls `onChange` or `onCharacterChange` to match.
|
|
132
|
+
* `mode` is the use case on screen, e.g. "text-to-text" with none picked:
|
|
133
|
+
* rewrite a text request as one, not as a media prompt.
|
|
127
134
|
*/
|
|
128
|
-
onEnhance?: (value: string, field: ComposerPromptField) => void;
|
|
135
|
+
onEnhance?: (value: string, field: ComposerPromptField, mode?: GenerationUseCase) => void;
|
|
129
136
|
/** True while the builder's own `onEnhance` handler is running its LLM call — shows the active state on the button that was clicked. */
|
|
130
137
|
enhancing?: boolean;
|
|
131
138
|
/**
|
|
@@ -179,6 +186,14 @@ export interface ComposerProps {
|
|
|
179
186
|
*/
|
|
180
187
|
regions?: EditRegion[];
|
|
181
188
|
onRegionsChange?: (next: EditRegion[]) => void;
|
|
189
|
+
/**
|
|
190
|
+
* Turns on the mic, left of submit: the person speaks, and the transcript
|
|
191
|
+
* is added to the prompt (never submitted). Name a Fal speech-to-text
|
|
192
|
+
* model, e.g. `{ model: "fal-ai/wizper" }`, and the clip goes through your
|
|
193
|
+
* `/api/chai/fal` route; or pass `{ transcribe }` for any other provider.
|
|
194
|
+
* Off by default, and there's no default model.
|
|
195
|
+
*/
|
|
196
|
+
voiceInput?: VoiceInputConfig;
|
|
182
197
|
disabled?: boolean;
|
|
183
198
|
}
|
|
184
199
|
|
|
@@ -234,6 +249,7 @@ export function Composer({
|
|
|
234
249
|
attachMenuActions,
|
|
235
250
|
regions = [],
|
|
236
251
|
onRegionsChange,
|
|
252
|
+
voiceInput,
|
|
237
253
|
disabled = false,
|
|
238
254
|
}: ComposerProps) {
|
|
239
255
|
const view = composerView({
|
|
@@ -298,9 +314,16 @@ export function Composer({
|
|
|
298
314
|
onEnhance &&
|
|
299
315
|
((current: string) => {
|
|
300
316
|
setEnhancingField(field);
|
|
301
|
-
onEnhance(current, field);
|
|
317
|
+
onEnhance(current, field, view.enhanceMode);
|
|
302
318
|
});
|
|
303
319
|
|
|
320
|
+
// Voice input: a transcript is added to the prompt, never submitted.
|
|
321
|
+
const latestPrompt = useLatest({ value, onChange });
|
|
322
|
+
const voice = useVoice(voiceInput, (text) => {
|
|
323
|
+
const { value: current, onChange: change } = latestPrompt.current;
|
|
324
|
+
change(current.trim() ? `${current.trimEnd()} ${text}` : text);
|
|
325
|
+
});
|
|
326
|
+
|
|
304
327
|
async function handleFilesSelected(fileList: FileList | null) {
|
|
305
328
|
if (!fileList || fileList.length === 0 || !onAttachmentsChange) return;
|
|
306
329
|
// Edit mode works on one image: a new one replaces it, and the edit starts over.
|
|
@@ -347,7 +370,9 @@ export function Composer({
|
|
|
347
370
|
</ul>
|
|
348
371
|
)}
|
|
349
372
|
|
|
350
|
-
{
|
|
373
|
+
{voiceInput && voice.state.status === "recording" ? (
|
|
374
|
+
<VoiceWaveform levels={voice.state.levels} elapsedMs={voice.state.elapsedMs} />
|
|
375
|
+
) : view.world ? (
|
|
351
376
|
<div className="chai-composer__world-fields">
|
|
352
377
|
<PromptField
|
|
353
378
|
value={value}
|
|
@@ -392,6 +417,13 @@ export function Composer({
|
|
|
392
417
|
</p>
|
|
393
418
|
)}
|
|
394
419
|
|
|
420
|
+
{voiceInput && voice.state.status === "error" && (
|
|
421
|
+
<p className="chai-composer__error" role="alert">
|
|
422
|
+
<ErrorIcon />
|
|
423
|
+
{voice.state.error}
|
|
424
|
+
</p>
|
|
425
|
+
)}
|
|
426
|
+
|
|
395
427
|
<div className="chai-composer__controls">
|
|
396
428
|
<div className="chai-composer__controls-start">
|
|
397
429
|
{menuItems.length > 0 && (
|
|
@@ -512,6 +544,11 @@ export function Composer({
|
|
|
512
544
|
(same filled look — reads as "in progress," not "empty/error"),
|
|
513
545
|
clickable regardless of `isSubmitDisabled` since a request
|
|
514
546
|
already in flight isn't gated on the field having content. */}
|
|
547
|
+
<div className="chai-composer__controls-end">
|
|
548
|
+
{voiceInput && <VoiceButton voice={voice} disabled={disabled} />}
|
|
549
|
+
{/* No submit while a recording is being made or transcribed: the
|
|
550
|
+
person sends the transcript once it's in the prompt to check. */}
|
|
551
|
+
{!(voiceInput && (voice.state.status === "recording" || voice.state.status === "transcribing")) && (
|
|
515
552
|
<MdFabElement
|
|
516
553
|
className="chai-composer__submit"
|
|
517
554
|
size="small"
|
|
@@ -538,7 +575,88 @@ export function Composer({
|
|
|
538
575
|
{showStop ? <StopIcon /> : submitError ? <RefreshIcon /> : <ArrowForwardIcon />}
|
|
539
576
|
</span>
|
|
540
577
|
</MdFabElement>
|
|
578
|
+
)}
|
|
579
|
+
</div>
|
|
580
|
+
</div>
|
|
581
|
+
</div>
|
|
582
|
+
);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
/** The core recorder, created once, with the latest config and transcript handler. */
|
|
586
|
+
function useVoice(config: VoiceInputConfig | undefined, onTranscript: (text: string) => void) {
|
|
587
|
+
const latest = useLatest({ config, onTranscript });
|
|
588
|
+
const [voice] = useState(() =>
|
|
589
|
+
createVoiceInput(
|
|
590
|
+
() => latest.current.config ?? { transcribe: async () => "" },
|
|
591
|
+
(text) => latest.current.onTranscript(text)
|
|
592
|
+
)
|
|
593
|
+
);
|
|
594
|
+
const state = useSyncExternalStore(voice.subscribe, voice.getState, voice.getState);
|
|
595
|
+
useEffect(() => () => voice.dispose(), [voice]);
|
|
596
|
+
return { ...voice, state };
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* What replaces the prompt while recording: the mic's recent loudness as
|
|
601
|
+
* bars, newest on the right, and how long it's run. Decorative: the mic
|
|
602
|
+
* button's label and the status line say it's recording.
|
|
603
|
+
*/
|
|
604
|
+
function VoiceWaveform({ levels, elapsedMs }: { levels: number[]; elapsedMs: number }) {
|
|
605
|
+
const bars = [...Array<number>(Math.max(0, VOICE_LEVEL_COUNT - levels.length)).fill(0), ...levels];
|
|
606
|
+
return (
|
|
607
|
+
<div className="chai-composer__waveform" aria-hidden="true">
|
|
608
|
+
<div className="chai-composer__waveform-bars">
|
|
609
|
+
{bars.map((level, i) => (
|
|
610
|
+
<span key={i} className="chai-composer__waveform-bar" style={{ height: `${Math.max(20, level * 100)}%` }} />
|
|
611
|
+
))}
|
|
541
612
|
</div>
|
|
613
|
+
<span className="chai-composer__waveform-time">{formatVoiceElapsed(elapsedMs)}</span>
|
|
614
|
+
</div>
|
|
615
|
+
);
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* The mic: click to record; while recording it's a stop button that ends
|
|
620
|
+
* the recording and transcribes it; while transcribing, a spinner, and a
|
|
621
|
+
* click cancels.
|
|
622
|
+
*/
|
|
623
|
+
function VoiceButton({ voice, disabled }: { voice: ReturnType<typeof useVoice>; disabled: boolean }) {
|
|
624
|
+
const { status } = voice.state;
|
|
625
|
+
const label =
|
|
626
|
+
status === "recording" ? "Stop recording and transcribe" : status === "transcribing" ? "Cancel transcription" : "Start voice input";
|
|
627
|
+
function handleClick() {
|
|
628
|
+
if (status === "recording") voice.stop();
|
|
629
|
+
else if (status === "transcribing") voice.cancel();
|
|
630
|
+
else {
|
|
631
|
+
voice.dismiss();
|
|
632
|
+
void voice.start();
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
return (
|
|
636
|
+
<div className="chai-composer__voice" data-status={status}>
|
|
637
|
+
<button
|
|
638
|
+
type="button"
|
|
639
|
+
className="chai-composer__voice-button"
|
|
640
|
+
onClick={handleClick}
|
|
641
|
+
onKeyDown={(e) => {
|
|
642
|
+
if (e.key === "Escape" && status === "recording") voice.cancel();
|
|
643
|
+
}}
|
|
644
|
+
disabled={disabled}
|
|
645
|
+
aria-label={label}
|
|
646
|
+
title={label}
|
|
647
|
+
>
|
|
648
|
+
{status === "transcribing" ? (
|
|
649
|
+
<span className="chai-composer__voice-spinner" aria-hidden="true" />
|
|
650
|
+
) : status === "recording" ? (
|
|
651
|
+
<StopIcon />
|
|
652
|
+
) : (
|
|
653
|
+
<MicIcon />
|
|
654
|
+
)}
|
|
655
|
+
</button>
|
|
656
|
+
{/* Announces each change of state once, not every tick of the timer. */}
|
|
657
|
+
<span className="chai-visually-hidden" role="status">
|
|
658
|
+
{status === "recording" ? "Recording" : status === "transcribing" ? "Transcribing" : ""}
|
|
659
|
+
</span>
|
|
542
660
|
</div>
|
|
543
661
|
);
|
|
544
662
|
}
|
|
@@ -788,7 +906,7 @@ function ComposerAttachMenu({
|
|
|
788
906
|
aria-haspopup="menu"
|
|
789
907
|
aria-label={open ? "Close attach menu" : "Add media"}
|
|
790
908
|
>
|
|
791
|
-
{open ? <
|
|
909
|
+
{open ? <CloseSymbolIcon /> : <AddIcon />}
|
|
792
910
|
</button>
|
|
793
911
|
|
|
794
912
|
{open && (
|
|
@@ -836,7 +954,7 @@ function ComposerThumbnail({ attachment, onRemove }: { attachment: ComposerAttac
|
|
|
836
954
|
)}
|
|
837
955
|
{onRemove && (
|
|
838
956
|
<button type="button" className="chai-composer__thumb-remove" onClick={onRemove} aria-label="Remove attachment">
|
|
839
|
-
<
|
|
957
|
+
<CloseSymbolIcon />
|
|
840
958
|
</button>
|
|
841
959
|
)}
|
|
842
960
|
</div>
|
|
@@ -875,7 +993,7 @@ function UseCaseChip({
|
|
|
875
993
|
disabled={disabled}
|
|
876
994
|
aria-label={`Remove ${useCase.label}`}
|
|
877
995
|
>
|
|
878
|
-
<
|
|
996
|
+
<CloseSymbolIcon />
|
|
879
997
|
</button>
|
|
880
998
|
)}
|
|
881
999
|
</span>
|
|
@@ -914,7 +1032,7 @@ function RegionChip({
|
|
|
914
1032
|
disabled={disabled}
|
|
915
1033
|
aria-label={`Remove ${name}`}
|
|
916
1034
|
>
|
|
917
|
-
<
|
|
1035
|
+
<CloseSymbolIcon />
|
|
918
1036
|
</button>
|
|
919
1037
|
)}
|
|
920
1038
|
</span>
|
|
@@ -956,32 +1074,6 @@ function kindIcon(kind: MediaKind) {
|
|
|
956
1074
|
// themed via the active/inactive CSS class instead of two hardcoded-color
|
|
957
1075
|
// SVGs. See its button's own doc comment above for what it actually does.
|
|
958
1076
|
|
|
959
|
-
function PlusIcon() {
|
|
960
|
-
return (
|
|
961
|
-
<svg viewBox="0 -960 960 960" aria-hidden="true">
|
|
962
|
-
<path d="M450-450H200v-60h250v-250h60v250h250v60H510v250h-60v-250Z" fill="currentColor" />
|
|
963
|
-
</svg>
|
|
964
|
-
);
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
// Material Symbols "close" — reproduced here since icons aren't shared
|
|
968
|
-
// across files yet in this codebase.
|
|
969
|
-
function CloseIcon() {
|
|
970
|
-
return (
|
|
971
|
-
<svg viewBox="0 -960 960 960" aria-hidden="true">
|
|
972
|
-
<path d="m249-207-42-42 231-231-231-231 42-42 231 231 231-231 42 42-231 231 231 231-42 42-231-231-231 231Z" fill="currentColor" />
|
|
973
|
-
</svg>
|
|
974
|
-
);
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
function ArrowForwardIcon() {
|
|
978
|
-
return (
|
|
979
|
-
<svg viewBox="0 -960 960 960" aria-hidden="true">
|
|
980
|
-
<path d="M686-450H160v-60h526L438-758l42-42 320 320-320 320-42-42 248-248Z" fill="currentColor" />
|
|
981
|
-
</svg>
|
|
982
|
-
);
|
|
983
|
-
}
|
|
984
|
-
|
|
985
1077
|
// Material Symbols "refresh" — the submit FAB's retry state.
|
|
986
1078
|
function RefreshIcon() {
|
|
987
1079
|
return (
|
|
@@ -1045,6 +1137,18 @@ function AttachFileIcon() {
|
|
|
1045
1137
|
);
|
|
1046
1138
|
}
|
|
1047
1139
|
|
|
1140
|
+
// Material Symbols "mic" — voice input.
|
|
1141
|
+
function MicIcon() {
|
|
1142
|
+
return (
|
|
1143
|
+
<svg viewBox="0 -960 960 960" aria-hidden="true">
|
|
1144
|
+
<path
|
|
1145
|
+
d="M408-453.92q-29-30.91-29-75.08v-251q0-41.67 29.44-70.83Q437.88-880 479.94-880t71.56 29.17Q581-821.67 581-780v251q0 44.17-29 75.08Q523-423 480-423t-72-30.92ZM480-651Zm-30 531v-136q-106-11-178-89t-72-184h60q0 91 64.29 153t155.5 62q91.21 0 155.71-62Q700-438 700-529h60q0 106-72 184t-178 89v136h-60Zm59.5-376.5Q521-510 521-529v-251q0-17-11.79-28.5T480-820q-17.42 0-29.21 11.5T439-780v251q0 19 11.5 32.5T480-483q18 0 29.5-13.5Z"
|
|
1146
|
+
fill="currentColor"
|
|
1147
|
+
/>
|
|
1148
|
+
</svg>
|
|
1149
|
+
);
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1048
1152
|
// Material Symbols "globe" — the attach menu's Create world.
|
|
1049
1153
|
function GlobeIcon() {
|
|
1050
1154
|
return (
|
package/src/MediaAnalyzer.tsx
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "@chai-ui/core";
|
|
15
15
|
import type { ModelOption, MediaKind, MediaAnalysisPromptLength } from "@chai-ui/core";
|
|
16
16
|
import { SearchMenu } from "./primitives/SearchMenu.js";
|
|
17
|
-
import { StopIcon } from "./icons.js";
|
|
17
|
+
import { ArrowForwardIcon, StopIcon } from "./icons.js";
|
|
18
18
|
import type { MediaAnalyzerAttachment, MediaAnalyzerSubmitPayload } from "@chai-ui/core";
|
|
19
19
|
|
|
20
20
|
export {
|
|
@@ -335,14 +335,6 @@ function MediaAnalyzerThumbnail({
|
|
|
335
335
|
// Same "trace and inline as a currentColor component" convention Composer.tsx
|
|
336
336
|
// documents — icons aren't shared across files yet in this codebase.
|
|
337
337
|
|
|
338
|
-
function ArrowForwardIcon() {
|
|
339
|
-
return (
|
|
340
|
-
<svg viewBox="0 -960 960 960" aria-hidden="true">
|
|
341
|
-
<path d="M686-450H160v-60h526L438-758l42-42 320 320-320 320-42-42 248-248Z" fill="currentColor" />
|
|
342
|
-
</svg>
|
|
343
|
-
);
|
|
344
|
-
}
|
|
345
|
-
|
|
346
338
|
/**
|
|
347
339
|
* A stroked X, not the filled-path Material Symbols "close" glyph the rest
|
|
348
340
|
* of this codebase traces (reference: Composer.tsx's own `CloseIcon`) —
|
package/src/ResultCard.tsx
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
type Result,
|
|
13
13
|
} from "@chai-ui/core";
|
|
14
14
|
import { Pagination } from "./primitives/Pagination.js";
|
|
15
|
-
import { CheckSymbolIcon, DownloadIcon, ExpandIcon, ShareIcon } from "./icons.js";
|
|
15
|
+
import { CheckIcon, CheckSymbolIcon, DownloadIcon, ExpandIcon, ShareIcon } from "./icons.js";
|
|
16
16
|
import { PageSlide, usePageSlide } from "./page-slide.js";
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -887,18 +887,6 @@ function CopyIcon() {
|
|
|
887
887
|
);
|
|
888
888
|
}
|
|
889
889
|
|
|
890
|
-
/** MD3 "check" symbol — same traced glyph SearchMenu.tsx uses, marking a passed evaluation. */
|
|
891
|
-
function CheckIcon() {
|
|
892
|
-
return (
|
|
893
|
-
<svg viewBox="0 0 18 18" fill="none" aria-hidden="true">
|
|
894
|
-
<path
|
|
895
|
-
d="M7.1625 13.5L2.8875 9.225L3.95625 8.15625L7.1625 11.3625L14.0438 4.48125L15.1125 5.55L7.1625 13.5Z"
|
|
896
|
-
fill="currentColor"
|
|
897
|
-
/>
|
|
898
|
-
</svg>
|
|
899
|
-
);
|
|
900
|
-
}
|
|
901
|
-
|
|
902
890
|
/** Real Material Symbols "play_arrow" (viewBox `0 -960 960 960`) — not in the mock itself, see this section's own header comment. */
|
|
903
891
|
function PlayIcon() {
|
|
904
892
|
return (
|
package/src/icons.tsx
CHANGED
|
@@ -127,3 +127,24 @@ export function StopIcon() {
|
|
|
127
127
|
</svg>
|
|
128
128
|
);
|
|
129
129
|
}
|
|
130
|
+
|
|
131
|
+
/** Material Symbols "arrow_forward": Composer's submit and Media Analyzer's. */
|
|
132
|
+
export function ArrowForwardIcon() {
|
|
133
|
+
return (
|
|
134
|
+
<svg viewBox="0 -960 960 960" aria-hidden="true">
|
|
135
|
+
<path d="M686-450H160v-60h526L438-758l42-42 320 320-320 320-42-42 248-248Z" fill="currentColor" />
|
|
136
|
+
</svg>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/** MD3 "check" (traced from Figma): a selected option row, a passed evaluation. Not `CheckSymbolIcon`, the Material Symbols path. */
|
|
141
|
+
export function CheckIcon() {
|
|
142
|
+
return (
|
|
143
|
+
<svg viewBox="0 0 18 18" fill="none" aria-hidden="true">
|
|
144
|
+
<path
|
|
145
|
+
d="M7.1625 13.5L2.8875 9.225L3.95625 8.15625L7.1625 11.3625L14.0438 4.48125L15.1125 5.55L7.1625 13.5Z"
|
|
146
|
+
fill="currentColor"
|
|
147
|
+
/>
|
|
148
|
+
</svg>
|
|
149
|
+
);
|
|
150
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from "./useMediaAnalyzer.js";
|
|
|
11
11
|
// to import from @chai-ui/react.
|
|
12
12
|
export {
|
|
13
13
|
createFalEngine,
|
|
14
|
+
createFalTranscriber,
|
|
14
15
|
createOpenRouterEngine,
|
|
15
16
|
createMockEngine,
|
|
16
17
|
mockEngine,
|
|
@@ -41,6 +42,9 @@ export type {
|
|
|
41
42
|
MediaKind,
|
|
42
43
|
ModelOption,
|
|
43
44
|
OutputKind,
|
|
45
|
+
Transcribe,
|
|
46
|
+
VoiceClip,
|
|
47
|
+
VoiceInputConfig,
|
|
44
48
|
ParameterOption,
|
|
45
49
|
RegionBox,
|
|
46
50
|
RegionFormat,
|