Skip to content

Commit

Permalink
chore(release): 🚀 build for release
Browse files Browse the repository at this point in the history
  • Loading branch information
jooyoungseo committed Jan 8, 2024
1 parent fc02b42 commit 4b10417
Show file tree
Hide file tree
Showing 45 changed files with 153 additions and 105 deletions.
42 changes: 33 additions & 9 deletions dist/maidr.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,14 @@ class Constants {
visualBraille = false; // do we want to represent braille based on what's visually there or actually there. Like if we have 2 outliers with the same position, do we show 1 (visualBraille true) or 2 (false)
globalMinMax = true;
ariaMode = 'assertive'; // assertive (default) / polite
playLLMWaitingSound = true;

// LLM settings
hasChatLLM = true;
LLMDebugMode = 0; // 0 = use real data, 1 = all fake, 2 = real data but no image
authKey = null; // OpenAI authentication key, set in menu
LLMmaxResponseTokens = 1000; // max tokens to send to LLM, 20 for testing, 1000 ish for real
LLMDetail = 'high'; // low (default for testing, like 100 tokens) / high (default for real, like 1000 tokens)
skillLevel = 'basic'; // basic / intermediate / expert

// user controls (not exposed to menu, with shortcuts usually)
showDisplay = 1; // true / false
Expand Down Expand Up @@ -403,15 +404,20 @@ class Menu {
constants.ariaMode == 'polite' ? 'checked' : ''
}><label for="aria_mode_polite">Polite</label></p>
</fieldset></div>
${
constants.hasChatLLM
? '<p><input type="text" id="chatLLM_auth_key"> <label for="chatLLM_auth_key">OpenAI Authentication Key</label></p>'
: ''
}
<h5 class="modal-title">LLM Settings</h5>
<p><input type="password" id="chatLLM_auth_key"> <label for="chatLLM_auth_key">OpenAI Authentication Key</label></p>
<p>
<select id="skill_level">
<option value="basic">Basic</option>
<option value="intermediate">Intermediate</option>
<option value="expert">Expert</option>
</select>
<label for="skill_level">Level of skill in statistical charts</label>
</p>
</div>
</div>
<div class="modal-footer">
<button type="button" id="save_and_close_menu">Save and close</button>
<button type="button" id="save_and_close_menu">Save and Close</button>
<button type="button" id="close_menu">Close</button>
</div>
</div>
Expand Down Expand Up @@ -543,6 +549,7 @@ class Menu {
if (typeof constants.authKey == 'string') {
document.getElementById('chatLLM_auth_key').value = constants.authKey;
}
document.getElementById('skill_level').value = constants.skillLevel;

// aria mode
if (constants.ariaMode == 'assertive') {
Expand Down Expand Up @@ -570,6 +577,7 @@ class Menu {
constants.keypressInterval =
document.getElementById('keypress_interval').value;
constants.authKey = document.getElementById('chatLLM_auth_key').value;
constants.skillLevel = document.getElementById('skill_level').value;

// aria
if (document.getElementById('aria_mode_assertive').checked) {
Expand Down Expand Up @@ -616,6 +624,7 @@ class Menu {
data.keypressInterval = constants.keypressInterval;
data.ariaMode = constants.ariaMode;
data.authKey = constants.authKey;
data.skillLevel = constants.skillLevel;
localStorage.setItem('settings_data', JSON.stringify(data));
}
/**
Expand All @@ -634,6 +643,7 @@ class Menu {
constants.keypressInterval = data.keypressInterval;
constants.ariaMode = data.ariaMode;
constants.authKey = data.authKey;
constants.skillLevel = data.skillLevel;
}
this.PopulateData();
this.UpdateHtml();
Expand Down Expand Up @@ -787,7 +797,7 @@ class ChatLLM {
let xhr = new XMLHttpRequest();

// start waiting sound
if (constants.sonifMode != 'off') {
if (constants.playLLMWaitingSound) {
chatLLM.WaitingSound(true);
}

Expand Down Expand Up @@ -1127,7 +1137,21 @@ class ChatLLM {
//let img = await this.ConvertSVGtoImg(singleMaidr.id);
let img = await this.ConvertSVGtoJPG(singleMaidr.id);
//this.downloadJPEG(img, 'test.jpg'); // test download
let text = 'Describe this chart';
let text = 'Describe this chart to a blind person';
if (constants.skillLevel) {
text +=
' who has a ' +
constants.skillLevel +
' understanding of statistical charts. ';
} else {
text += ' who has a basic understanding of statistical charts. ';
}
text += 'Here is chart in png format';
if (singleMaidr) {
text += ' and raw data in json format: \n';
text += JSON.stringify(singleMaidr);
}

chatLLM.Submit(text, img);
}
}
Expand Down
2 changes: 1 addition & 1 deletion dist/maidr.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Audio.html
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ <h4 class="name" id="playTone"><span class="type-signature"></span>playTone<span
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Fri Jan 05 2024 12:31:25 GMT-0600 (Central Standard Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Jan 07 2024 22:50:26 GMT-0600 (Central Standard Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/BarChart.html
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ <h4 class="name" id="UnSelectPrevious"><span class="type-signature"></span>UnSel
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Fri Jan 05 2024 12:31:25 GMT-0600 (Central Standard Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Jan 07 2024 22:50:26 GMT-0600 (Central Standard Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/BoxPlot.html
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Fri Jan 05 2024 12:31:25 GMT-0600 (Central Standard Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Jan 07 2024 22:50:26 GMT-0600 (Central Standard Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/BoxplotRect.html
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ <h4 class="name" id="UpdateRect"><span class="type-signature"></span>UpdateRect<
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Fri Jan 05 2024 12:31:25 GMT-0600 (Central Standard Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Jan 07 2024 22:50:26 GMT-0600 (Central Standard Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
16 changes: 8 additions & 8 deletions docs/ChatLLM.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ <h4 class="name" id="ChatLLM"><span class="type-signature"></span>new ChatLLM<sp

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line648">line 648</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line658">line 658</a>
</li></ul></dd>


Expand Down Expand Up @@ -200,7 +200,7 @@ <h4 class="name" id="ConvertSVGtoJPG"><span class="type-signature">(async) </spa

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1062">line 1062</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1072">line 1072</a>
</li></ul></dd>


Expand Down Expand Up @@ -283,7 +283,7 @@ <h4 class="name" id="CreateComponent"><span class="type-signature"></span>Create

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line659">line 659</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line669">line 669</a>
</li></ul></dd>


Expand Down Expand Up @@ -366,7 +366,7 @@ <h4 class="name" id="ProcessLLMResponse"><span class="type-signature"></span>Pro

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line863">line 863</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line873">line 873</a>
</li></ul></dd>


Expand Down Expand Up @@ -470,7 +470,7 @@ <h4 class="name" id="SetEvents"><span class="type-signature"></span>SetEvents<sp

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line697">line 697</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line707">line 707</a>
</li></ul></dd>


Expand Down Expand Up @@ -553,7 +553,7 @@ <h4 class="name" id="Toggle"><span class="type-signature"></span>Toggle<span cla

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1025">line 1025</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1035">line 1035</a>
</li></ul></dd>


Expand Down Expand Up @@ -708,7 +708,7 @@ <h4 class="name" id="fakeLLMResponseData"><span class="type-signature"></span>fa

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line875">line 875</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line885">line 885</a>
</li></ul></dd>


Expand Down Expand Up @@ -781,7 +781,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Fri Jan 05 2024 12:31:25 GMT-0600 (Central Standard Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Jan 07 2024 22:50:26 GMT-0600 (Central Standard Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Constants.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ <h3 class="subsection-title">Classes</h3>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Fri Jan 05 2024 12:31:25 GMT-0600 (Central Standard Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Jan 07 2024 22:50:26 GMT-0600 (Central Standard Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
4 changes: 2 additions & 2 deletions docs/Constants_ConvertHexToRGBString.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h4 class="name" id="ConvertHexToRGBString"><span class="type-signature"></span>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line143">line 143</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line144">line 144</a>
</li></ul></dd>


Expand Down Expand Up @@ -239,7 +239,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Fri Jan 05 2024 12:31:25 GMT-0600 (Central Standard Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Jan 07 2024 22:50:26 GMT-0600 (Central Standard Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
4 changes: 2 additions & 2 deletions docs/Constants_ConvertRGBStringToHex.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h4 class="name" id="ConvertRGBStringToHex"><span class="type-signature"></span>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line161">line 161</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line162">line 162</a>
</li></ul></dd>


Expand Down Expand Up @@ -239,7 +239,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Fri Jan 05 2024 12:31:25 GMT-0600 (Central Standard Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Jan 07 2024 22:50:26 GMT-0600 (Central Standard Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
4 changes: 2 additions & 2 deletions docs/Constants_GetStyleArrayFromString.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h4 class="name" id="GetStyleArrayFromString"><span class="type-signature"></spa

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line208">line 208</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line209">line 209</a>
</li></ul></dd>


Expand Down Expand Up @@ -239,7 +239,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Fri Jan 05 2024 12:31:25 GMT-0600 (Central Standard Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Jan 07 2024 22:50:26 GMT-0600 (Central Standard Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
4 changes: 2 additions & 2 deletions docs/Constants_GetStyleStringFromArray.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h4 class="name" id="GetStyleStringFromArray"><span class="type-signature"></spa

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line219">line 219</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line220">line 220</a>
</li></ul></dd>


Expand Down Expand Up @@ -239,7 +239,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Fri Jan 05 2024 12:31:25 GMT-0600 (Central Standard Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Jan 07 2024 22:50:26 GMT-0600 (Central Standard Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Control.html
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Fri Jan 05 2024 12:31:25 GMT-0600 (Central Standard Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Jan 07 2024 22:50:26 GMT-0600 (Central Standard Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
12 changes: 6 additions & 6 deletions docs/Description.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ <h4 class="name" id="Description"><span class="type-signature"></span>new Descri

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1138">line 1138</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1162">line 1162</a>
</li></ul></dd>


Expand Down Expand Up @@ -200,7 +200,7 @@ <h4 class="name" id="CreateComponent"><span class="type-signature"></span>Create

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1153">line 1153</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1177">line 1177</a>
</li></ul></dd>


Expand Down Expand Up @@ -283,7 +283,7 @@ <h4 class="name" id="Destroy"><span class="type-signature"></span>Destroy<span c

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1223">line 1223</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1247">line 1247</a>
</li></ul></dd>


Expand Down Expand Up @@ -366,7 +366,7 @@ <h4 class="name" id="PopulateData"><span class="type-signature"></span>PopulateD

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1267">line 1267</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1291">line 1291</a>
</li></ul></dd>


Expand Down Expand Up @@ -449,7 +449,7 @@ <h4 class="name" id="Toggle"><span class="type-signature"></span>Toggle<span cla

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1239">line 1239</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1263">line 1263</a>
</li></ul></dd>


Expand Down Expand Up @@ -573,7 +573,7 @@ <h5>Parameters:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Fri Jan 05 2024 12:31:25 GMT-0600 (Central Standard Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Jan 07 2024 22:50:26 GMT-0600 (Central Standard Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Display.html
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ <h4 class="name" id="toggleTextMode"><span class="type-signature"></span>toggleT
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Fri Jan 05 2024 12:31:25 GMT-0600 (Central Standard Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Jan 07 2024 22:50:26 GMT-0600 (Central Standard Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/HeatMap.html
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ <h4 class="name" id="updateConstants"><span class="type-signature"></span>update
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Fri Jan 05 2024 12:31:25 GMT-0600 (Central Standard Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Jan 07 2024 22:50:26 GMT-0600 (Central Standard Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/HeatMapRect.html
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ <h4 class="name" id="UpdateRect"><span class="type-signature"></span>UpdateRect<
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Fri Jan 05 2024 12:31:25 GMT-0600 (Central Standard Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Jan 07 2024 22:50:26 GMT-0600 (Central Standard Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
Loading

0 comments on commit 4b10417

Please sign in to comment.