@websolutespa/bom-llm 0.0.36 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/umd/index.js +13 -14
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/umd/index.js
CHANGED
|
@@ -22586,6 +22586,7 @@ ${Object.entries(vars).map(_ref2 => {
|
|
|
22586
22586
|
}, 2000);
|
|
22587
22587
|
},
|
|
22588
22588
|
initIntersection: element => {
|
|
22589
|
+
// console.log('initIntersection', element);
|
|
22589
22590
|
const handleIntersection = () => {
|
|
22590
22591
|
// console.log('handleIntersection', element);
|
|
22591
22592
|
if (!element) {
|
|
@@ -22799,19 +22800,18 @@ ${Object.entries(vars).map(_ref2 => {
|
|
|
22799
22800
|
return;
|
|
22800
22801
|
}
|
|
22801
22802
|
const state = get();
|
|
22802
|
-
const disableSpeechSynthesis = app.contents.synthesisMode ? app.contents.synthesisMode === 'none' : app.contents.disableSpeechSynthesis;
|
|
22803
22803
|
const textToSpeechApiKey = app.contents.textToSpeechApiKey;
|
|
22804
22804
|
const textToSpeechVoiceId = app.contents.textToSpeechVoiceId;
|
|
22805
|
-
const synthesisMode = app.contents.synthesisMode || 'default';
|
|
22806
|
-
const recognitionMode = app.contents.recognitionMode || 'default';
|
|
22807
|
-
const speechEnabled = state.speakEnabled
|
|
22805
|
+
const synthesisMode = app.contents.synthesisMode || (app.contents.disableSpeechSynthesis ? 'none' : 'default');
|
|
22806
|
+
const recognitionMode = app.contents.recognitionMode || (app.contents.disableSpeechRecognition ? 'none' : 'default');
|
|
22807
|
+
const speechEnabled = state.speakEnabled;
|
|
22808
22808
|
speech.lang = locale;
|
|
22809
22809
|
speech.enabled = speechEnabled;
|
|
22810
22810
|
speech.textToSpeechApiKey = textToSpeechApiKey;
|
|
22811
22811
|
speech.textToSpeechVoiceId = textToSpeechVoiceId;
|
|
22812
22812
|
speech.synthesisMode = synthesisMode;
|
|
22813
22813
|
speech.recognitionMode = recognitionMode;
|
|
22814
|
-
// console.log('useLlm.init', { textToSpeechApiKey, textToSpeechVoiceId, synthesisMode, recognitionMode,
|
|
22814
|
+
// console.log('useLlm.init', { textToSpeechApiKey, textToSpeechVoiceId, synthesisMode, recognitionMode, speechEnabled });
|
|
22815
22815
|
speech.on('result', async transcript => {
|
|
22816
22816
|
const state = get();
|
|
22817
22817
|
state.actions.setPrompt(transcript);
|
|
@@ -22954,18 +22954,16 @@ ${Object.entries(vars).map(_ref2 => {
|
|
|
22954
22954
|
prompt
|
|
22955
22955
|
})),
|
|
22956
22956
|
hasSpeechSynthesisSupport: () => {
|
|
22957
|
-
|
|
22958
|
-
|
|
22959
|
-
return speech.hasTextToSpeechSupport && !disableSpeechSynthesis;
|
|
22957
|
+
get();
|
|
22958
|
+
return speech.hasTextToSpeechSupport;
|
|
22960
22959
|
},
|
|
22961
22960
|
hasSpeechRecognitionSupport: () => {
|
|
22962
|
-
|
|
22963
|
-
|
|
22964
|
-
return speech.hasSpeechToTextSupport && !disableSpeechRecognition;
|
|
22961
|
+
get();
|
|
22962
|
+
return speech.hasSpeechToTextSupport;
|
|
22965
22963
|
},
|
|
22966
22964
|
toggleSpeak: () => {
|
|
22967
22965
|
set(state => {
|
|
22968
|
-
const speakEnabled = !state.speakEnabled
|
|
22966
|
+
const speakEnabled = !state.speakEnabled;
|
|
22969
22967
|
speech.setEnabled(speakEnabled);
|
|
22970
22968
|
return {
|
|
22971
22969
|
speakEnabled
|
|
@@ -23776,6 +23774,7 @@ void main(void) {
|
|
|
23776
23774
|
canvasRef,
|
|
23777
23775
|
shaderRef,
|
|
23778
23776
|
attach: canvas => {
|
|
23777
|
+
// console.log('CanvasOffscreenContextProvider.attach', canvas, shaderRef.current);
|
|
23779
23778
|
if (shaderRef.current) {
|
|
23780
23779
|
shaderRef.current.attach(canvas);
|
|
23781
23780
|
}
|
|
@@ -33696,10 +33695,10 @@ void main(void) {
|
|
|
33696
33695
|
initView();
|
|
33697
33696
|
}, [init, locale, initView]);
|
|
33698
33697
|
reactExports.useEffect(() => {
|
|
33699
|
-
if (innerRef.current) {
|
|
33698
|
+
if (mounted && ready && innerRef.current) {
|
|
33700
33699
|
initIntersection(innerRef.current);
|
|
33701
33700
|
}
|
|
33702
|
-
}, [mounted, initIntersection, innerRef]);
|
|
33701
|
+
}, [mounted, ready, initIntersection, innerRef]);
|
|
33703
33702
|
reactExports.useEffect(() => {
|
|
33704
33703
|
if (!embedded) {
|
|
33705
33704
|
document.documentElement.style.overflow = opened ? 'hidden' : 'auto';
|