diff --git a/assets/answer-choices-jhnMapjR.js b/assets/answer-choices-jhnMapjR.js index ec82aa19cb..61e18a3c9c 100644 --- a/assets/answer-choices-jhnMapjR.js +++ b/assets/answer-choices-jhnMapjR.js @@ -1,3 +1,3 @@ -import{a as c,j as e}from"./jsx-runtime-FVsy8kgq.js";import{g as x}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as N}from"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{l as t}from"./index-awljIyHI.js";import{F as z}from"./form-wrapped-text-field-tsI8XMXi.js";import{r as R}from"./index-TT1qJ6UJ.js";const T="javascript:void(0)",h=class h extends R.Component{render(){const{children:s,className:i,highlighted:n,href:d,inlineStyles:k,referrer:p,style:u,target:g,testId:b,element:f,...w}=this.props,[C,v]=d?d.split("#"):[T];let o=C;p&&(o.indexOf("?")>-1?o+="&ref="+p:o+="?ref="+p),v&&(o+="#"+v);const m=[S.link,n&&S.highlighted];Array.isArray(u)?m.push(...u):m.push(u);const I=i?" "+i:"",M=f==="a"?{href:o}:{to:o};let y=w.rel;return g==="_blank"&&!y&&(y="noopener noreferrer"),R.createElement(f,{"data-testid":b,...w,...M,className:t.css(...m)+I,style:k,target:g,rel:y},s)}};h.defaultProps={highlighted:!1,href:T,style:[],element:"a"};let l=h;const S=t.StyleSheet.create({link:{backgroundColor:"transparent",color:"inherit",textDecoration:"none",":hover":{textDecoration:"underline"}},highlighted:{textDecoration:"underline"}});l.__docgenInfo={description:"A wrapper that creates an anchor tag with normalized styles",methods:[],displayName:"Link",props:{element:{required:!1,tsType:{name:"ReactElementType",raw:"React.ElementType"},description:"",defaultValue:{value:'"a"',computed:!1}},highlighted:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},href:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"javascript:void(0)"',computed:!1}},style:{required:!1,tsType:{name:"union",raw:"CSSProperties | Array",elements:[{name:"CSSProperties"},{name:"Array",elements:[{name:"CSSProperties"}],raw:"Array"}]},description:"",defaultValue:{value:"[]",computed:!1}},children:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},className:{required:!1,tsType:{name:"string"},description:""},inlineStyles:{required:!1,tsType:{name:"signature",type:"object",raw:`{ +import{a as c,j as e}from"./jsx-runtime-FVsy8kgq.js";import{g as x}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as N}from"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{l as t}from"./index-awljIyHI.js";import{F as z}from"./form-wrapped-text-field-tsI8XMXi.js";import{r as R}from"./index-TT1qJ6UJ.js";const T="javascript:void(0)",h=class h extends R.Component{render(){const{children:s,className:i,highlighted:n,href:d,inlineStyles:k,referrer:p,style:u,target:g,testId:b,element:f,...w}=this.props,[C,v]=d?d.split("#"):[T];let o=C;p&&(o.indexOf("?")>-1?o+="&ref="+p:o+="?ref="+p),v&&(o+="#"+v);const m=[S.link,n&&S.highlighted];Array.isArray(u)?m.push(...u):m.push(u);const I=i?" "+i:"",M=f==="a"?{href:o}:{to:o};let y=w.rel;return g==="_blank"&&!y&&(y="noopener noreferrer"),R.createElement(f,{"data-testid":b,...w,...M,className:t.css(...m)+I,style:k,target:g,rel:y},s)}};h.defaultProps={highlighted:!1,href:T,style:[],element:"a"};let l=h;const S=t.StyleSheet.create({link:{backgroundColor:"transparent",color:"inherit",textDecoration:"none",":hover":{textDecoration:"underline"}},highlighted:{textDecoration:"underline"}});l.__docgenInfo={description:"A wrapper that creates an anchor tag with normalized styles",methods:[],displayName:"Link",props:{element:{required:!1,tsType:{name:"ReactElementType",raw:"React.ElementType"},description:"",defaultValue:{value:'"a"',computed:!1}},highlighted:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},href:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"javascript:void(0)"',computed:!1}},style:{required:!1,tsType:{name:"union",raw:"CSSProperties | Array",elements:[{name:"CSSProperties"},{name:"Array",elements:[{name:"CSSProperties"}],raw:"Array"}]},description:"",defaultValue:{value:"[]",computed:!1}},children:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},className:{required:!1,tsType:{name:"string"},description:""},inlineStyles:{required:!1,tsType:{name:"signature",type:"object",raw:`{ [key: string]: any; }`,signature:{properties:[{key:{name:"string"},value:{name:"any",required:!0}}]}},description:""},referrer:{required:!1,tsType:{name:"string"},description:""},target:{required:!1,tsType:{name:"string"},description:""},rel:{required:!1,tsType:{name:"string"},description:""},testId:{required:!1,tsType:{name:"string"},description:""},onClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.MouseEvent) => unknown",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent"},name:"e"}],return:{name:"unknown"}}},description:""},onMouseOver:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.MouseEvent) => unknown",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent"},name:"e"}],return:{name:"unknown"}}},description:""},onMouseLeave:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.MouseEvent) => unknown",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent"},name:"e"}],return:{name:"unknown"}}},description:""},onMouseEnter:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.MouseEvent) => unknown",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent"},name:"e"}],return:{name:"unknown"}}},description:""},onBlur:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.SyntheticEvent) => unknown",signature:{arguments:[{type:{name:"ReactSyntheticEvent",raw:"React.SyntheticEvent"},name:"e"}],return:{name:"unknown"}}},description:""},onFocus:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.SyntheticEvent) => unknown",signature:{arguments:[{type:{name:"ReactSyntheticEvent",raw:"React.SyntheticEvent"},name:"e"}],return:{name:"unknown"}}},description:""},onKeyDown:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.KeyboardEvent) => unknown",signature:{arguments:[{type:{name:"ReactKeyboardEvent",raw:"React.KeyboardEvent"},name:"e"}],return:{name:"unknown"}}},description:""},"aria-label":{required:!1,tsType:{name:"string"},description:""},"aria-selected":{required:!1,tsType:{name:"boolean"},description:""},"aria-current":{required:!1,tsType:{name:"boolean"},description:""},role:{required:!1,tsType:{name:"literal",value:'"tab"'},description:""},title:{required:!1,tsType:{name:"string"},description:""},id:{required:!1,tsType:{name:"string"},description:""},tabIndex:{required:!1,tsType:{name:"number"},description:""}}};const{colors:q,typography:E}=x,{Icon:A}=N,B={path:"M11 11V7a1 1 0 0 1 2 0v4h4a1 1 0 0 1 0 2h-4v4a1 1 0 0 1-2 0v-4H7a1 1 0 0 1 0-2h4zm1 13C5.373 24 0 18.627 0 12S5.373 0 12 0s12 5.373 12 12-5.373 12-12 12zm0-2c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z",width:24,height:24},D={path:"M12 24C5.373 24 0 18.627 0 12S5.373 0 12 0s12 5.373 12 12-5.373 12-12 12zm0-2c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10zm-5-9a1 1 0 0 1 0-2h10a1 1 0 0 1 0 2H7z",width:24,height:24},P=()=>c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",children:[c("filter",{id:"draggable-grip-shadow",width:"112.5%",height:"116.7%",x:"-6.2%",y:"-8.3%",filterUnits:"objectBoundingBox",children:[e("feGaussianBlur",{in:"SourceAlpha",stdDeviation:".5",result:"shadowBlurInner"}),e("feOffset",{in:"shadowBlurInner",dy:"1",result:"shadowOffsetInner"}),e("feComposite",{in:"shadowOffsetInner",in2:"SourceAlpha",k2:"-1",k3:"1",operator:"arithmetic",result:"shadowInnerInner"}),e("feColorMatrix",{in:"shadowInnerInner",values:"0 0 0 0 0.129411765 0 0 0 0 0.141176471 0 0 0 0 0.17254902 0 0 0 0.2 0"})]}),e("path",{d:"M1 4a1 1 0 1 1 0-2h14a1 1 0 0 1 0 2H1zm0 10a1 1 0 0 1 0-2h14a1 1 0 0 1 0 2H1zm0-5a1 1 0 1 1 0-2h14a1 1 0 0 1 0 2H1z",fill:q.gray17,filter:"url(#draggable-grip-shadow)"})]}),j=({onClick:r})=>c(l,{className:t.css(a.addAnswer,O.addAnswer),onClick:r,children:[e(A,{icon:B,size:24}),e("div",{className:t.css(a.spacer)}),"Add an answer choice"]}),H=({answer:r,onChange:s,onRemove:i})=>c("li",{className:t.css(a.answer),children:[e(l,{onClick:i,children:e(A,{icon:D,size:24,color:"#D92916"})}),e("div",{className:t.css(a.spacer)}),e(z,{grow:1,onChange:n=>s(n.target.value),value:r}),e("div",{className:t.css(a.spacer)}),e(l,{style:[a.disabled],title:"Answer reordering is not implemented.",children:e(P,{})})]}),F=({choices:r,onChange:s})=>c("div",{children:[e("div",{className:t.css(a.title),children:"Answer Choices"}),e("ul",{className:t.css(a.answers),children:r.map((i,n)=>e(H,{answer:i,onChange:d=>s([...r.slice(0,n),d,...r.slice(n+1)]),onRemove:()=>s([...r.slice(0,n),...r.slice(n+1)])},n))}),e(j,{onClick:()=>s([...r,""])})]}),a=t.StyleSheet.create({title:{...E.bodyXsmallBold,marginBottom:6,color:q.gray17},answers:{marginTop:12,marginBottom:12},answer:{display:"flex",flexDirection:"row",alignItems:"center",":not(:first-child)":{marginTop:12}},addAnswer:{...E.bodyXsmallBold,display:"flex",flexDirection:"row",alignItems:"center",color:"#1865f2"},spacer:{width:16},disabled:{cursor:"not-allowed"}}),O=t.StyleSheet.create({addAnswer:{":link":{color:"#1865f2"}}});F.__docgenInfo={description:"The list of choices, handles adding, removing and reording of answers.",methods:[],displayName:"AnswerChoices",props:{choices:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(choices: ReadonlyArray) => void",signature:{arguments:[{type:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},name:"choices"}],return:{name:"void"}}},description:""}}};export{F as A}; diff --git a/assets/answer-choices.stories-8XsGaiBy.js b/assets/answer-choices.stories-8XsGaiBy.js index 67198d6ac9..31486a0ddd 100644 --- a/assets/answer-choices.stories-8XsGaiBy.js +++ b/assets/answer-choices.stories-8XsGaiBy.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{a as y}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as C}from"./index-awljIyHI.js";import{r as S}from"./index-TT1qJ6UJ.js";import{A as v}from"./answer-choices-jhnMapjR.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./form-wrapped-text-field-tsI8XMXi.js";const ut={title:"PerseusEditor/Widgets/Label Image/Answer Choices"},E=C.StyleSheet.create({wrapper:{width:338}}),s=r=>o("div",{className:C.css(E.wrapper),children:o(v,{...r,onChange:(...t)=>{y("onChange")(...t),r.onChange(...t)}})});class N extends S.Component{constructor(){super(...arguments),this.state={choices:[]}}render(){const{choices:t}=this.state;return o(s,{choices:t,onChange:m=>this.setState({choices:m})})}}const i=r=>o(s,{...{choices:[],onChange:(...m)=>{}}}),e=r=>o(s,{...{choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],onChange:(...m)=>{}}}),p=r=>o(N,{});i.__docgenInfo={description:"",methods:[],displayName:"EmptyNonInteractive"};e.__docgenInfo={description:"",methods:[],displayName:"FilledNonInteractive"};p.__docgenInfo={description:"",methods:[],displayName:"Interactive"};var a,n,c;i.parameters={...i.parameters,docs:{...(a=i.parameters)==null?void 0:a.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{a as y}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as C}from"./index-awljIyHI.js";import{r as S}from"./index-TT1qJ6UJ.js";import{A as v}from"./answer-choices-jhnMapjR.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./form-wrapped-text-field-tsI8XMXi.js";const ut={title:"PerseusEditor/Widgets/Label Image/Answer Choices"},E=C.StyleSheet.create({wrapper:{width:338}}),s=r=>o("div",{className:C.css(E.wrapper),children:o(v,{...r,onChange:(...t)=>{y("onChange")(...t),r.onChange(...t)}})});class N extends S.Component{constructor(){super(...arguments),this.state={choices:[]}}render(){const{choices:t}=this.state;return o(s,{choices:t,onChange:m=>this.setState({choices:m})})}}const i=r=>o(s,{...{choices:[],onChange:(...m)=>{}}}),e=r=>o(s,{...{choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],onChange:(...m)=>{}}}),p=r=>o(N,{});i.__docgenInfo={description:"",methods:[],displayName:"EmptyNonInteractive"};e.__docgenInfo={description:"",methods:[],displayName:"FilledNonInteractive"};p.__docgenInfo={description:"",methods:[],displayName:"Interactive"};var a,n,c;i.parameters={...i.parameters,docs:{...(a=i.parameters)==null?void 0:a.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = ({ choices: [], onChange: (...args) => {} diff --git a/assets/answer-choices.stories-bD3wCjIX.js b/assets/answer-choices.stories-bD3wCjIX.js index bf769f0e5c..641a0e4e57 100644 --- a/assets/answer-choices.stories-bD3wCjIX.js +++ b/assets/answer-choices.stories-bD3wCjIX.js @@ -1,4 +1,4 @@ -import{j as t,a as _,F as c}from"./jsx-runtime-FVsy8kgq.js";import{L as y}from"./index-h_CiYGGb.js";import{r as p}from"./index-TT1qJ6UJ.js";import{A as b}from"./answer-choices-vbrLThK4.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-o3wWn3Y5.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./index-7vsPyIck.js";import"./index-rfN0X25E.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-YCTzZMik.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";const ge={title:"Perseus/Widgets/Label Image/Answer Choices"},A=[{content:"Lamborghini",checked:!1},{content:"BMW",checked:!1},{content:"Volkswagen",checked:!1},{content:"Fiat",checked:!1},{content:"$\\displaystyle f(x)=\\frac{1}{x}$",checked:!1},{content:"Porsche",checked:!1},{content:"Ferrari",checked:!1}],a=({multipleSelect:s})=>{const[i,g]=p.useState([...A]),[f,S]=p.useState(!1),k=e=>{g([...i.map((C,x)=>({...C,checked:e[x]}))])};return _(c,{children:[t(b,{choices:i,multipleSelect:s,onChange:e=>k(e),opener:()=>t("button",{children:f?"Close":"Open"}),onToggle:e=>S(e),disabled:!1}),t(c,{children:i.filter(({checked:e})=>e).map(({content:e})=>t(y,{children:e},e))})]})};a.defaultProps={multipleSelect:!1};const r=s=>t(a,{}),o=s=>t(a,{multipleSelect:!0});r.__docgenInfo={description:"",methods:[],displayName:"SingleSelect"};o.__docgenInfo={description:"",methods:[],displayName:"MultipleSelect"};var m,n,l;r.parameters={...r.parameters,docs:{...(m=r.parameters)==null?void 0:m.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as t,a as _,F as c}from"./jsx-runtime-FVsy8kgq.js";import{L as y}from"./index-h_CiYGGb.js";import{r as p}from"./index-TT1qJ6UJ.js";import{A as b}from"./answer-choices-vbrLThK4.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-o3wWn3Y5.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./index-7vsPyIck.js";import"./index-rfN0X25E.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-YCTzZMik.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";const ge={title:"Perseus/Widgets/Label Image/Answer Choices"},A=[{content:"Lamborghini",checked:!1},{content:"BMW",checked:!1},{content:"Volkswagen",checked:!1},{content:"Fiat",checked:!1},{content:"$\\displaystyle f(x)=\\frac{1}{x}$",checked:!1},{content:"Porsche",checked:!1},{content:"Ferrari",checked:!1}],a=({multipleSelect:s})=>{const[i,g]=p.useState([...A]),[f,S]=p.useState(!1),k=e=>{g([...i.map((C,x)=>({...C,checked:e[x]}))])};return _(c,{children:[t(b,{choices:i,multipleSelect:s,onChange:e=>k(e),opener:()=>t("button",{children:f?"Close":"Open"}),onToggle:e=>S(e),disabled:!1}),t(c,{children:i.filter(({checked:e})=>e).map(({content:e})=>t(y,{children:e},e))})]})};a.defaultProps={multipleSelect:!1};const r=s=>t(a,{}),o=s=>t(a,{multipleSelect:!0});r.__docgenInfo={description:"",methods:[],displayName:"SingleSelect"};o.__docgenInfo={description:"",methods:[],displayName:"MultipleSelect"};var m,n,l;r.parameters={...r.parameters,docs:{...(m=r.parameters)==null?void 0:m.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(l=(n=r.parameters)==null?void 0:n.docs)==null?void 0:l.source}}};var d,h,u;o.parameters={...o.parameters,docs:{...(d=o.parameters)==null?void 0:d.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/answer-pill.stories-91EV8Ogl.js b/assets/answer-pill.stories-91EV8Ogl.js index be9ac6a8d4..a21a4e1323 100644 --- a/assets/answer-pill.stories-91EV8Ogl.js +++ b/assets/answer-pill.stories-91EV8Ogl.js @@ -1,4 +1,4 @@ -import{j as C}from"./jsx-runtime-FVsy8kgq.js";import{A as t}from"./answer-pill-uwg1DdPG.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./index-o3wWn3Y5.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./index-7vsPyIck.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";const tr={title:"Perseus/Widgets/Label Image/Answer Pill",component:t,render:k=>C(t,{...k}),argTypes:{showCorrectness:{options:["not answered","correct","incorrect"],control:{type:"radio"}}}},r={args:{id:"1",selectedAnswers:["Answer Pill"],markerRef:null,side:"top",onClick:()=>{}}},e={args:{id:"1",selectedAnswers:["Answer 1","Answer 2"],markerRef:null,side:"top",onClick:()=>{}}},s={args:{id:"1",selectedAnswers:["Right Answer"],showCorrectness:"correct",markerRef:null,side:"top",onClick:()=>{}}},o={args:{id:"1",selectedAnswers:["Wrong Answer"],showCorrectness:"incorrect",markerRef:null,side:"top",onClick:()=>{}}};var n,i,c;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ +import{j as C}from"./jsx-runtime-FVsy8kgq.js";import{A as t}from"./answer-pill-uwg1DdPG.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./index-o3wWn3Y5.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./index-7vsPyIck.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";const tr={title:"Perseus/Widgets/Label Image/Answer Pill",component:t,render:k=>C(t,{...k}),argTypes:{showCorrectness:{options:["not answered","correct","incorrect"],control:{type:"radio"}}}},r={args:{id:"1",selectedAnswers:["Answer Pill"],markerRef:null,side:"top",onClick:()=>{}}},e={args:{id:"1",selectedAnswers:["Answer 1","Answer 2"],markerRef:null,side:"top",onClick:()=>{}}},s={args:{id:"1",selectedAnswers:["Right Answer"],showCorrectness:"correct",markerRef:null,side:"top",onClick:()=>{}}},o={args:{id:"1",selectedAnswers:["Wrong Answer"],showCorrectness:"incorrect",markerRef:null,side:"top",onClick:()=>{}}};var n,i,c;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ args: { id: "1", selectedAnswers: ["Answer Pill"], diff --git a/assets/article-editor-BfWGyfWk.js b/assets/article-editor-BfWGyfWk.js index e2a6cbf385..2b32e90ce7 100644 --- a/assets/article-editor-BfWGyfWk.js +++ b/assets/article-editor-BfWGyfWk.js @@ -1,4 +1,4 @@ -import{j as t,a as s}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import{_ as i}from"./jquery-yG1GhClm.js";import{P as d,E as c}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as u}from"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as g}from"./components-0kNWnYe6.js";import{I as v}from"./icon-paths-AuJwhOz7.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{r as w}from"./index-TT1qJ6UJ.js";import{D as R}from"./device-framer-wVZUBEZD.js";import{I as _,J as k}from"./register-all-widgets-and-editors-for-testing-Ftx4wZEN.js";import{S as o}from"./section-control-button-VtgjGcq5.js";import{E as b}from"./editor-SZLWA5DH.js";const{HUD:P,InlineIcon:C}=g,{iconCircleArrowDown:A,iconCircleArrowUp:S,iconPlus:h,iconTrash:E}=v,m=class m extends w.Component{constructor(){super(...arguments),this.state={highlightLint:!0},this._handleJsonChange=n=>{this.props.onChange({json:n})},this._handleEditorChange=(n,e)=>{const a=i.clone(this._sections());a[n]=i.extend({},a[n],e),this.props.onChange({json:a})}}componentDidMount(){this._updatePreviewFrames()}componentDidUpdate(){this._updatePreviewFrames()}_updatePreviewFrames(){this.props.mode==="preview"?this.refs["frame-all"].sendNewData({type:"article-all",data:this._sections().map((n,e)=>this._apiOptionsForSection(n,e))}):this.props.mode==="edit"&&this._sections().forEach((n,e)=>{this.refs["frame-"+e].sendNewData({type:"article",data:this._apiOptionsForSection(n,e)})})}_apiOptionsForSection(n,e){const a=this.refs[`editor${e}`];return{apiOptions:{...u.defaults,...this.props.apiOptions,showAlignmentOptions:!0,isArticle:!0},json:n,useNewStyles:this.props.useNewStyles,linterContext:{contentType:"article",highlightLint:this.state.highlightLint,paths:this.props.contentPaths},legacyPerseusLint:a?a.getSaveWarnings():[]}}_sections(){return Array.isArray(this.props.json)?this.props.json:[this.props.json]}_renderEditor(){const{imageUploader:n,sectionImageUploadGenerator:e}=this.props,a={...u.defaults,...this.props.apiOptions,showAlignmentOptions:!0,isArticle:!0},p=this._sections();return s("div",{className:"perseus-editor-table",children:[p.map((y,r)=>[s("div",{className:"perseus-editor-row",children:[s("div",{className:"perseus-editor-left-cell",children:[s("div",{className:"pod-title",children:["Section ",r+1,s("div",{style:{display:"inline-block",float:"right"},children:[e(r),t(o,{icon:h,onClick:()=>{this._handleAddSectionAfter(r)},title:"Add a new section after this one"}),r+1{this._handleMoveSectionLater(r)},title:"Move this section down"}),r>0&&t(o,{icon:S,onClick:()=>{this._handleMoveSectionEarlier(r)},title:"Move this section up"}),t(o,{icon:E,onClick:()=>{const f="Are you sure you want to delete section "+(r+1)+"?";confirm(f)&&this._handleRemoveSection(r)},title:"Delete this section"})]})]}),t(b,{...y,apiOptions:a,imageUploader:n,onChange:i.partial(this._handleEditorChange,r),placeholder:"Type your section text here...",ref:"editor"+r})]}),t("div",{className:"editor-preview",children:this._renderIframePreview(r,!0)})]},r)]),this._renderAddSection(),this._renderLinterHUD()]})}_renderAddSection(){return t("div",{className:"perseus-editor-row",children:t("div",{className:"perseus-editor-left-cell",children:s("a",{href:"#",className:"simple-button orange",onClick:()=>{this._handleAddSectionAfter(this._sections().length-1)},children:[t(C,{...h})," Add a section"]})})})}_renderLinterHUD(){return t(P,{message:"Style warnings",enabled:this.state.highlightLint,onClick:()=>{this.setState({highlightLint:!this.state.highlightLint})}})}_renderIframePreview(n,e){const a=this.props.screen==="phone"||this.props.screen==="tablet";return t(R,{deviceType:this.props.screen,nochrome:e,children:t(_,{ref:"frame-"+n,datasetKey:"mobile",datasetValue:a,seamless:e,url:this.props.previewURL},this.props.screen)})}_renderPreviewMode(){return t("div",{className:"standalone-preview",children:this._renderIframePreview("all",!1)})}_handleMoveSectionEarlier(n){if(n===0)return;const e=i.clone(this._sections()),a=e[n];e.splice(n,1),e.splice(n-1,0,a),this.props.onChange({json:e})}_handleMoveSectionLater(n){const e=i.clone(this._sections());if(n+1===e.length)return;const a=e[n];e.splice(n,1),e.splice(n+1,0,a),this.props.onChange({json:e})}_handleAddSectionAfter(n){const e=i.clone(this.serialize()),a=n>=0?{widgets:e[n].widgets}:{};e.splice(n+1,0,a),this.props.onChange({json:e})}_handleRemoveSection(n){const e=i.clone(this._sections());e.splice(n,1),this.props.onChange({json:e})}serialize(){if(this.props.mode==="edit")return this._sections().map((n,e)=>this.refs["editor"+e].serialize());if(this.props.mode==="preview"||this.props.mode==="json")return this.props.json;throw new d("Could not serialize; mode "+this.props.mode+" not found",c.Internal)}getSaveWarnings(){if(this.props.mode!=="edit")throw new d("Can only get save warnings in edit mode.",c.NotAllowed);return this._sections().map((n,e)=>this.refs["editor"+e].getSaveWarnings())}render(){return s("div",{className:"framework-perseus perseus-article-editor",children:[this.props.mode==="edit"&&this._renderEditor(),this.props.mode==="preview"&&this._renderPreviewMode(),this.props.mode==="json"&&s("div",{className:"json-editor",children:[t("div",{className:"json-editor-warning",children:t("span",{children:"Warning: Editing in this mode can lead to broken articles!"})}),t(k,{multiLine:!0,onChange:this._handleJsonChange,value:this.props.json})]})]})}};m.defaultProps={contentPaths:[],json:[{}],mode:"edit",screen:"desktop",sectionImageUploadGenerator:()=>t("span",{}),useNewStyles:!1};let l=m;l.__docgenInfo={description:"",methods:[{name:"_updatePreviewFrames",docblock:null,modifiers:[],params:[],returns:null},{name:"_apiOptionsForSection",docblock:null,modifiers:[],params:[{name:"section",optional:!1,type:{name:"signature",type:"object",raw:`{ +import{j as t,a as s}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import{_ as i}from"./jquery-yG1GhClm.js";import{P as d,E as c}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as u}from"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as g}from"./components-0kNWnYe6.js";import{I as v}from"./icon-paths-AuJwhOz7.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{r as w}from"./index-TT1qJ6UJ.js";import{D as R}from"./device-framer-wVZUBEZD.js";import{I as _,J as k}from"./register-all-widgets-and-editors-for-testing-Ftx4wZEN.js";import{S as o}from"./section-control-button-VtgjGcq5.js";import{E as b}from"./editor-SZLWA5DH.js";const{HUD:P,InlineIcon:C}=g,{iconCircleArrowDown:A,iconCircleArrowUp:S,iconPlus:h,iconTrash:E}=v,m=class m extends w.Component{constructor(){super(...arguments),this.state={highlightLint:!0},this._handleJsonChange=n=>{this.props.onChange({json:n})},this._handleEditorChange=(n,e)=>{const a=i.clone(this._sections());a[n]=i.extend({},a[n],e),this.props.onChange({json:a})}}componentDidMount(){this._updatePreviewFrames()}componentDidUpdate(){this._updatePreviewFrames()}_updatePreviewFrames(){this.props.mode==="preview"?this.refs["frame-all"].sendNewData({type:"article-all",data:this._sections().map((n,e)=>this._apiOptionsForSection(n,e))}):this.props.mode==="edit"&&this._sections().forEach((n,e)=>{this.refs["frame-"+e].sendNewData({type:"article",data:this._apiOptionsForSection(n,e)})})}_apiOptionsForSection(n,e){const a=this.refs[`editor${e}`];return{apiOptions:{...u.defaults,...this.props.apiOptions,showAlignmentOptions:!0,isArticle:!0},json:n,useNewStyles:this.props.useNewStyles,linterContext:{contentType:"article",highlightLint:this.state.highlightLint,paths:this.props.contentPaths},legacyPerseusLint:a?a.getSaveWarnings():[]}}_sections(){return Array.isArray(this.props.json)?this.props.json:[this.props.json]}_renderEditor(){const{imageUploader:n,sectionImageUploadGenerator:e}=this.props,a={...u.defaults,...this.props.apiOptions,showAlignmentOptions:!0,isArticle:!0},p=this._sections();return s("div",{className:"perseus-editor-table",children:[p.map((y,r)=>[s("div",{className:"perseus-editor-row",children:[s("div",{className:"perseus-editor-left-cell",children:[s("div",{className:"pod-title",children:["Section ",r+1,s("div",{style:{display:"inline-block",float:"right"},children:[e(r),t(o,{icon:h,onClick:()=>{this._handleAddSectionAfter(r)},title:"Add a new section after this one"}),r+1{this._handleMoveSectionLater(r)},title:"Move this section down"}),r>0&&t(o,{icon:S,onClick:()=>{this._handleMoveSectionEarlier(r)},title:"Move this section up"}),t(o,{icon:E,onClick:()=>{const f="Are you sure you want to delete section "+(r+1)+"?";confirm(f)&&this._handleRemoveSection(r)},title:"Delete this section"})]})]}),t(b,{...y,apiOptions:a,imageUploader:n,onChange:i.partial(this._handleEditorChange,r),placeholder:"Type your section text here...",ref:"editor"+r})]}),t("div",{className:"editor-preview",children:this._renderIframePreview(r,!0)})]},r)]),this._renderAddSection(),this._renderLinterHUD()]})}_renderAddSection(){return t("div",{className:"perseus-editor-row",children:t("div",{className:"perseus-editor-left-cell",children:s("a",{href:"#",className:"simple-button orange",onClick:()=>{this._handleAddSectionAfter(this._sections().length-1)},children:[t(C,{...h})," Add a section"]})})})}_renderLinterHUD(){return t(P,{message:"Style warnings",enabled:this.state.highlightLint,onClick:()=>{this.setState({highlightLint:!this.state.highlightLint})}})}_renderIframePreview(n,e){const a=this.props.screen==="phone"||this.props.screen==="tablet";return t(R,{deviceType:this.props.screen,nochrome:e,children:t(_,{ref:"frame-"+n,datasetKey:"mobile",datasetValue:a,seamless:e,url:this.props.previewURL},this.props.screen)})}_renderPreviewMode(){return t("div",{className:"standalone-preview",children:this._renderIframePreview("all",!1)})}_handleMoveSectionEarlier(n){if(n===0)return;const e=i.clone(this._sections()),a=e[n];e.splice(n,1),e.splice(n-1,0,a),this.props.onChange({json:e})}_handleMoveSectionLater(n){const e=i.clone(this._sections());if(n+1===e.length)return;const a=e[n];e.splice(n,1),e.splice(n+1,0,a),this.props.onChange({json:e})}_handleAddSectionAfter(n){const e=i.clone(this.serialize()),a=n>=0?{widgets:e[n].widgets}:{};e.splice(n+1,0,a),this.props.onChange({json:e})}_handleRemoveSection(n){const e=i.clone(this._sections());e.splice(n,1),this.props.onChange({json:e})}serialize(){if(this.props.mode==="edit")return this._sections().map((n,e)=>this.refs["editor"+e].serialize());if(this.props.mode==="preview"||this.props.mode==="json")return this.props.json;throw new d("Could not serialize; mode "+this.props.mode+" not found",c.Internal)}getSaveWarnings(){if(this.props.mode!=="edit")throw new d("Can only get save warnings in edit mode.",c.NotAllowed);return this._sections().map((n,e)=>this.refs["editor"+e].getSaveWarnings())}render(){return s("div",{className:"framework-perseus perseus-article-editor",children:[this.props.mode==="edit"&&this._renderEditor(),this.props.mode==="preview"&&this._renderPreviewMode(),this.props.mode==="json"&&s("div",{className:"json-editor",children:[t("div",{className:"json-editor-warning",children:t("span",{children:"Warning: Editing in this mode can lead to broken articles!"})}),t(k,{multiLine:!0,onChange:this._handleJsonChange,value:this.props.json})]})]})}};m.defaultProps={contentPaths:[],json:[{}],mode:"edit",screen:"desktop",sectionImageUploadGenerator:()=>t("span",{}),useNewStyles:!1};let l=m;l.__docgenInfo={description:"",methods:[{name:"_updatePreviewFrames",docblock:null,modifiers:[],params:[],returns:null},{name:"_apiOptionsForSection",docblock:null,modifiers:[],params:[{name:"section",optional:!1,type:{name:"signature",type:"object",raw:`{ content?: string; widgets?: any; images?: any; diff --git a/assets/article-editor.stories-pGtSApHs.js b/assets/article-editor.stories-pGtSApHs.js index cd68a02cd6..1495c42574 100644 --- a/assets/article-editor.stories-pGtSApHs.js +++ b/assets/article-editor.stories-pGtSApHs.js @@ -1,4 +1,4 @@ -import{a as d,F as u,j as r}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as f}from"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{r as i}from"./index-TT1qJ6UJ.js";import{A as g}from"./article-editor-BfWGyfWk.js";import{r as h}from"./register-all-widgets-and-editors-for-testing-Ftx4wZEN.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./icon-paths-AuJwhOz7.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./shared-3pf9YZIg.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-vbrLThK4.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./video-transcript-link-WVgIZGhp.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-Hmby24Jq.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./choice-none-above-o4v4BTO3.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./index-QCAhLhLD.js";import"./strings-OAjNfY6D.js";import"./bundle.esm-7jAAHVxW.js";import"./components-0kNWnYe6.js";import"./device-framer-wVZUBEZD.js";import"./constants-hQyjCzwz.js";import"./section-control-button-VtgjGcq5.js";import"./index-tFzzSRL2.js";import"./editor-SZLWA5DH.js";import"./index-0C4KXdeC.js";import"./index-SM3muJE2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";import"./categorizer-editor-aJj5kcPa.js";import"./editor-jsonify-yP45H1ib.js";import"./blur-input-hjJsfoK9.js";import"./definition-editor-koC6zgjU.js";import"./dropdown-editor-vzCR7Y_E.js";import"./explanation-editor-QNDSiyWl.js";import"./expression-editor-gbMGfXvL.js";import"./graph-settings-LBBYDOUY.js";import"./image-editor-ifkVG3z1.js";import"./input-number-editor-ncl_GOvQ.js";import"./index-uK3b_Y1s.js";import"./interactive-graph-editor-PeMztHwk.js";import"./heading-8aCiuWUg.js";import"./interactive-graph-settings-3oLklA_Z.js";import"./locked-figures-section-nxp-trxv.js";import"./locked-ellipse-settings-H2lz6Mnf.js";import"./plus-circle-JCxQSzSv.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./color-select-aXibMsPD.js";import"./util-7LGRm2EO.js";import"./line-stroke-select-ZTaE76uS.js";import"./locked-label-settings-qoc_z_IC.js";import"./locked-function-settings-RE4yVDE6.js";import"./line-swatch-YWYea0Do.js";import"./locked-line-settings-h25vlmkK.js";import"./locked-point-settings-7pJS5tix.js";import"./labeled-switch-OVGss_VI.js";import"./locked-polygon-settings-pkXY4ncz.js";import"./locked-vector-settings-EnKejgQ9.js";import"./label-image-editor-Z5_dot8_.js";import"./form-wrapped-text-field-tsI8XMXi.js";import"./answer-choices-jhnMapjR.js";import"./behavior-RYjJdmKF.js";import"./question-markers-KN3OrYEl.js";import"./marker-st5wrvmE.js";import"./select-image-_eHoVMfM.js";import"./matcher-editor-hlzTMdtB.js";import"./number-line-editor-t3bGT3LG.js";import"./numeric-input-editor-QUZ56KMx.js";import"./phet-simulation-editor-0655QF05.js";import"./python-program-editor-SPqpWu4A.js";import"./editor-8WwPqQi6.js";import"./sorter-editor-Kj6XqnPI.js";h();const eo={title:"PerseusEditor/ArticleEditor"},t=()=>{const[s,n]=i.useState(),o=i.useRef();function a(c){n(c.json)}function l(){console.log(o.current.serialize())}return d(u,{children:[r("button",{onClick:l,children:"Serialize"}),r("hr",{}),r(g,{apiOptions:f.defaults,imageUploader:()=>{},json:s,onChange:a,previewURL:"/perseus/frame",ref:o})]})};t.__docgenInfo={description:"",methods:[],displayName:"Base"};var p,m,e;t.parameters={...t.parameters,docs:{...(p=t.parameters)==null?void 0:p.docs,source:{originalSource:`(): React.ReactElement => { +import{a as d,F as u,j as r}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as f}from"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{r as i}from"./index-TT1qJ6UJ.js";import{A as g}from"./article-editor-BfWGyfWk.js";import{r as h}from"./register-all-widgets-and-editors-for-testing-Ftx4wZEN.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./icon-paths-AuJwhOz7.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./shared-3pf9YZIg.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-vbrLThK4.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./video-transcript-link-WVgIZGhp.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-Hmby24Jq.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./choice-none-above-o4v4BTO3.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./index-QCAhLhLD.js";import"./strings-OAjNfY6D.js";import"./bundle.esm-7jAAHVxW.js";import"./components-0kNWnYe6.js";import"./device-framer-wVZUBEZD.js";import"./constants-hQyjCzwz.js";import"./section-control-button-VtgjGcq5.js";import"./index-tFzzSRL2.js";import"./editor-SZLWA5DH.js";import"./index-k-0mNqHS.js";import"./index-SM3muJE2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";import"./categorizer-editor-aJj5kcPa.js";import"./editor-jsonify-yP45H1ib.js";import"./blur-input-hjJsfoK9.js";import"./definition-editor-koC6zgjU.js";import"./dropdown-editor-vzCR7Y_E.js";import"./explanation-editor-QNDSiyWl.js";import"./expression-editor-gbMGfXvL.js";import"./graph-settings-LBBYDOUY.js";import"./image-editor-ifkVG3z1.js";import"./input-number-editor-ncl_GOvQ.js";import"./index-uK3b_Y1s.js";import"./interactive-graph-editor-PeMztHwk.js";import"./heading-8aCiuWUg.js";import"./interactive-graph-settings-3oLklA_Z.js";import"./locked-figures-section-nxp-trxv.js";import"./locked-ellipse-settings-H2lz6Mnf.js";import"./plus-circle-JCxQSzSv.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./color-select-aXibMsPD.js";import"./util-7LGRm2EO.js";import"./line-stroke-select-ZTaE76uS.js";import"./locked-label-settings-qoc_z_IC.js";import"./locked-function-settings-RE4yVDE6.js";import"./line-swatch-YWYea0Do.js";import"./locked-line-settings-h25vlmkK.js";import"./locked-point-settings-7pJS5tix.js";import"./labeled-switch-OVGss_VI.js";import"./locked-polygon-settings-pkXY4ncz.js";import"./locked-vector-settings-EnKejgQ9.js";import"./label-image-editor-Z5_dot8_.js";import"./form-wrapped-text-field-tsI8XMXi.js";import"./answer-choices-jhnMapjR.js";import"./behavior-RYjJdmKF.js";import"./question-markers-KN3OrYEl.js";import"./marker-st5wrvmE.js";import"./select-image-_eHoVMfM.js";import"./matcher-editor-hlzTMdtB.js";import"./number-line-editor-t3bGT3LG.js";import"./numeric-input-editor-QUZ56KMx.js";import"./phet-simulation-editor-0655QF05.js";import"./python-program-editor-SPqpWu4A.js";import"./editor-8WwPqQi6.js";import"./sorter-editor-Kj6XqnPI.js";h();const eo={title:"PerseusEditor/ArticleEditor"},t=()=>{const[s,n]=i.useState(),o=i.useRef();function a(c){n(c.json)}function l(){console.log(o.current.serialize())}return d(u,{children:[r("button",{onClick:l,children:"Serialize"}),r("hr",{}),r(g,{apiOptions:f.defaults,imageUploader:()=>{},json:s,onChange:a,previewURL:"/perseus/frame",ref:o})]})};t.__docgenInfo={description:"",methods:[],displayName:"Base"};var p,m,e;t.parameters={...t.parameters,docs:{...(p=t.parameters)==null?void 0:p.docs,source:{originalSource:`(): React.ReactElement => { const [state, setState] = useState(); const articleEditorRef = useRef(); function handleChange(value) { diff --git a/assets/article-renderer-o95CuJpS.js b/assets/article-renderer-o95CuJpS.js index cb0e18a6b0..d148bebd55 100644 --- a/assets/article-renderer-o95CuJpS.js +++ b/assets/article-renderer-o95CuJpS.js @@ -1,4 +1,4 @@ -import{a as T,j as d,F as U}from"./jsx-runtime-FVsy8kgq.js";import{P as Be,E as Oe,p as cr,g as Dr,K as Ue,U as L,e as Jn,D as hl,h as Ca,t as pl,c as cl}from"./util-XcxTwqb0.js";import{M as bl}from"./prop-types-3bOVFRDQ.js";import"./key-translator-IA-2V2LV.js";import"./mobile-keypad-hKjeQGNp.js";import"./button-assets-txIojR3b.js";import{K as vl}from"./enums-x5qaTru7.js";import{l as B,P as Ea,R as V,D as wl,m as Zn,n as D,J as fl,p as kl}from"./renderer-4_U4OAry.js";import{V as K,U as ql,d as Tl,b as Gi,u as Ki,_ as dn}from"./index-6h5t6F0w.js";import{T as ea}from"./index-K9BSJPWl.js";import{b as Pa,a as Bi}from"./index-h_CiYGGb.js";import{l as j}from"./index-awljIyHI.js";import{c as je}from"./index-dnMhQZ-1.js";import{r as q,R as Yi}from"./index-TT1qJ6UJ.js";import{R as H,r as qr}from"./index-7vsPyIck.js";import{_ as g,$ as z}from"./jquery-yG1GhClm.js";import{P as $,u as ra}from"./i18n-context-hxuRe8oU.js";import{a as Gt,M as Al}from"./math-input-b6JdL4xR.js";import{u as Xi,g as qe,D as Rl}from"./dependencies-8XILypbq.js";import"./version-akiLXZts.js";import{P as re}from"./index-k-0mNqHS.js";import{A as me,C as Le}from"./perseus-api-mOiZT07d.js";import{L as ta,a as Y,r as Ol,K as N,s as za,b as zr,I as E,S as Ur,W as Lr,c as xl,d as na,f as ar,v as ir,p as jl,g as Wl,h as Qi,i as dt,j as yt,k as Ji,e as Il,n as Ie,q as La,t as Nl,G as He,u as Z,w as Zt,x as _a,y as Cl,z as Fa,A as Sa,C as El,B as aa}from"./svg-image-Rjw-_QTV.js";import{s as ye,c as P,a as Pl,b as zl}from"./index-deFLJwr4.js";import{I as Zi}from"./input-with-examples-1e8gjW5y.js";import{S as Hr}from"./simple-keypad-input-zNNuoI83.js";import{B as Ll}from"./base-radio-sE9E2UC2.js";import{I as sr}from"./inline-icon-tKY1iMkH.js";import{g as _l,h as Fl,j as Sl,k as Ml,l as $l,m as Dl}from"./icon-paths-AuJwhOz7.js";import{m as _r}from"./media-queries-MaBBbpNq.js";import{s as Ma}from"./shared-3pf9YZIg.js";import{u as Ul,n as Ve,s as ze,g as mt,v as es,e as Hl,i as rs}from"./constants-I_nlPaPx.js";import{C as ia}from"./index-2dmvOE3q.js";import{P as Vl,a as Gl}from"./index-BPSWBbj5.js";import{B as Kl,a as Bl,h as Yl,k as Xl,b as Ql,c as Jl,d as Zl,l as eu,e as ru,f as tu}from"./phet-simulation-I2_BZVd2.js";import{O as $a,S as nu,A as au}from"./answer-choices-vbrLThK4.js";import{B as Ye}from"./choice-E4eyMygy.js";import{B as iu}from"./button-group-nsoLlHtM.js";import{c as sa}from"./asset-context-I7yIqWki.js";import{c as Kr,g as ts}from"./_commonjsHelpers-4gQjN7DL.js";import{G as su}from"./graph-sgfCFYpv.js";import{w as Vr}from"./index-J2t_5nK1.js";import{v as x,C as ou,E as lu,P as gt,a as ht,L as Da,b as yn,u as uu,c as ns,T as du,M as Ua}from"./index-IIMKO4_x.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./multi-button-group-a0iIfrwx.js";import{N as as}from"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import{T as yu}from"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import{i as mn}from"./tiny-invariant-bHgPayXn.js";import{m as mu,c as gu,u as hu,a as pu,T as cu}from"./index-rfN0X25E.js";import{M as bu}from"./marker-vUQ60Bu-.js";import{S as gn}from"./sortable-w6DA86Qg.js";import{i as vu}from"./invariant-bu5zBsRS.js";import{F as wu}from"./fixed-to-responsive-1fSZ1n--.js";import{V as fu}from"./video-transcript-link-WVgIZGhp.js";const ku=["PLUS","MINUS","NEGATIVE","TIMES","DIVIDE","DECIMAL","PERIOD","PERCENT","CDOT","EQUAL","NEQ","GT","LT","GEQ","LEQ","FRAC_INCLUSIVE","FRAC_EXCLUSIVE","FRAC","EXP","EXP_2","EXP_3","SQRT","CUBE_ROOT","RADICAL","LEFT_PAREN","RIGHT_PAREN","LN","LOG","LOG_N","SIN","COS","TAN","PI","THETA","UP","RIGHT","DOWN","LEFT","BACKSPACE","DISMISS","JUMP_OUT_PARENTHESES","JUMP_OUT_EXPONENT","JUMP_OUT_BASE","JUMP_INTO_NUMERATOR","JUMP_OUT_NUMERATOR","JUMP_OUT_DENOMINATOR","NUM_0","NUM_1","NUM_2","NUM_3","NUM_4","NUM_5","NUM_6","NUM_7","NUM_8","NUM_9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],qu=["key","ref","containerSizeClass","widgetId","onChange","problemNum","apiOptions","widgetIsOpen","questionCompleted","findWidgets","onRemove","id","onBlur","onFocus","trackInteraction","keypadElement"],Tu=`Usage: +import{a as T,j as d,F as U}from"./jsx-runtime-FVsy8kgq.js";import{P as Be,E as Oe,p as cr,g as Dr,K as Ue,U as L,e as Jn,D as hl,h as Ca,t as pl,c as cl}from"./util-XcxTwqb0.js";import{M as bl}from"./prop-types-3bOVFRDQ.js";import"./key-translator-IA-2V2LV.js";import"./mobile-keypad-hKjeQGNp.js";import"./button-assets-txIojR3b.js";import{K as vl}from"./enums-x5qaTru7.js";import{l as B,P as Ea,R as V,D as wl,m as Zn,n as D,J as fl,p as kl}from"./renderer-4_U4OAry.js";import{V as K,U as ql,d as Tl,b as Gi,u as Ki,_ as dn}from"./index-6h5t6F0w.js";import{T as ea}from"./index-K9BSJPWl.js";import{b as Pa,a as Bi}from"./index-h_CiYGGb.js";import{l as j}from"./index-awljIyHI.js";import{c as je}from"./index-dnMhQZ-1.js";import{r as q,R as Yi}from"./index-TT1qJ6UJ.js";import{R as H,r as qr}from"./index-7vsPyIck.js";import{_ as g,$ as z}from"./jquery-yG1GhClm.js";import{P as $,u as ra}from"./i18n-context-hxuRe8oU.js";import{a as Gt,M as Al}from"./math-input-b6JdL4xR.js";import{u as Xi,g as qe,D as Rl}from"./dependencies-8XILypbq.js";import"./version-akiLXZts.js";import{P as re}from"./index-0C4KXdeC.js";import{A as me,C as Le}from"./perseus-api-mOiZT07d.js";import{L as ta,a as Y,r as Ol,K as N,s as za,b as zr,I as E,S as Ur,W as Lr,c as xl,d as na,f as ar,v as ir,p as jl,g as Wl,h as Qi,i as dt,j as yt,k as Ji,e as Il,n as Ie,q as La,t as Nl,G as He,u as Z,w as Zt,x as _a,y as Cl,z as Fa,A as Sa,C as El,B as aa}from"./svg-image-Rjw-_QTV.js";import{s as ye,c as P,a as Pl,b as zl}from"./index-deFLJwr4.js";import{I as Zi}from"./input-with-examples-1e8gjW5y.js";import{S as Hr}from"./simple-keypad-input-zNNuoI83.js";import{B as Ll}from"./base-radio-sE9E2UC2.js";import{I as sr}from"./inline-icon-tKY1iMkH.js";import{g as _l,h as Fl,j as Sl,k as Ml,l as $l,m as Dl}from"./icon-paths-AuJwhOz7.js";import{m as _r}from"./media-queries-MaBBbpNq.js";import{s as Ma}from"./shared-3pf9YZIg.js";import{u as Ul,n as Ve,s as ze,g as mt,v as es,e as Hl,i as rs}from"./constants-I_nlPaPx.js";import{C as ia}from"./index-WNT3sUKf.js";import{P as Vl,a as Gl}from"./index-BPSWBbj5.js";import{B as Kl,a as Bl,h as Yl,k as Xl,b as Ql,c as Jl,d as Zl,l as eu,e as ru,f as tu}from"./phet-simulation-I2_BZVd2.js";import{O as $a,S as nu,A as au}from"./answer-choices-vbrLThK4.js";import{B as Ye}from"./choice-E4eyMygy.js";import{B as iu}from"./button-group-nsoLlHtM.js";import{c as sa}from"./asset-context-I7yIqWki.js";import{c as Kr,g as ts}from"./_commonjsHelpers-4gQjN7DL.js";import{G as su}from"./graph-sgfCFYpv.js";import{w as Vr}from"./index-J2t_5nK1.js";import{v as x,C as ou,E as lu,P as gt,a as ht,L as Da,b as yn,u as uu,c as ns,T as du,M as Ua}from"./index-IIMKO4_x.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./multi-button-group-a0iIfrwx.js";import{N as as}from"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import{T as yu}from"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import{i as mn}from"./tiny-invariant-bHgPayXn.js";import{m as mu,c as gu,u as hu,a as pu,T as cu}from"./index-rfN0X25E.js";import{M as bu}from"./marker-vUQ60Bu-.js";import{S as gn}from"./sortable-w6DA86Qg.js";import{i as vu}from"./invariant-bu5zBsRS.js";import{F as wu}from"./fixed-to-responsive-1fSZ1n--.js";import{V as fu}from"./video-transcript-link-WVgIZGhp.js";const ku=["PLUS","MINUS","NEGATIVE","TIMES","DIVIDE","DECIMAL","PERIOD","PERCENT","CDOT","EQUAL","NEQ","GT","LT","GEQ","LEQ","FRAC_INCLUSIVE","FRAC_EXCLUSIVE","FRAC","EXP","EXP_2","EXP_3","SQRT","CUBE_ROOT","RADICAL","LEFT_PAREN","RIGHT_PAREN","LN","LOG","LOG_N","SIN","COS","TAN","PI","THETA","UP","RIGHT","DOWN","LEFT","BACKSPACE","DISMISS","JUMP_OUT_PARENTHESES","JUMP_OUT_EXPONENT","JUMP_OUT_BASE","JUMP_INTO_NUMERATOR","JUMP_OUT_NUMERATOR","JUMP_OUT_DENOMINATOR","NUM_0","NUM_1","NUM_2","NUM_3","NUM_4","NUM_5","NUM_6","NUM_7","NUM_8","NUM_9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],qu=["key","ref","containerSizeClass","widgetId","onChange","problemNum","apiOptions","widgetIsOpen","questionCompleted","findWidgets","onRemove","id","onBlur","onFocus","trackInteraction","keypadElement"],Tu=`Usage: this.change({propName: 5}, callback); this.change("propName", 5, callback); this.change("propName")`,is=function(t,e,r){const n=g.omit(t.props,qu),a=g.extend(n,e);t.props.onChange(a,r)},ss=function(t,e,r,n){if(r===void 0)return g.partial(ss,t,e);const a={};a[e]=r,is(t,a,n)},ae=function(t,e,r){if(g.isObject(t)&&r===void 0)return r=e,is(this,t,r);if(typeof t=="string")return ss(this,t,e,r);throw new Be("Invalid types sent to this.change(): "+g.toArray(arguments).join()+` diff --git a/assets/article-renderer.stories-ofIk6Qof.js b/assets/article-renderer.stories-ofIk6Qof.js index e00125cb5b..13fb14a31f 100644 --- a/assets/article-renderer.stories-ofIk6Qof.js +++ b/assets/article-renderer.stories-ofIk6Qof.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{a as _}from"./mobile-keypad-hKjeQGNp.js";import{a as j}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{s as p}from"./test-dependencies-3HLxfOjs.js";import{s as k,m as M,p as W,a as T,b as D}from"./article-renderer.testdata-spwNviYy.js";import{A as m}from"./article-renderer-o95CuJpS.js";import{T as b}from"./test-keypad-context-wrapper-UieRILfg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./prop-types-3bOVFRDQ.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";const Kr={title:"Perseus/Renderers/Article Renderer",argTypes:{useNewStyles:{control:"boolean"}}},t=e=>r(m,{json:k,dependencies:p,useNewStyles:e.useNewStyles}),o=e=>r(m,{json:M,dependencies:p,useNewStyles:e.useNewStyles}),i=({useNewStyles:e})=>r(m,{json:W,dependencies:p,useNewStyles:e}),s=({useNewStyles:e})=>r(b,{children:r(_.Consumer,{children:({keypadElement:a,setRenderer:c})=>r(m,{ref:d=>{c(d)},json:T,dependencies:p,useNewStyles:e,apiOptions:{isMobile:!0,customKeypad:!0,onFocusChange:j("onFocusChange")},keypadElement:a})})}),n=({useNewStyles:e})=>r(b,{children:r(_.Consumer,{children:({keypadElement:a,setRenderer:c})=>r(m,{ref:d=>{c(d)},json:D,dependencies:p,useNewStyles:e,apiOptions:{isMobile:!0,customKeypad:!0},keypadElement:a})})});t.__docgenInfo={description:"",methods:[],displayName:"ASingleSectionArticle"};o.__docgenInfo={description:"",methods:[],displayName:"BMultiSectionArticle"};i.__docgenInfo={description:"",methods:[],displayName:"PassageArticle"};s.__docgenInfo={description:"",methods:[],displayName:"ExpressionArticle"};n.__docgenInfo={description:"",methods:[],displayName:"MultiSectionedExpressionArticle"};var l,u,y;t.parameters={...t.parameters,docs:{...(l=t.parameters)==null?void 0:l.docs,source:{originalSource:`(args: { +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{a as _}from"./mobile-keypad-hKjeQGNp.js";import{a as j}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{s as p}from"./test-dependencies-3HLxfOjs.js";import{s as k,m as M,p as W,a as T,b as D}from"./article-renderer.testdata-spwNviYy.js";import{A as m}from"./article-renderer-o95CuJpS.js";import{T as b}from"./test-keypad-context-wrapper-UieRILfg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./prop-types-3bOVFRDQ.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";const Kr={title:"Perseus/Renderers/Article Renderer",argTypes:{useNewStyles:{control:"boolean"}}},t=e=>r(m,{json:k,dependencies:p,useNewStyles:e.useNewStyles}),o=e=>r(m,{json:M,dependencies:p,useNewStyles:e.useNewStyles}),i=({useNewStyles:e})=>r(m,{json:W,dependencies:p,useNewStyles:e}),s=({useNewStyles:e})=>r(b,{children:r(_.Consumer,{children:({keypadElement:a,setRenderer:c})=>r(m,{ref:d=>{c(d)},json:T,dependencies:p,useNewStyles:e,apiOptions:{isMobile:!0,customKeypad:!0,onFocusChange:j("onFocusChange")},keypadElement:a})})}),n=({useNewStyles:e})=>r(b,{children:r(_.Consumer,{children:({keypadElement:a,setRenderer:c})=>r(m,{ref:d=>{c(d)},json:D,dependencies:p,useNewStyles:e,apiOptions:{isMobile:!0,customKeypad:!0},keypadElement:a})})});t.__docgenInfo={description:"",methods:[],displayName:"ASingleSectionArticle"};o.__docgenInfo={description:"",methods:[],displayName:"BMultiSectionArticle"};i.__docgenInfo={description:"",methods:[],displayName:"PassageArticle"};s.__docgenInfo={description:"",methods:[],displayName:"ExpressionArticle"};n.__docgenInfo={description:"",methods:[],displayName:"MultiSectionedExpressionArticle"};var l,u,y;t.parameters={...t.parameters,docs:{...(l=t.parameters)==null?void 0:l.docs,source:{originalSource:`(args: { useNewStyles; }): React.ReactElement => { return ; diff --git a/assets/base-radio.stories-HsgX9pke.js b/assets/base-radio.stories-HsgX9pke.js index 660b7fee24..6f8d5b44e2 100644 --- a/assets/base-radio.stories-HsgX9pke.js +++ b/assets/base-radio.stories-HsgX9pke.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-FVsy8kgq.js";import{a as z}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{B as i}from"./base-radio-sE9E2UC2.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-awljIyHI.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./jquery-yG1GhClm.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./constants-I_nlPaPx.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./renderer-4_U4OAry.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";function o(t){return{...{checked:!1,crossedOut:!1,content:"",rationale:"",hasRationale:!1,showRationale:!1,showCorrectness:!1,correct:!1,isNoneOfTheAbove:!1,highlighted:!1,previouslyAnswered:!1,revealNoneOfTheAbove:!1,disabled:!1},...t}}const Je={title:"Perseus/Widgets/Radio/Base Radio",args:{multipleSelect:!1,editMode:!1,countChoices:!1}},c={apiOptions:{},choices:[o({content:"Content 1"}),o({content:"Content 2"}),o({content:"Content 3",correct:!0}),o({isNoneOfTheAbove:!0})],deselectEnabled:!1,editMode:!1,labelWrap:!1,countChoices:!1,numCorrect:1,multipleSelect:!1,onChange:z("changed"),isLastUsedWidget:!1},l=t=>{const e={...c,...t};return n(i,{...e})},p=t=>{const e={...c,multipleSelect:!1};return n(i,{...e})},u=t=>{const e={...c,multipleSelect:!0};return n(i,{...e})},d=t=>{const e={...c,multipleSelect:!0,numCorrect:2,countChoices:!0};return n(i,{...e})},m=t=>{const e=Array(4).fill(null).map((a,r)=>o({content:`Choice ${r+1}`}));e[1].checked=!0;const s={...c,multipleSelect:!1,choices:e};return n(i,{...s})},h=t=>{const e=Array(4).fill(null).map((a,r)=>o({content:`Choice ${r+1}`}));e[1].checked=!0,e[2].checked=!0;const s={...c,multipleSelect:!0,choices:e};return n(i,{...s})},S=t=>{const e=Array(4).fill(null).map((r,f)=>o({content:`Choice ${f+1}`,rationale:"This is a neat rationale",hasRationale:!0,showRationale:!0,correct:!1,showCorrectness:!0}));e[1].checked=!0,e[2].correct=!0;const s=e.map(({correct:r})=>({content:"",correct:r})),a={...c,multipleSelect:!1,reviewModeRubric:{choices:s},choices:e};return n(i,{...a})},g=t=>{const e=Array(4).fill(null).map((r,f)=>o({content:`Choice ${f+1}`,rationale:"This is a neat rationale",hasRationale:!0,showRationale:!0,correct:!1,showCorrectness:!0}));e[1].checked=!0,e[2].checked=!0,e[2].correct=!0,e[3].correct=!0;const s=e.map(r=>({content:"",correct:r.correct})),a={...c,multipleSelect:!0,numCorrect:2,reviewModeRubric:{choices:s},choices:e};return n(i,{...a})};l.__docgenInfo={description:"",methods:[],displayName:"Interactive",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};p.__docgenInfo={description:"",methods:[],displayName:"SingleSelectWithNothingSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};u.__docgenInfo={description:"",methods:[],displayName:"MultipleSelectWithNothingSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};d.__docgenInfo={description:"",methods:[],displayName:"MultipleSelectWithCountChoicesLabel",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};m.__docgenInfo={description:"",methods:[],displayName:"SingleSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};h.__docgenInfo={description:"",methods:[],displayName:"MultipleSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};S.__docgenInfo={description:"",methods:[],displayName:"SingleKitchenSink",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};g.__docgenInfo={description:"",methods:[],displayName:"MultipleKitchenSink",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};var b,y,C;l.parameters={...l.parameters,docs:{...(b=l.parameters)==null?void 0:b.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as n}from"./jsx-runtime-FVsy8kgq.js";import{a as z}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{B as i}from"./base-radio-sE9E2UC2.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-awljIyHI.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./jquery-yG1GhClm.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./constants-I_nlPaPx.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./renderer-4_U4OAry.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";function o(t){return{...{checked:!1,crossedOut:!1,content:"",rationale:"",hasRationale:!1,showRationale:!1,showCorrectness:!1,correct:!1,isNoneOfTheAbove:!1,highlighted:!1,previouslyAnswered:!1,revealNoneOfTheAbove:!1,disabled:!1},...t}}const Je={title:"Perseus/Widgets/Radio/Base Radio",args:{multipleSelect:!1,editMode:!1,countChoices:!1}},c={apiOptions:{},choices:[o({content:"Content 1"}),o({content:"Content 2"}),o({content:"Content 3",correct:!0}),o({isNoneOfTheAbove:!0})],deselectEnabled:!1,editMode:!1,labelWrap:!1,countChoices:!1,numCorrect:1,multipleSelect:!1,onChange:z("changed"),isLastUsedWidget:!1},l=t=>{const e={...c,...t};return n(i,{...e})},p=t=>{const e={...c,multipleSelect:!1};return n(i,{...e})},u=t=>{const e={...c,multipleSelect:!0};return n(i,{...e})},d=t=>{const e={...c,multipleSelect:!0,numCorrect:2,countChoices:!0};return n(i,{...e})},m=t=>{const e=Array(4).fill(null).map((a,r)=>o({content:`Choice ${r+1}`}));e[1].checked=!0;const s={...c,multipleSelect:!1,choices:e};return n(i,{...s})},h=t=>{const e=Array(4).fill(null).map((a,r)=>o({content:`Choice ${r+1}`}));e[1].checked=!0,e[2].checked=!0;const s={...c,multipleSelect:!0,choices:e};return n(i,{...s})},S=t=>{const e=Array(4).fill(null).map((r,f)=>o({content:`Choice ${f+1}`,rationale:"This is a neat rationale",hasRationale:!0,showRationale:!0,correct:!1,showCorrectness:!0}));e[1].checked=!0,e[2].correct=!0;const s=e.map(({correct:r})=>({content:"",correct:r})),a={...c,multipleSelect:!1,reviewModeRubric:{choices:s},choices:e};return n(i,{...a})},g=t=>{const e=Array(4).fill(null).map((r,f)=>o({content:`Choice ${f+1}`,rationale:"This is a neat rationale",hasRationale:!0,showRationale:!0,correct:!1,showCorrectness:!0}));e[1].checked=!0,e[2].checked=!0,e[2].correct=!0,e[3].correct=!0;const s=e.map(r=>({content:"",correct:r.correct})),a={...c,multipleSelect:!0,numCorrect:2,reviewModeRubric:{choices:s},choices:e};return n(i,{...a})};l.__docgenInfo={description:"",methods:[],displayName:"Interactive",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};p.__docgenInfo={description:"",methods:[],displayName:"SingleSelectWithNothingSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};u.__docgenInfo={description:"",methods:[],displayName:"MultipleSelectWithNothingSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};d.__docgenInfo={description:"",methods:[],displayName:"MultipleSelectWithCountChoicesLabel",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};m.__docgenInfo={description:"",methods:[],displayName:"SingleSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};h.__docgenInfo={description:"",methods:[],displayName:"MultipleSelected",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};S.__docgenInfo={description:"",methods:[],displayName:"SingleKitchenSink",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};g.__docgenInfo={description:"",methods:[],displayName:"MultipleKitchenSink",props:{multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},editMode:{required:!0,tsType:{name:"boolean"},description:""},countChoices:{required:!0,tsType:{name:"boolean"},description:""}}};var b,y,C;l.parameters={...l.parameters,docs:{...(b=l.parameters)==null?void 0:b.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const overwrittenProps = ({ ...defaultProps, ...args diff --git a/assets/behavior-RYjJdmKF.js b/assets/behavior-RYjJdmKF.js index 10d3335ddb..b8bfb53028 100644 --- a/assets/behavior-RYjJdmKF.js +++ b/assets/behavior-RYjJdmKF.js @@ -1,4 +1,4 @@ -import{j as e,a}from"./jsx-runtime-FVsy8kgq.js";import{g as b}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{l as t}from"./index-awljIyHI.js";import{r as T}from"./index-TT1qJ6UJ.js";const v=class v extends T.Component{constructor(n){super(n),this.handleClick=r=>{this.props.disabled||(this.props.shouldUpdate()&&(this.waitingForClick=!1),this.props.onClick&&!this.props.disabled&&this.props.onClick(r))},this.handleMouseEnter=()=>{!this.props.disabled&&this.props.shouldUpdate()&&!this.waitingForClick&&this.setState({hovered:!0})},this.handleMouseLeave=()=>{!this.props.disabled&&this.props.shouldUpdate()&&!this.waitingForClick&&this.setState({hovered:!1})},this.handleTouchStart=()=>{!this.props.disabled&&this.props.shouldUpdate()&&this.setState({hovered:!0})},this.handleTouchEnd=()=>{!this.props.disabled&&this.props.shouldUpdate()&&(this.setState({hovered:!1}),this.waitingForClick=!0)},this.handleMouseDown=()=>{!this.props.disabled&&this.props.shouldUpdate()&&(this.setState({focused:!1}),this.focusFlag=!0)},this.handleBlur=()=>{!this.props.disabled&&this.props.shouldUpdate()&&this.setState({focused:!1})},this.handleFocus=()=>{!this.props.disabled&&this.props.shouldUpdate()&&(this.focusFlag?this.focusFlag=!1:this.setState({focused:!0}))},this.state={focused:!1,hovered:n.startHovered}}render(){const n={onBlur:this.handleBlur,onClick:this.handleClick,onFocus:this.handleFocus,onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},{children:r}=this.props;return(r==null?void 0:r(this.state,n))||null}};v.defaultProps={startHovered:!1,shouldUpdate:()=>!0};let m=v;m.__docgenInfo={description:"",methods:[{name:"handleClick",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactMouseEvent",raw:"React.MouseEvent",alias:"React.MouseEvent"}}],returns:null},{name:"handleMouseEnter",docblock:null,modifiers:[],params:[],returns:null},{name:"handleMouseLeave",docblock:null,modifiers:[],params:[],returns:null},{name:"handleTouchStart",docblock:null,modifiers:[],params:[],returns:null},{name:"handleTouchEnd",docblock:null,modifiers:[],params:[],returns:null},{name:"handleMouseDown",docblock:null,modifiers:[],params:[],returns:null},{name:"handleBlur",docblock:null,modifiers:[],params:[],returns:null},{name:"handleFocus",docblock:null,modifiers:[],params:[],returns:null}],displayName:"HoverBehavior",props:{children:{required:!1,tsType:{name:"signature",type:"function",raw:"(state: State, handlers: Handlers) => React.ReactElement",signature:{arguments:[{type:{name:"signature",type:"object",raw:`{ +import{j as e,a}from"./jsx-runtime-FVsy8kgq.js";import{g as b}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{l as t}from"./index-awljIyHI.js";import{r as T}from"./index-TT1qJ6UJ.js";const v=class v extends T.Component{constructor(n){super(n),this.handleClick=r=>{this.props.disabled||(this.props.shouldUpdate()&&(this.waitingForClick=!1),this.props.onClick&&!this.props.disabled&&this.props.onClick(r))},this.handleMouseEnter=()=>{!this.props.disabled&&this.props.shouldUpdate()&&!this.waitingForClick&&this.setState({hovered:!0})},this.handleMouseLeave=()=>{!this.props.disabled&&this.props.shouldUpdate()&&!this.waitingForClick&&this.setState({hovered:!1})},this.handleTouchStart=()=>{!this.props.disabled&&this.props.shouldUpdate()&&this.setState({hovered:!0})},this.handleTouchEnd=()=>{!this.props.disabled&&this.props.shouldUpdate()&&(this.setState({hovered:!1}),this.waitingForClick=!0)},this.handleMouseDown=()=>{!this.props.disabled&&this.props.shouldUpdate()&&(this.setState({focused:!1}),this.focusFlag=!0)},this.handleBlur=()=>{!this.props.disabled&&this.props.shouldUpdate()&&this.setState({focused:!1})},this.handleFocus=()=>{!this.props.disabled&&this.props.shouldUpdate()&&(this.focusFlag?this.focusFlag=!1:this.setState({focused:!0}))},this.state={focused:!1,hovered:n.startHovered}}render(){const n={onBlur:this.handleBlur,onClick:this.handleClick,onFocus:this.handleFocus,onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},{children:r}=this.props;return(r==null?void 0:r(this.state,n))||null}};v.defaultProps={startHovered:!1,shouldUpdate:()=>!0};let m=v;m.__docgenInfo={description:"",methods:[{name:"handleClick",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactMouseEvent",raw:"React.MouseEvent",alias:"React.MouseEvent"}}],returns:null},{name:"handleMouseEnter",docblock:null,modifiers:[],params:[],returns:null},{name:"handleMouseLeave",docblock:null,modifiers:[],params:[],returns:null},{name:"handleTouchStart",docblock:null,modifiers:[],params:[],returns:null},{name:"handleTouchEnd",docblock:null,modifiers:[],params:[],returns:null},{name:"handleMouseDown",docblock:null,modifiers:[],params:[],returns:null},{name:"handleBlur",docblock:null,modifiers:[],params:[],returns:null},{name:"handleFocus",docblock:null,modifiers:[],params:[],returns:null}],displayName:"HoverBehavior",props:{children:{required:!1,tsType:{name:"signature",type:"function",raw:"(state: State, handlers: Handlers) => React.ReactElement",signature:{arguments:[{type:{name:"signature",type:"object",raw:`{ focused: boolean; hovered: boolean; }`,signature:{properties:[{key:"focused",value:{name:"boolean",required:!0}},{key:"hovered",value:{name:"boolean",required:!0}}]}},name:"state"},{type:{name:"signature",type:"object",raw:`{ diff --git a/assets/behavior.stories-Yiw6bHtg.js b/assets/behavior.stories-Yiw6bHtg.js index b7d2cc8c37..217c989f46 100644 --- a/assets/behavior.stories-Yiw6bHtg.js +++ b/assets/behavior.stories-Yiw6bHtg.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-FVsy8kgq.js";import{a}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{r as c}from"./index-TT1qJ6UJ.js";import{B as l}from"./behavior-RYjJdmKF.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";const ir={title:"PerseusEditor/Widgets/Label Image/Behavior"},t=u=>{const[r,e]=c.useState({multipleAnswers:!1,hideChoicesFromInstructions:!1}),s={multipleAnswers:r.multipleAnswers,hideChoicesFromInstructions:r.hideChoicesFromInstructions,onChange:o=>{a("onChange")(o),e({...r,...o})}};return n(l,{preferredPopoverDirection:"NONE",...s})};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,m,p;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as n}from"./jsx-runtime-FVsy8kgq.js";import{a}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{r as c}from"./index-TT1qJ6UJ.js";import{B as l}from"./behavior-RYjJdmKF.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";const ir={title:"PerseusEditor/Widgets/Label Image/Behavior"},t=u=>{const[r,e]=c.useState({multipleAnswers:!1,hideChoicesFromInstructions:!1}),s={multipleAnswers:r.multipleAnswers,hideChoicesFromInstructions:r.hideChoicesFromInstructions,onChange:o=>{a("onChange")(o),e({...r,...o})}};return n(l,{preferredPopoverDirection:"NONE",...s})};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,m,p;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const [state, setState] = React.useState({ multipleAnswers: false, hideChoicesFromInstructions: false diff --git a/assets/categorizer-editor-aJj5kcPa.js b/assets/categorizer-editor-aJj5kcPa.js index 0aadfd2f26..5f994cad22 100644 --- a/assets/categorizer-editor-aJj5kcPa.js +++ b/assets/categorizer-editor-aJj5kcPa.js @@ -1 +1 @@ -import{a as o,j as r}from"./jsx-runtime-FVsy8kgq.js";import{C as p,c as n,p as m}from"./article-renderer-o95CuJpS.js";import{_ as l}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as c}from"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as u}from"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{E as d}from"./editor-jsonify-yP45H1ib.js";import{C as f}from"./index-QCAhLhLD.js";import{P as s}from"./index-0C4KXdeC.js";import{r as h}from"./index-TT1qJ6UJ.js";const{TextListEditor:i}=u,g=p.widget,a=class a extends h.Component{constructor(){super(...arguments),this.change=(...e)=>n.apply(this,e),this.serialize=()=>d.serialize.call(this)}render(){return o("div",{children:[r("div",{className:"perseus-widget-row",children:r(f,{label:"Randomize item order",checked:this.props.randomizeItems,onChange:e=>{this.props.onChange({randomizeItems:e})}})}),"Categories:",r(i,{options:this.props.categories,onChange:e=>{this.change("categories",e)},layout:"horizontal"}),"Items:",r(i,{options:this.props.items,onChange:e=>{this.change({items:e,values:l.first(this.props.values,e.length)})},layout:"vertical"}),r(g,{apiOptions:this.props.apiOptions,items:this.props.items,categories:this.props.categories,values:this.props.values,onChange:e=>{this.props.onChange(e)},trackInteraction:function(){}})]})}};a.propTypes={...m,apiOptions:c.propTypes,items:s.arrayOf(s.string),categories:s.arrayOf(s.string),values:s.arrayOf(s.number),randomizeItems:s.bool},a.widgetName="categorizer",a.defaultProps={items:[],categories:[],values:[],randomizeItems:!1};let t=a;t.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"CategorizerEditor",props:{items:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},categories:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},values:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},randomizeItems:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1}},composes:["@khanacademy/perseus"]};export{t as C}; +import{a as o,j as r}from"./jsx-runtime-FVsy8kgq.js";import{C as p,c as n,p as m}from"./article-renderer-o95CuJpS.js";import{_ as l}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as c}from"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as u}from"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{E as d}from"./editor-jsonify-yP45H1ib.js";import{C as f}from"./index-QCAhLhLD.js";import{P as s}from"./index-k-0mNqHS.js";import{r as h}from"./index-TT1qJ6UJ.js";const{TextListEditor:i}=u,g=p.widget,a=class a extends h.Component{constructor(){super(...arguments),this.change=(...e)=>n.apply(this,e),this.serialize=()=>d.serialize.call(this)}render(){return o("div",{children:[r("div",{className:"perseus-widget-row",children:r(f,{label:"Randomize item order",checked:this.props.randomizeItems,onChange:e=>{this.props.onChange({randomizeItems:e})}})}),"Categories:",r(i,{options:this.props.categories,onChange:e=>{this.change("categories",e)},layout:"horizontal"}),"Items:",r(i,{options:this.props.items,onChange:e=>{this.change({items:e,values:l.first(this.props.values,e.length)})},layout:"vertical"}),r(g,{apiOptions:this.props.apiOptions,items:this.props.items,categories:this.props.categories,values:this.props.values,onChange:e=>{this.props.onChange(e)},trackInteraction:function(){}})]})}};a.propTypes={...m,apiOptions:c.propTypes,items:s.arrayOf(s.string),categories:s.arrayOf(s.string),values:s.arrayOf(s.number),randomizeItems:s.bool},a.widgetName="categorizer",a.defaultProps={items:[],categories:[],values:[],randomizeItems:!1};let t=a;t.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"CategorizerEditor",props:{items:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},categories:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},values:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},randomizeItems:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1}},composes:["@khanacademy/perseus"]};export{t as C}; diff --git a/assets/categorizer-editor.stories-wnQG-men.js b/assets/categorizer-editor.stories-wnQG-men.js index 135c4b3227..9730a540e8 100644 --- a/assets/categorizer-editor.stories-wnQG-men.js +++ b/assets/categorizer-editor.stories-wnQG-men.js @@ -1,3 +1,3 @@ -import{j as p}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as m}from"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{a as e}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{C as a}from"./categorizer-editor-aJj5kcPa.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./icon-paths-AuJwhOz7.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./shared-3pf9YZIg.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-vbrLThK4.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./video-transcript-link-WVgIZGhp.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-Hmby24Jq.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./choice-none-above-o4v4BTO3.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./index-QCAhLhLD.js";import"./strings-OAjNfY6D.js";import"./bundle.esm-7jAAHVxW.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./components-0kNWnYe6.js";import"./editor-jsonify-yP45H1ib.js";import"./index-0C4KXdeC.js";const ot={title:"PerseusEditor/Widgets/Categorizer Editor"},r=s=>p(a,{onChange:e("onChange"),apiOptions:m.defaults});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as p}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as m}from"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{a as e}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{C as a}from"./categorizer-editor-aJj5kcPa.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./icon-paths-AuJwhOz7.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./shared-3pf9YZIg.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-vbrLThK4.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./video-transcript-link-WVgIZGhp.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-Hmby24Jq.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./choice-none-above-o4v4BTO3.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./index-QCAhLhLD.js";import"./strings-OAjNfY6D.js";import"./bundle.esm-7jAAHVxW.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./components-0kNWnYe6.js";import"./editor-jsonify-yP45H1ib.js";import"./index-k-0mNqHS.js";const ot={title:"PerseusEditor/Widgets/Categorizer Editor"},r=s=>p(a,{onChange:e("onChange"),apiOptions:m.defaults});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(o=r.parameters)==null?void 0:o.docs)==null?void 0:i.source}}};const it=["Default"];export{r as Default,it as __namedExportsOrder,ot as default}; diff --git a/assets/categorizer.stories-ofGCD9ry.js b/assets/categorizer.stories-ofGCD9ry.js index 921a7c3ad9..fa38d11b49 100644 --- a/assets/categorizer.stories-ofGCD9ry.js +++ b/assets/categorizer.stories-ofGCD9ry.js @@ -1,4 +1,4 @@ -import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{R as m}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const e={content:`**Classify each graph according to the kind of relationship it suggests.** +import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{R as m}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const e={content:`**Classify each graph according to the kind of relationship it suggests.** $\\qquad\\qquad\\quad\\text{Graph 1}\\qquad\\qquad\\quad\\qquad\\qquad\\quad\\text{Graph 2}$ diff --git a/assets/choice-E4eyMygy.js b/assets/choice-E4eyMygy.js index 329552569a..ddef346cad 100644 --- a/assets/choice-E4eyMygy.js +++ b/assets/choice-E4eyMygy.js @@ -1 +1 @@ -import{j as m,a as N}from"./jsx-runtime-FVsy8kgq.js";import{b as V,a as K,_ as L,V as D}from"./index-6h5t6F0w.js";import{r as a}from"./index-TT1qJ6UJ.js";import{c as Z,L as ae}from"./react-router-dom-W_e8xVUu.js";import{i as ne,g as de}from"./index-o3wWn3Y5.js";import{l as H}from"./index-awljIyHI.js";import{b as le,L as se}from"./index-h_CiYGGb.js";import{C as ce}from"./index-ngddCaVG.js";import{m as ue,c as fe,u as pe,a as be,T as me}from"./index-rfN0X25E.js";import{c as i,b as k,s as h,a as M}from"./index-deFLJwr4.js";import{P as U}from"./index-xuPsLuPk.js";import{C as X}from"./index-2dmvOE3q.js";import{S as ge}from"./index-qUyqkRvh.js";import{P as ye,b as he}from"./index-BPSWBbj5.js";import{c as Y}from"./index-dnMhQZ-1.js";import{u as xe}from"./i18n-context-hxuRe8oU.js";import{I as ve}from"./icon-YuYiVxsK.js";import{C as Ce,A as ke}from"./perseus-api-mOiZT07d.js";import{m as we}from"./media-queries-MaBBbpNq.js";import{g as j,C as Se}from"./choice-icon-LAaL9HdM.js";import{O as Ie}from"./option-status-6glEGOB8.js";const q={color:{bg:{action:{default:i.blue,active:i.activeBlue,inverse:i.fadedBlue},critical:{default:i.red,active:i.activeRed,inverse:i.fadedRed},primary:{default:i.white,disabled:i.offBlack32,inverse:i.darkBlue},secondary:{default:"none",inverse:"none",focus:i.white,active:{action:i.fadedBlue,critical:i.fadedRed}},tertiary:{hover:i.white},icon:{secondaryHover:"transparent"}},text:{disabled:i.offBlack32,inverse:i.white,primary:{disabled:i.white64},secondary:{inverse:i.white50},icon:{secondaryHover:"inherit"}},border:{disabled:i.offBlack32,primary:{inverse:i.white},secondary:{action:i.offBlack50,critical:i.offBlack50,inverse:i.white50},tertiary:{inverse:i.white}}},border:{width:{secondary:k.width.hairline,focused:k.width.thin,disabled:k.width.thin},radius:{default:k.radius.medium_4,tertiary:k.radius.xSmall_2,small:k.radius.medium_4,large:k.radius.large_6,icon:k.radius.full}},size:{height:{tertiaryHover:h.xxxxSmall_2,small:h.xLarge_32,medium:40,large:56}},margin:{icon:{offset:-h.xxxxSmall_2}},padding:{xsmall:h.xxxxSmall_2,small:h.xxSmall_6,medium:h.small_12,large:h.medium_16,xLarge:h.xLarge_32},font:{size:{large:18},lineHeight:{large:M.lineHeight.medium},weight:{default:M.weight.bold}}},Be=ue(q,{color:{bg:{secondary:{default:i.offWhite,active:{action:i.fadedBlue8,critical:i.fadedRed8},focus:i.offWhite},icon:{secondaryHover:i.fadedBlue16}},border:{secondary:{action:i.fadedBlue,critical:i.fadedRed}},text:{icon:{secondaryHover:i.blue}}},border:{radius:{default:k.radius.xLarge_12,small:k.radius.large_6,large:k.radius.xLarge_12},width:{focused:k.width.hairline}},margin:{icon:{offset:-h.xSmall_8}},font:{weight:{default:M.weight.regular}}}),Oe={default:q,khanmigo:Be},ee=fe(q);function ze(o){const n=a.useContext(me),r=Oe[n]||q;return a.createElement(ee.Provider,{value:r},o.children)}function G({icon:o,size:n,style:r,testId:l}){const e={"aria-hidden":!0,color:"currentColor",style:r,testId:l};switch(n){case"small":return a.createElement(U,L({},e,{size:"small",icon:o}));case"medium":default:return a.createElement(U,L({},e,{size:"medium",icon:o}))}}const Ee=["children","skipClientNav","color","disabled","focused","hovered","href","kind","labelStyle","light","pressed","size","style","testId","type","spinner","startIcon","endIcon","id","waiting"],Le=V("a"),_e=V("button"),Te=V(ae),We=a.forwardRef(function(n,r){const{theme:l,themeName:e}=pe(ee),t=be(Re,l),s=x=>{const{children:d,skipClientNav:u,color:g,disabled:C,focused:f,hovered:S,href:I=void 0,kind:v="primary",labelStyle:_,light:B=!1,pressed:c,size:y="medium",style:$,testId:p,type:T=void 0,spinner:O,startIcon:z,endIcon:b,id:W}=n,R=K(n,Ee),w=Ne(g,v,B,y,l,e),E=O||C,re=[t.shared,E&&t.disabled,z&&t.withStartIcon,b&&t.withEndIcon,w.default,E&&w.disabled,v!=="tertiary"&&!E&&(c?w.active:(S||f)&&w.focus),v==="tertiary"&&!c&&f&&[w.focus,E&&w.disabledFocus],y==="small"&&t.small,y==="large"&&t.large],A=L({"data-testid":p,id:W,role:"button",style:[re,$]},R),oe=y==="small"?le:se,te=a.createElement(oe,{style:[t.text,y==="large"&&t.largeText,_,O&&t.hiddenText,v==="tertiary"&&t.textWithFocus,v==="tertiary"&&!E&&(c?[w.hover,w.active]:S&&w.hover)],testId:p?`${p}-inner-label`:void 0},d),ie={medium:"small",small:"xsmall",large:"medium"},Q=y==="small"?"small":"medium",F=a.createElement(a.Fragment,null,z&&a.createElement(D,{style:t.iconWrapper},a.createElement(G,{size:Q,icon:z,style:[t.startIcon,v==="tertiary"&&t.tertiaryStartIcon],testId:p?`${p}-start-icon`:void 0})),te,O&&a.createElement(ce,{style:t.spinner,size:ie[y],light:v==="primary",testId:`${p||"button"}-spinner`}),b&&a.createElement(D,{testId:p?`${p}-end-icon-wrapper`:void 0,style:[P.endIcon,t.iconWrapper,t.endIconWrapper,v==="tertiary"&&t.endIconWrapperTertiary,(f||S)&&v!=="primary"&&t.iconWrapperSecondaryHovered]},a.createElement(G,{size:Q,icon:b,testId:p?`${p}-end-icon`:void 0})));return I&&!E?x&&!u&&ne(I)?a.createElement(Te,L({},A,{to:I,ref:r}),F):a.createElement(Le,L({},A,{href:I,ref:r}),F):a.createElement(_e,L({type:T||"button"},A,{"aria-disabled":E,ref:r}),F)};return a.createElement(Z.Consumer,null,x=>s(x))}),Re=o=>({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",height:o.size.height.medium,paddingTop:0,paddingBottom:0,paddingLeft:o.padding.large,paddingRight:o.padding.large,border:"none",borderRadius:o.border.radius.default,cursor:"pointer",outline:"none",textDecoration:"none",boxSizing:"border-box",touchAction:"manipulation",userSelect:"none",":focus":{WebkitTapHighlightColor:"rgba(0,0,0,0)"}},disabled:{cursor:"auto"},small:{borderRadius:o.border.radius.small,height:o.size.height.small},large:{borderRadius:o.border.radius.large,height:o.size.height.large},text:{alignItems:"center",fontWeight:o.font.weight.default,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"inline-block",pointerEvents:"none"},largeText:{fontSize:o.font.size.large,lineHeight:`${o.font.lineHeight.large}px`},textWithFocus:{position:"relative"},hiddenText:{visibility:"hidden"},spinner:{position:"absolute"},startIcon:{marginRight:o.padding.small,marginLeft:o.margin.icon.offset},tertiaryStartIcon:{marginLeft:0},endIcon:{marginLeft:o.padding.small},iconWrapper:{borderRadius:o.border.radius.icon,padding:o.padding.xsmall,minWidth:"auto"},iconWrapperSecondaryHovered:{backgroundColor:o.color.bg.icon.secondaryHover,color:o.color.text.icon.secondaryHover},endIconWrapper:{marginLeft:o.padding.small,marginRight:o.margin.icon.offset},endIconWrapperTertiary:{marginRight:0}}),P={},Ne=(o="default",n,r,l,e,t)=>{const s=o==="destructive"?e.color.bg.critical.default:e.color.bg.action.default,x=`${s}-${n}-${r}-${l}-${t}`;if(P[x])return P[x];const d=o==="destructive"?e.color.bg.critical.inverse:e.color.bg.action.inverse,u=o==="destructive"?e.color.bg.critical.active:e.color.bg.action.active,g=l==="large"?e.padding.xLarge:e.padding.large;let C={};if(n==="primary"){const f=r?e.color.bg.primary.inverse:e.color.bg.primary.default;C={default:{background:r?e.color.bg.primary.default:s,color:r?s:e.color.text.inverse,paddingLeft:g,paddingRight:g},focus:{boxShadow:`0 0 0 1px ${f}, 0 0 0 3px ${r?e.color.bg.primary.default:s}`},active:{boxShadow:`0 0 0 1px ${f}, 0 0 0 3px ${r?d:u}`,background:r?d:u,color:r?u:d},disabled:{background:r?d:e.color.bg.primary.disabled,color:r?s:e.color.text.primary.disabled,cursor:"default",":focus":{boxShadow:`0 0 0 1px ${r?e.color.bg.primary.disabled:e.color.bg.primary.default}, 0 0 0 3px ${r?d:e.color.bg.primary.disabled}`}}}}else if(n==="secondary"){const f=o==="destructive"?e.color.border.secondary.critical:e.color.border.secondary.action,S=o==="destructive"?e.color.bg.secondary.active.critical:e.color.bg.secondary.active.action;C={default:{background:r?e.color.bg.secondary.inverse:e.color.bg.secondary.default,color:r?e.color.text.inverse:s,borderColor:r?e.color.border.secondary.inverse:f,borderStyle:"solid",borderWidth:e.border.width.secondary,paddingLeft:g,paddingRight:g},focus:{background:r?e.color.bg.secondary.inverse:e.color.bg.secondary.focus,borderColor:"transparent",outlineColor:r?e.color.border.primary.inverse:s,outlineStyle:"solid",outlineWidth:e.border.width.focused},active:{background:r?u:S,color:r?d:u,borderColor:"transparent",outlineColor:r?d:u,outlineStyle:"solid",outlineWidth:e.border.width.focused},disabled:{color:r?e.color.text.secondary.inverse:e.color.text.disabled,outlineColor:r?d:e.color.border.disabled,cursor:"default",":focus":{outlineColor:r?e.color.border.secondary.inverse:e.color.border.disabled,outlineStyle:"solid",outlineWidth:e.border.width.disabled}}}}else if(n==="tertiary")C={default:{background:"none",color:r?e.color.text.inverse:s,paddingLeft:0,paddingRight:0},hover:{":after":{content:"''",position:"absolute",height:e.size.height.tertiaryHover,width:"100%",right:0,bottom:0,background:r?e.color.bg.tertiary.hover:s,borderRadius:e.border.radius.tertiary}},focus:{outlineStyle:"solid",outlineColor:r?e.color.border.tertiary.inverse:s,outlineWidth:e.border.width.focused,borderRadius:e.border.radius.default},active:{color:r?d:u,":after":{height:e.size.height.tertiaryHover,background:r?d:u}},disabled:{color:r?d:e.color.text.disabled,cursor:"default"},disabledFocus:{outlineColor:r?e.color.border.tertiary.inverse:e.color.border.disabled}};else throw new Error("Button kind not recognized");return P[x]=H.StyleSheet.create(C),P[x]},$e=["href","type","children","skipClientNav","onClick","beforeNav","safeWithNav","tabIndex","target","rel","color","kind","light","size","disabled","spinner"],Pe=a.forwardRef(function(n,r){const{href:l=void 0,type:e=void 0,children:t,skipClientNav:s,onClick:x,beforeNav:d=void 0,safeWithNav:u=void 0,tabIndex:g,target:C,rel:f,color:S="default",kind:I="primary",light:v=!1,size:_="medium",disabled:B=!1,spinner:c=!1}=n,y=K(n,$e),$=p=>{const T=de(l,s,p),O=(z,b)=>a.createElement(We,L({},y,z,b,{disabled:B,spinner:c||z.waiting,color:S,kind:I,light:v,size:_,skipClientNav:s,href:l,target:C,type:e,tabIndex:g,ref:r}),t);return d?a.createElement(T,{disabled:c||B,href:l,role:"button",type:e,onClick:x,beforeNav:d,safeWithNav:u,rel:f},O):a.createElement(T,{disabled:c||B,href:l,role:"button",type:e,onClick:x,safeWithNav:u,target:C,rel:f},O)};return a.createElement(ze,null,a.createElement(Z.Consumer,null,p=>$(p)))});function He(o,n,r,l,e,t){return e&&r?n?t.choiceCheckedCorrect({letter:o}):l?t.choiceCrossedOutCorrect({letter:o}):t.choiceCorrect({letter:o}):e&&!r?n?t.choiceCheckedIncorrect({letter:o}):l?t.choiceCrossedOutIncorrect({letter:o}):t.choiceIncorrect({letter:o}):n?t.choiceChecked({letter:o}):l?t.choiceCrossedOut({letter:o}):t.choice({letter:o})}const qe="16px 16px",Ae="12px 16px",Fe={path:"M27.218 6.82l0 13.578q0 2.852-1.984 4.836t-4.836 1.984l-13.578 0q-2.852 0-4.836-1.984t-1.984-4.836l0-13.578q0-2.852 1.984-4.836t4.836-1.984l13.578 0q2.852 0 4.836 1.984t1.984 4.836zm36.27 0l0 13.578q0 2.852-1.984 4.836t-4.836 1.984l-13.578 0q-2.852 0-4.836-1.984t-1.984-4.836l0-13.578q0-2.852 1.984-4.836t4.836-1.984l13.578 0q2.852 0 4.836 1.984t1.984 4.836zm36.27 0l0 13.578q0 2.852-1.984 4.836t-4.836 1.984l-13.578 0q-2.852 0-4.836-1.984t-1.984-4.836l0-13.578q0-2.852 1.984-4.836t4.836-1.984l13.578 0q2.852 0 4.836 1.984t1.984 4.836z",width:100,height:27.284},je=function(o){const{disabled:n=!1,checked:r=!1,content:l,crossedOut:e,showCorrectness:t,multipleSelect:s,onChange:x=b=>{},reviewMode:d,correct:u=!1,apiOptions:g=ke.defaults,previouslyAnswered:C=!1,pos:f=0,showRationale:S=!1,rationale:I,forwardedRef:v}=o,[_,B]=a.useState(!1),{strings:c}=xe();a.useEffect(()=>{_&&n&&B(!1)},[n,_,B]);function y(b){const W=b.checked??r,R=b.crossedOut??e;x({checked:W,crossedOut:R})}const $=Y("description",H.css(J.description)),p=Y("perseus-radio-rationale-content",H.css(J.rationale)),T=!d&&g.readOnly||e,O=j(f,c),z=He(O,r,u,e,t,c);return N("div",{style:{dispay:"flex",flexDirection:"column",color:i.offBlack},className:$,children:[N("div",{style:{display:"flex",flexDirection:"row",opacity:T?.5:1,overflowX:"auto",overflowY:"hidden"},children:[m("div",{className:"perseus-sr-only",children:N("label",{children:[z,"   ",l,m("input",{type:s?"checkbox":"radio",checked:r,onClick:()=>{y({checked:!r,crossedOut:!1})},onChange:()=>{},disabled:n||g.readOnly,tabIndex:-1,className:Ce.RADIO.OPTION_CONTENT})]})}),m(X,{onClick:()=>{y({checked:!r,crossedOut:!1})},disabled:n||g.readOnly,style:{flex:1,color:i.offBlack,userSelect:"text"},ref:v,"aria-hidden":"true",children:({hovered:b,focused:W,pressed:R})=>N("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignContent:"center",paddingTop:h.xSmall_8,paddingBottom:h.xSmall_8,paddingLeft:h.xSmall_8},children:[m(Se,{pos:f,correct:u,crossedOut:e,pressed:R,focused:W,checked:r,hovered:b,showCorrectness:t,multipleSelect:s,reviewMode:d,previouslyAnswered:C}),N("span",{style:{paddingLeft:h.small_12,textAlign:"left",flex:1,paddingTop:4},children:[m("div",{children:m(Ie,{checked:r,correct:u,crossedOut:e,previouslyAnswered:C,reviewMode:d})}),m("div",{children:l})]})]})}),g.crossOutEnabled&&!d&&m(ye,{dismissEnabled:!0,content:({close:b})=>m(he,{title:c.crossOut,content:c.crossOutOption,closeButtonVisible:!0,actions:N(D,{children:[m(ge,{size:h.medium_16}),m(Pe,{kind:"primary","aria-label":c.crossOutChoice({letter:j(f,c)}),disabled:g.readOnly||d,onClick:()=>{y(e?{crossedOut:!1}:{checked:!1,crossedOut:!0}),b()},children:e?c.bringBack:c.crossOut})]})}),children:({open:b})=>m(X,{onClick:b,"aria-label":c.openMenuForChoice({letter:j(f,c)}),style:{alignSelf:"center",padding:"5px",display:"flex",justifyContent:"center",alignItems:"center",marginLeft:"10px"},children:({hovered:W,focused:R,pressed:w})=>m(ve,{icon:Fe,size:3,color:i.offBlack64})})})]}),S&&m("div",{className:p,"data-testid":`perseus-radio-rationale-content-${f}`,children:I})]})},J=H.StyleSheet.create({description:{display:"inline-block",width:"100%"},rationale:{display:"block",padding:qe,paddingTop:0,marginLeft:54,color:i.offBlack64,[we.smOrSmaller]:{padding:Ae,paddingTop:0}}}),cr=a.forwardRef((o,n)=>m(je,{...o,forwardedRef:n}));export{Pe as B,cr as C}; +import{j as m,a as N}from"./jsx-runtime-FVsy8kgq.js";import{b as V,a as K,_ as L,V as D}from"./index-6h5t6F0w.js";import{r as a}from"./index-TT1qJ6UJ.js";import{c as Z,L as ae}from"./react-router-dom-W_e8xVUu.js";import{i as ne,g as de}from"./index-o3wWn3Y5.js";import{l as H}from"./index-awljIyHI.js";import{b as le,L as se}from"./index-h_CiYGGb.js";import{C as ce}from"./index-ngddCaVG.js";import{m as ue,c as fe,u as pe,a as be,T as me}from"./index-rfN0X25E.js";import{c as i,b as k,s as h,a as M}from"./index-deFLJwr4.js";import{P as U}from"./index-xuPsLuPk.js";import{C as X}from"./index-WNT3sUKf.js";import{S as ge}from"./index-qUyqkRvh.js";import{P as ye,b as he}from"./index-BPSWBbj5.js";import{c as Y}from"./index-dnMhQZ-1.js";import{u as xe}from"./i18n-context-hxuRe8oU.js";import{I as ve}from"./icon-YuYiVxsK.js";import{C as Ce,A as ke}from"./perseus-api-mOiZT07d.js";import{m as we}from"./media-queries-MaBBbpNq.js";import{g as j,C as Se}from"./choice-icon-LAaL9HdM.js";import{O as Ie}from"./option-status-6glEGOB8.js";const q={color:{bg:{action:{default:i.blue,active:i.activeBlue,inverse:i.fadedBlue},critical:{default:i.red,active:i.activeRed,inverse:i.fadedRed},primary:{default:i.white,disabled:i.offBlack32,inverse:i.darkBlue},secondary:{default:"none",inverse:"none",focus:i.white,active:{action:i.fadedBlue,critical:i.fadedRed}},tertiary:{hover:i.white},icon:{secondaryHover:"transparent"}},text:{disabled:i.offBlack32,inverse:i.white,primary:{disabled:i.white64},secondary:{inverse:i.white50},icon:{secondaryHover:"inherit"}},border:{disabled:i.offBlack32,primary:{inverse:i.white},secondary:{action:i.offBlack50,critical:i.offBlack50,inverse:i.white50},tertiary:{inverse:i.white}}},border:{width:{secondary:k.width.hairline,focused:k.width.thin,disabled:k.width.thin},radius:{default:k.radius.medium_4,tertiary:k.radius.xSmall_2,small:k.radius.medium_4,large:k.radius.large_6,icon:k.radius.full}},size:{height:{tertiaryHover:h.xxxxSmall_2,small:h.xLarge_32,medium:40,large:56}},margin:{icon:{offset:-h.xxxxSmall_2}},padding:{xsmall:h.xxxxSmall_2,small:h.xxSmall_6,medium:h.small_12,large:h.medium_16,xLarge:h.xLarge_32},font:{size:{large:18},lineHeight:{large:M.lineHeight.medium},weight:{default:M.weight.bold}}},Be=ue(q,{color:{bg:{secondary:{default:i.offWhite,active:{action:i.fadedBlue8,critical:i.fadedRed8},focus:i.offWhite},icon:{secondaryHover:i.fadedBlue16}},border:{secondary:{action:i.fadedBlue,critical:i.fadedRed}},text:{icon:{secondaryHover:i.blue}}},border:{radius:{default:k.radius.xLarge_12,small:k.radius.large_6,large:k.radius.xLarge_12},width:{focused:k.width.hairline}},margin:{icon:{offset:-h.xSmall_8}},font:{weight:{default:M.weight.regular}}}),Oe={default:q,khanmigo:Be},ee=fe(q);function ze(o){const n=a.useContext(me),r=Oe[n]||q;return a.createElement(ee.Provider,{value:r},o.children)}function G({icon:o,size:n,style:r,testId:l}){const e={"aria-hidden":!0,color:"currentColor",style:r,testId:l};switch(n){case"small":return a.createElement(U,L({},e,{size:"small",icon:o}));case"medium":default:return a.createElement(U,L({},e,{size:"medium",icon:o}))}}const Ee=["children","skipClientNav","color","disabled","focused","hovered","href","kind","labelStyle","light","pressed","size","style","testId","type","spinner","startIcon","endIcon","id","waiting"],Le=V("a"),_e=V("button"),Te=V(ae),We=a.forwardRef(function(n,r){const{theme:l,themeName:e}=pe(ee),t=be(Re,l),s=x=>{const{children:d,skipClientNav:u,color:g,disabled:C,focused:f,hovered:S,href:I=void 0,kind:v="primary",labelStyle:_,light:B=!1,pressed:c,size:y="medium",style:$,testId:p,type:T=void 0,spinner:O,startIcon:z,endIcon:b,id:W}=n,R=K(n,Ee),w=Ne(g,v,B,y,l,e),E=O||C,re=[t.shared,E&&t.disabled,z&&t.withStartIcon,b&&t.withEndIcon,w.default,E&&w.disabled,v!=="tertiary"&&!E&&(c?w.active:(S||f)&&w.focus),v==="tertiary"&&!c&&f&&[w.focus,E&&w.disabledFocus],y==="small"&&t.small,y==="large"&&t.large],A=L({"data-testid":p,id:W,role:"button",style:[re,$]},R),oe=y==="small"?le:se,te=a.createElement(oe,{style:[t.text,y==="large"&&t.largeText,_,O&&t.hiddenText,v==="tertiary"&&t.textWithFocus,v==="tertiary"&&!E&&(c?[w.hover,w.active]:S&&w.hover)],testId:p?`${p}-inner-label`:void 0},d),ie={medium:"small",small:"xsmall",large:"medium"},Q=y==="small"?"small":"medium",F=a.createElement(a.Fragment,null,z&&a.createElement(D,{style:t.iconWrapper},a.createElement(G,{size:Q,icon:z,style:[t.startIcon,v==="tertiary"&&t.tertiaryStartIcon],testId:p?`${p}-start-icon`:void 0})),te,O&&a.createElement(ce,{style:t.spinner,size:ie[y],light:v==="primary",testId:`${p||"button"}-spinner`}),b&&a.createElement(D,{testId:p?`${p}-end-icon-wrapper`:void 0,style:[P.endIcon,t.iconWrapper,t.endIconWrapper,v==="tertiary"&&t.endIconWrapperTertiary,(f||S)&&v!=="primary"&&t.iconWrapperSecondaryHovered]},a.createElement(G,{size:Q,icon:b,testId:p?`${p}-end-icon`:void 0})));return I&&!E?x&&!u&&ne(I)?a.createElement(Te,L({},A,{to:I,ref:r}),F):a.createElement(Le,L({},A,{href:I,ref:r}),F):a.createElement(_e,L({type:T||"button"},A,{"aria-disabled":E,ref:r}),F)};return a.createElement(Z.Consumer,null,x=>s(x))}),Re=o=>({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",height:o.size.height.medium,paddingTop:0,paddingBottom:0,paddingLeft:o.padding.large,paddingRight:o.padding.large,border:"none",borderRadius:o.border.radius.default,cursor:"pointer",outline:"none",textDecoration:"none",boxSizing:"border-box",touchAction:"manipulation",userSelect:"none",":focus":{WebkitTapHighlightColor:"rgba(0,0,0,0)"}},disabled:{cursor:"auto"},small:{borderRadius:o.border.radius.small,height:o.size.height.small},large:{borderRadius:o.border.radius.large,height:o.size.height.large},text:{alignItems:"center",fontWeight:o.font.weight.default,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"inline-block",pointerEvents:"none"},largeText:{fontSize:o.font.size.large,lineHeight:`${o.font.lineHeight.large}px`},textWithFocus:{position:"relative"},hiddenText:{visibility:"hidden"},spinner:{position:"absolute"},startIcon:{marginRight:o.padding.small,marginLeft:o.margin.icon.offset},tertiaryStartIcon:{marginLeft:0},endIcon:{marginLeft:o.padding.small},iconWrapper:{borderRadius:o.border.radius.icon,padding:o.padding.xsmall,minWidth:"auto"},iconWrapperSecondaryHovered:{backgroundColor:o.color.bg.icon.secondaryHover,color:o.color.text.icon.secondaryHover},endIconWrapper:{marginLeft:o.padding.small,marginRight:o.margin.icon.offset},endIconWrapperTertiary:{marginRight:0}}),P={},Ne=(o="default",n,r,l,e,t)=>{const s=o==="destructive"?e.color.bg.critical.default:e.color.bg.action.default,x=`${s}-${n}-${r}-${l}-${t}`;if(P[x])return P[x];const d=o==="destructive"?e.color.bg.critical.inverse:e.color.bg.action.inverse,u=o==="destructive"?e.color.bg.critical.active:e.color.bg.action.active,g=l==="large"?e.padding.xLarge:e.padding.large;let C={};if(n==="primary"){const f=r?e.color.bg.primary.inverse:e.color.bg.primary.default;C={default:{background:r?e.color.bg.primary.default:s,color:r?s:e.color.text.inverse,paddingLeft:g,paddingRight:g},focus:{boxShadow:`0 0 0 1px ${f}, 0 0 0 3px ${r?e.color.bg.primary.default:s}`},active:{boxShadow:`0 0 0 1px ${f}, 0 0 0 3px ${r?d:u}`,background:r?d:u,color:r?u:d},disabled:{background:r?d:e.color.bg.primary.disabled,color:r?s:e.color.text.primary.disabled,cursor:"default",":focus":{boxShadow:`0 0 0 1px ${r?e.color.bg.primary.disabled:e.color.bg.primary.default}, 0 0 0 3px ${r?d:e.color.bg.primary.disabled}`}}}}else if(n==="secondary"){const f=o==="destructive"?e.color.border.secondary.critical:e.color.border.secondary.action,S=o==="destructive"?e.color.bg.secondary.active.critical:e.color.bg.secondary.active.action;C={default:{background:r?e.color.bg.secondary.inverse:e.color.bg.secondary.default,color:r?e.color.text.inverse:s,borderColor:r?e.color.border.secondary.inverse:f,borderStyle:"solid",borderWidth:e.border.width.secondary,paddingLeft:g,paddingRight:g},focus:{background:r?e.color.bg.secondary.inverse:e.color.bg.secondary.focus,borderColor:"transparent",outlineColor:r?e.color.border.primary.inverse:s,outlineStyle:"solid",outlineWidth:e.border.width.focused},active:{background:r?u:S,color:r?d:u,borderColor:"transparent",outlineColor:r?d:u,outlineStyle:"solid",outlineWidth:e.border.width.focused},disabled:{color:r?e.color.text.secondary.inverse:e.color.text.disabled,outlineColor:r?d:e.color.border.disabled,cursor:"default",":focus":{outlineColor:r?e.color.border.secondary.inverse:e.color.border.disabled,outlineStyle:"solid",outlineWidth:e.border.width.disabled}}}}else if(n==="tertiary")C={default:{background:"none",color:r?e.color.text.inverse:s,paddingLeft:0,paddingRight:0},hover:{":after":{content:"''",position:"absolute",height:e.size.height.tertiaryHover,width:"100%",right:0,bottom:0,background:r?e.color.bg.tertiary.hover:s,borderRadius:e.border.radius.tertiary}},focus:{outlineStyle:"solid",outlineColor:r?e.color.border.tertiary.inverse:s,outlineWidth:e.border.width.focused,borderRadius:e.border.radius.default},active:{color:r?d:u,":after":{height:e.size.height.tertiaryHover,background:r?d:u}},disabled:{color:r?d:e.color.text.disabled,cursor:"default"},disabledFocus:{outlineColor:r?e.color.border.tertiary.inverse:e.color.border.disabled}};else throw new Error("Button kind not recognized");return P[x]=H.StyleSheet.create(C),P[x]},$e=["href","type","children","skipClientNav","onClick","beforeNav","safeWithNav","tabIndex","target","rel","color","kind","light","size","disabled","spinner"],Pe=a.forwardRef(function(n,r){const{href:l=void 0,type:e=void 0,children:t,skipClientNav:s,onClick:x,beforeNav:d=void 0,safeWithNav:u=void 0,tabIndex:g,target:C,rel:f,color:S="default",kind:I="primary",light:v=!1,size:_="medium",disabled:B=!1,spinner:c=!1}=n,y=K(n,$e),$=p=>{const T=de(l,s,p),O=(z,b)=>a.createElement(We,L({},y,z,b,{disabled:B,spinner:c||z.waiting,color:S,kind:I,light:v,size:_,skipClientNav:s,href:l,target:C,type:e,tabIndex:g,ref:r}),t);return d?a.createElement(T,{disabled:c||B,href:l,role:"button",type:e,onClick:x,beforeNav:d,safeWithNav:u,rel:f},O):a.createElement(T,{disabled:c||B,href:l,role:"button",type:e,onClick:x,safeWithNav:u,target:C,rel:f},O)};return a.createElement(ze,null,a.createElement(Z.Consumer,null,p=>$(p)))});function He(o,n,r,l,e,t){return e&&r?n?t.choiceCheckedCorrect({letter:o}):l?t.choiceCrossedOutCorrect({letter:o}):t.choiceCorrect({letter:o}):e&&!r?n?t.choiceCheckedIncorrect({letter:o}):l?t.choiceCrossedOutIncorrect({letter:o}):t.choiceIncorrect({letter:o}):n?t.choiceChecked({letter:o}):l?t.choiceCrossedOut({letter:o}):t.choice({letter:o})}const qe="16px 16px",Ae="12px 16px",Fe={path:"M27.218 6.82l0 13.578q0 2.852-1.984 4.836t-4.836 1.984l-13.578 0q-2.852 0-4.836-1.984t-1.984-4.836l0-13.578q0-2.852 1.984-4.836t4.836-1.984l13.578 0q2.852 0 4.836 1.984t1.984 4.836zm36.27 0l0 13.578q0 2.852-1.984 4.836t-4.836 1.984l-13.578 0q-2.852 0-4.836-1.984t-1.984-4.836l0-13.578q0-2.852 1.984-4.836t4.836-1.984l13.578 0q2.852 0 4.836 1.984t1.984 4.836zm36.27 0l0 13.578q0 2.852-1.984 4.836t-4.836 1.984l-13.578 0q-2.852 0-4.836-1.984t-1.984-4.836l0-13.578q0-2.852 1.984-4.836t4.836-1.984l13.578 0q2.852 0 4.836 1.984t1.984 4.836z",width:100,height:27.284},je=function(o){const{disabled:n=!1,checked:r=!1,content:l,crossedOut:e,showCorrectness:t,multipleSelect:s,onChange:x=b=>{},reviewMode:d,correct:u=!1,apiOptions:g=ke.defaults,previouslyAnswered:C=!1,pos:f=0,showRationale:S=!1,rationale:I,forwardedRef:v}=o,[_,B]=a.useState(!1),{strings:c}=xe();a.useEffect(()=>{_&&n&&B(!1)},[n,_,B]);function y(b){const W=b.checked??r,R=b.crossedOut??e;x({checked:W,crossedOut:R})}const $=Y("description",H.css(J.description)),p=Y("perseus-radio-rationale-content",H.css(J.rationale)),T=!d&&g.readOnly||e,O=j(f,c),z=He(O,r,u,e,t,c);return N("div",{style:{dispay:"flex",flexDirection:"column",color:i.offBlack},className:$,children:[N("div",{style:{display:"flex",flexDirection:"row",opacity:T?.5:1,overflowX:"auto",overflowY:"hidden"},children:[m("div",{className:"perseus-sr-only",children:N("label",{children:[z,"   ",l,m("input",{type:s?"checkbox":"radio",checked:r,onClick:()=>{y({checked:!r,crossedOut:!1})},onChange:()=>{},disabled:n||g.readOnly,tabIndex:-1,className:Ce.RADIO.OPTION_CONTENT})]})}),m(X,{onClick:()=>{y({checked:!r,crossedOut:!1})},disabled:n||g.readOnly,style:{flex:1,color:i.offBlack,userSelect:"text"},ref:v,"aria-hidden":"true",children:({hovered:b,focused:W,pressed:R})=>N("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignContent:"center",paddingTop:h.xSmall_8,paddingBottom:h.xSmall_8,paddingLeft:h.xSmall_8},children:[m(Se,{pos:f,correct:u,crossedOut:e,pressed:R,focused:W,checked:r,hovered:b,showCorrectness:t,multipleSelect:s,reviewMode:d,previouslyAnswered:C}),N("span",{style:{paddingLeft:h.small_12,textAlign:"left",flex:1,paddingTop:4},children:[m("div",{children:m(Ie,{checked:r,correct:u,crossedOut:e,previouslyAnswered:C,reviewMode:d})}),m("div",{children:l})]})]})}),g.crossOutEnabled&&!d&&m(ye,{dismissEnabled:!0,content:({close:b})=>m(he,{title:c.crossOut,content:c.crossOutOption,closeButtonVisible:!0,actions:N(D,{children:[m(ge,{size:h.medium_16}),m(Pe,{kind:"primary","aria-label":c.crossOutChoice({letter:j(f,c)}),disabled:g.readOnly||d,onClick:()=>{y(e?{crossedOut:!1}:{checked:!1,crossedOut:!0}),b()},children:e?c.bringBack:c.crossOut})]})}),children:({open:b})=>m(X,{onClick:b,"aria-label":c.openMenuForChoice({letter:j(f,c)}),style:{alignSelf:"center",padding:"5px",display:"flex",justifyContent:"center",alignItems:"center",marginLeft:"10px"},children:({hovered:W,focused:R,pressed:w})=>m(ve,{icon:Fe,size:3,color:i.offBlack64})})})]}),S&&m("div",{className:p,"data-testid":`perseus-radio-rationale-content-${f}`,children:I})]})},J=H.StyleSheet.create({description:{display:"inline-block",width:"100%"},rationale:{display:"block",padding:qe,paddingTop:0,marginLeft:54,color:i.offBlack64,[we.smOrSmaller]:{padding:Ae,paddingTop:0}}}),cr=a.forwardRef((o,n)=>m(je,{...o,forwardedRef:n}));export{Pe as B,cr as C}; diff --git a/assets/choice-none-above.stories-5tKq4ftc.js b/assets/choice-none-above.stories-5tKq4ftc.js index a2e8365d5d..99406adc99 100644 --- a/assets/choice-none-above.stories-5tKq4ftc.js +++ b/assets/choice-none-above.stories-5tKq4ftc.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as s}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{C as a}from"./choice-none-above-o4v4BTO3.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./choice-E4eyMygy.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./icon-YuYiVxsK.js";import"./media-queries-MaBBbpNq.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";const fo={title:"Perseus/Widgets/Radio/Choice None of the Above",args:{showContent:!1,content:"This is a possible choice"}},n={checked:!1,rationale:"This is a good rational",correct:!0,disabled:!1,pos:0,reviewMode:!1,showRationale:!1,showCorrectness:!1,multipleSelect:!1,crossedOut:!1,previouslyAnswered:!1,apiOptions:{},onChange:s("changed")},o=i=>{const p={...n,...i};return m(a,{...p})};o.__docgenInfo={description:"",methods:[],displayName:"Example",props:{content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},showContent:{required:!1,tsType:{name:"boolean"},description:""}}};var t,r,e;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as s}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{C as a}from"./choice-none-above-o4v4BTO3.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./choice-E4eyMygy.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./icon-YuYiVxsK.js";import"./media-queries-MaBBbpNq.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";const fo={title:"Perseus/Widgets/Radio/Choice None of the Above",args:{showContent:!1,content:"This is a possible choice"}},n={checked:!1,rationale:"This is a good rational",correct:!0,disabled:!1,pos:0,reviewMode:!1,showRationale:!1,showCorrectness:!1,multipleSelect:!1,crossedOut:!1,previouslyAnswered:!1,apiOptions:{},onChange:s("changed")},o=i=>{const p={...n,...i};return m(a,{...p})};o.__docgenInfo={description:"",methods:[],displayName:"Example",props:{content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},showContent:{required:!1,tsType:{name:"boolean"},description:""}}};var t,r,e;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const combineProps = ({ ...ChoiceDefaults, ...args diff --git a/assets/choice.stories-CaPa6g2I.js b/assets/choice.stories-CaPa6g2I.js index 2cb4dbdaea..21a1e360df 100644 --- a/assets/choice.stories-CaPa6g2I.js +++ b/assets/choice.stories-CaPa6g2I.js @@ -1,4 +1,4 @@ -import{j as r,a as p,F as l}from"./jsx-runtime-FVsy8kgq.js";import{a as C}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{C as t}from"./choice-E4eyMygy.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";const i={checked:!1,rationale:"This is a good rationale",content:"This is a possible choice",correct:!0,disabled:!1,pos:0,reviewMode:!1,showRationale:!1,showCorrectness:!1,multipleSelect:!1,crossedOut:!1,previouslyAnswered:!1,onChange:C("changed")},me={title:"Perseus/Widgets/Radio/Choice",args:i},o=a=>r(t,{...a}),n=a=>{const e={...i,checked:!0,showCorrectness:!0},d={...e,correct:!0,content:"This choice is correct"},u={...e,correct:!1,content:"This choice is incorrect"};return p(l,{children:[r(t,{...d}),r(t,{...u})]})},s=a=>{const e={...i,showCorrectness:!0,reviewMode:!0,multipleSelect:!0};return p(l,{children:[r(t,{...e,correct:!0,checked:!0,content:"This choice was correct and checked"}),r(t,{...e,correct:!0,content:"This choice was also correct and not checked"}),r(t,{...e,correct:!1,checked:!0,content:"This choice was incorrect and checked"}),r(t,{...e,correct:!1,content:"This choice was also incorrect and not checked"})]})},c=a=>{const e={...i,checked:!0,showCorrectness:!0,showRationale:!0,reviewMode:!0},d={...e,correct:!0,content:"This choice is correct",rationale:"It was correct because of the way it is"},u={...e,correct:!1,content:"This choice is incorrect",rationale:"It was incorrect because of the way it is"};return p(l,{children:[r(t,{...d}),r(t,{...u})]})};o.__docgenInfo={description:"",methods:[],displayName:"Interactive",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};n.__docgenInfo={description:"",methods:[],displayName:"Checked",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};s.__docgenInfo={description:"",methods:[],displayName:"ReviewMode",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};c.__docgenInfo={description:"",methods:[],displayName:"Rationale",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};var m,h,y;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as r,a as p,F as l}from"./jsx-runtime-FVsy8kgq.js";import{a as C}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{C as t}from"./choice-E4eyMygy.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";const i={checked:!1,rationale:"This is a good rationale",content:"This is a possible choice",correct:!0,disabled:!1,pos:0,reviewMode:!1,showRationale:!1,showCorrectness:!1,multipleSelect:!1,crossedOut:!1,previouslyAnswered:!1,onChange:C("changed")},me={title:"Perseus/Widgets/Radio/Choice",args:i},o=a=>r(t,{...a}),n=a=>{const e={...i,checked:!0,showCorrectness:!0},d={...e,correct:!0,content:"This choice is correct"},u={...e,correct:!1,content:"This choice is incorrect"};return p(l,{children:[r(t,{...d}),r(t,{...u})]})},s=a=>{const e={...i,showCorrectness:!0,reviewMode:!0,multipleSelect:!0};return p(l,{children:[r(t,{...e,correct:!0,checked:!0,content:"This choice was correct and checked"}),r(t,{...e,correct:!0,content:"This choice was also correct and not checked"}),r(t,{...e,correct:!1,checked:!0,content:"This choice was incorrect and checked"}),r(t,{...e,correct:!1,content:"This choice was also incorrect and not checked"})]})},c=a=>{const e={...i,checked:!0,showCorrectness:!0,showRationale:!0,reviewMode:!0},d={...e,correct:!0,content:"This choice is correct",rationale:"It was correct because of the way it is"},u={...e,correct:!1,content:"This choice is incorrect",rationale:"It was incorrect because of the way it is"};return p(l,{children:[r(t,{...d}),r(t,{...u})]})};o.__docgenInfo={description:"",methods:[],displayName:"Interactive",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};n.__docgenInfo={description:"",methods:[],displayName:"Checked",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};s.__docgenInfo={description:"",methods:[],displayName:"ReviewMode",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};c.__docgenInfo={description:"",methods:[],displayName:"Rationale",props:{checked:{required:!0,tsType:{name:"boolean"},description:""},rationale:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},content:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},correct:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!0,tsType:{name:"boolean"},description:""},pos:{required:!0,tsType:{name:"number"},description:""},reviewMode:{required:!0,tsType:{name:"boolean"},description:""},showRationale:{required:!0,tsType:{name:"boolean"},description:""},showCorrectness:{required:!0,tsType:{name:"boolean"},description:""},multipleSelect:{required:!0,tsType:{name:"boolean"},description:""},crossedOut:{required:!0,tsType:{name:"boolean"},description:""},previouslyAnswered:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValues: {checked: boolean; crossedOut: boolean}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{checked: boolean; crossedOut: boolean}",signature:{properties:[{key:"checked",value:{name:"boolean",required:!0}},{key:"crossedOut",value:{name:"boolean",required:!0}}]}},name:"newValues"}],return:{name:"void"}}},description:""}}};var m,h,y;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(y=(h=o.parameters)==null?void 0:h.docs)==null?void 0:y.source}}};var b,w,T;n.parameters={...n.parameters,docs:{...(b=n.parameters)==null?void 0:b.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const sharedProps = ({ diff --git a/assets/color-select-aXibMsPD.js b/assets/color-select-aXibMsPD.js index f266248fd7..de046cf8b5 100644 --- a/assets/color-select-aXibMsPD.js +++ b/assets/color-select-aXibMsPD.js @@ -1 +1 @@ -import{j as e,a as l}from"./jsx-runtime-FVsy8kgq.js";import{l as a}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{V as n}from"./index-6h5t6F0w.js";import{S as c,O as d}from"./answer-choices-vbrLThK4.js";import{S as u}from"./index-qUyqkRvh.js";import{s as y}from"./index-deFLJwr4.js";import{a as f}from"./index-h_CiYGGb.js";import{l as g}from"./index-awljIyHI.js";import{C as S}from"./util-7LGRm2EO.js";const C=Object.keys(a),o=i=>{const{selectedValue:s,style:m,onChange:p}=i;return e(n,{style:[t.row,m],children:l(f,{tag:"label",style:t.row,children:["color",e(u,{size:y.xxSmall_6}),e(c,{selectedValue:s,onChange:p,placeholder:"",children:C.map(r=>e(d,{value:r,label:r,leftAccessory:e(S,{color:r,decorative:!0})},r))})]})})},t=g.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center",minWidth:"auto"}}),ee=o;o.__docgenInfo={description:"",methods:[],displayName:"ColorSelect",props:{selectedValue:{required:!0,tsType:{name:"LockedFigureColor"},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: string) => void",signature:{arguments:[{type:{name:"string"},name:"newValue"}],return:{name:"void"}}},description:""}}};export{ee as C}; +import{j as e,a as l}from"./jsx-runtime-FVsy8kgq.js";import{l as a}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{V as n}from"./index-6h5t6F0w.js";import{S as c,O as d}from"./answer-choices-vbrLThK4.js";import{S as u}from"./index-qUyqkRvh.js";import{s as y}from"./index-deFLJwr4.js";import{a as f}from"./index-h_CiYGGb.js";import{l as g}from"./index-awljIyHI.js";import{C as S}from"./util-7LGRm2EO.js";const C=Object.keys(a),o=i=>{const{selectedValue:s,style:m,onChange:p}=i;return e(n,{style:[t.row,m],children:l(f,{tag:"label",style:t.row,children:["color",e(u,{size:y.xxSmall_6}),e(c,{selectedValue:s,onChange:p,placeholder:"",children:C.map(r=>e(d,{value:r,label:r,leftAccessory:e(S,{color:r,decorative:!0})},r))})]})})},t=g.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center",minWidth:"auto"}}),ee=o;o.__docgenInfo={description:"",methods:[],displayName:"ColorSelect",props:{selectedValue:{required:!0,tsType:{name:"LockedFigureColor"},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: string) => void",signature:{arguments:[{type:{name:"string"},name:"newValue"}],return:{name:"void"}}},description:""}}};export{ee as C}; diff --git a/assets/color-select.stories-mNqFLHPY.js b/assets/color-select.stories-mNqFLHPY.js index 3d484ea8a9..ba44085ffd 100644 --- a/assets/color-select.stories-mNqFLHPY.js +++ b/assets/color-select.stories-mNqFLHPY.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{r as g}from"./index-TT1qJ6UJ.js";import{C as t}from"./color-select-aXibMsPD.js";import{g as f}from"./util-7LGRm2EO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";const ar={title:"PerseusEditor/Components/Color Select",component:t},o=e=>s(t,{...e}),c=f("point").color;o.args={id:"color-select",selectedValue:c,onChange:()=>{}};const r={render:function(){const[d,u]=g.useState(c);return s(t,{selectedValue:d,onChange:C=>{u(C)}})}};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var m,i,p;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{r as g}from"./index-TT1qJ6UJ.js";import{C as t}from"./color-select-aXibMsPD.js";import{g as f}from"./util-7LGRm2EO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";const ar={title:"PerseusEditor/Components/Color Select",component:t},o=e=>s(t,{...e}),c=f("point").color;o.args={id:"color-select",selectedValue:c,onChange:()=>{}};const r={render:function(){const[d,u]=g.useState(c);return s(t,{selectedValue:d,onChange:C=>{u(C)}})}};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var m,i,p;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(p=(i=o.parameters)==null?void 0:i.docs)==null?void 0:p.source}}};var a,l,n;r.parameters={...r.parameters,docs:{...(a=r.parameters)==null?void 0:a.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/color-swatch.stories--rQT3YkY.js b/assets/color-swatch.stories--rQT3YkY.js index 2da08b9af6..b7b6a7d704 100644 --- a/assets/color-swatch.stories--rQT3YkY.js +++ b/assets/color-swatch.stories--rQT3YkY.js @@ -1,3 +1,3 @@ -import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{C as p,g as a}from"./util-7LGRm2EO.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";const Xo={title:"PerseusEditor/Components/Color Swatch",component:p},o=i=>e(p,{...i});o.args={color:a("point").color,filled:!0};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var r,t,m;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{C as p,g as a}from"./util-7LGRm2EO.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";const Xo={title:"PerseusEditor/Components/Color Swatch",component:p},o=i=>e(p,{...i});o.args={color:a("point").color,filled:!0};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var r,t,m;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(m=(t=o.parameters)==null?void 0:t.docs)==null?void 0:m.source}}};const Yo=["Default"];export{o as Default,Yo as __namedExportsOrder,Xo as default}; diff --git a/assets/content-preview.stories-64c0o_I7.js b/assets/content-preview.stories-64c0o_I7.js index 8010d258dc..5112b7e41a 100644 --- a/assets/content-preview.stories-64c0o_I7.js +++ b/assets/content-preview.stories-64c0o_I7.js @@ -1,4 +1,4 @@ -import{j as e,a as x,F as W}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import{R as D}from"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import{u as R,a as A}from"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{V as m}from"./index-6h5t6F0w.js";import{s as b}from"./index-deFLJwr4.js";import{r as $}from"./index-TT1qJ6UJ.js";import{c as I}from"./article-renderer.testdata-spwNviYy.js";import{m as L}from"./strings-OAjNfY6D.js";import{b as O}from"./radio.testdata-sITJ8lxE.js";import{D as _}from"./device-framer-wVZUBEZD.js";import{V as k}from"./viewport-resizer-YtC0KtaX.js";import{S as V,a as H,M}from"./mobile-keypad-hKjeQGNp.js";import"./prop-types-3bOVFRDQ.js";import"./key-translator-IA-2V2LV.js";import"./button-assets-txIojR3b.js";import{l as j}from"./constants-hQyjCzwz.js";import{l as z}from"./index-awljIyHI.js";/* empty css */import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-7vsPyIck.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./icon-paths-AuJwhOz7.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./shared-3pf9YZIg.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./answer-choices-vbrLThK4.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./asset-context-I7yIqWki.js";import"./index-J2t_5nK1.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./invariant-bu5zBsRS.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./video-transcript-link-WVgIZGhp.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-Hmby24Jq.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./choice-none-above-o4v4BTO3.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./components-0kNWnYe6.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";function p({question:t,apiOptions:r,seamless:s,linterContext:P,legacyPerseusLint:T,previewDevice:q}){const C=R(),a=q!=="desktop";return e(m,{className:`framework-perseus ${a?"perseus-mobile":""}`,style:[c.container,s?void 0:c.gutter],children:e(V,{children:e(H.Consumer,{children:({setKeypadActive:S,keypadElement:E,setKeypadElement:N})=>x(W,{children:[e(D,{strings:C.strings,apiOptions:{...r,isMobile:a},keypadElement:E,linterContext:P,legacyPerseusLint:T,...t}),e(M,{onAnalyticsEvent:()=>Promise.resolve(),onDismiss:()=>S(!1),onElementMounted:N})]})})})})}const c=z.StyleSheet.create({container:{padding:b.xxxSmall_4,containerType:"inline-size",containerName:"perseus-root"},gutter:{marginRight:j}});p.__docgenInfo={description:"The `ContentPreview` component provides a simple preview system for Perseus\nContent. Due to how Persus styles are built, the preview styling matches the\ncurrent device based on the viewport width (using `@media` queries for\n`min-width` and `max-width`).\n\nThe preview will render the mobile variant (styling and layout) when the\n`previewDevice` is phone or tablet. Note that the styling cannot be matched\n100% due to the above `@media` query limitation.",methods:[],displayName:"ContentPreview",props:{question:{required:!1,tsType:{name:"PerseusRenderer"},description:""},apiOptions:{required:!1,tsType:{name:"APIOptions"},description:""},seamless:{required:!1,tsType:{name:"boolean"},description:""},linterContext:{required:!1,tsType:{name:"LinterContextProps"},description:""},legacyPerseusLint:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},previewDevice:{required:!0,tsType:{name:"DeviceType"},description:""}}};const F=t=>{const[r,s]=$.useState("phone");return x(m,{children:[e(k,{deviceType:r,onViewportSizeChanged:s}),e(_,{nochrome:!1,deviceType:r,children:e(p,{...t})})]})},Vt={title:"PerseusEditor/Content Preview",component:p,decorators:[t=>e(m,{style:{margin:b.xxSmall_6},children:e(A,{strings:L,locale:"en",children:e(t,{})})})],render:t=>e(F,{...t})},o={args:{question:O}},i={args:{question:I}},n={args:{linterContext:{contentType:"exercise",highlightLint:!0,stack:[],paths:[]},question:{content:`# H1s bad +import{j as e,a as x,F as W}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import{R as D}from"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import{u as R,a as A}from"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{V as m}from"./index-6h5t6F0w.js";import{s as b}from"./index-deFLJwr4.js";import{r as $}from"./index-TT1qJ6UJ.js";import{c as I}from"./article-renderer.testdata-spwNviYy.js";import{m as L}from"./strings-OAjNfY6D.js";import{b as O}from"./radio.testdata-sITJ8lxE.js";import{D as _}from"./device-framer-wVZUBEZD.js";import{V as k}from"./viewport-resizer-YtC0KtaX.js";import{S as V,a as H,M}from"./mobile-keypad-hKjeQGNp.js";import"./prop-types-3bOVFRDQ.js";import"./key-translator-IA-2V2LV.js";import"./button-assets-txIojR3b.js";import{l as j}from"./constants-hQyjCzwz.js";import{l as z}from"./index-awljIyHI.js";/* empty css */import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-7vsPyIck.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./icon-paths-AuJwhOz7.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./shared-3pf9YZIg.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./answer-choices-vbrLThK4.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./asset-context-I7yIqWki.js";import"./index-J2t_5nK1.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./invariant-bu5zBsRS.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./video-transcript-link-WVgIZGhp.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-Hmby24Jq.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./choice-none-above-o4v4BTO3.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./components-0kNWnYe6.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";function p({question:t,apiOptions:r,seamless:s,linterContext:P,legacyPerseusLint:T,previewDevice:q}){const C=R(),a=q!=="desktop";return e(m,{className:`framework-perseus ${a?"perseus-mobile":""}`,style:[c.container,s?void 0:c.gutter],children:e(V,{children:e(H.Consumer,{children:({setKeypadActive:S,keypadElement:E,setKeypadElement:N})=>x(W,{children:[e(D,{strings:C.strings,apiOptions:{...r,isMobile:a},keypadElement:E,linterContext:P,legacyPerseusLint:T,...t}),e(M,{onAnalyticsEvent:()=>Promise.resolve(),onDismiss:()=>S(!1),onElementMounted:N})]})})})})}const c=z.StyleSheet.create({container:{padding:b.xxxSmall_4,containerType:"inline-size",containerName:"perseus-root"},gutter:{marginRight:j}});p.__docgenInfo={description:"The `ContentPreview` component provides a simple preview system for Perseus\nContent. Due to how Persus styles are built, the preview styling matches the\ncurrent device based on the viewport width (using `@media` queries for\n`min-width` and `max-width`).\n\nThe preview will render the mobile variant (styling and layout) when the\n`previewDevice` is phone or tablet. Note that the styling cannot be matched\n100% due to the above `@media` query limitation.",methods:[],displayName:"ContentPreview",props:{question:{required:!1,tsType:{name:"PerseusRenderer"},description:""},apiOptions:{required:!1,tsType:{name:"APIOptions"},description:""},seamless:{required:!1,tsType:{name:"boolean"},description:""},linterContext:{required:!1,tsType:{name:"LinterContextProps"},description:""},legacyPerseusLint:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},previewDevice:{required:!0,tsType:{name:"DeviceType"},description:""}}};const F=t=>{const[r,s]=$.useState("phone");return x(m,{children:[e(k,{deviceType:r,onViewportSizeChanged:s}),e(_,{nochrome:!1,deviceType:r,children:e(p,{...t})})]})},Vt={title:"PerseusEditor/Content Preview",component:p,decorators:[t=>e(m,{style:{margin:b.xxSmall_6},children:e(A,{strings:L,locale:"en",children:e(t,{})})})],render:t=>e(F,{...t})},o={args:{question:O}},i={args:{question:I}},n={args:{linterContext:{contentType:"exercise",highlightLint:!0,stack:[],paths:[]},question:{content:`# H1s bad Here is some unclosed math: $1+1=3 diff --git a/assets/cs-program.stories-H0GMon8_.js b/assets/cs-program.stories-H0GMon8_.js index e9873e3e38..7552163d9d 100644 --- a/assets/cs-program.stories-H0GMon8_.js +++ b/assets/cs-program.stories-H0GMon8_.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const e={content:`[[☃ cs-program 1]] +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const e={content:`[[☃ cs-program 1]] `,images:{},widgets:{"cs-program 1":{graded:!0,version:{major:0,minor:0},static:!1,type:"cs-program",options:{settings:[{name:"",value:""},{name:"",value:""}],height:540,width:640,programID:"6293105639817216",static:!1,showButtons:!1,showEditor:!1},alignment:"block"}}},Yr={title:"Perseus/Widgets/CS Program"},r=s=>m(p,{question:e});r.__docgenInfo={description:"",methods:[],displayName:"Question1"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/definition-editor-koC6zgjU.js b/assets/definition-editor-koC6zgjU.js index 53d165ca27..0966af449f 100644 --- a/assets/definition-editor-koC6zgjU.js +++ b/assets/definition-editor-koC6zgjU.js @@ -1 +1 @@ -import{a as n,j as e}from"./jsx-runtime-FVsy8kgq.js";import{c as a,p}from"./article-renderer-o95CuJpS.js";import{_ as m}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as l}from"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{E as d}from"./editor-jsonify-yP45H1ib.js";import{P as o}from"./index-0C4KXdeC.js";import{r as c}from"./index-TT1qJ6UJ.js";import{E as f}from"./editor-SZLWA5DH.js";const{TextInput:u}=l,t=class t extends c.Component{constructor(){super(...arguments),this.change=(...i)=>a.apply(this,i),this.serialize=()=>d.serialize.call(this)}render(){return n("div",{className:"perseus-widget-definition-editor",children:[e("a",{href:"https://docs.google.com/document/d/1udaPef4imOfTMhmLDlWq4SM0mxL0r3YHFZE-5J1uGfo",target:"_blank",children:"Definition style guide"}),e("div",{className:"perseus-widget-row",children:n("label",{children:["Word to be defined:"," ",e(u,{value:this.props.togglePrompt,onChange:this.change("togglePrompt"),placeholder:"define me"})]})}),e("div",{className:"perseus-widget-row",children:e(f,{apiOptions:this.props.apiOptions,content:this.props.definition,widgetEnabled:!1,placeholder:"definition goes here",onChange:i=>{const s={};m.has(i,"content")&&(s.definition=i.content),this.change(s)}})})]})}};t.propTypes={...p,togglePrompt:o.string,definition:o.string,apiOptions:o.any},t.widgetName="definition",t.defaultProps={togglePrompt:"",definition:""};let r=t;r.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"DefinitionEditor",props:{togglePrompt:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},definition:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},apiOptions:{description:"",type:{name:"any"},required:!1}},composes:["@khanacademy/perseus"]};export{r as D}; +import{a as n,j as e}from"./jsx-runtime-FVsy8kgq.js";import{c as a,p}from"./article-renderer-o95CuJpS.js";import{_ as m}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as l}from"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{E as d}from"./editor-jsonify-yP45H1ib.js";import{P as o}from"./index-k-0mNqHS.js";import{r as c}from"./index-TT1qJ6UJ.js";import{E as f}from"./editor-SZLWA5DH.js";const{TextInput:u}=l,t=class t extends c.Component{constructor(){super(...arguments),this.change=(...i)=>a.apply(this,i),this.serialize=()=>d.serialize.call(this)}render(){return n("div",{className:"perseus-widget-definition-editor",children:[e("a",{href:"https://docs.google.com/document/d/1udaPef4imOfTMhmLDlWq4SM0mxL0r3YHFZE-5J1uGfo",target:"_blank",children:"Definition style guide"}),e("div",{className:"perseus-widget-row",children:n("label",{children:["Word to be defined:"," ",e(u,{value:this.props.togglePrompt,onChange:this.change("togglePrompt"),placeholder:"define me"})]})}),e("div",{className:"perseus-widget-row",children:e(f,{apiOptions:this.props.apiOptions,content:this.props.definition,widgetEnabled:!1,placeholder:"definition goes here",onChange:i=>{const s={};m.has(i,"content")&&(s.definition=i.content),this.change(s)}})})]})}};t.propTypes={...p,togglePrompt:o.string,definition:o.string,apiOptions:o.any},t.widgetName="definition",t.defaultProps={togglePrompt:"",definition:""};let r=t;r.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"DefinitionEditor",props:{togglePrompt:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},definition:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},apiOptions:{description:"",type:{name:"any"},required:!1}},composes:["@khanacademy/perseus"]};export{r as D}; diff --git a/assets/definition-editor.stories-QuLoj61I.js b/assets/definition-editor.stories-QuLoj61I.js index f92ab89a00..fc56ac530f 100644 --- a/assets/definition-editor.stories-QuLoj61I.js +++ b/assets/definition-editor.stories-QuLoj61I.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{D as e}from"./definition-editor-koC6zgjU.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./editor-jsonify-yP45H1ib.js";import"./index-0C4KXdeC.js";import"./editor-SZLWA5DH.js";import"./index-SM3muJE2.js";import"./section-control-button-VtgjGcq5.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const nt={title:"PerseusEditor/Widgets/Definition Editor"},o=a=>m(e,{onChange:p("onChange")});o.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,r,i;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{D as e}from"./definition-editor-koC6zgjU.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./editor-jsonify-yP45H1ib.js";import"./index-k-0mNqHS.js";import"./editor-SZLWA5DH.js";import"./index-SM3muJE2.js";import"./section-control-button-VtgjGcq5.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const nt={title:"PerseusEditor/Widgets/Definition Editor"},o=a=>m(e,{onChange:p("onChange")});o.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,r,i;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(r=o.parameters)==null?void 0:r.docs)==null?void 0:i.source}}};const st=["Default"];export{o as Default,st as __namedExportsOrder,nt as default}; diff --git a/assets/definition.stories-0_b0K8aZ.js b/assets/definition.stories-0_b0K8aZ.js index e6a210a0aa..153bf067a5 100644 --- a/assets/definition.stories-0_b0K8aZ.js +++ b/assets/definition.stories-0_b0K8aZ.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{R as f}from"./renderer-with-debug-ui-o6OVhJgg.js";import{s as h}from"./test-dependencies-3HLxfOjs.js";import{A as g}from"./article-renderer-o95CuJpS.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./side-by-side-kpK-8vW0.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-8XILypbq.js";import"./multi-renderer-Nglq5SzN.js";import"./renderer-4_U4OAry.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./hints-renderer-GjKFBH8K.js";import"./shared-3pf9YZIg.js";import"./base-radio-sE9E2UC2.js";import"./choice-none-above-o4v4BTO3.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./enums-x5qaTru7.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./answer-choices-vbrLThK4.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";const dt={title:"Perseus/Widgets/Definition"},w={content:`Read the excerpt and answer the question below. +import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{R as f}from"./renderer-with-debug-ui-o6OVhJgg.js";import{s as h}from"./test-dependencies-3HLxfOjs.js";import{A as g}from"./article-renderer-o95CuJpS.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./side-by-side-kpK-8vW0.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-8XILypbq.js";import"./multi-renderer-Nglq5SzN.js";import"./renderer-4_U4OAry.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./hints-renderer-GjKFBH8K.js";import"./shared-3pf9YZIg.js";import"./base-radio-sE9E2UC2.js";import"./choice-none-above-o4v4BTO3.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./enums-x5qaTru7.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./answer-choices-vbrLThK4.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";const dt={title:"Perseus/Widgets/Definition"},w={content:`Read the excerpt and answer the question below. The Governor and Council of the Massachusetts had much conference many days; and at last . . . . concluded a peace and friendship with [[☃ definition 1]], upon these conditions.`,images:{},widgets:{"definition 1":{graded:!0,version:{major:0,minor:0},static:!1,type:"definition",options:{definition:"A Native American people in Connecticut; white settlers in New England, the Pequots, and their respective allies were at war from 1636-1638.",togglePrompt:"the Pequots",static:!1},alignment:"default"}}},y={content:`Read the excerpt and answer the question below. diff --git a/assets/deprecated-standin.stories-zZFVpdPS.js b/assets/deprecated-standin.stories-zZFVpdPS.js index a082e6ae1a..c5a37b1249 100644 --- a/assets/deprecated-standin.stories-zZFVpdPS.js +++ b/assets/deprecated-standin.stories-zZFVpdPS.js @@ -1,4 +1,4 @@ -import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{R as m}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const Xt={title:"Perseus/Widgets/Deprecated Standin"},e={content:`$\\overleftrightarrow{MN}$ is the perpendicular bisector of segment $\\overline{JL}$. +import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{R as m}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const Xt={title:"Perseus/Widgets/Deprecated Standin"},e={content:`$\\overleftrightarrow{MN}$ is the perpendicular bisector of segment $\\overline{JL}$. **Perform a reflection that proves $M$ must be equidistant from $J$ and $L$ and select the option which explains the proof.** The statement must be true for any point $M$ which lies on the perpendicular bisector. diff --git a/assets/device-framer-wVZUBEZD.js b/assets/device-framer-wVZUBEZD.js index 117f8a88ba..be29348bd2 100644 --- a/assets/device-framer-wVZUBEZD.js +++ b/assets/device-framer-wVZUBEZD.js @@ -1 +1 @@ -import{j as o}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import{p as h,l as a}from"./constants-hQyjCzwz.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{r as m}from"./index-TT1qJ6UJ.js";const r={phone:{width:320,height:480,framedWidth:320},tablet:{width:750,height:920,framedWidth:525},desktop:{width:688,height:600,framedWidth:688}},d=({children:i,deviceType:t="phone",nochrome:p})=>{const e=m.useMemo(()=>r[t].framedWidth/r[t].width,[t]),s=m.useMemo(()=>({backgroundColor:"white",overflow:"scroll",color:"black",textAlign:"left",width:r[t].width,height:r[t].height,border:"solid 1px #CCC",margin:8,zoom:e}),[t,e]);return p?o("div",{style:{overflow:"scroll",width:r[t].framedWidth+2*h+a},children:o("div",{children:i})},"screen"):o("div",{className:"screen",style:{...s,textAlign:"start"},children:i},"screen")};d.__docgenInfo={description:"",methods:[],displayName:"DeviceFramer",props:{deviceType:{defaultValue:{value:'"phone"',computed:!1},required:!1}}};export{d as D}; +import{j as o}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import{p as h,l as a}from"./constants-hQyjCzwz.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{r as m}from"./index-TT1qJ6UJ.js";const r={phone:{width:320,height:480,framedWidth:320},tablet:{width:750,height:920,framedWidth:525},desktop:{width:688,height:600,framedWidth:688}},d=({children:i,deviceType:t="phone",nochrome:p})=>{const e=m.useMemo(()=>r[t].framedWidth/r[t].width,[t]),s=m.useMemo(()=>({backgroundColor:"white",overflow:"scroll",color:"black",textAlign:"left",width:r[t].width,height:r[t].height,border:"solid 1px #CCC",margin:8,zoom:e}),[t,e]);return p?o("div",{style:{overflow:"scroll",width:r[t].framedWidth+2*h+a},children:o("div",{children:i})},"screen"):o("div",{className:"screen",style:{...s,textAlign:"start"},children:i},"screen")};d.__docgenInfo={description:"",methods:[],displayName:"DeviceFramer",props:{deviceType:{defaultValue:{value:'"phone"',computed:!1},required:!1}}};export{d as D}; diff --git a/assets/device-framer.stories-8Ab3hVpr.js b/assets/device-framer.stories-8Ab3hVpr.js index 044240e29f..64d60a7d5b 100644 --- a/assets/device-framer.stories-8Ab3hVpr.js +++ b/assets/device-framer.stories-8Ab3hVpr.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{S as D}from"./index-SM3muJE2.js";import{c as p}from"./index-deFLJwr4.js";import{D as m}from"./device-framer-wVZUBEZD.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./constants-hQyjCzwz.js";const po={component:m,title:"PerseusEditor/Components/Device Framer"},i=()=>r("div",{style:{backgroundColor:p.blue,color:p.offWhite,width:"90%",height:"300px",padding:D.medium_16},children:"The DeviceFramer controls the size of the content inside the frame. So there's not much to look at here except how large each device type's size is."}),o={render:()=>r(m,{deviceType:"phone",nochrome:!0,children:r(i,{})})},t={render:()=>r(m,{deviceType:"tablet",nochrome:!0,children:r(i,{})})},e={render:()=>r(m,{deviceType:"desktop",nochrome:!0,children:r(i,{})})};var n,c,a;o.parameters={...o.parameters,docs:{...(n=o.parameters)==null?void 0:n.docs,source:{originalSource:`{ +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{S as D}from"./index-SM3muJE2.js";import{c as p}from"./index-deFLJwr4.js";import{D as m}from"./device-framer-wVZUBEZD.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./constants-hQyjCzwz.js";const po={component:m,title:"PerseusEditor/Components/Device Framer"},i=()=>r("div",{style:{backgroundColor:p.blue,color:p.offWhite,width:"90%",height:"300px",padding:D.medium_16},children:"The DeviceFramer controls the size of the content inside the frame. So there's not much to look at here except how large each device type's size is."}),o={render:()=>r(m,{deviceType:"phone",nochrome:!0,children:r(i,{})})},t={render:()=>r(m,{deviceType:"tablet",nochrome:!0,children:r(i,{})})},e={render:()=>r(m,{deviceType:"desktop",nochrome:!0,children:r(i,{})})};var n,c,a;o.parameters={...o.parameters,docs:{...(n=o.parameters)==null?void 0:n.docs,source:{originalSource:`{ render: () => diff --git a/assets/dropdown-editor-vzCR7Y_E.js b/assets/dropdown-editor-vzCR7Y_E.js index de058a3301..a65a2c9482 100644 --- a/assets/dropdown-editor-vzCR7Y_E.js +++ b/assets/dropdown-editor-vzCR7Y_E.js @@ -1,4 +1,4 @@ -import{a as r,j as t}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import{_ as a}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as d}from"./components-0kNWnYe6.js";import{I as m}from"./icon-paths-AuJwhOz7.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{E as u}from"./editor-jsonify-yP45H1ib.js";import{P as i}from"./index-0C4KXdeC.js";import{r as f}from"./index-TT1qJ6UJ.js";import{R as C}from"./index-7vsPyIck.js";const{InfoTip:p,InlineIcon:h}=d,{iconPlus:g,iconTrash:v}=m,c=class c extends f.Component{constructor(){super(...arguments),this.onPlaceholderChange=o=>{const n=o.target.value;this.props.onChange({placeholder:n})},this.onCorrectChange=o=>{const n=a.map(this.props.choices,function(e,s){return a.extend({},e,{correct:s===o})});this.props.onChange({choices:n})},this.onContentChange=(o,n)=>{const e=this.props.choices.slice(),s=a.clone(e[o]);s.content=n.target.value,e[o]=s,this.props.onChange({choices:e})},this.addChoice=o=>{o.preventDefault();const n=this.props.choices,e={content:"",correct:!1};this.props.onChange({choices:n.concat([e])},this.focus.bind(this,n.length))},this.removeChoice=(o,n)=>{n.preventDefault();const e=a(this.props.choices).clone();e.splice(o,1),this.props.onChange({choices:e})},this.focus=o=>(C.findDOMNode(this.refs["editor"+o]).focus(),!0),this.serialize=()=>u.serialize.call(this)}render(){const o=a.uniqueId("perseus_dropdown_");return r("div",{className:"perseus-widget-dropdown",children:[r("div",{className:"dropdown-info",children:["Dropdown",t(p,{children:r("p",{children:["The drop down is useful for making inequalities in a custom format. We normally use the symbols ","<",","," ",">",', ≤, ≥ (in that order) which you can copy into the choices. When possible, use the "multiple choice" answer type instead.']})})]}),r("div",{className:"dropdown-placeholder",children:[t("input",{type:"text",placeholder:"Placeholder value",value:this.props.placeholder,onChange:this.onPlaceholderChange}),t(p,{children:t("p",{children:"This value will appear as the drop down default. It should give the user some indication of the values available in the drop down itself, e.g., Yes/No/Maybe."})})]}),t("div",{className:"clearfix"}),t("ul",{className:"dropdown-choices",children:this.props.choices.map(function(n,e){const s=n.correct?"correct":"incorrect";return t("li",{children:r("div",{children:[t("input",{ref:"radio"+e,type:"radio",name:o,checked:n.correct?"checked":"",onChange:this.onCorrectChange.bind(this,e),value:e}),t("input",{type:"text",ref:"editor"+e,onChange:this.onContentChange.bind(this,e),className:s,value:n.content}),t("a",{href:"#",className:"simple-button orange","aria-label":"Delete choice",onClick:this.removeChoice.bind(this,e),children:t("span",{className:"remove-choice",children:t(h,{...v})})})]})},""+e)},this)}),t("div",{className:"add-choice-container",children:r("a",{href:"#",className:"simple-button orange",onClick:this.addChoice,children:[t(h,{...g})," Add a choice"," "]})})]})}};c.propTypes={choices:i.arrayOf(i.shape({content:i.string,correct:i.bool})),placeholder:i.string},c.widgetName="dropdown",c.defaultProps={placeholder:"",choices:[{content:"",correct:!1}]};let l=c;l.__docgenInfo={description:"",methods:[{name:"onPlaceholderChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"onCorrectChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"onContentChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"addChoice",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"removeChoice",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"DropdownEditor",props:{placeholder:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},choices:{defaultValue:{value:`[ +import{a as r,j as t}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import{_ as a}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as d}from"./components-0kNWnYe6.js";import{I as m}from"./icon-paths-AuJwhOz7.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{E as u}from"./editor-jsonify-yP45H1ib.js";import{P as i}from"./index-k-0mNqHS.js";import{r as f}from"./index-TT1qJ6UJ.js";import{R as C}from"./index-7vsPyIck.js";const{InfoTip:p,InlineIcon:h}=d,{iconPlus:g,iconTrash:v}=m,c=class c extends f.Component{constructor(){super(...arguments),this.onPlaceholderChange=o=>{const n=o.target.value;this.props.onChange({placeholder:n})},this.onCorrectChange=o=>{const n=a.map(this.props.choices,function(e,s){return a.extend({},e,{correct:s===o})});this.props.onChange({choices:n})},this.onContentChange=(o,n)=>{const e=this.props.choices.slice(),s=a.clone(e[o]);s.content=n.target.value,e[o]=s,this.props.onChange({choices:e})},this.addChoice=o=>{o.preventDefault();const n=this.props.choices,e={content:"",correct:!1};this.props.onChange({choices:n.concat([e])},this.focus.bind(this,n.length))},this.removeChoice=(o,n)=>{n.preventDefault();const e=a(this.props.choices).clone();e.splice(o,1),this.props.onChange({choices:e})},this.focus=o=>(C.findDOMNode(this.refs["editor"+o]).focus(),!0),this.serialize=()=>u.serialize.call(this)}render(){const o=a.uniqueId("perseus_dropdown_");return r("div",{className:"perseus-widget-dropdown",children:[r("div",{className:"dropdown-info",children:["Dropdown",t(p,{children:r("p",{children:["The drop down is useful for making inequalities in a custom format. We normally use the symbols ","<",","," ",">",', ≤, ≥ (in that order) which you can copy into the choices. When possible, use the "multiple choice" answer type instead.']})})]}),r("div",{className:"dropdown-placeholder",children:[t("input",{type:"text",placeholder:"Placeholder value",value:this.props.placeholder,onChange:this.onPlaceholderChange}),t(p,{children:t("p",{children:"This value will appear as the drop down default. It should give the user some indication of the values available in the drop down itself, e.g., Yes/No/Maybe."})})]}),t("div",{className:"clearfix"}),t("ul",{className:"dropdown-choices",children:this.props.choices.map(function(n,e){const s=n.correct?"correct":"incorrect";return t("li",{children:r("div",{children:[t("input",{ref:"radio"+e,type:"radio",name:o,checked:n.correct?"checked":"",onChange:this.onCorrectChange.bind(this,e),value:e}),t("input",{type:"text",ref:"editor"+e,onChange:this.onContentChange.bind(this,e),className:s,value:n.content}),t("a",{href:"#",className:"simple-button orange","aria-label":"Delete choice",onClick:this.removeChoice.bind(this,e),children:t("span",{className:"remove-choice",children:t(h,{...v})})})]})},""+e)},this)}),t("div",{className:"add-choice-container",children:r("a",{href:"#",className:"simple-button orange",onClick:this.addChoice,children:[t(h,{...g})," Add a choice"," "]})})]})}};c.propTypes={choices:i.arrayOf(i.shape({content:i.string,correct:i.bool})),placeholder:i.string},c.widgetName="dropdown",c.defaultProps={placeholder:"",choices:[{content:"",correct:!1}]};let l=c;l.__docgenInfo={description:"",methods:[{name:"onPlaceholderChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"onCorrectChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"onContentChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"addChoice",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"removeChoice",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"DropdownEditor",props:{placeholder:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},choices:{defaultValue:{value:`[ { content: "", correct: false, diff --git a/assets/dropdown-editor.stories-0LZOUAK7.js b/assets/dropdown-editor.stories-0LZOUAK7.js index 8cce2ad642..db0bb46b67 100644 --- a/assets/dropdown-editor.stories-0LZOUAK7.js +++ b/assets/dropdown-editor.stories-0LZOUAK7.js @@ -1,3 +1,3 @@ -import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{a as m}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{D as e}from"./dropdown-editor-vzCR7Y_E.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./editor-jsonify-yP45H1ib.js";import"./index-0C4KXdeC.js";const tr={title:"PerseusEditor/Widgets/Dropdown Editor"},o=a=>p(e,{onChange:m("onChange")});o.__docgenInfo={description:"",methods:[],displayName:"Default"};var r,t,i;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{a as m}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{D as e}from"./dropdown-editor-vzCR7Y_E.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./editor-jsonify-yP45H1ib.js";import"./index-k-0mNqHS.js";const tr={title:"PerseusEditor/Widgets/Dropdown Editor"},o=a=>p(e,{onChange:m("onChange")});o.__docgenInfo={description:"",methods:[],displayName:"Default"};var r,t,i;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(t=o.parameters)==null?void 0:t.docs)==null?void 0:i.source}}};const ir=["Default"];export{o as Default,ir as __namedExportsOrder,tr as default}; diff --git a/assets/dropdown.stories-szoyYkPw.js b/assets/dropdown.stories-szoyYkPw.js index df64453630..2f35cc5634 100644 --- a/assets/dropdown.stories-szoyYkPw.js +++ b/assets/dropdown.stories-szoyYkPw.js @@ -1,3 +1,3 @@ -import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{R as m}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const e={content:"The total number of boxes the forklift can carry is [[☃ dropdown 1]] $60$.",images:{},widgets:{"dropdown 1":{type:"dropdown",alignment:"default",static:!1,graded:!0,options:{static:!1,placeholder:"greater/less than or equal to",choices:[{content:"greater than or equal to",correct:!1},{content:"less than or equal to",correct:!0}]},version:{major:0,minor:0}}}},Xt={title:"Perseus/Widgets/Dropdown"},t=s=>p(m,{question:e});t.__docgenInfo={description:"",methods:[],displayName:"Question1"};var o,r,i;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{R as m}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const e={content:"The total number of boxes the forklift can carry is [[☃ dropdown 1]] $60$.",images:{},widgets:{"dropdown 1":{type:"dropdown",alignment:"default",static:!1,graded:!0,options:{static:!1,placeholder:"greater/less than or equal to",choices:[{content:"greater than or equal to",correct:!1},{content:"less than or equal to",correct:!0}]},version:{major:0,minor:0}}}},Xt={title:"Perseus/Widgets/Dropdown"},t=s=>p(m,{question:e});t.__docgenInfo={description:"",methods:[],displayName:"Question1"};var o,r,i;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(r=t.parameters)==null?void 0:r.docs)==null?void 0:i.source}}};const Yt=["Question1"];export{t as Question1,Yt as __namedExportsOrder,Xt as default}; diff --git a/assets/editor-8WwPqQi6.js b/assets/editor-8WwPqQi6.js index a6408d8f4f..8af7bd8f26 100644 --- a/assets/editor-8WwPqQi6.js +++ b/assets/editor-8WwPqQi6.js @@ -1 +1 @@ -import{j as t,a}from"./jsx-runtime-FVsy8kgq.js";import{c as v,p as N}from"./article-renderer-o95CuJpS.js";import{_ as l}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as g}from"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import{B as O}from"./base-radio-sE9E2UC2.js";import{c as k}from"./components-0kNWnYe6.js";import{I as T}from"./icon-paths-AuJwhOz7.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{C as p}from"./index-QCAhLhLD.js";import{P as n}from"./index-0C4KXdeC.js";import{r as y}from"./index-TT1qJ6UJ.js";import{E as C}from"./editor-SZLWA5DH.js";const{InlineIcon:h}=k,{iconPlus:b,iconTrash:A}=T,m=class m extends y.Component{render(){const e=this.props.choice.correct?"correct":"incorrect";let s="Type a choice here...";this.props.choice.isNoneOfTheAbove&&(s=this.props.choice.correct?"Type the answer to reveal to the user...":"None of the above");const o=t(C,{ref:"content-editor",apiOptions:this.props.apiOptions,content:this.props.choice.content||"",widgetEnabled:!1,placeholder:s,disabled:this.props.choice.isNoneOfTheAbove&&!this.props.choice.correct,onChange:this.props.onContentChange}),i=t(C,{ref:"clue-editor",apiOptions:this.props.apiOptions,content:this.props.choice.clue||"",widgetEnabled:!1,placeholder:`Why is this choice ${e}?`,onChange:this.props.onClueChange}),r=t("a",{className:"simple-button orange delete-choice",href:"#",onClick:f=>{f.stopPropagation(),f.preventDefault(),this.props.onDelete()},title:"Remove this choice",children:t(h,{...A})});return a("div",{className:"choice-clue-editors",children:[t("div",{className:`choice-editor ${e}`,children:o}),t("div",{className:"clue-editor",children:i}),this.props.showDelete&&r]})}};m.propTypes={apiOptions:g.propTypes,choice:n.object,showDelete:n.bool,onClueChange:n.func,onContentChange:n.func,onDelete:n.func};let u=m;const c=class c extends y.Component{constructor(){super(...arguments),this.change=(...e)=>v.apply(this,e),this.onMultipleSelectChange=e=>{e=e.multipleSelect;const s=l.reduce(this.props.choices,function(o,i){return i.correct?o+1:o},0);if(!e&&s>1){const o=l.map(this.props.choices,function(i){return l.defaults({correct:!1},i)});this.props.onChange({multipleSelect:e,choices:o})}else this.props.onChange({multipleSelect:e})},this.onCountChoicesChange=e=>{e=e.countChoices,this.props.onChange({countChoices:e})},this.onChange=({checked:e})=>{const s=l.map(this.props.choices,(o,i)=>l.extend({},o,{correct:e[i],content:o.isNoneOfTheAbove&&!e[i]?"":o.content}));this.props.onChange({choices:s})},this.onContentChange=(e,s)=>{const o=this.props.choices.slice();o[e]=l.extend({},o[e],{content:s}),this.props.onChange({choices:o})},this.onClueChange=(e,s)=>{const o=this.props.choices.slice();o[e]=l.extend({},o[e],{clue:s}),s===""&&delete o[e].clue,this.props.onChange({choices:o})},this.onDelete=e=>{const s=this.props.choices.slice(),o=s[e];s.splice(e,1),this.props.onChange({choices:s,hasNoneOfTheAbove:this.props.hasNoneOfTheAbove&&!o.isNoneOfTheAbove})},this.addChoice=(e,s)=>{s.preventDefault();const o=this.props.choices.slice(),i={isNoneOfTheAbove:e},r=o.length-(this.props.hasNoneOfTheAbove?1:0);o.splice(r,0,i),this.props.onChange({choices:o,hasNoneOfTheAbove:e||this.props.hasNoneOfTheAbove},()=>{this.refs[`choice-editor${r}`].refs["content-editor"].focus()})},this.setDisplayCount=e=>{this.props.onChange({displayCount:e})},this.focus=()=>(this.refs["choice-editor0"].refs["content-editor"].focus(),!0),this.getSaveWarnings=()=>l.some(l.pluck(this.props.choices,"correct"))?[]:["No choice is marked as correct."],this.serialize=()=>l.pick(this.props,"choices","randomize","multipleSelect","countChoices","displayCount","hasNoneOfTheAbove","deselectEnabled")}render(){const e=l.reduce(this.props.choices,function(s,o){return o.correct?s+1:s},0);return a("div",{children:[a("div",{className:"perseus-widget-row",children:[t("a",{href:"https://docs.google.com/document/d/1frZf7yrWVWb1n4tVjqlzqVUiv1pn4cZXbxgP62-JDBY/edit#heading=h.8ng1isya19nu",target:"_blank",children:"Multiple choice style guide"}),t("br",{}),t("div",{className:"perseus-widget-left-col",children:t(p,{label:"Multiple selections",checked:this.props.multipleSelect,onChange:s=>{this.onMultipleSelectChange({multipleSelect:s})}})}),t("div",{className:"perseus-widget-right-col",children:t(p,{label:"Randomize order",checked:this.props.randomize,onChange:s=>{this.props.onChange({randomize:s})}})}),this.props.multipleSelect&&t("div",{className:"perseus-widget-left-col",children:t(p,{label:"Specify number correct",checked:this.props.countChoices,onChange:s=>{this.onCountChoicesChange({countChoices:s})}})})]}),t(O,{multipleSelect:this.props.multipleSelect,countChoices:this.props.countChoices,numCorrect:e,editMode:!0,labelWrap:!1,apiOptions:this.props.apiOptions,choices:this.props.choices.map((s,o)=>({content:t(u,{ref:`choice-editor${o}`,apiOptions:this.props.apiOptions,choice:s,onContentChange:i=>{"content"in i&&this.onContentChange(o,i.content)},onClueChange:i=>{"content"in i&&this.onClueChange(o,i.content)},onDelete:()=>this.onDelete(o),showDelete:this.props.choices.length>=2}),isNoneOfTheAbove:s.isNoneOfTheAbove,checked:s.correct}),this),onChange:this.onChange}),a("div",{className:"add-choice-container",children:[a("a",{className:"simple-button orange",href:"#",onClick:this.addChoice.bind(this,!1),children:[t(h,{...b})," Add a choice"," "]}),!this.props.hasNoneOfTheAbove&&a("a",{className:"simple-button",href:"#",onClick:this.addChoice.bind(this,!0),children:[t(h,{...b})," None of the above"," "]})]})]})}};c.propTypes={...N,apiOptions:g.propTypes,choices:n.arrayOf(n.shape({content:n.string,clue:n.string,correct:n.bool})),displayCount:n.number,randomize:n.bool,hasNoneOfTheAbove:n.bool,multipleSelect:n.bool,countChoices:n.bool,deselectEnabled:n.bool,static:n.bool},c.widgetName="radio",c.defaultProps={choices:[{},{},{},{}],displayCount:null,randomize:!1,hasNoneOfTheAbove:!1,multipleSelect:!1,countChoices:!1,deselectEnabled:!1};let d=c;d.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"onMultipleSelectChange",docblock:null,modifiers:[],params:[{name:"allowMultiple",optional:!1,type:null}],returns:null},{name:"onCountChoicesChange",docblock:null,modifiers:[],params:[{name:"count",optional:!1,type:null}],returns:null},{name:"onChange",docblock:null,modifiers:[],params:[{name:"{checked}",optional:!1,type:null}],returns:null},{name:"onContentChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"newContent",optional:!1,type:null}],returns:null},{name:"onClueChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"newClue",optional:!1,type:null}],returns:null},{name:"onDelete",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"addChoice",docblock:null,modifiers:[],params:[{name:"noneOfTheAbove",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"setDisplayCount",docblock:null,modifiers:[],params:[{name:"num",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"RadioEditor",props:{choices:{defaultValue:{value:"[{}, {}, {}, {}]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"shape",value:{content:{name:"string",required:!1},clue:{name:"string",required:!1},correct:{name:"bool",required:!1}}}},required:!1},displayCount:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},randomize:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},hasNoneOfTheAbove:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},multipleSelect:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},countChoices:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},deselectEnabled:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1},static:{description:"",type:{name:"bool"},required:!1}},composes:["@khanacademy/perseus"]};export{d as R}; +import{j as t,a}from"./jsx-runtime-FVsy8kgq.js";import{c as v,p as N}from"./article-renderer-o95CuJpS.js";import{_ as l}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as g}from"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import{B as O}from"./base-radio-sE9E2UC2.js";import{c as k}from"./components-0kNWnYe6.js";import{I as T}from"./icon-paths-AuJwhOz7.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{C as p}from"./index-QCAhLhLD.js";import{P as n}from"./index-k-0mNqHS.js";import{r as y}from"./index-TT1qJ6UJ.js";import{E as C}from"./editor-SZLWA5DH.js";const{InlineIcon:h}=k,{iconPlus:b,iconTrash:A}=T,m=class m extends y.Component{render(){const e=this.props.choice.correct?"correct":"incorrect";let s="Type a choice here...";this.props.choice.isNoneOfTheAbove&&(s=this.props.choice.correct?"Type the answer to reveal to the user...":"None of the above");const o=t(C,{ref:"content-editor",apiOptions:this.props.apiOptions,content:this.props.choice.content||"",widgetEnabled:!1,placeholder:s,disabled:this.props.choice.isNoneOfTheAbove&&!this.props.choice.correct,onChange:this.props.onContentChange}),i=t(C,{ref:"clue-editor",apiOptions:this.props.apiOptions,content:this.props.choice.clue||"",widgetEnabled:!1,placeholder:`Why is this choice ${e}?`,onChange:this.props.onClueChange}),r=t("a",{className:"simple-button orange delete-choice",href:"#",onClick:f=>{f.stopPropagation(),f.preventDefault(),this.props.onDelete()},title:"Remove this choice",children:t(h,{...A})});return a("div",{className:"choice-clue-editors",children:[t("div",{className:`choice-editor ${e}`,children:o}),t("div",{className:"clue-editor",children:i}),this.props.showDelete&&r]})}};m.propTypes={apiOptions:g.propTypes,choice:n.object,showDelete:n.bool,onClueChange:n.func,onContentChange:n.func,onDelete:n.func};let u=m;const c=class c extends y.Component{constructor(){super(...arguments),this.change=(...e)=>v.apply(this,e),this.onMultipleSelectChange=e=>{e=e.multipleSelect;const s=l.reduce(this.props.choices,function(o,i){return i.correct?o+1:o},0);if(!e&&s>1){const o=l.map(this.props.choices,function(i){return l.defaults({correct:!1},i)});this.props.onChange({multipleSelect:e,choices:o})}else this.props.onChange({multipleSelect:e})},this.onCountChoicesChange=e=>{e=e.countChoices,this.props.onChange({countChoices:e})},this.onChange=({checked:e})=>{const s=l.map(this.props.choices,(o,i)=>l.extend({},o,{correct:e[i],content:o.isNoneOfTheAbove&&!e[i]?"":o.content}));this.props.onChange({choices:s})},this.onContentChange=(e,s)=>{const o=this.props.choices.slice();o[e]=l.extend({},o[e],{content:s}),this.props.onChange({choices:o})},this.onClueChange=(e,s)=>{const o=this.props.choices.slice();o[e]=l.extend({},o[e],{clue:s}),s===""&&delete o[e].clue,this.props.onChange({choices:o})},this.onDelete=e=>{const s=this.props.choices.slice(),o=s[e];s.splice(e,1),this.props.onChange({choices:s,hasNoneOfTheAbove:this.props.hasNoneOfTheAbove&&!o.isNoneOfTheAbove})},this.addChoice=(e,s)=>{s.preventDefault();const o=this.props.choices.slice(),i={isNoneOfTheAbove:e},r=o.length-(this.props.hasNoneOfTheAbove?1:0);o.splice(r,0,i),this.props.onChange({choices:o,hasNoneOfTheAbove:e||this.props.hasNoneOfTheAbove},()=>{this.refs[`choice-editor${r}`].refs["content-editor"].focus()})},this.setDisplayCount=e=>{this.props.onChange({displayCount:e})},this.focus=()=>(this.refs["choice-editor0"].refs["content-editor"].focus(),!0),this.getSaveWarnings=()=>l.some(l.pluck(this.props.choices,"correct"))?[]:["No choice is marked as correct."],this.serialize=()=>l.pick(this.props,"choices","randomize","multipleSelect","countChoices","displayCount","hasNoneOfTheAbove","deselectEnabled")}render(){const e=l.reduce(this.props.choices,function(s,o){return o.correct?s+1:s},0);return a("div",{children:[a("div",{className:"perseus-widget-row",children:[t("a",{href:"https://docs.google.com/document/d/1frZf7yrWVWb1n4tVjqlzqVUiv1pn4cZXbxgP62-JDBY/edit#heading=h.8ng1isya19nu",target:"_blank",children:"Multiple choice style guide"}),t("br",{}),t("div",{className:"perseus-widget-left-col",children:t(p,{label:"Multiple selections",checked:this.props.multipleSelect,onChange:s=>{this.onMultipleSelectChange({multipleSelect:s})}})}),t("div",{className:"perseus-widget-right-col",children:t(p,{label:"Randomize order",checked:this.props.randomize,onChange:s=>{this.props.onChange({randomize:s})}})}),this.props.multipleSelect&&t("div",{className:"perseus-widget-left-col",children:t(p,{label:"Specify number correct",checked:this.props.countChoices,onChange:s=>{this.onCountChoicesChange({countChoices:s})}})})]}),t(O,{multipleSelect:this.props.multipleSelect,countChoices:this.props.countChoices,numCorrect:e,editMode:!0,labelWrap:!1,apiOptions:this.props.apiOptions,choices:this.props.choices.map((s,o)=>({content:t(u,{ref:`choice-editor${o}`,apiOptions:this.props.apiOptions,choice:s,onContentChange:i=>{"content"in i&&this.onContentChange(o,i.content)},onClueChange:i=>{"content"in i&&this.onClueChange(o,i.content)},onDelete:()=>this.onDelete(o),showDelete:this.props.choices.length>=2}),isNoneOfTheAbove:s.isNoneOfTheAbove,checked:s.correct}),this),onChange:this.onChange}),a("div",{className:"add-choice-container",children:[a("a",{className:"simple-button orange",href:"#",onClick:this.addChoice.bind(this,!1),children:[t(h,{...b})," Add a choice"," "]}),!this.props.hasNoneOfTheAbove&&a("a",{className:"simple-button",href:"#",onClick:this.addChoice.bind(this,!0),children:[t(h,{...b})," None of the above"," "]})]})]})}};c.propTypes={...N,apiOptions:g.propTypes,choices:n.arrayOf(n.shape({content:n.string,clue:n.string,correct:n.bool})),displayCount:n.number,randomize:n.bool,hasNoneOfTheAbove:n.bool,multipleSelect:n.bool,countChoices:n.bool,deselectEnabled:n.bool,static:n.bool},c.widgetName="radio",c.defaultProps={choices:[{},{},{},{}],displayCount:null,randomize:!1,hasNoneOfTheAbove:!1,multipleSelect:!1,countChoices:!1,deselectEnabled:!1};let d=c;d.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"onMultipleSelectChange",docblock:null,modifiers:[],params:[{name:"allowMultiple",optional:!1,type:null}],returns:null},{name:"onCountChoicesChange",docblock:null,modifiers:[],params:[{name:"count",optional:!1,type:null}],returns:null},{name:"onChange",docblock:null,modifiers:[],params:[{name:"{checked}",optional:!1,type:null}],returns:null},{name:"onContentChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"newContent",optional:!1,type:null}],returns:null},{name:"onClueChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"newClue",optional:!1,type:null}],returns:null},{name:"onDelete",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"addChoice",docblock:null,modifiers:[],params:[{name:"noneOfTheAbove",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"setDisplayCount",docblock:null,modifiers:[],params:[{name:"num",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"RadioEditor",props:{choices:{defaultValue:{value:"[{}, {}, {}, {}]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"shape",value:{content:{name:"string",required:!1},clue:{name:"string",required:!1},correct:{name:"bool",required:!1}}}},required:!1},displayCount:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},randomize:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},hasNoneOfTheAbove:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},multipleSelect:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},countChoices:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},deselectEnabled:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1},static:{description:"",type:{name:"bool"},required:!1}},composes:["@khanacademy/perseus"]};export{d as R}; diff --git a/assets/editor-SZLWA5DH.js b/assets/editor-SZLWA5DH.js index a4da460461..2bfad63eff 100644 --- a/assets/editor-SZLWA5DH.js +++ b/assets/editor-SZLWA5DH.js @@ -1,4 +1,4 @@ -import{j as X,a as j0,F as bi}from"./jsx-runtime-FVsy8kgq.js";import{a as wi,S as Si,d as ki}from"./article-renderer-o95CuJpS.js";import{_ as j,$ as Ai}from"./jquery-yG1GhClm.js";import{U as H0,P as Ci,E as Bi}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import{d as Ut,g as Mi,s as zi,u as Ti,e as Ei,f as Aa,h as Di,i as _i,P as Ht,j as qi}from"./renderer-4_U4OAry.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import{L as Ni}from"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./dependencies-8XILypbq.js";import"./version-akiLXZts.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{c as Fi,g as Ii}from"./_commonjsHelpers-4gQjN7DL.js";import{r as we}from"./index-TT1qJ6UJ.js";import{P as et}from"./index-0C4KXdeC.js";import{c as Oi}from"./components-0kNWnYe6.js";import{I as Ri}from"./icon-paths-AuJwhOz7.js";import{u as Li}from"./index-6h5t6F0w.js";import{S as Pi}from"./index-qUyqkRvh.js";import{S as $i}from"./index-SM3muJE2.js";import{S as Wi}from"./section-control-button-VtgjGcq5.js";import{T as Hi}from"./tex-error-view-Y2BSLjwB.js";var Ma={exports:{}};(function(l,h){(function(S,B){l.exports=B()})(typeof self<"u"?self:Fi,function(){return function(v){var S={};function B(M){if(S[M])return S[M].exports;var N=S[M]={i:M,l:!1,exports:{}};return v[M].call(N.exports,N,N.exports,B),N.l=!0,N.exports}return B.m=v,B.c=S,B.d=function(M,N,R){B.o(M,N)||Object.defineProperty(M,N,{enumerable:!0,get:R})},B.r=function(M){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(M,"__esModule",{value:!0})},B.t=function(M,N){if(N&1&&(M=B(M)),N&8||N&4&&typeof M=="object"&&M&&M.__esModule)return M;var R=Object.create(null);if(B.r(R),Object.defineProperty(R,"default",{enumerable:!0,value:M}),N&2&&typeof M!="string")for(var C in M)B.d(R,C,(function(n0){return M[n0]}).bind(null,C));return R},B.n=function(M){var N=M&&M.__esModule?function(){return M.default}:function(){return M};return B.d(N,"a",N),N},B.o=function(M,N){return Object.prototype.hasOwnProperty.call(M,N)},B.p="",B(B.s=1)}([function(v,S,B){},function(v,S,B){B.r(S),B(0);var M=function(){function o(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}return o.range=function(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new o(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc},o}(),N=function(){function o(t,r){this.text=void 0,this.loc=void 0,this.text=t,this.loc=r}var e=o.prototype;return e.range=function(r,a){return new o(a,M.range(this,r))},o}(),R=function o(e,t){this.position=void 0;var r="KaTeX parse error: "+e,a,i=t&&t.loc;if(i&&i.start<=i.end){var u=i.lexer.input;a=i.start;var m=i.end;a===u.length?r+=" at end of input: ":r+=" at position "+(a+1)+": ";var d=u.slice(a,m).replace(/[^]/g,"$&̲"),f;a>15?f="…"+u.slice(a-15,a):f=u.slice(0,a);var x;m+15":">","<":"<",'"':""","'":"'"},k0=/[&><"']/g;function T0(o){return String(o).replace(k0,function(e){return Z[e]})}var Q=function o(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?o(e.body[0]):e:e.type==="font"?o(e.body):e},v0=function(e){var t=Q(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},e0=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},A0=function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return t!=null?t[1]:"_relative"},F={contains:n0,deflt:c0,escape:T0,hyphenate:a0,getBaseElem:Q,isCharacterBox:v0,protocolFromUrl:A0},Y0=function(){function o(t){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,t=t||{},this.displayMode=F.deflt(t.displayMode,!1),this.output=F.deflt(t.output,"htmlAndMathml"),this.leqno=F.deflt(t.leqno,!1),this.fleqn=F.deflt(t.fleqn,!1),this.throwOnError=F.deflt(t.throwOnError,!0),this.errorColor=F.deflt(t.errorColor,"#cc0000"),this.macros=t.macros||{},this.minRuleThickness=Math.max(0,F.deflt(t.minRuleThickness,0)),this.colorIsTextColor=F.deflt(t.colorIsTextColor,!1),this.strict=F.deflt(t.strict,"warn"),this.trust=F.deflt(t.trust,!1),this.maxSize=Math.max(0,F.deflt(t.maxSize,1/0)),this.maxExpand=Math.max(0,F.deflt(t.maxExpand,1e3))}var e=o.prototype;return e.reportNonstrict=function(r,a,i){var u=this.strict;if(typeof u=="function"&&(u=u(r,a,i)),!(!u||u==="ignore")){if(u===!0||u==="error")throw new C("LaTeX-incompatible input and strict mode is set to 'error': "+(a+" ["+r+"]"),i);u==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(a+" ["+r+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+u+"': "+a+" ["+r+"]"))}},e.useStrictBehavior=function(r,a,i){var u=this.strict;if(typeof u=="function")try{u=u(r,a,i)}catch{u="error"}return!u||u==="ignore"?!1:u===!0||u==="error"?!0:u==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(a+" ["+r+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+u+"': "+a+" ["+r+"]")),!1)},e.isTrusted=function(r){r.url&&!r.protocol&&(r.protocol=F.protocolFromUrl(r.url));var a=typeof this.trust=="function"?this.trust(r):this.trust;return!!a},o}(),_0=function(){function o(t,r,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=r,this.cramped=a}var e=o.prototype;return e.sup=function(){return W0[_a[this.id]]},e.sub=function(){return W0[qa[this.id]]},e.fracNum=function(){return W0[Na[this.id]]},e.fracDen=function(){return W0[Fa[this.id]]},e.cramp=function(){return W0[Ia[this.id]]},e.text=function(){return W0[Oa[this.id]]},e.isTight=function(){return this.size>=2},o}(),at=0,_e=1,he=2,G0=3,Se=4,N0=5,me=6,C0=7,W0=[new _0(at,0,!1),new _0(_e,0,!0),new _0(he,1,!1),new _0(G0,1,!0),new _0(Se,2,!1),new _0(N0,2,!0),new _0(me,3,!1),new _0(C0,3,!0)],_a=[Se,N0,Se,N0,me,C0,me,C0],qa=[N0,N0,N0,N0,C0,C0,C0,C0],Na=[he,G0,Se,N0,me,C0,me,C0],Fa=[G0,G0,N0,N0,C0,C0,C0,C0],Ia=[_e,_e,G0,G0,N0,N0,C0,C0],Oa=[at,_e,he,G0,he,G0,he,G0],$={DISPLAY:W0[at],TEXT:W0[he],SCRIPT:W0[Se],SCRIPTSCRIPT:W0[me]},nt=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Ra(o){for(var e=0;e=a[0]&&o<=a[1])return t.name}return null}var ke=[];nt.forEach(function(o){return o.blocks.forEach(function(e){return ke.push.apply(ke,e)})});function jt(o){for(var e=0;e=ke[e]&&o<=ke[e+1])return!0;return!1}var de=80,La=function(e,t){return"M95,"+(622+e+t)+` +import{j as X,a as j0,F as bi}from"./jsx-runtime-FVsy8kgq.js";import{a as wi,S as Si,d as ki}from"./article-renderer-o95CuJpS.js";import{_ as j,$ as Ai}from"./jquery-yG1GhClm.js";import{U as H0,P as Ci,E as Bi}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import{d as Ut,g as Mi,s as zi,u as Ti,e as Ei,f as Aa,h as Di,i as _i,P as Ht,j as qi}from"./renderer-4_U4OAry.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import{L as Ni}from"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./dependencies-8XILypbq.js";import"./version-akiLXZts.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{c as Fi,g as Ii}from"./_commonjsHelpers-4gQjN7DL.js";import{r as we}from"./index-TT1qJ6UJ.js";import{P as et}from"./index-k-0mNqHS.js";import{c as Oi}from"./components-0kNWnYe6.js";import{I as Ri}from"./icon-paths-AuJwhOz7.js";import{u as Li}from"./index-6h5t6F0w.js";import{S as Pi}from"./index-qUyqkRvh.js";import{S as $i}from"./index-SM3muJE2.js";import{S as Wi}from"./section-control-button-VtgjGcq5.js";import{T as Hi}from"./tex-error-view-Y2BSLjwB.js";var Ma={exports:{}};(function(l,h){(function(S,B){l.exports=B()})(typeof self<"u"?self:Fi,function(){return function(v){var S={};function B(M){if(S[M])return S[M].exports;var N=S[M]={i:M,l:!1,exports:{}};return v[M].call(N.exports,N,N.exports,B),N.l=!0,N.exports}return B.m=v,B.c=S,B.d=function(M,N,R){B.o(M,N)||Object.defineProperty(M,N,{enumerable:!0,get:R})},B.r=function(M){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(M,"__esModule",{value:!0})},B.t=function(M,N){if(N&1&&(M=B(M)),N&8||N&4&&typeof M=="object"&&M&&M.__esModule)return M;var R=Object.create(null);if(B.r(R),Object.defineProperty(R,"default",{enumerable:!0,value:M}),N&2&&typeof M!="string")for(var C in M)B.d(R,C,(function(n0){return M[n0]}).bind(null,C));return R},B.n=function(M){var N=M&&M.__esModule?function(){return M.default}:function(){return M};return B.d(N,"a",N),N},B.o=function(M,N){return Object.prototype.hasOwnProperty.call(M,N)},B.p="",B(B.s=1)}([function(v,S,B){},function(v,S,B){B.r(S),B(0);var M=function(){function o(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}return o.range=function(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new o(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc},o}(),N=function(){function o(t,r){this.text=void 0,this.loc=void 0,this.text=t,this.loc=r}var e=o.prototype;return e.range=function(r,a){return new o(a,M.range(this,r))},o}(),R=function o(e,t){this.position=void 0;var r="KaTeX parse error: "+e,a,i=t&&t.loc;if(i&&i.start<=i.end){var u=i.lexer.input;a=i.start;var m=i.end;a===u.length?r+=" at end of input: ":r+=" at position "+(a+1)+": ";var d=u.slice(a,m).replace(/[^]/g,"$&̲"),f;a>15?f="…"+u.slice(a-15,a):f=u.slice(0,a);var x;m+15":">","<":"<",'"':""","'":"'"},k0=/[&><"']/g;function T0(o){return String(o).replace(k0,function(e){return Z[e]})}var Q=function o(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?o(e.body[0]):e:e.type==="font"?o(e.body):e},v0=function(e){var t=Q(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},e0=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},A0=function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return t!=null?t[1]:"_relative"},F={contains:n0,deflt:c0,escape:T0,hyphenate:a0,getBaseElem:Q,isCharacterBox:v0,protocolFromUrl:A0},Y0=function(){function o(t){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,t=t||{},this.displayMode=F.deflt(t.displayMode,!1),this.output=F.deflt(t.output,"htmlAndMathml"),this.leqno=F.deflt(t.leqno,!1),this.fleqn=F.deflt(t.fleqn,!1),this.throwOnError=F.deflt(t.throwOnError,!0),this.errorColor=F.deflt(t.errorColor,"#cc0000"),this.macros=t.macros||{},this.minRuleThickness=Math.max(0,F.deflt(t.minRuleThickness,0)),this.colorIsTextColor=F.deflt(t.colorIsTextColor,!1),this.strict=F.deflt(t.strict,"warn"),this.trust=F.deflt(t.trust,!1),this.maxSize=Math.max(0,F.deflt(t.maxSize,1/0)),this.maxExpand=Math.max(0,F.deflt(t.maxExpand,1e3))}var e=o.prototype;return e.reportNonstrict=function(r,a,i){var u=this.strict;if(typeof u=="function"&&(u=u(r,a,i)),!(!u||u==="ignore")){if(u===!0||u==="error")throw new C("LaTeX-incompatible input and strict mode is set to 'error': "+(a+" ["+r+"]"),i);u==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(a+" ["+r+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+u+"': "+a+" ["+r+"]"))}},e.useStrictBehavior=function(r,a,i){var u=this.strict;if(typeof u=="function")try{u=u(r,a,i)}catch{u="error"}return!u||u==="ignore"?!1:u===!0||u==="error"?!0:u==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(a+" ["+r+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+u+"': "+a+" ["+r+"]")),!1)},e.isTrusted=function(r){r.url&&!r.protocol&&(r.protocol=F.protocolFromUrl(r.url));var a=typeof this.trust=="function"?this.trust(r):this.trust;return!!a},o}(),_0=function(){function o(t,r,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=r,this.cramped=a}var e=o.prototype;return e.sup=function(){return W0[_a[this.id]]},e.sub=function(){return W0[qa[this.id]]},e.fracNum=function(){return W0[Na[this.id]]},e.fracDen=function(){return W0[Fa[this.id]]},e.cramp=function(){return W0[Ia[this.id]]},e.text=function(){return W0[Oa[this.id]]},e.isTight=function(){return this.size>=2},o}(),at=0,_e=1,he=2,G0=3,Se=4,N0=5,me=6,C0=7,W0=[new _0(at,0,!1),new _0(_e,0,!0),new _0(he,1,!1),new _0(G0,1,!0),new _0(Se,2,!1),new _0(N0,2,!0),new _0(me,3,!1),new _0(C0,3,!0)],_a=[Se,N0,Se,N0,me,C0,me,C0],qa=[N0,N0,N0,N0,C0,C0,C0,C0],Na=[he,G0,Se,N0,me,C0,me,C0],Fa=[G0,G0,N0,N0,C0,C0,C0,C0],Ia=[_e,_e,G0,G0,N0,N0,C0,C0],Oa=[at,_e,he,G0,he,G0,he,G0],$={DISPLAY:W0[at],TEXT:W0[he],SCRIPT:W0[Se],SCRIPTSCRIPT:W0[me]},nt=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Ra(o){for(var e=0;e=a[0]&&o<=a[1])return t.name}return null}var ke=[];nt.forEach(function(o){return o.blocks.forEach(function(e){return ke.push.apply(ke,e)})});function jt(o){for(var e=0;e=ke[e]&&o<=ke[e+1])return!0;return!1}var de=80,La=function(e,t){return"M95,"+(622+e+t)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 diff --git a/assets/editor-page-91uXOpaV.js b/assets/editor-page-91uXOpaV.js index c71051d11d..e407cf6e1b 100644 --- a/assets/editor-page-91uXOpaV.js +++ b/assets/editor-page-91uXOpaV.js @@ -1,4 +1,4 @@ -import{a,j as s}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import{_ as o}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as k,C as I}from"./perseus-api-mOiZT07d.js";import{c as M}from"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as b}from"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{r as p}from"./index-TT1qJ6UJ.js";import{I as T,J as R}from"./register-all-widgets-and-editors-for-testing-Ftx4wZEN.js";import{V as A}from"./viewport-resizer-YtC0KtaX.js";import{I as O}from"./icon-paths-AuJwhOz7.js";import{D as q}from"./device-framer-wVZUBEZD.js";import{E as C}from"./editor-SZLWA5DH.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import{I as E}from"./item-extras-editor-2Be_tCWc.js";const{InfoTip:U,InlineIcon:d}=b,{iconCircleArrowDown:D,iconCircleArrowUp:L,iconPlus:P,iconTrash:N}=O,f=class f extends p.Component{constructor(){super(...arguments),this.editor=p.createRef(),this.handleChange=e=>{this.props.onChange({replace:e.target.checked})},this.focus=()=>{var e;(e=this.editor.current)==null||e.focus()},this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=e=>{var t;return(t=this.editor.current)==null?void 0:t.serialize(e)}}render(){return a("div",{className:"perseus-hint-editor "+this.props.className,children:[this.props.showTitle&&s("div",{className:"pod-title",children:"Hint"}),s(C,{ref:this.editor,apiOptions:this.props.apiOptions,widgets:this.props.widgets||void 0,content:this.props.content||void 0,images:this.props.images,replace:this.props.replace,placeholder:"Type your hint here...",imageUploader:this.props.imageUploader,onChange:this.props.onChange},this.props.itemId),a("div",{className:"hint-controls-container clearfix",children:[this.props.showMoveButtons&&a("span",{className:"reorder-hints",children:[s("button",{type:"button",className:this.props.isLast?"hidden":"",onClick:o.partial(this.props.onMove,1),children:s(d,{...D})})," ",s("button",{type:"button",className:this.props.isFirst?"hidden":"",onClick:o.partial(this.props.onMove,-1),children:s(d,{...L})})," ",this.props.isLast&&s(U,{children:s("p",{children:"The last hint is automatically bolded."})})]}),s("input",{type:"checkbox",checked:this.props.replace,onChange:this.handleChange}),"Replace previous hint",this.props.showRemoveButton&&a("button",{type:"button",className:"remove-hint simple-button orange",onClick:this.props.onRemove,children:[s(d,{...N}),"Remove this hint"," "]})]})]})}};f.defaultProps={className:"",content:"",replace:!1,showMoveButtons:!0,showTitle:!0,showRemoveButton:!0};let l=f;const y=class y extends p.Component{constructor(){super(...arguments),this.editor=p.createRef(),this.frame=p.createRef(),this.updatePreview=()=>{var t;const e=this.props.isLast&&!/\*\*/.test(this.props.hint.content);(t=this.frame.current)==null||t.sendNewData({type:"hint",data:{hint:this.props.hint,bold:e,pos:this.props.pos,apiOptions:this.props.apiOptions,linterContext:{contentType:"hint",highlightLint:this.props.highlightLint,paths:this.props.contentPaths}}})},this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=e=>{var t;return(t=this.editor.current)==null?void 0:t.serialize(e)},this.focus=()=>{var e;(e=this.editor.current)==null||e.focus()}}componentDidMount(){this.updatePreview()}componentDidUpdate(){this.updatePreview()}render(){const e=this.props.deviceType==="phone"||this.props.deviceType==="tablet";return a("div",{className:"perseus-combined-hint-editor perseus-editor-row",children:[s("div",{className:"perseus-editor-left-cell",children:s(l,{ref:this.editor,itemId:this.props.itemId,isFirst:this.props.isFirst,isLast:this.props.isLast,widgets:this.props.hint.widgets,content:this.props.hint.content,images:this.props.hint.images,replace:this.props.hint.replace,imageUploader:this.props.imageUploader,onChange:this.props.onChange,onRemove:this.props.onRemove,onMove:this.props.onMove,apiOptions:this.props.apiOptions})}),s("div",{className:"perseus-editor-right-cell",children:s(q,{deviceType:this.props.deviceType,nochrome:!0,children:s(T,{ref:this.frame,datasetKey:"mobile",datasetValue:e,seamless:!0,url:this.props.previewURL})})})]})}};y.defaultProps={highlightLint:!1};let c=y;const m=class m extends p.Component{constructor(){super(...arguments),this.handleHintChange=(e,t,i,n)=>{const r=[...this.props.hints];r[e]=o.extend({},this.serializeHint(e,{keepDeletedWidgets:!0}),t),this.props.onChange({hints:r},i,n)},this.handleHintRemove=e=>{if(!confirm("Are you sure you want to delete this hint?"))return;const t=[...this.props.hints];t.splice(e,1),this.props.onChange({hints:t})},this.handleHintMove=(e,t)=>{const i=[...this.props.hints],n=i.splice(e,1)[0];i.splice(e+t,0,n),this.props.onChange({hints:i},()=>{this.refs["hintEditor"+(e+t)].focus()})},this.addHint=()=>{const e=this.props.hints.concat([{content:"",images:{},widgets:{}}]);this.props.onChange({hints:e},()=>{const t=e.length-1;this.refs["hintEditor"+t].focus()})},this.getSaveWarnings=()=>o.chain(this.props.hints).map((e,t)=>o.map(this.refs["hintEditor"+t].getSaveWarnings(),i=>"Hint "+(t+1)+": "+i)).flatten(!0).value(),this.serialize=e=>this.props.hints.map((t,i)=>this.serializeHint(i,e)),this.serializeHint=(e,t)=>this.refs["hintEditor"+e].serialize(t)}render(){const{itemId:e,hints:t}=this.props,i=o.map(t,function(n,r){return s(c,{ref:"hintEditor"+r,isFirst:r===0,isLast:r+1===t.length,itemId:e,hint:n,pos:r,imageUploader:this.props.imageUploader,onChange:this.handleHintChange.bind(this,r),onRemove:this.handleHintRemove.bind(this,r),onMove:this.handleHintMove.bind(this,r),deviceType:this.props.deviceType,apiOptions:this.props.apiOptions,highlightLint:this.props.highlightLint,previewURL:this.props.previewURL,contentPaths:[]},"hintEditor"+r)},this);return a("div",{className:"perseus-hints-editor perseus-editor-table",children:[i,s("div",{className:"perseus-editor-row",children:s("div",{className:"add-hint-container perseus-editor-left-cell",children:a("button",{type:"button",className:"add-hint simple-button orange",onClick:this.addHint,children:[s(d,{...P})," Add a hint"]})})})]})}};m.HintEditor=l,m.defaultProps={onChange:()=>{},hints:[],highlightLint:!1};let h=m;l.__docgenInfo={description:"",methods:[{name:"handleChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactChangeEvent",raw:"React.ChangeEvent",elements:[{name:"HTMLInputElement"}],alias:"React.ChangeEvent"}}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[{name:"options",optional:!1,type:{name:"any"}}],returns:null}],displayName:"HintEditor",props:{itemId:{required:!1,tsType:{name:"string"},description:""},apiOptions:{required:!1,tsType:{name:"APIOptions"},description:""},className:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},imageUploader:{required:!1,tsType:{name:"ImageUploader"},description:""},showMoveButtons:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},showRemoveButton:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},showTitle:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},content:{required:!1,tsType:{name:"union",raw:"string | null | undefined",elements:[{name:"string"},{name:"null"},{name:"undefined"}]},description:"",defaultValue:{value:'""',computed:!1}},replace:{required:!1,tsType:{name:"union",raw:"boolean | null | undefined",elements:[{name:"boolean"},{name:"null"},{name:"undefined"}]},description:"",defaultValue:{value:"false",computed:!1}},widgets:{required:!1,tsType:{name:"union",raw:"WidgetDict | null | undefined",elements:[{name:"WidgetDict"},{name:"null"},{name:"undefined"}]},description:""},images:{required:!1,tsType:{name:"union",raw:"ImageDict | null | undefined",elements:[{name:"ImageDict"},{name:"null"},{name:"undefined"}]},description:""},isLast:{required:!0,tsType:{name:"boolean"},description:""},isFirst:{required:!0,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(direction: number) => unknown",signature:{arguments:[{type:{name:"number"},name:"direction"}],return:{name:"unknown"}}},description:""},onRemove:{required:!0,tsType:{name:"signature",type:"function",raw:"() => unknown",signature:{arguments:[],return:{name:"unknown"}}},description:""},onChange:{required:!0,tsType:{name:"ChangeHandler"},description:""},__type:{required:!1,tsType:{name:"literal",value:'"hint"'},description:""}}};h.__docgenInfo={description:"",methods:[{name:"handleHintChange",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:{name:"number"}},{name:"newProps",optional:!1,type:{name:"signature",type:"object",raw:`{ +import{a,j as s}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import{_ as o}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as k,C as I}from"./perseus-api-mOiZT07d.js";import{c as M}from"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as b}from"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{r as p}from"./index-TT1qJ6UJ.js";import{I as T,J as R}from"./register-all-widgets-and-editors-for-testing-Ftx4wZEN.js";import{V as A}from"./viewport-resizer-YtC0KtaX.js";import{I as O}from"./icon-paths-AuJwhOz7.js";import{D as q}from"./device-framer-wVZUBEZD.js";import{E as C}from"./editor-SZLWA5DH.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import{I as E}from"./item-extras-editor-2Be_tCWc.js";const{InfoTip:U,InlineIcon:d}=b,{iconCircleArrowDown:D,iconCircleArrowUp:L,iconPlus:P,iconTrash:N}=O,f=class f extends p.Component{constructor(){super(...arguments),this.editor=p.createRef(),this.handleChange=e=>{this.props.onChange({replace:e.target.checked})},this.focus=()=>{var e;(e=this.editor.current)==null||e.focus()},this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=e=>{var t;return(t=this.editor.current)==null?void 0:t.serialize(e)}}render(){return a("div",{className:"perseus-hint-editor "+this.props.className,children:[this.props.showTitle&&s("div",{className:"pod-title",children:"Hint"}),s(C,{ref:this.editor,apiOptions:this.props.apiOptions,widgets:this.props.widgets||void 0,content:this.props.content||void 0,images:this.props.images,replace:this.props.replace,placeholder:"Type your hint here...",imageUploader:this.props.imageUploader,onChange:this.props.onChange},this.props.itemId),a("div",{className:"hint-controls-container clearfix",children:[this.props.showMoveButtons&&a("span",{className:"reorder-hints",children:[s("button",{type:"button",className:this.props.isLast?"hidden":"",onClick:o.partial(this.props.onMove,1),children:s(d,{...D})})," ",s("button",{type:"button",className:this.props.isFirst?"hidden":"",onClick:o.partial(this.props.onMove,-1),children:s(d,{...L})})," ",this.props.isLast&&s(U,{children:s("p",{children:"The last hint is automatically bolded."})})]}),s("input",{type:"checkbox",checked:this.props.replace,onChange:this.handleChange}),"Replace previous hint",this.props.showRemoveButton&&a("button",{type:"button",className:"remove-hint simple-button orange",onClick:this.props.onRemove,children:[s(d,{...N}),"Remove this hint"," "]})]})]})}};f.defaultProps={className:"",content:"",replace:!1,showMoveButtons:!0,showTitle:!0,showRemoveButton:!0};let l=f;const y=class y extends p.Component{constructor(){super(...arguments),this.editor=p.createRef(),this.frame=p.createRef(),this.updatePreview=()=>{var t;const e=this.props.isLast&&!/\*\*/.test(this.props.hint.content);(t=this.frame.current)==null||t.sendNewData({type:"hint",data:{hint:this.props.hint,bold:e,pos:this.props.pos,apiOptions:this.props.apiOptions,linterContext:{contentType:"hint",highlightLint:this.props.highlightLint,paths:this.props.contentPaths}}})},this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=e=>{var t;return(t=this.editor.current)==null?void 0:t.serialize(e)},this.focus=()=>{var e;(e=this.editor.current)==null||e.focus()}}componentDidMount(){this.updatePreview()}componentDidUpdate(){this.updatePreview()}render(){const e=this.props.deviceType==="phone"||this.props.deviceType==="tablet";return a("div",{className:"perseus-combined-hint-editor perseus-editor-row",children:[s("div",{className:"perseus-editor-left-cell",children:s(l,{ref:this.editor,itemId:this.props.itemId,isFirst:this.props.isFirst,isLast:this.props.isLast,widgets:this.props.hint.widgets,content:this.props.hint.content,images:this.props.hint.images,replace:this.props.hint.replace,imageUploader:this.props.imageUploader,onChange:this.props.onChange,onRemove:this.props.onRemove,onMove:this.props.onMove,apiOptions:this.props.apiOptions})}),s("div",{className:"perseus-editor-right-cell",children:s(q,{deviceType:this.props.deviceType,nochrome:!0,children:s(T,{ref:this.frame,datasetKey:"mobile",datasetValue:e,seamless:!0,url:this.props.previewURL})})})]})}};y.defaultProps={highlightLint:!1};let c=y;const m=class m extends p.Component{constructor(){super(...arguments),this.handleHintChange=(e,t,i,n)=>{const r=[...this.props.hints];r[e]=o.extend({},this.serializeHint(e,{keepDeletedWidgets:!0}),t),this.props.onChange({hints:r},i,n)},this.handleHintRemove=e=>{if(!confirm("Are you sure you want to delete this hint?"))return;const t=[...this.props.hints];t.splice(e,1),this.props.onChange({hints:t})},this.handleHintMove=(e,t)=>{const i=[...this.props.hints],n=i.splice(e,1)[0];i.splice(e+t,0,n),this.props.onChange({hints:i},()=>{this.refs["hintEditor"+(e+t)].focus()})},this.addHint=()=>{const e=this.props.hints.concat([{content:"",images:{},widgets:{}}]);this.props.onChange({hints:e},()=>{const t=e.length-1;this.refs["hintEditor"+t].focus()})},this.getSaveWarnings=()=>o.chain(this.props.hints).map((e,t)=>o.map(this.refs["hintEditor"+t].getSaveWarnings(),i=>"Hint "+(t+1)+": "+i)).flatten(!0).value(),this.serialize=e=>this.props.hints.map((t,i)=>this.serializeHint(i,e)),this.serializeHint=(e,t)=>this.refs["hintEditor"+e].serialize(t)}render(){const{itemId:e,hints:t}=this.props,i=o.map(t,function(n,r){return s(c,{ref:"hintEditor"+r,isFirst:r===0,isLast:r+1===t.length,itemId:e,hint:n,pos:r,imageUploader:this.props.imageUploader,onChange:this.handleHintChange.bind(this,r),onRemove:this.handleHintRemove.bind(this,r),onMove:this.handleHintMove.bind(this,r),deviceType:this.props.deviceType,apiOptions:this.props.apiOptions,highlightLint:this.props.highlightLint,previewURL:this.props.previewURL,contentPaths:[]},"hintEditor"+r)},this);return a("div",{className:"perseus-hints-editor perseus-editor-table",children:[i,s("div",{className:"perseus-editor-row",children:s("div",{className:"add-hint-container perseus-editor-left-cell",children:a("button",{type:"button",className:"add-hint simple-button orange",onClick:this.addHint,children:[s(d,{...P})," Add a hint"]})})})]})}};m.HintEditor=l,m.defaultProps={onChange:()=>{},hints:[],highlightLint:!1};let h=m;l.__docgenInfo={description:"",methods:[{name:"handleChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactChangeEvent",raw:"React.ChangeEvent",elements:[{name:"HTMLInputElement"}],alias:"React.ChangeEvent"}}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[{name:"options",optional:!1,type:{name:"any"}}],returns:null}],displayName:"HintEditor",props:{itemId:{required:!1,tsType:{name:"string"},description:""},apiOptions:{required:!1,tsType:{name:"APIOptions"},description:""},className:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},imageUploader:{required:!1,tsType:{name:"ImageUploader"},description:""},showMoveButtons:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},showRemoveButton:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},showTitle:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},content:{required:!1,tsType:{name:"union",raw:"string | null | undefined",elements:[{name:"string"},{name:"null"},{name:"undefined"}]},description:"",defaultValue:{value:'""',computed:!1}},replace:{required:!1,tsType:{name:"union",raw:"boolean | null | undefined",elements:[{name:"boolean"},{name:"null"},{name:"undefined"}]},description:"",defaultValue:{value:"false",computed:!1}},widgets:{required:!1,tsType:{name:"union",raw:"WidgetDict | null | undefined",elements:[{name:"WidgetDict"},{name:"null"},{name:"undefined"}]},description:""},images:{required:!1,tsType:{name:"union",raw:"ImageDict | null | undefined",elements:[{name:"ImageDict"},{name:"null"},{name:"undefined"}]},description:""},isLast:{required:!0,tsType:{name:"boolean"},description:""},isFirst:{required:!0,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(direction: number) => unknown",signature:{arguments:[{type:{name:"number"},name:"direction"}],return:{name:"unknown"}}},description:""},onRemove:{required:!0,tsType:{name:"signature",type:"function",raw:"() => unknown",signature:{arguments:[],return:{name:"unknown"}}},description:""},onChange:{required:!0,tsType:{name:"ChangeHandler"},description:""},__type:{required:!1,tsType:{name:"literal",value:'"hint"'},description:""}}};h.__docgenInfo={description:"",methods:[{name:"handleHintChange",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:{name:"number"}},{name:"newProps",optional:!1,type:{name:"signature",type:"object",raw:`{ apiOptions?: APIOptions; deviceType: DeviceType; imageUploader?: ImageUploader; diff --git a/assets/editor-page-with-storybook-preview-tHaT_Czh.js b/assets/editor-page-with-storybook-preview-tHaT_Czh.js index b999bb5de3..3be8c9b6b3 100644 --- a/assets/editor-page-with-storybook-preview-tHaT_Czh.js +++ b/assets/editor-page-with-storybook-preview-tHaT_Czh.js @@ -1 +1 @@ -import{a as l,j as t}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import{R as f}from"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{B as I}from"./choice-E4eyMygy.js";import{V as a}from"./index-6h5t6F0w.js";import{I as _}from"./locked-figure-settings-actions-WSW3YvFI.js";import{S as A}from"./index-qUyqkRvh.js";import{c as h,s as o}from"./index-deFLJwr4.js";import{L as q}from"./index-h_CiYGGb.js";import{x as B}from"./index-rfN0X25E.js";import{a as C}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as R}from"./index-awljIyHI.js";import{r as i}from"./index-TT1qJ6UJ.js";import{m as g}from"./strings-OAjNfY6D.js";import{E}from"./editor-page-91uXOpaV.js";import{f as O}from"./flags-for-api-options-NwahBZpL.js";const j=C("onChange");function M(m){const[y,w]=i.useState("phone"),[S,b]=i.useState(!1),[x,v]=i.useState(),[d,P]=i.useState(m.question),[n,k]=i.useState(m.hints),[s,c]=i.useState(!0),p=m.apiOptions??{isMobile:!1,flags:O};return l(a,{children:[t(E,{apiOptions:p,previewDevice:y,onPreviewDeviceChange:e=>w(e),developerMode:!0,jsonMode:S,answerArea:x,question:d,hints:n,frameSource:"about:blank",previewURL:"about:blank",itemId:"1",onChange:e=>{j(e),"jsonMode"in e&&b(e.jsonMode),"answerArea"in e&&v(e.answerArea),"question"in e&&P(e.question),"hints"in e&&k(e.hints)}}),!s&&t(I,{onClick:()=>c(!s),style:r.openPanelButton,children:"Open preview (storybook only)"}),s&&l(a,{style:r.panel,children:[t(_,{icon:B,onClick:()=>c(!s),style:r.closeButton}),t(a,{style:r.panelInner,children:t(f,{strings:g,apiOptions:p,...d})}),n==null?void 0:n.map((e,u)=>l(a,{style:r.panelInner,children:[t(A,{size:o.medium_16}),t(q,{children:`Hint ${u+1}`}),t(f,{strings:g,apiOptions:p,...e})]},u))]})]})}const r=R.StyleSheet.create({panel:{position:"fixed",right:0,minWidth:500,height:"90vh",overflow:"auto",flex:"none",backgroundColor:h.fadedBlue16,padding:o.medium_16,borderRadius:o.small_12,alignItems:"end"},panelInner:{flex:"none",backgroundColor:h.white,borderRadius:o.xSmall_8,marginTop:o.medium_16,width:"100%",padding:o.xSmall_8},closeButton:{margin:0},openPanelButton:{position:"fixed",right:o.medium_16,bottom:o.xxxLarge_64}});M.__docgenInfo={description:"",methods:[],displayName:"EditorPageWithStorybookPreview",props:{apiOptions:{required:!1,tsType:{name:"APIOptions"},description:""},question:{required:!1,tsType:{name:"PerseusRenderer"},description:""},hints:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"Hint"}],raw:"ReadonlyArray"},description:""}}};export{M as E}; +import{a as l,j as t}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import{R as f}from"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{B as I}from"./choice-E4eyMygy.js";import{V as a}from"./index-6h5t6F0w.js";import{I as _}from"./locked-figure-settings-actions-WSW3YvFI.js";import{S as A}from"./index-qUyqkRvh.js";import{c as h,s as o}from"./index-deFLJwr4.js";import{L as q}from"./index-h_CiYGGb.js";import{x as B}from"./index-rfN0X25E.js";import{a as C}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as R}from"./index-awljIyHI.js";import{r as i}from"./index-TT1qJ6UJ.js";import{m as g}from"./strings-OAjNfY6D.js";import{E}from"./editor-page-91uXOpaV.js";import{f as O}from"./flags-for-api-options-NwahBZpL.js";const j=C("onChange");function M(m){const[y,w]=i.useState("phone"),[S,b]=i.useState(!1),[x,v]=i.useState(),[d,P]=i.useState(m.question),[n,k]=i.useState(m.hints),[s,c]=i.useState(!0),p=m.apiOptions??{isMobile:!1,flags:O};return l(a,{children:[t(E,{apiOptions:p,previewDevice:y,onPreviewDeviceChange:e=>w(e),developerMode:!0,jsonMode:S,answerArea:x,question:d,hints:n,frameSource:"about:blank",previewURL:"about:blank",itemId:"1",onChange:e=>{j(e),"jsonMode"in e&&b(e.jsonMode),"answerArea"in e&&v(e.answerArea),"question"in e&&P(e.question),"hints"in e&&k(e.hints)}}),!s&&t(I,{onClick:()=>c(!s),style:r.openPanelButton,children:"Open preview (storybook only)"}),s&&l(a,{style:r.panel,children:[t(_,{icon:B,onClick:()=>c(!s),style:r.closeButton}),t(a,{style:r.panelInner,children:t(f,{strings:g,apiOptions:p,...d})}),n==null?void 0:n.map((e,u)=>l(a,{style:r.panelInner,children:[t(A,{size:o.medium_16}),t(q,{children:`Hint ${u+1}`}),t(f,{strings:g,apiOptions:p,...e})]},u))]})]})}const r=R.StyleSheet.create({panel:{position:"fixed",right:0,minWidth:500,height:"90vh",overflow:"auto",flex:"none",backgroundColor:h.fadedBlue16,padding:o.medium_16,borderRadius:o.small_12,alignItems:"end"},panelInner:{flex:"none",backgroundColor:h.white,borderRadius:o.xSmall_8,marginTop:o.medium_16,width:"100%",padding:o.xSmall_8},closeButton:{margin:0},openPanelButton:{position:"fixed",right:o.medium_16,bottom:o.xxxLarge_64}});M.__docgenInfo={description:"",methods:[],displayName:"EditorPageWithStorybookPreview",props:{apiOptions:{required:!1,tsType:{name:"APIOptions"},description:""},question:{required:!1,tsType:{name:"PerseusRenderer"},description:""},hints:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"Hint"}],raw:"ReadonlyArray"},description:""}}};export{M as E}; diff --git a/assets/editor-page.stories-f5GLxGWU.js b/assets/editor-page.stories-f5GLxGWU.js index 602a7110b0..493ea33318 100644 --- a/assets/editor-page.stories-f5GLxGWU.js +++ b/assets/editor-page.stories-f5GLxGWU.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{r as p}from"./register-all-widgets-and-editors-for-testing-Ftx4wZEN.js";import{E as e}from"./editor-page-with-storybook-preview-tHaT_Czh.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./categorizer-editor-aJj5kcPa.js";import"./components-0kNWnYe6.js";import"./editor-jsonify-yP45H1ib.js";import"./index-0C4KXdeC.js";import"./blur-input-hjJsfoK9.js";import"./definition-editor-koC6zgjU.js";import"./editor-SZLWA5DH.js";import"./index-SM3muJE2.js";import"./section-control-button-VtgjGcq5.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";import"./dropdown-editor-vzCR7Y_E.js";import"./explanation-editor-QNDSiyWl.js";import"./expression-editor-gbMGfXvL.js";import"./graph-settings-LBBYDOUY.js";import"./image-editor-ifkVG3z1.js";import"./input-number-editor-ncl_GOvQ.js";import"./index-uK3b_Y1s.js";import"./interactive-graph-editor-PeMztHwk.js";import"./heading-8aCiuWUg.js";import"./interactive-graph-settings-3oLklA_Z.js";import"./locked-figures-section-nxp-trxv.js";import"./locked-ellipse-settings-H2lz6Mnf.js";import"./plus-circle-JCxQSzSv.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./color-select-aXibMsPD.js";import"./util-7LGRm2EO.js";import"./line-stroke-select-ZTaE76uS.js";import"./locked-label-settings-qoc_z_IC.js";import"./locked-function-settings-RE4yVDE6.js";import"./line-swatch-YWYea0Do.js";import"./locked-line-settings-h25vlmkK.js";import"./locked-point-settings-7pJS5tix.js";import"./labeled-switch-OVGss_VI.js";import"./locked-polygon-settings-pkXY4ncz.js";import"./locked-vector-settings-EnKejgQ9.js";import"./label-image-editor-Z5_dot8_.js";import"./form-wrapped-text-field-tsI8XMXi.js";import"./answer-choices-jhnMapjR.js";import"./behavior-RYjJdmKF.js";import"./question-markers-KN3OrYEl.js";import"./marker-st5wrvmE.js";import"./select-image-_eHoVMfM.js";import"./matcher-editor-hlzTMdtB.js";import"./number-line-editor-t3bGT3LG.js";import"./numeric-input-editor-QUZ56KMx.js";import"./phet-simulation-editor-0655QF05.js";import"./python-program-editor-SPqpWu4A.js";import"./editor-8WwPqQi6.js";import"./sorter-editor-Kj6XqnPI.js";import"./chunk-WFFRPTHA-zlNDxfrq.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./editor-page-91uXOpaV.js";import"./viewport-resizer-YtC0KtaX.js";import"./constants-hQyjCzwz.js";import"./device-framer-wVZUBEZD.js";import"./item-extras-editor-2Be_tCWc.js";import"./flags-for-api-options-NwahBZpL.js";p();const mt={title:"PerseusEditor/EditorPage"},r=()=>m(e,{});r.__docgenInfo={description:"",methods:[],displayName:"Demo"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{r as p}from"./register-all-widgets-and-editors-for-testing-Ftx4wZEN.js";import{E as e}from"./editor-page-with-storybook-preview-tHaT_Czh.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./categorizer-editor-aJj5kcPa.js";import"./components-0kNWnYe6.js";import"./editor-jsonify-yP45H1ib.js";import"./index-k-0mNqHS.js";import"./blur-input-hjJsfoK9.js";import"./definition-editor-koC6zgjU.js";import"./editor-SZLWA5DH.js";import"./index-SM3muJE2.js";import"./section-control-button-VtgjGcq5.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";import"./dropdown-editor-vzCR7Y_E.js";import"./explanation-editor-QNDSiyWl.js";import"./expression-editor-gbMGfXvL.js";import"./graph-settings-LBBYDOUY.js";import"./image-editor-ifkVG3z1.js";import"./input-number-editor-ncl_GOvQ.js";import"./index-uK3b_Y1s.js";import"./interactive-graph-editor-PeMztHwk.js";import"./heading-8aCiuWUg.js";import"./interactive-graph-settings-3oLklA_Z.js";import"./locked-figures-section-nxp-trxv.js";import"./locked-ellipse-settings-H2lz6Mnf.js";import"./plus-circle-JCxQSzSv.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./color-select-aXibMsPD.js";import"./util-7LGRm2EO.js";import"./line-stroke-select-ZTaE76uS.js";import"./locked-label-settings-qoc_z_IC.js";import"./locked-function-settings-RE4yVDE6.js";import"./line-swatch-YWYea0Do.js";import"./locked-line-settings-h25vlmkK.js";import"./locked-point-settings-7pJS5tix.js";import"./labeled-switch-OVGss_VI.js";import"./locked-polygon-settings-pkXY4ncz.js";import"./locked-vector-settings-EnKejgQ9.js";import"./label-image-editor-Z5_dot8_.js";import"./form-wrapped-text-field-tsI8XMXi.js";import"./answer-choices-jhnMapjR.js";import"./behavior-RYjJdmKF.js";import"./question-markers-KN3OrYEl.js";import"./marker-st5wrvmE.js";import"./select-image-_eHoVMfM.js";import"./matcher-editor-hlzTMdtB.js";import"./number-line-editor-t3bGT3LG.js";import"./numeric-input-editor-QUZ56KMx.js";import"./phet-simulation-editor-0655QF05.js";import"./python-program-editor-SPqpWu4A.js";import"./editor-8WwPqQi6.js";import"./sorter-editor-Kj6XqnPI.js";import"./chunk-WFFRPTHA-zlNDxfrq.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./editor-page-91uXOpaV.js";import"./viewport-resizer-YtC0KtaX.js";import"./constants-hQyjCzwz.js";import"./device-framer-wVZUBEZD.js";import"./item-extras-editor-2Be_tCWc.js";import"./flags-for-api-options-NwahBZpL.js";p();const mt={title:"PerseusEditor/EditorPage"},r=()=>m(e,{});r.__docgenInfo={description:"",methods:[],displayName:"Demo"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(): React.ReactElement => { return ; }`,...(i=(t=r.parameters)==null?void 0:t.docs)==null?void 0:i.source}}};const pt=["Demo"];export{r as Demo,pt as __namedExportsOrder,mt as default}; diff --git a/assets/editor.stories-SCDv_rUh.js b/assets/editor.stories-SCDv_rUh.js index 9e94c611c9..c5a3d8d23c 100644 --- a/assets/editor.stories-SCDv_rUh.js +++ b/assets/editor.stories-SCDv_rUh.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{V as R}from"./index-6h5t6F0w.js";import{a as O}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{r as e}from"./index-TT1qJ6UJ.js";import"./index-pUnNHf6v.js";import{S as C}from"./side-by-side-kpK-8vW0.js";import{r as x}from"./register-all-widgets-and-editors-for-testing-Ftx4wZEN.js";import{a as u}from"./flags-for-api-options-NwahBZpL.js";import{E as f}from"./editor-SZLWA5DH.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./version-akiLXZts.js";import"./article-editor-BfWGyfWk.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./device-framer-wVZUBEZD.js";import"./constants-hQyjCzwz.js";import"./section-control-button-VtgjGcq5.js";import"./index-tFzzSRL2.js";import"./viewport-resizer-YtC0KtaX.js";import"./index-0C4KXdeC.js";import"./structured-item-diff-C8S6VB9q.js";import"./text-diff-RbGWUAEg.js";import"./tags-diff-loewY876.js";import"./editor-page-91uXOpaV.js";import"./item-extras-editor-2Be_tCWc.js";import"./multi-items-MzI04jIx.js";/* empty css */import"./categorizer-editor-aJj5kcPa.js";import"./editor-jsonify-yP45H1ib.js";import"./blur-input-hjJsfoK9.js";import"./definition-editor-koC6zgjU.js";import"./dropdown-editor-vzCR7Y_E.js";import"./explanation-editor-QNDSiyWl.js";import"./expression-editor-gbMGfXvL.js";import"./graph-settings-LBBYDOUY.js";import"./image-editor-ifkVG3z1.js";import"./input-number-editor-ncl_GOvQ.js";import"./index-uK3b_Y1s.js";import"./interactive-graph-editor-PeMztHwk.js";import"./heading-8aCiuWUg.js";import"./toggleable-caret-lFiCktzo.js";import"./interactive-graph-settings-3oLklA_Z.js";import"./locked-figures-section-nxp-trxv.js";import"./locked-ellipse-settings-H2lz6Mnf.js";import"./plus-circle-JCxQSzSv.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./color-select-aXibMsPD.js";import"./util-7LGRm2EO.js";import"./line-stroke-select-ZTaE76uS.js";import"./locked-label-settings-qoc_z_IC.js";import"./locked-function-settings-RE4yVDE6.js";import"./line-swatch-YWYea0Do.js";import"./locked-line-settings-h25vlmkK.js";import"./locked-point-settings-7pJS5tix.js";import"./labeled-switch-OVGss_VI.js";import"./locked-polygon-settings-pkXY4ncz.js";import"./locked-vector-settings-EnKejgQ9.js";import"./label-image-editor-Z5_dot8_.js";import"./form-wrapped-text-field-tsI8XMXi.js";import"./answer-choices-jhnMapjR.js";import"./behavior-RYjJdmKF.js";import"./question-markers-KN3OrYEl.js";import"./marker-st5wrvmE.js";import"./select-image-_eHoVMfM.js";import"./matcher-editor-hlzTMdtB.js";import"./number-line-editor-t3bGT3LG.js";import"./numeric-input-editor-QUZ56KMx.js";import"./phet-simulation-editor-0655QF05.js";import"./python-program-editor-SPqpWu4A.js";import"./editor-8WwPqQi6.js";import"./sorter-editor-Kj6XqnPI.js";import"./index-SM3muJE2.js";import"./tex-error-view-Y2BSLjwB.js";const n={content:`A sequence is defined recursively as follows: +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{V as R}from"./index-6h5t6F0w.js";import{a as O}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{r as e}from"./index-TT1qJ6UJ.js";import"./index-pUnNHf6v.js";import{S as C}from"./side-by-side-kpK-8vW0.js";import{r as x}from"./register-all-widgets-and-editors-for-testing-Ftx4wZEN.js";import{a as u}from"./flags-for-api-options-NwahBZpL.js";import{E as f}from"./editor-SZLWA5DH.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./version-akiLXZts.js";import"./article-editor-BfWGyfWk.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./device-framer-wVZUBEZD.js";import"./constants-hQyjCzwz.js";import"./section-control-button-VtgjGcq5.js";import"./index-tFzzSRL2.js";import"./viewport-resizer-YtC0KtaX.js";import"./index-k-0mNqHS.js";import"./structured-item-diff-C8S6VB9q.js";import"./text-diff-RbGWUAEg.js";import"./tags-diff-loewY876.js";import"./editor-page-91uXOpaV.js";import"./item-extras-editor-2Be_tCWc.js";import"./multi-items-MzI04jIx.js";/* empty css */import"./categorizer-editor-aJj5kcPa.js";import"./editor-jsonify-yP45H1ib.js";import"./blur-input-hjJsfoK9.js";import"./definition-editor-koC6zgjU.js";import"./dropdown-editor-vzCR7Y_E.js";import"./explanation-editor-QNDSiyWl.js";import"./expression-editor-gbMGfXvL.js";import"./graph-settings-LBBYDOUY.js";import"./image-editor-ifkVG3z1.js";import"./input-number-editor-ncl_GOvQ.js";import"./index-uK3b_Y1s.js";import"./interactive-graph-editor-PeMztHwk.js";import"./heading-8aCiuWUg.js";import"./toggleable-caret-lFiCktzo.js";import"./interactive-graph-settings-3oLklA_Z.js";import"./locked-figures-section-nxp-trxv.js";import"./locked-ellipse-settings-H2lz6Mnf.js";import"./plus-circle-JCxQSzSv.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./color-select-aXibMsPD.js";import"./util-7LGRm2EO.js";import"./line-stroke-select-ZTaE76uS.js";import"./locked-label-settings-qoc_z_IC.js";import"./locked-function-settings-RE4yVDE6.js";import"./line-swatch-YWYea0Do.js";import"./locked-line-settings-h25vlmkK.js";import"./locked-point-settings-7pJS5tix.js";import"./labeled-switch-OVGss_VI.js";import"./locked-polygon-settings-pkXY4ncz.js";import"./locked-vector-settings-EnKejgQ9.js";import"./label-image-editor-Z5_dot8_.js";import"./form-wrapped-text-field-tsI8XMXi.js";import"./answer-choices-jhnMapjR.js";import"./behavior-RYjJdmKF.js";import"./question-markers-KN3OrYEl.js";import"./marker-st5wrvmE.js";import"./select-image-_eHoVMfM.js";import"./matcher-editor-hlzTMdtB.js";import"./number-line-editor-t3bGT3LG.js";import"./numeric-input-editor-QUZ56KMx.js";import"./phet-simulation-editor-0655QF05.js";import"./python-program-editor-SPqpWu4A.js";import"./editor-8WwPqQi6.js";import"./sorter-editor-Kj6XqnPI.js";import"./index-SM3muJE2.js";import"./tex-error-view-Y2BSLjwB.js";const n={content:`A sequence is defined recursively as follows: $\\qquad\\displaystyle{{a}_{n}}=-\\frac{1}{a_{n-1}-1} diff --git a/assets/explanation-editor-QNDSiyWl.js b/assets/explanation-editor-QNDSiyWl.js index 01aa39d7dd..03f879e539 100644 --- a/assets/explanation-editor-QNDSiyWl.js +++ b/assets/explanation-editor-QNDSiyWl.js @@ -1,3 +1,3 @@ -import{a as o,j as t}from"./jsx-runtime-FVsy8kgq.js";import{c as l,p as m}from"./article-renderer-o95CuJpS.js";import{_ as n}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as d}from"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{E as c}from"./editor-jsonify-yP45H1ib.js";import{P as i}from"./index-0C4KXdeC.js";import{r as h}from"./index-TT1qJ6UJ.js";import{E as u}from"./editor-SZLWA5DH.js";const{TextInput:p}=d,g={showPrompt:"Explain",hidePrompt:"Hide explanation",explanation:`explanation goes here +import{a as o,j as t}from"./jsx-runtime-FVsy8kgq.js";import{c as l,p as m}from"./article-renderer-o95CuJpS.js";import{_ as n}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as d}from"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{E as c}from"./editor-jsonify-yP45H1ib.js";import{P as i}from"./index-k-0mNqHS.js";import{r as h}from"./index-TT1qJ6UJ.js";import{E as u}from"./editor-SZLWA5DH.js";const{TextInput:p}=d,g={showPrompt:"Explain",hidePrompt:"Hide explanation",explanation:`explanation goes here more explanation`,widgets:{}},s=class s extends h.Component{constructor(){super(...arguments),this.state={},this.change=(...e)=>l.apply(this,e),this.serialize=()=>c.serialize.call(this)}render(){return o("div",{className:"perseus-widget-explanation-editor",children:[t("div",{className:"perseus-widget-row",children:o("label",{children:["Prompt to show explanation:"," ",t(p,{value:this.props.showPrompt,onChange:this.change("showPrompt")})]})}),t("div",{className:"perseus-widget-row",children:o("label",{children:["Prompt to hide explanation:"," ",t(p,{value:this.props.hidePrompt,onChange:this.change("hidePrompt")})]})}),t("div",{className:"perseus-widget-row",children:t(u,{apiOptions:this.props.apiOptions,content:this.props.explanation,widgets:this.props.widgets,widgetEnabled:!0,immutableWidgets:!1,onChange:e=>{const a={};n.has(e,"content")&&(a.explanation=e.content),n.has(e,"widgets")&&(a.widgets=e.widgets),this.change(a)}})})]})}};s.propTypes={...m,showPrompt:i.string,hidePrompt:i.string,explanation:i.string,widgets:i.object,apiOptions:i.any},s.widgetName="explanation",s.defaultProps=g;let r=s;r.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ExplanationEditor",props:{showPrompt:{defaultValue:{value:'"Explain"',computed:!1},description:"",type:{name:"string"},required:!1},hidePrompt:{defaultValue:{value:'"Hide explanation"',computed:!1},description:"",type:{name:"string"},required:!1},explanation:{defaultValue:{value:'"explanation goes here\\n\\nmore explanation"',computed:!1},description:"",type:{name:"string"},required:!1},widgets:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},apiOptions:{description:"",type:{name:"any"},required:!1}},composes:["@khanacademy/perseus"]};export{r as E}; diff --git a/assets/explanation-editor.stories-oa1mYYdV.js b/assets/explanation-editor.stories-oa1mYYdV.js index 40cc44e98c..e5c0a97369 100644 --- a/assets/explanation-editor.stories-oa1mYYdV.js +++ b/assets/explanation-editor.stories-oa1mYYdV.js @@ -1,3 +1,3 @@ -import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{a as m}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{E as a}from"./explanation-editor-QNDSiyWl.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./editor-jsonify-yP45H1ib.js";import"./index-0C4KXdeC.js";import"./editor-SZLWA5DH.js";import"./index-SM3muJE2.js";import"./section-control-button-VtgjGcq5.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const nt={title:"PerseusEditor/Widgets/Explanation Editor"},o=e=>p(a,{onChange:m("onChange")});o.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,r,i;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{a as m}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{E as a}from"./explanation-editor-QNDSiyWl.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./editor-jsonify-yP45H1ib.js";import"./index-k-0mNqHS.js";import"./editor-SZLWA5DH.js";import"./index-SM3muJE2.js";import"./section-control-button-VtgjGcq5.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const nt={title:"PerseusEditor/Widgets/Explanation Editor"},o=e=>p(a,{onChange:m("onChange")});o.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,r,i;o.parameters={...o.parameters,docs:{...(t=o.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(r=o.parameters)==null?void 0:r.docs)==null?void 0:i.source}}};const st=["Default"];export{o as Default,st as __namedExportsOrder,nt as default}; diff --git a/assets/explanation.stories-IJa8Dz5q.js b/assets/explanation.stories-IJa8Dz5q.js index a3abda09b4..b6a00c89a8 100644 --- a/assets/explanation.stories-IJa8Dz5q.js +++ b/assets/explanation.stories-IJa8Dz5q.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{R as a}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const v={content:`Here's the explanation +import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{R as a}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const v={content:`Here's the explanation [[☃ explanation 1]] Did you get that?`,images:{},widgets:{"explanation 1":{graded:!0,version:{major:0,minor:0},static:!1,type:"explanation",options:{hidePrompt:"Hide explanation!",widgets:{},explanation:"This is an explanation",static:!1,showPrompt:"Explanation"},alignment:"default"}}},b={content:`Here's the explanation [[☃ explanation 1]] diff --git a/assets/expression-editor-gbMGfXvL.js b/assets/expression-editor-gbMGfXvL.js index b0a0ea5599..232e9c9288 100644 --- a/assets/expression-editor-gbMGfXvL.js +++ b/assets/expression-editor-gbMGfXvL.js @@ -1,2 +1,2 @@ -import{j as n,a as c,F as I}from"./jsx-runtime-FVsy8kgq.js";import{p as N}from"./util-XcxTwqb0.js";import{a as C,c as D,P as R,E as _}from"./article-renderer-o95CuJpS.js";import{_ as g}from"./jquery-yG1GhClm.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import{l as w}from"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as T}from"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import{f as q}from"./index-J2t_5nK1.js";import"./index-IIMKO4_x.js";import{B as f}from"./choice-E4eyMygy.js";import{C as m,l as S}from"./index-QCAhLhLD.js";import{S as O}from"./index-qUyqkRvh.js";import{s as p,c as y}from"./index-deFLJwr4.js";import{H as k,d as L}from"./index-h_CiYGGb.js";import{l}from"./index-awljIyHI.js";import{r as F}from"./index-TT1qJ6UJ.js";import{P as B}from"./index-0C4KXdeC.js";import{R as Y}from"./index-7vsPyIck.js";const d=B,z=C({propTypes:{className:d.string,components:d.arrayOf(d.node).isRequired,onReorder:d.func.isRequired,style:d.any,verify:d.func},getDefaultProps:function(){return{verify:()=>!0}},getInitialState:function(){return{dragging:null,components:this.props.components}},componentDidMount:function(){this._setDragEvents()},UNSAFE_componentWillReceiveProps:function(r){this.setState({components:r.components})},componentDidUpdate:function(){this._setDragEvents()},onDragStart:function(r){this.setState({dragging:r})},onDrop:function(){this.setState({dragging:null}),this.props.onReorder(this.state.components)},onDragEnter:function(r){if(this.state.dragging===r)return;const i=this.state.components.slice(),e=i.splice(this.state.dragging,1);i.splice(r,0,e[0]);const t=this.props.verify(i);return t&&this.setState({dragging:r,components:i}),t},_listenEvent:function(r){r.dataTransfer.setData("hackhackhack","because browsers!")},_cancelEvent:function(r){r.preventDefault()},_setDragEvents:function(){this._dragItems=this._dragItems||[];const r=Y.findDOMNode(this).querySelectorAll("[draggable=true]"),i=[],e=[];for(let t=0;tn(P,{index:e,component:i,area:this,draggable:i.props.draggable,dragging:e===this.state.dragging},i.key));return n("ol",{className:this.props.className,style:this.props.style,children:r})}}),P=C({propTypes:{area:d.shape({onDragEnter:d.func.isRequired,onDragStart:d.func.isRequired,onDrop:d.func.isRequired}),component:d.node.isRequired,dragging:d.bool.isRequired,draggable:d.bool.isRequired,index:d.number.isRequired},handleDragStart:function(r){r.nativeEvent.dataTransfer.effectAllowed="move",this.props.area.onDragStart(this.props.index)},handleDrop:function(){this.props.area.onDrop(this.props.index)},handleDragEnter:function(r){const i=this.props.area.onDragEnter(this.props.index);r.nativeEvent.dataTransfer.effectAllowed=i?"move":"none"},handleDragOver:function(r){r.preventDefault()},render:function(){let r="sortable-disabled";return this.props.dragging?r="sortable-dragging":this.props.draggable&&(r="sortable-enabled"),n("li",{draggable:this.props.draggable,className:[r,l.css(U.sortableListItem)].join(" "),onDragStart:this.handleDragStart,onDrop:this.handleDrop,onDragEnter:this.handleDragEnter,onDragOver:this.handleDragOver,children:this.props.component})}}),U=l.StyleSheet.create({sortableListItem:{margin:"5px 0"}}),{InfoTip:u}=T,A=["basic","trig","prealgebra","logarithms","basic relations","advanced relations"],E=({key:r})=>Number.parseInt(r??""),V=r=>{const i=[];r.forEach(e=>{i[E(e)]=!0});for(let e=0;e{const e=["value","form","simplify","considered","key"],t=["answerForms","buttonSets","functions","times","visibleLabel","ariaLabel"],s=this.props.answerForms.map(a=>g(a).pick(e));return w(this.props).set(["answerForms"],s).mod([],a=>g(a).pick(t)).freeze()},this.getSaveWarnings=()=>{const e=[];return this.props.answerForms.length===0?e.push("No answers specified"):(this.props.answerForms.some(s=>s.considered==="correct")||e.push("No correct answer specified"),g(this.props.answerForms).each((s,a)=>{if(this.props.value==="")e.push(`Answer ${a+1} is empty`);else{const h=N(s.value,{functions:this.props.functions});h.parsed?s.simplify&&!h.expr.isSimplified()&&e.push(`${s.value} isn't simplified, but is required" + +import{j as n,a as c,F as I}from"./jsx-runtime-FVsy8kgq.js";import{p as N}from"./util-XcxTwqb0.js";import{a as C,c as D,P as R,E as _}from"./article-renderer-o95CuJpS.js";import{_ as g}from"./jquery-yG1GhClm.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import{l as w}from"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as T}from"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import{f as q}from"./index-J2t_5nK1.js";import"./index-IIMKO4_x.js";import{B as f}from"./choice-E4eyMygy.js";import{C as m,l as S}from"./index-QCAhLhLD.js";import{S as O}from"./index-qUyqkRvh.js";import{s as p,c as y}from"./index-deFLJwr4.js";import{H as k,d as L}from"./index-h_CiYGGb.js";import{l}from"./index-awljIyHI.js";import{r as F}from"./index-TT1qJ6UJ.js";import{P as B}from"./index-k-0mNqHS.js";import{R as Y}from"./index-7vsPyIck.js";const d=B,z=C({propTypes:{className:d.string,components:d.arrayOf(d.node).isRequired,onReorder:d.func.isRequired,style:d.any,verify:d.func},getDefaultProps:function(){return{verify:()=>!0}},getInitialState:function(){return{dragging:null,components:this.props.components}},componentDidMount:function(){this._setDragEvents()},UNSAFE_componentWillReceiveProps:function(r){this.setState({components:r.components})},componentDidUpdate:function(){this._setDragEvents()},onDragStart:function(r){this.setState({dragging:r})},onDrop:function(){this.setState({dragging:null}),this.props.onReorder(this.state.components)},onDragEnter:function(r){if(this.state.dragging===r)return;const i=this.state.components.slice(),e=i.splice(this.state.dragging,1);i.splice(r,0,e[0]);const t=this.props.verify(i);return t&&this.setState({dragging:r,components:i}),t},_listenEvent:function(r){r.dataTransfer.setData("hackhackhack","because browsers!")},_cancelEvent:function(r){r.preventDefault()},_setDragEvents:function(){this._dragItems=this._dragItems||[];const r=Y.findDOMNode(this).querySelectorAll("[draggable=true]"),i=[],e=[];for(let t=0;tn(P,{index:e,component:i,area:this,draggable:i.props.draggable,dragging:e===this.state.dragging},i.key));return n("ol",{className:this.props.className,style:this.props.style,children:r})}}),P=C({propTypes:{area:d.shape({onDragEnter:d.func.isRequired,onDragStart:d.func.isRequired,onDrop:d.func.isRequired}),component:d.node.isRequired,dragging:d.bool.isRequired,draggable:d.bool.isRequired,index:d.number.isRequired},handleDragStart:function(r){r.nativeEvent.dataTransfer.effectAllowed="move",this.props.area.onDragStart(this.props.index)},handleDrop:function(){this.props.area.onDrop(this.props.index)},handleDragEnter:function(r){const i=this.props.area.onDragEnter(this.props.index);r.nativeEvent.dataTransfer.effectAllowed=i?"move":"none"},handleDragOver:function(r){r.preventDefault()},render:function(){let r="sortable-disabled";return this.props.dragging?r="sortable-dragging":this.props.draggable&&(r="sortable-enabled"),n("li",{draggable:this.props.draggable,className:[r,l.css(U.sortableListItem)].join(" "),onDragStart:this.handleDragStart,onDrop:this.handleDrop,onDragEnter:this.handleDragEnter,onDragOver:this.handleDragOver,children:this.props.component})}}),U=l.StyleSheet.create({sortableListItem:{margin:"5px 0"}}),{InfoTip:u}=T,A=["basic","trig","prealgebra","logarithms","basic relations","advanced relations"],E=({key:r})=>Number.parseInt(r??""),V=r=>{const i=[];r.forEach(e=>{i[E(e)]=!0});for(let e=0;e{const e=["value","form","simplify","considered","key"],t=["answerForms","buttonSets","functions","times","visibleLabel","ariaLabel"],s=this.props.answerForms.map(a=>g(a).pick(e));return w(this.props).set(["answerForms"],s).mod([],a=>g(a).pick(t)).freeze()},this.getSaveWarnings=()=>{const e=[];return this.props.answerForms.length===0?e.push("No answers specified"):(this.props.answerForms.some(s=>s.considered==="correct")||e.push("No correct answer specified"),g(this.props.answerForms).each((s,a)=>{if(this.props.value==="")e.push(`Answer ${a+1} is empty`);else{const h=N(s.value,{functions:this.props.functions});h.parsed?s.simplify&&!h.expr.isSimplified()&&e.push(`${s.value} isn't simplified, but is required" + " to be`):e.push(`Couldn't parse ${s.value}`)}})),e},this._newEmptyAnswerForm=()=>({considered:"correct",form:!1,key:V(this.props.answerForms),simplify:!1,value:""}),this.newAnswer=()=>{const e=this.props.answerForms.slice();e.push(this._newEmptyAnswerForm()),this.change({answerForms:e})},this.handleRemoveForm=e=>{const t=this.props.answerForms.slice();t.splice(e,1),this.change({answerForms:t})},this.updateForm=(e,t)=>{const s=w(this.props.answerForms).merge([e],t).freeze();this.change({answerForms:s})},this.handleReorder=e=>{const t=e.map(s=>{const a=g(s.props).pick("considered","form","simplify","value");return a.key=s.key,a});this.change({answerForms:t})},this.handleButtonSet=e=>{const s=A.filter(a=>this.props.buttonSets.includes(a)!==(a===e));this.props.onChange({buttonSets:s})},this.handleToggleDiv=()=>{let e,t;this.props.buttonSets.includes("basic+div")?(e="basic",t="basic+div"):(e="basic+div",t="basic");const s=this.props.buttonSets.filter(a=>a!==t).concat(e);this.change("buttonSets",s)},this.handleTexInsert=e=>{this.refs.expression.insert(e)},this.handleFunctions=e=>{this.setState({functionsInternal:e});const t={};t.functions=e.split(/[ ,]+/).filter(q),this.props.onChange(t)},this.state={functionsInternal:this.props.functions.join(" ")}}change(...i){return D.apply(this,i)}render(){const i=this.props.answerForms.map(s=>{const a=E(s),h={times:this.props.times,functions:this.props.functions,buttonSets:this.props.buttonSets,buttonsVisible:"focused",form:s.form,simplify:s.simplify,value:s.value,onChange:v=>this.updateForm(a,v),trackInteraction:()=>{},widgetId:this.props.widgetId+"-"+s.key};return w(s).merge([],{key:a,draggable:!0,onChange:v=>this.updateForm(Number.parseInt(s.key??""),v),onDelete:()=>this.handleRemoveForm(a),expressionProps:h}).freeze()}).map(s=>n(j,{...s},s.key)),e=n(z,{components:i,onReorder:this.handleReorder}),t=A.map(s=>{const a=s==="basic",h=this.props.buttonSets.includes(s)||a;return n(m,{label:s,checked:h,disabled:a,onChange:()=>this.handleButtonSet(s)},s)});return t.unshift(n(m,{label:"show ÷ button",checked:this.props.buttonSets.includes("basic+div"),onChange:this.handleToggleDiv},"show ÷ button")),c("div",{children:[n(k,{children:"Global Options"}),c("div",{className:l.css(o.paddedY),children:[n(S,{label:"Visible label",value:this.props.visibleLabel||"",onChange:this.change("visibleLabel")}),n(u,{children:n("p",{children:"Optional visible text; strongly encouraged to help learners using dictation software, but can be omitted if the surrounding content provides enough context."})})]}),c("div",{className:l.css(o.paddedY),children:[n(S,{label:"Aria label",value:this.props.ariaLabel||"",onChange:this.change("ariaLabel")}),n(u,{children:c("p",{children:["Label text that's read by screen readers. Highly recommend adding a label here to ensure your exercise is accessible. For more information on writting accessible labels, please see"," ",n("a",{href:"https://www.w3.org/WAI/tips/designing/#ensure-that-form-elements-include-clearly-associated-labels",target:"_blank",children:"this article."})]})})]}),c("div",{className:l.css(o.paddedY),children:[n(S,{label:"Function variables",value:this.state.functionsInternal,onChange:this.handleFunctions}),n(u,{children:n("p",{children:'Single-letter variables listed here will be interpreted as functions. This let us know that f(x) means "f of x" and not "f times x".'})})]}),c("div",{className:l.css(o.paddedY),children:[n(m,{label:"Use × instead of ⋅ for multiplication",checked:this.props.times,onChange:s=>{this.props.onChange({times:s})}}),n(u,{children:n("p",{children:"For pre-algebra problems this option displays multiplication as \\times instead of \\cdot in both the rendered output and the acceptable formats examples."})})]}),c("div",{className:l.css(o.paddedY),children:[n(L,{children:"Button Sets"}),t]}),n(k,{children:"Answers"}),n("p",{style:{margin:"4px 0"},children:"student responses area matched against these from top to bottom"}),e,n("div",{children:n(f,{size:"small",onClick:this.newAnswer,children:"Add new answer"})})]})}};b.widgetName="expression",b.defaultProps={answerForms:[],times:!1,buttonSets:["basic"],functions:["f","g","h"]};let x=b;const W=function(r,i){let e=r.indexOf(i);return e=(e+1)%r.length,r[e]};class j extends F.Component{constructor(){super(...arguments),this.state={deleteFocused:!1},this.change=(...i)=>D.apply(this,i),this.handleImSure=()=>{this.props.onDelete()},this.handleCancelDelete=()=>{this.setState({deleteFocused:!1})},this.handleDelete=()=>{this.setState({deleteFocused:!0})},this.toggleConsidered=()=>{const i=W(R,this.props.considered);this.change({considered:i})}}render(){const i=this.state.deleteFocused?c(I,{children:[n(f,{size:"small",onClick:this.handleImSure,color:"destructive",children:"I'm sure!"}),n(O,{size:p.small_12}),n(f,{size:"small",onClick:this.handleCancelDelete,light:!0,children:"Cancel"})]}):n(f,{size:"small",onClick:this.handleDelete,color:"destructive",light:!0,children:"Delete"}),e=l.css(o.answerStatus,this.props.considered==="wrong"&&o.answerStatusWrong,this.props.considered==="correct"&&o.answerStatusCorrect,this.props.considered==="ungraded"&&o.answerStatusUngraded);return c("div",{className:l.css(o.answerOption),children:[n("div",{className:l.css(o.answerHandle)}),c("div",{className:l.css(o.answerBody),children:[c("div",{children:[n("button",{onClick:this.toggleConsidered,className:e,children:this.props.considered}),n("div",{children:n(_,{...this.props.expressionProps})})]}),c("div",{className:l.css(o.paddedY,o.paddedX),children:[n(m,{label:"Answer expression must have the same form.",checked:this.props.form,onChange:t=>{this.props.onChange({form:t})}}),n(u,{children:n("p",{children:"The student's answer must be in the same form. Commutativity and excess negative signs are ignored."})})]}),c("div",{className:l.css(o.paddedY,o.paddedX),children:[n(m,{label:"Answer expression must be fully expanded and simplified.",checked:this.props.simplify,onChange:t=>{this.props.onChange({simplify:t})}}),n(u,{children:n("p",{children:`The student's answer must be fully expanded and simplified. Answering this equation (x^2+2x+1) with this factored equation (x+1)^2 will render this response "Your answer is not fully expanded and simplified."`})})]}),n("div",{className:l.css(o.buttonRow,o.paddedY),children:i})]})]})}}const o=l.StyleSheet.create({paddedX:{paddingLeft:p.xSmall_8,paddingRight:p.xSmall_8},paddedY:{paddingTop:p.xxSmall_6,paddingBottom:p.xxSmall_6},answerOption:{border:"1px solid #ddd",borderRadius:"3px",display:"flex"},answerHandle:{background:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==) no-repeat 50% 50%",borderRight:"1px solid #ddd",cursor:"move",width:"20px",minWidth:"20px"},answerStatus:{border:"none",userSelect:"none",width:"100px",paddingTop:p.small_12,paddingBottom:p.small_12},answerStatusWrong:{backgroundColor:y.fadedRed16},answerStatusCorrect:{backgroundColor:y.fadedGreen16},answerStatusUngraded:{backgroundColor:y.fadedBlue16},answerBody:{},buttonRow:{display:"flex"}});x.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"_newEmptyAnswerForm",docblock:null,modifiers:[],params:[],returns:null},{name:"newAnswer",docblock:null,modifiers:[],params:[],returns:null},{name:"handleRemoveForm",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null}],returns:null},{name:"updateForm",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null},{name:"props",optional:!1,type:null}],returns:null},{name:"handleReorder",docblock:null,modifiers:[],params:[{name:"components",optional:!1,type:null}],returns:null},{name:"handleButtonSet",docblock:null,modifiers:[],params:[{name:"changingName",optional:!1,type:null}],returns:null},{name:"handleToggleDiv",docblock:null,modifiers:[],params:[],returns:null},{name:"handleTexInsert",docblock:null,modifiers:[],params:[{name:"str",optional:!1,type:null}],returns:null},{name:"handleFunctions",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null}],displayName:"ExpressionEditor",props:{widgetId:{required:!1,tsType:{name:"any"},description:""},value:{required:!1,tsType:{name:"string"},description:""},answerForms:{defaultValue:{value:"[]",computed:!1},required:!1},times:{defaultValue:{value:"false",computed:!1},required:!1},buttonSets:{defaultValue:{value:'["basic"]',computed:!1},required:!1},functions:{defaultValue:{value:'["f", "g", "h"]',computed:!1},required:!1}}};export{x as E}; diff --git a/assets/expression-editor.stories-BbgOXF15.js b/assets/expression-editor.stories-BbgOXF15.js index 6b26f8b0a0..4241f8ea5e 100644 --- a/assets/expression-editor.stories-BbgOXF15.js +++ b/assets/expression-editor.stories-BbgOXF15.js @@ -1,4 +1,4 @@ -import{j as i,a as c}from"./jsx-runtime-FVsy8kgq.js";import{l as p}from"./index-awljIyHI.js";import{r as u}from"./index-TT1qJ6UJ.js";import{R as g}from"./renderer-with-debug-ui-o6OVhJgg.js";import{E as l}from"./expression-editor-gbMGfXvL.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";const nr={title:"PerseusEditor/Widgets/Expression Editor"};class f extends u.Component{constructor(e){super(e);const t=r.widgets["expression 1"].options;this.state={answerForms:t.answerForms,times:t.times,buttonSets:t.buttonSets,functions:t.functions}}mergeQuestionWithState(){return{...r,widgets:{...r.widgets,"expression 1":{...r.widgets["expression 1"],options:{...r.widgets["expression 1"].options,...this.state}}}}}render(){const e=Object.freeze({});return c("div",{className:p.css(m.wrapper),children:[i("div",{className:p.css(m.editorWrapper),children:i(l,{...this.state,onChange:t=>{this.setState({...t})}})}),i(g,{question:this.mergeQuestionWithState(),apiOptions:e,reviewMode:!0})]})}}const o=d=>i(f,{}),r={content:`This is a cool expression question +import{j as i,a as c}from"./jsx-runtime-FVsy8kgq.js";import{l as p}from"./index-awljIyHI.js";import{r as u}from"./index-TT1qJ6UJ.js";import{R as g}from"./renderer-with-debug-ui-o6OVhJgg.js";import{E as l}from"./expression-editor-gbMGfXvL.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";const nr={title:"PerseusEditor/Widgets/Expression Editor"};class f extends u.Component{constructor(e){super(e);const t=r.widgets["expression 1"].options;this.state={answerForms:t.answerForms,times:t.times,buttonSets:t.buttonSets,functions:t.functions}}mergeQuestionWithState(){return{...r,widgets:{...r.widgets,"expression 1":{...r.widgets["expression 1"],options:{...r.widgets["expression 1"].options,...this.state}}}}}render(){const e=Object.freeze({});return c("div",{className:p.css(m.wrapper),children:[i("div",{className:p.css(m.editorWrapper),children:i(l,{...this.state,onChange:t=>{this.setState({...t})}})}),i(g,{question:this.mergeQuestionWithState(),apiOptions:e,reviewMode:!0})]})}}const o=d=>i(f,{}),r={content:`This is a cool expression question [[☃ expression 1]] diff --git a/assets/expression.stories--0GavJhy.js b/assets/expression.stories--0GavJhy.js index 5f1d69f140..96c2bc6dd0 100644 --- a/assets/expression.stories--0GavJhy.js +++ b/assets/expression.stories--0GavJhy.js @@ -1,4 +1,4 @@ -import{j as r,a as u}from"./jsx-runtime-FVsy8kgq.js";import{a as T}from"./mobile-keypad-hKjeQGNp.js";import"./prop-types-3bOVFRDQ.js";import"./key-translator-IA-2V2LV.js";import"./button-assets-txIojR3b.js";import{K as _}from"./enums-x5qaTru7.js";import{a as W}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{S as L}from"./server-item-renderer-with-debug-ui-G785FGTt.js";import{T as M}from"./test-keypad-context-wrapper-UieRILfg.js";import{I as N,f as j}from"./article-renderer-o95CuJpS.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./version-akiLXZts.js";import"./invariant-bu5zBsRS.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./choice-E4eyMygy.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-8XILypbq.js";import"./multi-renderer-Nglq5SzN.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./hints-renderer-GjKFBH8K.js";import"./shared-3pf9YZIg.js";import"./base-radio-sE9E2UC2.js";import"./choice-none-above-o4v4BTO3.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./ke-score-ui-xy7p6xf5.js";import"./side-by-side-kpK-8vW0.js";import"./test-dependencies-3HLxfOjs.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./answer-choices-vbrLThK4.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";const c=(e,t)=>({question:{content:"[[☃ expression 1]]",images:{},widgets:{"expression 1":{type:"expression",graded:!0,options:e,version:t}}},answer:null,answerArea:Object.fromEntries(N.map(o=>[o,!1])),itemDataVersion:{major:0,minor:1},hints:[]});c({answerForms:[],times:!1,buttonSets:["basic"],functions:[],buttonsVisible:"always",ariaLabel:"Test aria label",visibleLabel:"Test visible label"},{major:1,minor:0});const D=c({answerForms:[{considered:"correct",form:!1,simplify:!1,value:"123-x"},{considered:"correct",form:!1,simplify:!1,value:"x-123"}],times:!1,buttonSets:["basic"],functions:["f","g","h"],buttonsVisible:"always"},{major:1,minor:0}),A={answerForms:[{considered:"ungraded",form:!1,simplify:!1,value:"x+1"},{considered:"wrong",form:!1,simplify:!1,value:"y+1"},{considered:"correct",form:!1,simplify:!1,value:"z+1"},{considered:"correct",form:!1,simplify:!1,value:"a+1"}],times:!1,buttonSets:["basic"],functions:["f","g","h"],buttonsVisible:"focused",visibleLabel:"number of cm",ariaLabel:"number of centimeters"},d=c(A,{major:1,minor:0}),n=({item:e,customKeypad:t,isMobile:o=!1})=>r(M,{children:r(T.Consumer,{children:({keypadElement:l})=>r(L,{item:e,keypadElement:l,apiOptions:{isMobile:o,customKeypad:t,onFocusChange:W("onFocusChange")}})})}),s=e=>{const t={functions:["f","g","h"],times:!0,answerForms:[],buttonSets:["basic","basic+div","trig","prealgebra","logarithms","basic relations","advanced relations"]},o={keypadType:_.EXPRESSION,extraKeys:["x","y","z"]};return r("div",{style:{padding:"2rem"},children:r(j.widget,{alignment:null,value:"",visibleLabel:"",ariaLabel:"",containerSizeClass:"small",findWidgets:l=>[],isLastUsedWidget:!1,onChange:()=>{},problemNum:1,static:!1,trackInteraction:()=>{},widgetId:"expression",reviewModeRubric:t,keypadConfiguration:o})})},i=e=>r(n,{item:d,customKeypad:!1}),a=e=>u("div",{children:[u("p",{children:["MathInput uses touch events;"," ",r("a",{href:"https://developer.chrome.com/docs/devtools/device-mode/",children:"emulate mobile"})," ","to use the custom keypad."]}),r(n,{item:d,customKeypad:!0,isMobile:!0})]}),p=e=>r(n,{item:D,customKeypad:e.customKeypad}),m=e=>r(n,{item:d,customKeypad:e.customKeypad}),Mr={title:"Perseus/Widgets/Expression",argTypes:{customKeypad:{control:"boolean"}}};s.__docgenInfo={description:"",methods:[],displayName:"DesktopKitchenSink",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};i.__docgenInfo={description:"",methods:[],displayName:"Desktop",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};a.__docgenInfo={description:"",methods:[],displayName:"Mobile",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};p.__docgenInfo={description:"",methods:[],displayName:"ExpressionItem2",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};m.__docgenInfo={description:"",methods:[],displayName:"ExpressionItem3",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};var y,f,g;s.parameters={...s.parameters,docs:{...(y=s.parameters)==null?void 0:y.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as r,a as u}from"./jsx-runtime-FVsy8kgq.js";import{a as T}from"./mobile-keypad-hKjeQGNp.js";import"./prop-types-3bOVFRDQ.js";import"./key-translator-IA-2V2LV.js";import"./button-assets-txIojR3b.js";import{K as _}from"./enums-x5qaTru7.js";import{a as W}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{S as L}from"./server-item-renderer-with-debug-ui-G785FGTt.js";import{T as M}from"./test-keypad-context-wrapper-UieRILfg.js";import{I as N,f as j}from"./article-renderer-o95CuJpS.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./version-akiLXZts.js";import"./invariant-bu5zBsRS.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./choice-E4eyMygy.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-8XILypbq.js";import"./multi-renderer-Nglq5SzN.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./hints-renderer-GjKFBH8K.js";import"./shared-3pf9YZIg.js";import"./base-radio-sE9E2UC2.js";import"./choice-none-above-o4v4BTO3.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./ke-score-ui-xy7p6xf5.js";import"./side-by-side-kpK-8vW0.js";import"./test-dependencies-3HLxfOjs.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./answer-choices-vbrLThK4.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";const c=(e,t)=>({question:{content:"[[☃ expression 1]]",images:{},widgets:{"expression 1":{type:"expression",graded:!0,options:e,version:t}}},answer:null,answerArea:Object.fromEntries(N.map(o=>[o,!1])),itemDataVersion:{major:0,minor:1},hints:[]});c({answerForms:[],times:!1,buttonSets:["basic"],functions:[],buttonsVisible:"always",ariaLabel:"Test aria label",visibleLabel:"Test visible label"},{major:1,minor:0});const D=c({answerForms:[{considered:"correct",form:!1,simplify:!1,value:"123-x"},{considered:"correct",form:!1,simplify:!1,value:"x-123"}],times:!1,buttonSets:["basic"],functions:["f","g","h"],buttonsVisible:"always"},{major:1,minor:0}),A={answerForms:[{considered:"ungraded",form:!1,simplify:!1,value:"x+1"},{considered:"wrong",form:!1,simplify:!1,value:"y+1"},{considered:"correct",form:!1,simplify:!1,value:"z+1"},{considered:"correct",form:!1,simplify:!1,value:"a+1"}],times:!1,buttonSets:["basic"],functions:["f","g","h"],buttonsVisible:"focused",visibleLabel:"number of cm",ariaLabel:"number of centimeters"},d=c(A,{major:1,minor:0}),n=({item:e,customKeypad:t,isMobile:o=!1})=>r(M,{children:r(T.Consumer,{children:({keypadElement:l})=>r(L,{item:e,keypadElement:l,apiOptions:{isMobile:o,customKeypad:t,onFocusChange:W("onFocusChange")}})})}),s=e=>{const t={functions:["f","g","h"],times:!0,answerForms:[],buttonSets:["basic","basic+div","trig","prealgebra","logarithms","basic relations","advanced relations"]},o={keypadType:_.EXPRESSION,extraKeys:["x","y","z"]};return r("div",{style:{padding:"2rem"},children:r(j.widget,{alignment:null,value:"",visibleLabel:"",ariaLabel:"",containerSizeClass:"small",findWidgets:l=>[],isLastUsedWidget:!1,onChange:()=>{},problemNum:1,static:!1,trackInteraction:()=>{},widgetId:"expression",reviewModeRubric:t,keypadConfiguration:o})})},i=e=>r(n,{item:d,customKeypad:!1}),a=e=>u("div",{children:[u("p",{children:["MathInput uses touch events;"," ",r("a",{href:"https://developer.chrome.com/docs/devtools/device-mode/",children:"emulate mobile"})," ","to use the custom keypad."]}),r(n,{item:d,customKeypad:!0,isMobile:!0})]}),p=e=>r(n,{item:D,customKeypad:e.customKeypad}),m=e=>r(n,{item:d,customKeypad:e.customKeypad}),Mr={title:"Perseus/Widgets/Expression",argTypes:{customKeypad:{control:"boolean"}}};s.__docgenInfo={description:"",methods:[],displayName:"DesktopKitchenSink",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};i.__docgenInfo={description:"",methods:[],displayName:"Desktop",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};a.__docgenInfo={description:"",methods:[],displayName:"Mobile",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};p.__docgenInfo={description:"",methods:[],displayName:"ExpressionItem2",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};m.__docgenInfo={description:"",methods:[],displayName:"ExpressionItem3",props:{customKeypad:{required:!0,tsType:{name:"boolean"},description:""}}};var y,f,g;s.parameters={...s.parameters,docs:{...(y=s.parameters)==null?void 0:y.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const reviewModeRubric = { functions: ["f", "g", "h"], times: true, diff --git a/assets/flags-for-api-options-NwahBZpL.js b/assets/flags-for-api-options-NwahBZpL.js index 0c58f17a88..19036a5739 100644 --- a/assets/flags-for-api-options-NwahBZpL.js +++ b/assets/flags-for-api-options-NwahBZpL.js @@ -1 +1 @@ -import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as t}from"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";const r={mafs:{angle:!0,segment:!0,circle:!0,quadratic:!0,sinusoid:!0,polygon:!0,linear:!0,"linear-system":!0,ray:!0,point:!0,none:!0,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!0,"locked-line-labels":!0,"locked-vector-labels":!0,"locked-ellipse-labels":!0,"locked-function-labels":!0}},z={...t.defaults,flags:{...t.defaults.flags,...r}};export{z as a,r as f}; +import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as t}from"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";const r={mafs:{angle:!0,segment:!0,circle:!0,quadratic:!0,sinusoid:!0,polygon:!0,linear:!0,"linear-system":!0,ray:!0,point:!0,none:!0,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!0,"locked-line-labels":!0,"locked-vector-labels":!0,"locked-ellipse-labels":!0,"locked-function-labels":!0}},z={...t.defaults,flags:{...t.defaults.flags,...r}};export{z as a,r as f}; diff --git a/assets/form-wrapped-text-field-tsI8XMXi.js b/assets/form-wrapped-text-field-tsI8XMXi.js index e57ab5d74c..a6ce67a0e5 100644 --- a/assets/form-wrapped-text-field-tsI8XMXi.js +++ b/assets/form-wrapped-text-field-tsI8XMXi.js @@ -1 +1 @@ -import{j as l,a as D}from"./jsx-runtime-FVsy8kgq.js";import{t as M,b as a,e as N}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{c as b}from"./index-deFLJwr4.js";import{l as s}from"./index-awljIyHI.js";import{r as g}from"./index-TT1qJ6UJ.js";class T extends g.Component{constructor(){super(...arguments),this.state={focused:!1},this.handleBlur=o=>{const{onBlur:t}=this.props;t&&t(o),this.setState({focused:!1})},this.handleFocus=o=>{const{onFocus:t}=this.props;t&&t(o),this.setState({focused:!0})},this.disableDefault=o=>{o.preventDefault()}}render(){const{forwardedRef:o,width:t,grow:n,shrink:i,icon:d,backgroundColor:c,focusBorderColor:x,borderColor:y,color:m,onSubmit:B,leftSideIcon:u,id:S,testId:w,type:k,labelMediumInputText:F,...C}=this.props,{focused:I}=this.state,r={},f=[e.input,e.container];t&&(r.width=t),n&&(r.flexGrow=n===!0?1:n),(i||i===0)&&(r.flexShrink=i===!0?0:i),c?r.backgroundColor=c:f.push(e.defaultBackground),m&&(r.color=m);const R=I?x||b.blue:y||b.offBlack16;r.border=`1px solid ${R}`;const h=d&&l("span",{className:s.css(e.icon),children:d}),j=F?e.labelMediumInputBase:e.inputBase;return D("form",{className:s.css(...f),style:r,onSubmit:B||this.disableDefault,children:[u&&h,l("input",{...C,onFocus:this.handleFocus,onBlur:this.handleBlur,type:k,className:s.css(j),ref:o,id:S,"data-testid":w}),!u&&h]})}}const e=s.StyleSheet.create({inputBase:{background:"inherit",border:"none",...M.bodyXsmall,outline:"none","::placeholder":{color:a.gray41},width:"100%",color:"inherit",marginBottom:0,paddingLeft:0,boxShadow:"none",padding:0,margin:0},labelMediumInputBase:{background:"inherit",border:"none",outline:"none","::placeholder":{color:a.gray41},width:"100%",fontWeight:"normal",fontFamily:"Lato, san-serif",fontSize:"16px",lineHeight:"20px"},input:{height:40,borderRadius:N,boxSizing:"border-box",padding:"8px 10px"},container:{display:"inline-flex",alignItems:"center",marginBottom:0},defaultBackground:{backgroundColor:a.white},icon:{display:"flex",alignItems:"center",justifyContent:"center"}}),co=g.forwardRef((p,o)=>l(T,{...p,forwardedRef:o}));export{co as F}; +import{j as l,a as D}from"./jsx-runtime-FVsy8kgq.js";import{t as M,b as a,e as N}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{c as b}from"./index-deFLJwr4.js";import{l as s}from"./index-awljIyHI.js";import{r as g}from"./index-TT1qJ6UJ.js";class T extends g.Component{constructor(){super(...arguments),this.state={focused:!1},this.handleBlur=o=>{const{onBlur:t}=this.props;t&&t(o),this.setState({focused:!1})},this.handleFocus=o=>{const{onFocus:t}=this.props;t&&t(o),this.setState({focused:!0})},this.disableDefault=o=>{o.preventDefault()}}render(){const{forwardedRef:o,width:t,grow:n,shrink:i,icon:d,backgroundColor:c,focusBorderColor:x,borderColor:y,color:m,onSubmit:B,leftSideIcon:u,id:S,testId:w,type:k,labelMediumInputText:F,...C}=this.props,{focused:I}=this.state,r={},f=[e.input,e.container];t&&(r.width=t),n&&(r.flexGrow=n===!0?1:n),(i||i===0)&&(r.flexShrink=i===!0?0:i),c?r.backgroundColor=c:f.push(e.defaultBackground),m&&(r.color=m);const R=I?x||b.blue:y||b.offBlack16;r.border=`1px solid ${R}`;const h=d&&l("span",{className:s.css(e.icon),children:d}),j=F?e.labelMediumInputBase:e.inputBase;return D("form",{className:s.css(...f),style:r,onSubmit:B||this.disableDefault,children:[u&&h,l("input",{...C,onFocus:this.handleFocus,onBlur:this.handleBlur,type:k,className:s.css(j),ref:o,id:S,"data-testid":w}),!u&&h]})}}const e=s.StyleSheet.create({inputBase:{background:"inherit",border:"none",...M.bodyXsmall,outline:"none","::placeholder":{color:a.gray41},width:"100%",color:"inherit",marginBottom:0,paddingLeft:0,boxShadow:"none",padding:0,margin:0},labelMediumInputBase:{background:"inherit",border:"none",outline:"none","::placeholder":{color:a.gray41},width:"100%",fontWeight:"normal",fontFamily:"Lato, san-serif",fontSize:"16px",lineHeight:"20px"},input:{height:40,borderRadius:N,boxSizing:"border-box",padding:"8px 10px"},container:{display:"inline-flex",alignItems:"center",marginBottom:0},defaultBackground:{backgroundColor:a.white},icon:{display:"flex",alignItems:"center",justifyContent:"center"}}),co=g.forwardRef((p,o)=>l(T,{...p,forwardedRef:o}));export{co as F}; diff --git a/assets/full-keypad.stories-GPmJXYWw.js b/assets/full-keypad.stories-GPmJXYWw.js index d9c3b7a3f1..d2748f8b2b 100644 --- a/assets/full-keypad.stories-GPmJXYWw.js +++ b/assets/full-keypad.stories-GPmJXYWw.js @@ -1 +1 @@ -import{j as O}from"./jsx-runtime-FVsy8kgq.js";import{a as c}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{I as x}from"./index-VDi1Le_1.js";import{K as F}from"./mobile-keypad-hKjeQGNp.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";const s="Operators Page",l="Numbers Page",S="Geometry Page",I="Fractions Page",re={title:"math-input/Full Keypad",parameters:{backgrounds:{values:[{name:"light background",value:"white",default:!0}]},viewport:{defaultViewport:"iphone6",viewports:x}},component:F,args:{advancedRelations:!1,basicRelations:!1,divisionKey:!1,logarithms:!1,fractionsOnly:!1,convertDotToTimes:!1,preAlgebra:!1,trigonometry:!1,sendEvent:()=>{},onAnalyticsEvent:async()=>{}},argTypes:{advancedRelations:{control:"boolean",table:{category:s}},basicRelations:{control:"boolean",table:{category:s}},divisionKey:{control:"boolean",table:{category:l}},logarithms:{control:"boolean",table:{category:s}},fractionsOnly:{control:"boolean",table:{category:I}},multiplicationDot:{control:"boolean",table:{category:l}},preAlgebra:{control:"boolean",table:{category:s}},trigonometry:{control:"boolean",table:{category:S}}}},e=w=>O(F,{...w,onClickKey:c("onClickKey"),onAnalyticsEvent:async D=>c("onAnalyticsEvent")(D)}),i=e.bind({}),a=e.bind({});a.args={preAlgebra:!0};const o=e.bind({});o.args={preAlgebra:!0,trigonometry:!0};const t=e.bind({});t.args={fractionsOnly:!0};const r=e.bind({});r.args={advancedRelations:!0,basicRelations:!0,divisionKey:!0,logarithms:!0,convertDotToTimes:!1,preAlgebra:!0,trigonometry:!0,expandedView:!0,showDismiss:!0,extraKeys:["a","b","c"]};const n=e.bind({});n.args={advancedRelations:!0,basicRelations:!0,divisionKey:!0,logarithms:!0,convertDotToTimes:!1,preAlgebra:!0,trigonometry:!0,expandedView:!1,showDismiss:!0,extraKeys:["a","b","c"]};var p,y,m;i.parameters={...i.parameters,docs:{...(p=i.parameters)==null?void 0:p.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(m=(y=i.parameters)==null?void 0:y.docs)==null?void 0:m.source}}};var g,d,u;a.parameters={...a.parameters,docs:{...(g=a.parameters)==null?void 0:g.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(u=(d=a.parameters)==null?void 0:d.docs)==null?void 0:u.source}}};var b,v,K;o.parameters={...o.parameters,docs:{...(b=o.parameters)==null?void 0:b.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(K=(v=o.parameters)==null?void 0:v.docs)==null?void 0:K.source}}};var f,E,A;t.parameters={...t.parameters,docs:{...(f=t.parameters)==null?void 0:f.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(A=(E=t.parameters)==null?void 0:E.docs)==null?void 0:A.source}}};var R,P,k;r.parameters={...r.parameters,docs:{...(R=r.parameters)==null?void 0:R.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(k=(P=r.parameters)==null?void 0:P.docs)==null?void 0:k.source}}};var h,C,T;n.parameters={...n.parameters,docs:{...(h=n.parameters)==null?void 0:h.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(T=(C=n.parameters)==null?void 0:C.docs)==null?void 0:T.source}}};const ne=["Default","PreAlgebra","Trigonometry","FractionsOnly","Everything","EverythingMinusNavigationPad"];export{i as Default,r as Everything,n as EverythingMinusNavigationPad,t as FractionsOnly,a as PreAlgebra,o as Trigonometry,ne as __namedExportsOrder,re as default}; +import{j as O}from"./jsx-runtime-FVsy8kgq.js";import{a as c}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{I as x}from"./index-VDi1Le_1.js";import{K as F}from"./mobile-keypad-hKjeQGNp.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";const s="Operators Page",l="Numbers Page",S="Geometry Page",I="Fractions Page",re={title:"math-input/Full Keypad",parameters:{backgrounds:{values:[{name:"light background",value:"white",default:!0}]},viewport:{defaultViewport:"iphone6",viewports:x}},component:F,args:{advancedRelations:!1,basicRelations:!1,divisionKey:!1,logarithms:!1,fractionsOnly:!1,convertDotToTimes:!1,preAlgebra:!1,trigonometry:!1,sendEvent:()=>{},onAnalyticsEvent:async()=>{}},argTypes:{advancedRelations:{control:"boolean",table:{category:s}},basicRelations:{control:"boolean",table:{category:s}},divisionKey:{control:"boolean",table:{category:l}},logarithms:{control:"boolean",table:{category:s}},fractionsOnly:{control:"boolean",table:{category:I}},multiplicationDot:{control:"boolean",table:{category:l}},preAlgebra:{control:"boolean",table:{category:s}},trigonometry:{control:"boolean",table:{category:S}}}},e=w=>O(F,{...w,onClickKey:c("onClickKey"),onAnalyticsEvent:async D=>c("onAnalyticsEvent")(D)}),i=e.bind({}),a=e.bind({});a.args={preAlgebra:!0};const o=e.bind({});o.args={preAlgebra:!0,trigonometry:!0};const t=e.bind({});t.args={fractionsOnly:!0};const r=e.bind({});r.args={advancedRelations:!0,basicRelations:!0,divisionKey:!0,logarithms:!0,convertDotToTimes:!1,preAlgebra:!0,trigonometry:!0,expandedView:!0,showDismiss:!0,extraKeys:["a","b","c"]};const n=e.bind({});n.args={advancedRelations:!0,basicRelations:!0,divisionKey:!0,logarithms:!0,convertDotToTimes:!1,preAlgebra:!0,trigonometry:!0,expandedView:!1,showDismiss:!0,extraKeys:["a","b","c"]};var p,y,m;i.parameters={...i.parameters,docs:{...(p=i.parameters)==null?void 0:p.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(m=(y=i.parameters)==null?void 0:y.docs)==null?void 0:m.source}}};var g,d,u;a.parameters={...a.parameters,docs:{...(g=a.parameters)==null?void 0:g.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(u=(d=a.parameters)==null?void 0:d.docs)==null?void 0:u.source}}};var b,v,K;o.parameters={...o.parameters,docs:{...(b=o.parameters)==null?void 0:b.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(K=(v=o.parameters)==null?void 0:v.docs)==null?void 0:K.source}}};var f,E,A;t.parameters={...t.parameters,docs:{...(f=t.parameters)==null?void 0:f.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(A=(E=t.parameters)==null?void 0:E.docs)==null?void 0:A.source}}};var R,P,k;r.parameters={...r.parameters,docs:{...(R=r.parameters)==null?void 0:R.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(k=(P=r.parameters)==null?void 0:P.docs)==null?void 0:k.source}}};var h,C,T;n.parameters={...n.parameters,docs:{...(h=n.parameters)==null?void 0:h.docs,source:{originalSource:'(args: PropsFor): React.ReactElement => action("onAnalyticsEvent")(e)} />',...(T=(C=n.parameters)==null?void 0:C.docs)==null?void 0:T.source}}};const ne=["Default","PreAlgebra","Trigonometry","FractionsOnly","Everything","EverythingMinusNavigationPad"];export{i as Default,r as Everything,n as EverythingMinusNavigationPad,t as FractionsOnly,a as PreAlgebra,o as Trigonometry,ne as __namedExportsOrder,re as default}; diff --git a/assets/full-mobile-input.stories-nmERbKsP.js b/assets/full-mobile-input.stories-nmERbKsP.js index 4b8f0462b9..107b9003e3 100644 --- a/assets/full-mobile-input.stories-nmERbKsP.js +++ b/assets/full-mobile-input.stories-nmERbKsP.js @@ -1,4 +1,4 @@ -import{j as e,a as u}from"./jsx-runtime-FVsy8kgq.js";import{S,a as M,M as T}from"./mobile-keypad-hKjeQGNp.js";import{a as I}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{r}from"./index-TT1qJ6UJ.js";import{M as b}from"./prop-types-3bOVFRDQ.js";import"./key-translator-IA-2V2LV.js";import"./button-assets-txIojR3b.js";import{K as d}from"./enums-x5qaTru7.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./version-akiLXZts.js";import"./invariant-bu5zBsRS.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";const ot={title:"math-input/Full Mobile MathInput",parameters:{backgrounds:{default:"light background",values:[{name:"light background",value:"lightgrey",default:!0}]}}},N=({keypadElement:t,setKeypadElement:a})=>{const[h,v]=r.useState(""),[i,g]=r.useState(!1),[n,y]=r.useState(!0),[m,K]=r.useState(!0),x=r.useRef(null),C=n?"CDOT":"TIMES";return r.useEffect(()=>{t==null||t.configure({keypadType:i?d.EXPRESSION:d.FRACTION,extraKeys:i?["x","y","PI","THETA"]:[],times:n},()=>{})},[t,i,n]),u("div",{style:{padding:"1rem 2rem"},children:[u("div",{children:[e("div",{children:"NOTE: To properly test the input interaction, you will need to simulate a device using the dev tools. MathInput requires touch events (not click events)."}),u("div",{style:{padding:"1rem 0"},children:[e("button",{onClick:()=>g(!i),children:`Use ${i?"Fraction":"Expression"} Keypad`}),e("button",{onClick:()=>K(!m),children:`Use ${m?"Legacy":"New"} Keypad`}),e("button",{onClick:()=>y(!n),children:"Toggle to "+C})]})]}),e(b,{value:h,ref:x,keypadElement:t,onChange:(o,p)=>{v(o),p==null||p()},onFocus:()=>{t==null||t.activate()},onBlur:()=>{t==null||t.dismiss()},ariaLabel:"Mobile input"}),e(T,{onElementMounted:o=>{o&&a(o)},onDismiss:()=>{},onAnalyticsEvent:async o=>I("onAnalyticsEvent")(o)})]})};function s(){return e(S,{children:e(M.Consumer,{children:({keypadElement:t,setKeypadElement:a})=>e(N,{keypadElement:t,setKeypadElement:a})})})}s.__docgenInfo={description:"",methods:[],displayName:"Wrapped"};var c,l,f;s.parameters={...s.parameters,docs:{...(c=s.parameters)==null?void 0:c.docs,source:{originalSource:`function Wrapped() { +import{j as e,a as u}from"./jsx-runtime-FVsy8kgq.js";import{S,a as M,M as T}from"./mobile-keypad-hKjeQGNp.js";import{a as I}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{r}from"./index-TT1qJ6UJ.js";import{M as b}from"./prop-types-3bOVFRDQ.js";import"./key-translator-IA-2V2LV.js";import"./button-assets-txIojR3b.js";import{K as d}from"./enums-x5qaTru7.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./version-akiLXZts.js";import"./invariant-bu5zBsRS.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";const ot={title:"math-input/Full Mobile MathInput",parameters:{backgrounds:{default:"light background",values:[{name:"light background",value:"lightgrey",default:!0}]}}},N=({keypadElement:t,setKeypadElement:a})=>{const[h,v]=r.useState(""),[i,g]=r.useState(!1),[n,y]=r.useState(!0),[m,K]=r.useState(!0),x=r.useRef(null),C=n?"CDOT":"TIMES";return r.useEffect(()=>{t==null||t.configure({keypadType:i?d.EXPRESSION:d.FRACTION,extraKeys:i?["x","y","PI","THETA"]:[],times:n},()=>{})},[t,i,n]),u("div",{style:{padding:"1rem 2rem"},children:[u("div",{children:[e("div",{children:"NOTE: To properly test the input interaction, you will need to simulate a device using the dev tools. MathInput requires touch events (not click events)."}),u("div",{style:{padding:"1rem 0"},children:[e("button",{onClick:()=>g(!i),children:`Use ${i?"Fraction":"Expression"} Keypad`}),e("button",{onClick:()=>K(!m),children:`Use ${m?"Legacy":"New"} Keypad`}),e("button",{onClick:()=>y(!n),children:"Toggle to "+C})]})]}),e(b,{value:h,ref:x,keypadElement:t,onChange:(o,p)=>{v(o),p==null||p()},onFocus:()=>{t==null||t.activate()},onBlur:()=>{t==null||t.dismiss()},ariaLabel:"Mobile input"}),e(T,{onElementMounted:o=>{o&&a(o)},onDismiss:()=>{},onAnalyticsEvent:async o=>I("onAnalyticsEvent")(o)})]})};function s(){return e(S,{children:e(M.Consumer,{children:({keypadElement:t,setKeypadElement:a})=>e(N,{keypadElement:t,setKeypadElement:a})})})}s.__docgenInfo={description:"",methods:[],displayName:"Wrapped"};var c,l,f;s.parameters={...s.parameters,docs:{...(c=s.parameters)==null?void 0:c.docs,source:{originalSource:`function Wrapped() { return {({ diff --git a/assets/graded-group-set.stories-kyCA6Zcs.js b/assets/graded-group-set.stories-kyCA6Zcs.js index 7c4a65da52..a72771f329 100644 --- a/assets/graded-group-set.stories-kyCA6Zcs.js +++ b/assets/graded-group-set.stories-kyCA6Zcs.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{R as s}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const n={content:`#Section 1: Adding tenths less than one +import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{R as s}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const n={content:`#Section 1: Adding tenths less than one [[☃ graded-group-set 1]] diff --git a/assets/graded-group.stories-0-0BkGHZ.js b/assets/graded-group.stories-0-0BkGHZ.js index 8fe8a0c4a7..bd925b1874 100644 --- a/assets/graded-group.stories-0-0BkGHZ.js +++ b/assets/graded-group.stories-0-0BkGHZ.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{R as m}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const a={content:`--- +import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{R as m}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const a={content:`--- ##Check your understanding! diff --git a/assets/graph-settings-LBBYDOUY.js b/assets/graph-settings-LBBYDOUY.js index a11e8fcd6d..79fe923d95 100644 --- a/assets/graph-settings-LBBYDOUY.js +++ b/assets/graph-settings-LBBYDOUY.js @@ -1 +1 @@ -import{j as a,a as o}from"./jsx-runtime-FVsy8kgq.js";import{a as v,p as T,c as k}from"./article-renderer-o95CuJpS.js";import{_ as i}from"./jquery-yG1GhClm.js";import{U as g,K as f}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import{g as w}from"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as y}from"./components-0kNWnYe6.js";import{i as x}from"./constants-I_nlPaPx.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{C as m}from"./index-QCAhLhLD.js";import{P as n}from"./index-0C4KXdeC.js";import{R as N}from"./index-7vsPyIck.js";const{ButtonGroup:R,InfoTip:G,RangeInput:u}=y,C={url:null,width:0,height:0};function I(e,s){return Math.floor((e[1]-e[0])/s)}const F=v({displayName:"GraphSettings",propTypes:{...T,editableSettings:n.arrayOf(n.oneOf(["canvas","graph","snap","image","measure"])),box:n.arrayOf(n.number),labels:n.arrayOf(n.string),range:n.arrayOf(n.arrayOf(n.number)),step:n.arrayOf(n.number),gridStep:n.arrayOf(n.number),snapStep:n.arrayOf(n.number),valid:n.oneOfType([n.bool,n.string]),backgroundImage:n.object,markings:n.oneOf(["graph","grid","none"]),showProtractor:n.bool,showRuler:n.bool,showTooltips:n.bool,rulerLabel:n.string,rulerTicks:n.number},getDefaultProps:function(){return{editableSettings:["graph","snap","image","measure"],box:[x.defaultBoxSizeSmall,x.defaultBoxSizeSmall],labels:["x","y"],range:[[-10,10],[-10,10]],step:[1,1],gridStep:[1,1],snapStep:[1,1],valid:!0,backgroundImage:C,markings:"graph",showProtractor:!1,showRuler:!1,showTooltips:!1,rulerLabel:"",rulerTicks:10}},getInitialState:function(){return this.stateFromProps(this.props)},componentDidMount:function(){this._isMounted=!0,this.changeGraph=i.debounce(this.changeGraph,300)},UNSAFE_componentWillReceiveProps:function(e){(!i.isEqual(this.props.labels,e.labels)||!i.isEqual(this.props.gridStep,e.gridStep)||!i.isEqual(this.props.snapStep,e.snapStep)||!i.isEqual(this.props.step,e.step)||!i.isEqual(this.props.range,e.range)||!i.isEqual(this.props.backgroundImage,e.backgroundImage))&&this.setState(this.stateFromProps(e))},componentWillUnmount:function(){this._isMounted=!1},stateFromProps:function(e){return{labelsTextbox:e.labels,gridStepTextbox:e.gridStep,snapStepTextbox:e.snapStep,stepTextbox:e.step,rangeTextbox:e.range,backgroundImage:i.clone(e.backgroundImage)}},change(...e){return k.apply(this,e)},changeRulerLabel:function(e){this.change({rulerLabel:e.target.value})},changeRulerTicks:function(e){this.change({rulerTicks:+e.target.value})},changeBackgroundUrl:function(e){if(e.type==="keypress"&&e.key!=="Enter")return;const s=(l,c,h)=>{const r=i.clone(this.props.backgroundImage);r.url=l,r.width=c,r.height=h,this.setState({backgroundImage:r},this.changeGraph)},t=N.findDOMNode(this.refs["bg-url"]).value;t?g.getImageSize(t,(l,c)=>{this._isMounted&&s(t,l,c)}):s(null,0,0)},renderLabelChoices:function(e){return i.map(e,function([s,t]){return a("option",{value:t,children:s},t)})},validRange:function(e){return i.every(e,function(t){return i.isFinite(t)})?e[0]>=e[1]?"Range must have a higher number on the right":!0:"Range must be a valid number"},validateStepValue:function(e){const{step:s,range:t,name:l,minTicks:c,maxTicks:h}=e;if(!i.isFinite(s))return l+" must be a valid number";const r=I(t,s);return rh?l+" is too small, there can be at most "+h+" ticks.":!0},validSnapStep:function(e,s){return this.validateStepValue({step:e,range:s,name:"Snap step",minTicks:5,maxTicks:60})},validGridStep:function(e,s){return this.validateStepValue({step:e,range:s,name:"Grid step",minTicks:3,maxTicks:60})},validStep:function(e,s){return this.validateStepValue({step:e,range:s,name:"Step",minTicks:3,maxTicks:20})},validBackgroundImageSize:function(e){return e.url?e.width<=450&&e.height<=450?!0:"Image must be smaller than 450px x 450px.":!0},validateGraphSettings:function(e,s,t,l,c){const h=this;let r;if(!i.every(e,function(p){return r=h.validRange(p),r===!0})||!i.every(s,function(p,d){return r=h.validStep(p,e[d]),r===!0})||!i.every(t,function(p,d){return r=h.validGridStep(p,e[d]),r===!0})||!i.every(l,function(p,d){return r=h.validSnapStep(p,e[d]),r===!0}))return r;const S=this.validBackgroundImageSize(c);return S!==!0?(r=S,r):!0},changeLabel:function(e,s){const t=s.target.value,l=this.state.labelsTextbox.slice();l[e]=t,this.setState({labelsTextbox:l},this.changeGraph)},changeRange:function(e,s){const t=this.state.rangeTextbox.slice();t[e]=s;const l=this.state.stepTextbox.slice(),c=this.state.gridStepTextbox.slice(),h=this.state.snapStepTextbox.slice(),r=g.scaleFromExtent(t[e],this.props.box[e]);this.validRange(t[e])===!0&&(l[e]=g.tickStepFromExtent(t[e],this.props.box[e]),c[e]=g.gridStepFromTickStep(l[e],r),h[e]=c[e]/2),this.setState({stepTextbox:l,gridStepTextbox:c,snapStepTextbox:h,rangeTextbox:t},this.changeGraph)},changeStep:function(e){this.setState({stepTextbox:e},this.changeGraph)},changeSnapStep:function(e){this.setState({snapStepTextbox:e},this.changeGraph)},changeGridStep:function(e){this.setState({gridStepTextbox:e,snapStepTextbox:i.map(e,function(s){return s/2})},this.changeGraph)},changeGraph:function(){const e=this.state.labelsTextbox,s=i.map(this.state.rangeTextbox,function(b){return i.map(b,Number)}),t=i.map(this.state.stepTextbox,Number),l=this.state.gridStepTextbox,c=this.state.snapStepTextbox,h=this.state.backgroundImage,r=this.validateGraphSettings(s,t,l,c,h);r===!0?this.change({valid:!0,labels:e,range:s,step:t,gridStep:l,snapStep:c,backgroundImage:h}):this.change({valid:r})},render:function(){const e=[f.roundTo(2,g.scaleFromExtent(this.props.range[0],this.props.box[0])),f.roundTo(2,g.scaleFromExtent(this.props.range[1],this.props.box[1]))],{TeX:s}=w();return o("div",{children:[i.contains(this.props.editableSettings,"canvas")&&o("div",{className:"graph-settings",children:[o("div",{className:"perseus-widget-row",children:[a("label",{htmlFor:"canvas-size",children:"Canvas size (x,y pixels)"}),a(u,{id:"canvas-size",value:this.props.box,onChange:t=>{this.change({box:t})}})]}),o("div",{className:"perseus-widget-row",children:["Scale (px per div):"," ",a(s,{children:"("+e[0]+", "+e[1]+")"})]})]}),i.contains(this.props.editableSettings,"graph")&&o("div",{className:"graph-settings",children:[o("div",{className:"perseus-widget-row",children:[o("div",{className:"perseus-widget-left-col",children:[a("label",{htmlFor:"labels-x",children:"x Label"}),a("input",{id:"labels-x",type:"text",className:"graph-settings-axis-label",ref:"labels-0",onChange:t=>this.changeLabel(0,t),value:this.state.labelsTextbox[0]||""})]}),o("div",{className:"perseus-widget-right-col",children:[a("label",{htmlFor:"labels-y",children:"y Label"}),a("input",{id:"labels-y",type:"text",className:"graph-settings-axis-label",ref:"labels-1",onChange:t=>this.changeLabel(1,t),value:this.state.labelsTextbox[1]||""})]})]}),o("div",{className:"perseus-widget-row",children:[o("div",{className:"perseus-widget-left-col",children:[a("label",{htmlFor:"range-x",children:"x Range"}),a(u,{id:"range-x",value:this.state.rangeTextbox[0],onChange:t=>this.changeRange(0,t)})]}),o("div",{className:"perseus-widget-right-col",children:[a("label",{htmlFor:"range-y",children:"y Range"}),a(u,{id:"range-y",value:this.state.rangeTextbox[1],onChange:t=>this.changeRange(1,t)})]})]}),o("div",{className:"perseus-widget-row",children:[o("div",{className:"perseus-widget-left-col",children:[a("label",{htmlFor:"tick-step",children:"Tick Step"}),a(u,{id:"tick-step",value:this.state.stepTextbox,onChange:this.changeStep})]}),o("div",{className:"perseus-widget-right-col",children:[a("label",{htmlFor:"grid-step",children:"Grid Step"}),a(u,{id:"grid-step",value:this.state.gridStepTextbox,onChange:this.changeGridStep})]})]}),i.contains(this.props.editableSettings,"snap")&&a("div",{className:"perseus-widget-row",children:o("div",{className:"perseus-widget-left-col",children:[a("label",{htmlFor:"snap-step",children:"Snap Step"}),a(u,{id:"snap-step",value:this.state.snapStepTextbox,onChange:this.changeSnapStep})]})}),o("div",{className:"perseus-widget-row",children:[a("label",{children:"Markings: "}),a(R,{value:this.props.markings,allowEmpty:!1,buttons:[{value:"graph",content:"Graph"},{value:"grid",content:"Grid"},{value:"none",content:"None"}],onChange:this.change("markings")})]}),a("div",{className:"perseus-widget-left-col",children:a(m,{label:"Show tooltips",checked:this.props.showTooltips,onChange:t=>{this.change({showTooltips:t})}})})]}),i.contains(this.props.editableSettings,"image")&&o("div",{className:"image-settings",children:[a("div",{children:"Background image:"}),o("div",{children:[a("label",{htmlFor:"bg-url",children:"Url:"}),a("input",{id:"bg-url",type:"text",className:"graph-settings-background-url",ref:"bg-url",value:this.state.backgroundImage.url||"",onChange:t=>{const l=i.clone(this.props.backgroundImage);l.url=t.target.value,this.setState({backgroundImage:l})},onKeyPress:this.changeBackgroundUrl,onBlur:this.changeBackgroundUrl}),a(G,{children:a("p",{children:'Create an image in graphie, or use the "Add image" function to create a background.'})})]})]}),i.contains(this.props.editableSettings,"measure")&&o("div",{className:"misc-settings",children:[o("div",{className:"perseus-widget-row",children:[a("div",{className:"perseus-widget-left-col",children:a(m,{label:"Show ruler",checked:this.props.showRuler,onChange:t=>{this.change({showRuler:t})}})}),a("div",{className:"perseus-widget-right-col",children:a(m,{label:"Show protractor",checked:this.props.showProtractor,onChange:t=>{this.change({showProtractor:t})}})})]}),this.props.showRuler&&o("div",{children:[a("div",{children:o("label",{children:[" ","Ruler label:"," ",o("select",{onChange:this.changeRulerLabel,value:this.props.rulerLabel,children:[a("option",{value:"",children:"None"}),a("optgroup",{label:"Metric",children:this.renderLabelChoices([["milimeters","mm"],["centimeters","cm"],["meters","m"],["kilometers","km"]])}),a("optgroup",{label:"Imperial",children:this.renderLabelChoices([["inches","in"],["feet","ft"],["yards","yd"],["miles","mi"]])})]})]})}),a("div",{children:o("label",{children:[" ","Ruler ticks:"," ",a("select",{onChange:this.changeRulerTicks,value:this.props.rulerTicks,children:i.map([1,2,4,8,10,16],function(t){return a("option",{value:t,children:t},t)})})]})})]})]})]})}}),te=F;export{te as G}; +import{j as a,a as o}from"./jsx-runtime-FVsy8kgq.js";import{a as v,p as T,c as k}from"./article-renderer-o95CuJpS.js";import{_ as i}from"./jquery-yG1GhClm.js";import{U as g,K as f}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import{g as w}from"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as y}from"./components-0kNWnYe6.js";import{i as x}from"./constants-I_nlPaPx.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{C as m}from"./index-QCAhLhLD.js";import{P as n}from"./index-k-0mNqHS.js";import{R as N}from"./index-7vsPyIck.js";const{ButtonGroup:R,InfoTip:G,RangeInput:u}=y,C={url:null,width:0,height:0};function I(e,s){return Math.floor((e[1]-e[0])/s)}const F=v({displayName:"GraphSettings",propTypes:{...T,editableSettings:n.arrayOf(n.oneOf(["canvas","graph","snap","image","measure"])),box:n.arrayOf(n.number),labels:n.arrayOf(n.string),range:n.arrayOf(n.arrayOf(n.number)),step:n.arrayOf(n.number),gridStep:n.arrayOf(n.number),snapStep:n.arrayOf(n.number),valid:n.oneOfType([n.bool,n.string]),backgroundImage:n.object,markings:n.oneOf(["graph","grid","none"]),showProtractor:n.bool,showRuler:n.bool,showTooltips:n.bool,rulerLabel:n.string,rulerTicks:n.number},getDefaultProps:function(){return{editableSettings:["graph","snap","image","measure"],box:[x.defaultBoxSizeSmall,x.defaultBoxSizeSmall],labels:["x","y"],range:[[-10,10],[-10,10]],step:[1,1],gridStep:[1,1],snapStep:[1,1],valid:!0,backgroundImage:C,markings:"graph",showProtractor:!1,showRuler:!1,showTooltips:!1,rulerLabel:"",rulerTicks:10}},getInitialState:function(){return this.stateFromProps(this.props)},componentDidMount:function(){this._isMounted=!0,this.changeGraph=i.debounce(this.changeGraph,300)},UNSAFE_componentWillReceiveProps:function(e){(!i.isEqual(this.props.labels,e.labels)||!i.isEqual(this.props.gridStep,e.gridStep)||!i.isEqual(this.props.snapStep,e.snapStep)||!i.isEqual(this.props.step,e.step)||!i.isEqual(this.props.range,e.range)||!i.isEqual(this.props.backgroundImage,e.backgroundImage))&&this.setState(this.stateFromProps(e))},componentWillUnmount:function(){this._isMounted=!1},stateFromProps:function(e){return{labelsTextbox:e.labels,gridStepTextbox:e.gridStep,snapStepTextbox:e.snapStep,stepTextbox:e.step,rangeTextbox:e.range,backgroundImage:i.clone(e.backgroundImage)}},change(...e){return k.apply(this,e)},changeRulerLabel:function(e){this.change({rulerLabel:e.target.value})},changeRulerTicks:function(e){this.change({rulerTicks:+e.target.value})},changeBackgroundUrl:function(e){if(e.type==="keypress"&&e.key!=="Enter")return;const s=(l,c,h)=>{const r=i.clone(this.props.backgroundImage);r.url=l,r.width=c,r.height=h,this.setState({backgroundImage:r},this.changeGraph)},t=N.findDOMNode(this.refs["bg-url"]).value;t?g.getImageSize(t,(l,c)=>{this._isMounted&&s(t,l,c)}):s(null,0,0)},renderLabelChoices:function(e){return i.map(e,function([s,t]){return a("option",{value:t,children:s},t)})},validRange:function(e){return i.every(e,function(t){return i.isFinite(t)})?e[0]>=e[1]?"Range must have a higher number on the right":!0:"Range must be a valid number"},validateStepValue:function(e){const{step:s,range:t,name:l,minTicks:c,maxTicks:h}=e;if(!i.isFinite(s))return l+" must be a valid number";const r=I(t,s);return rh?l+" is too small, there can be at most "+h+" ticks.":!0},validSnapStep:function(e,s){return this.validateStepValue({step:e,range:s,name:"Snap step",minTicks:5,maxTicks:60})},validGridStep:function(e,s){return this.validateStepValue({step:e,range:s,name:"Grid step",minTicks:3,maxTicks:60})},validStep:function(e,s){return this.validateStepValue({step:e,range:s,name:"Step",minTicks:3,maxTicks:20})},validBackgroundImageSize:function(e){return e.url?e.width<=450&&e.height<=450?!0:"Image must be smaller than 450px x 450px.":!0},validateGraphSettings:function(e,s,t,l,c){const h=this;let r;if(!i.every(e,function(p){return r=h.validRange(p),r===!0})||!i.every(s,function(p,d){return r=h.validStep(p,e[d]),r===!0})||!i.every(t,function(p,d){return r=h.validGridStep(p,e[d]),r===!0})||!i.every(l,function(p,d){return r=h.validSnapStep(p,e[d]),r===!0}))return r;const S=this.validBackgroundImageSize(c);return S!==!0?(r=S,r):!0},changeLabel:function(e,s){const t=s.target.value,l=this.state.labelsTextbox.slice();l[e]=t,this.setState({labelsTextbox:l},this.changeGraph)},changeRange:function(e,s){const t=this.state.rangeTextbox.slice();t[e]=s;const l=this.state.stepTextbox.slice(),c=this.state.gridStepTextbox.slice(),h=this.state.snapStepTextbox.slice(),r=g.scaleFromExtent(t[e],this.props.box[e]);this.validRange(t[e])===!0&&(l[e]=g.tickStepFromExtent(t[e],this.props.box[e]),c[e]=g.gridStepFromTickStep(l[e],r),h[e]=c[e]/2),this.setState({stepTextbox:l,gridStepTextbox:c,snapStepTextbox:h,rangeTextbox:t},this.changeGraph)},changeStep:function(e){this.setState({stepTextbox:e},this.changeGraph)},changeSnapStep:function(e){this.setState({snapStepTextbox:e},this.changeGraph)},changeGridStep:function(e){this.setState({gridStepTextbox:e,snapStepTextbox:i.map(e,function(s){return s/2})},this.changeGraph)},changeGraph:function(){const e=this.state.labelsTextbox,s=i.map(this.state.rangeTextbox,function(b){return i.map(b,Number)}),t=i.map(this.state.stepTextbox,Number),l=this.state.gridStepTextbox,c=this.state.snapStepTextbox,h=this.state.backgroundImage,r=this.validateGraphSettings(s,t,l,c,h);r===!0?this.change({valid:!0,labels:e,range:s,step:t,gridStep:l,snapStep:c,backgroundImage:h}):this.change({valid:r})},render:function(){const e=[f.roundTo(2,g.scaleFromExtent(this.props.range[0],this.props.box[0])),f.roundTo(2,g.scaleFromExtent(this.props.range[1],this.props.box[1]))],{TeX:s}=w();return o("div",{children:[i.contains(this.props.editableSettings,"canvas")&&o("div",{className:"graph-settings",children:[o("div",{className:"perseus-widget-row",children:[a("label",{htmlFor:"canvas-size",children:"Canvas size (x,y pixels)"}),a(u,{id:"canvas-size",value:this.props.box,onChange:t=>{this.change({box:t})}})]}),o("div",{className:"perseus-widget-row",children:["Scale (px per div):"," ",a(s,{children:"("+e[0]+", "+e[1]+")"})]})]}),i.contains(this.props.editableSettings,"graph")&&o("div",{className:"graph-settings",children:[o("div",{className:"perseus-widget-row",children:[o("div",{className:"perseus-widget-left-col",children:[a("label",{htmlFor:"labels-x",children:"x Label"}),a("input",{id:"labels-x",type:"text",className:"graph-settings-axis-label",ref:"labels-0",onChange:t=>this.changeLabel(0,t),value:this.state.labelsTextbox[0]||""})]}),o("div",{className:"perseus-widget-right-col",children:[a("label",{htmlFor:"labels-y",children:"y Label"}),a("input",{id:"labels-y",type:"text",className:"graph-settings-axis-label",ref:"labels-1",onChange:t=>this.changeLabel(1,t),value:this.state.labelsTextbox[1]||""})]})]}),o("div",{className:"perseus-widget-row",children:[o("div",{className:"perseus-widget-left-col",children:[a("label",{htmlFor:"range-x",children:"x Range"}),a(u,{id:"range-x",value:this.state.rangeTextbox[0],onChange:t=>this.changeRange(0,t)})]}),o("div",{className:"perseus-widget-right-col",children:[a("label",{htmlFor:"range-y",children:"y Range"}),a(u,{id:"range-y",value:this.state.rangeTextbox[1],onChange:t=>this.changeRange(1,t)})]})]}),o("div",{className:"perseus-widget-row",children:[o("div",{className:"perseus-widget-left-col",children:[a("label",{htmlFor:"tick-step",children:"Tick Step"}),a(u,{id:"tick-step",value:this.state.stepTextbox,onChange:this.changeStep})]}),o("div",{className:"perseus-widget-right-col",children:[a("label",{htmlFor:"grid-step",children:"Grid Step"}),a(u,{id:"grid-step",value:this.state.gridStepTextbox,onChange:this.changeGridStep})]})]}),i.contains(this.props.editableSettings,"snap")&&a("div",{className:"perseus-widget-row",children:o("div",{className:"perseus-widget-left-col",children:[a("label",{htmlFor:"snap-step",children:"Snap Step"}),a(u,{id:"snap-step",value:this.state.snapStepTextbox,onChange:this.changeSnapStep})]})}),o("div",{className:"perseus-widget-row",children:[a("label",{children:"Markings: "}),a(R,{value:this.props.markings,allowEmpty:!1,buttons:[{value:"graph",content:"Graph"},{value:"grid",content:"Grid"},{value:"none",content:"None"}],onChange:this.change("markings")})]}),a("div",{className:"perseus-widget-left-col",children:a(m,{label:"Show tooltips",checked:this.props.showTooltips,onChange:t=>{this.change({showTooltips:t})}})})]}),i.contains(this.props.editableSettings,"image")&&o("div",{className:"image-settings",children:[a("div",{children:"Background image:"}),o("div",{children:[a("label",{htmlFor:"bg-url",children:"Url:"}),a("input",{id:"bg-url",type:"text",className:"graph-settings-background-url",ref:"bg-url",value:this.state.backgroundImage.url||"",onChange:t=>{const l=i.clone(this.props.backgroundImage);l.url=t.target.value,this.setState({backgroundImage:l})},onKeyPress:this.changeBackgroundUrl,onBlur:this.changeBackgroundUrl}),a(G,{children:a("p",{children:'Create an image in graphie, or use the "Add image" function to create a background.'})})]})]}),i.contains(this.props.editableSettings,"measure")&&o("div",{className:"misc-settings",children:[o("div",{className:"perseus-widget-row",children:[a("div",{className:"perseus-widget-left-col",children:a(m,{label:"Show ruler",checked:this.props.showRuler,onChange:t=>{this.change({showRuler:t})}})}),a("div",{className:"perseus-widget-right-col",children:a(m,{label:"Show protractor",checked:this.props.showProtractor,onChange:t=>{this.change({showProtractor:t})}})})]}),this.props.showRuler&&o("div",{children:[a("div",{children:o("label",{children:[" ","Ruler label:"," ",o("select",{onChange:this.changeRulerLabel,value:this.props.rulerLabel,children:[a("option",{value:"",children:"None"}),a("optgroup",{label:"Metric",children:this.renderLabelChoices([["milimeters","mm"],["centimeters","cm"],["meters","m"],["kilometers","km"]])}),a("optgroup",{label:"Imperial",children:this.renderLabelChoices([["inches","in"],["feet","ft"],["yards","yd"],["miles","mi"]])})]})]})}),a("div",{children:o("label",{children:[" ","Ruler ticks:"," ",a("select",{onChange:this.changeRulerTicks,value:this.props.rulerTicks,children:i.map([1,2,4,8,10,16],function(t){return a("option",{value:t,children:t},t)})})]})})]})]})]})}}),te=F;export{te as G}; diff --git a/assets/graph-settings.stories-nmay4LcO.js b/assets/graph-settings.stories-nmay4LcO.js index 404223b301..d6c1519086 100644 --- a/assets/graph-settings.stories-nmay4LcO.js +++ b/assets/graph-settings.stories-nmay4LcO.js @@ -1,3 +1,3 @@ -import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{G as i}from"./graph-settings-LBBYDOUY.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";const a={editableSettings:{control:{type:"array",options:["canvas","graph","snap","image","measure"]}},box:{control:{type:"array"}},range:{control:{type:"object"}},labels:{control:{type:"object"}},step:{control:{type:"object"}},gridStep:{control:{type:"object"}},snapStep:{control:{type:"object"}},valid:{control:{type:"text"}},backgroundImage:{control:{type:"object"}},markings:{control:{type:"select"},table:{type:{summary:'"graph" | "grid" | "none"'}},type:{name:"enum",value:["graph","grid","none"],required:!1}},rulerLabel:{control:{type:"text"}},rulerTicks:{control:{type:"number"}},showTooltips:{control:{type:"boolean"}},onChange:{control:{type:"function"}}},Yt={title:"PerseusEditor/Components/Graph Settings",component:i,argTypes:a},t=m=>e(i,{...m});t.args={range:[[-10,10],[-10,10]]};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var r,o,p;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{G as i}from"./graph-settings-LBBYDOUY.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";const a={editableSettings:{control:{type:"array",options:["canvas","graph","snap","image","measure"]}},box:{control:{type:"array"}},range:{control:{type:"object"}},labels:{control:{type:"object"}},step:{control:{type:"object"}},gridStep:{control:{type:"object"}},snapStep:{control:{type:"object"}},valid:{control:{type:"text"}},backgroundImage:{control:{type:"object"}},markings:{control:{type:"select"},table:{type:{summary:'"graph" | "grid" | "none"'}},type:{name:"enum",value:["graph","grid","none"],required:!1}},rulerLabel:{control:{type:"text"}},rulerTicks:{control:{type:"number"}},showTooltips:{control:{type:"boolean"}},onChange:{control:{type:"function"}}},Yt={title:"PerseusEditor/Components/Graph Settings",component:i,argTypes:a},t=m=>e(i,{...m});t.args={range:[[-10,10],[-10,10]]};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var r,o,p;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(p=(o=t.parameters)==null?void 0:o.docs)==null?void 0:p.source}}};const Zt=["Default"];export{t as Default,Zt as __namedExportsOrder,Yt as default}; diff --git a/assets/grapher.stories-dDPRW5-o.js b/assets/grapher.stories-dDPRW5-o.js index 902a430e6a..8ec54d7008 100644 --- a/assets/grapher.stories-dDPRW5-o.js +++ b/assets/grapher.stories-dDPRW5-o.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{R as r}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const A={content:`The graph of the function $h(x)=2|x|$ is shown on the grid below. +import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{R as r}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const A={content:`The graph of the function $h(x)=2|x|$ is shown on the grid below. **Graph the function $f(x)=2|x-8|+1$ in the interactive graph. ** diff --git a/assets/graphie.stories-T0Om1gnV.js b/assets/graphie.stories-T0Om1gnV.js index 684a316f7d..064e811ddd 100644 --- a/assets/graphie.stories-T0Om1gnV.js +++ b/assets/graphie.stories-T0Om1gnV.js @@ -1,4 +1,4 @@ -import{j as c}from"./jsx-runtime-FVsy8kgq.js";import{S as d}from"./server-item-renderer-with-debug-ui-G785FGTt.js";import{I as u}from"./article-renderer-o95CuJpS.js";import{a as g}from"./svg-image-Rjw-_QTV.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-8XILypbq.js";import"./multi-renderer-Nglq5SzN.js";import"./renderer-4_U4OAry.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./hints-renderer-GjKFBH8K.js";import"./shared-3pf9YZIg.js";import"./base-radio-sE9E2UC2.js";import"./choice-none-above-o4v4BTO3.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./ke-score-ui-xy7p6xf5.js";import"./side-by-side-kpK-8vW0.js";import"./test-dependencies-3HLxfOjs.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./enums-x5qaTru7.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./answer-choices-vbrLThK4.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./video-transcript-link-WVgIZGhp.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";const h={answerArea:Object.fromEntries(u.map(i=>[i,!1])),hints:[],itemDataVersion:{major:0,minor:1},question:{content:"[[☃ image 1]]",images:{},widgets:{"image 1":{alignment:"block",graded:!0,options:{alt:"This chart presents a pie graph divided into 2 sectors: 28 percent are unsuccessful and 72 percent are successful.",backgroundImage:{height:210,url:"web+graphie://cdn.kastatic.org/ka-perseus-graphie/7c0a5afb8670fad738df800ffe16c5e516b48777",width:210},box:[210,210],caption:"Source: NASA “Current and Past Missions”",labels:[],range:[[0,10],[0,10]],static:!1,title:"Percentage of Successful Cometary Missions (1978-2014)"},static:!1,type:"image",version:{major:0,minor:0}}}},answer:null},o=200,pt={title:"Perseus/Components/Graphie"},r=i=>c(g,{box:[o,o],setDrawingAreaAvailable:()=>{},setup:()=>{}}),t=i=>c(d,{item:h});r.__docgenInfo={description:"",methods:[],displayName:"SquareBoxSizeAndOtherwiseEmpty"};t.__docgenInfo={description:"",methods:[],displayName:"PieChartGraphieLabels"};var e,m,p;r.parameters={...r.parameters,docs:{...(e=r.parameters)==null?void 0:e.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as c}from"./jsx-runtime-FVsy8kgq.js";import{S as d}from"./server-item-renderer-with-debug-ui-G785FGTt.js";import{I as u}from"./article-renderer-o95CuJpS.js";import{a as g}from"./svg-image-Rjw-_QTV.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-8XILypbq.js";import"./multi-renderer-Nglq5SzN.js";import"./renderer-4_U4OAry.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./hints-renderer-GjKFBH8K.js";import"./shared-3pf9YZIg.js";import"./base-radio-sE9E2UC2.js";import"./choice-none-above-o4v4BTO3.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./ke-score-ui-xy7p6xf5.js";import"./side-by-side-kpK-8vW0.js";import"./test-dependencies-3HLxfOjs.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./enums-x5qaTru7.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./answer-choices-vbrLThK4.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./video-transcript-link-WVgIZGhp.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";const h={answerArea:Object.fromEntries(u.map(i=>[i,!1])),hints:[],itemDataVersion:{major:0,minor:1},question:{content:"[[☃ image 1]]",images:{},widgets:{"image 1":{alignment:"block",graded:!0,options:{alt:"This chart presents a pie graph divided into 2 sectors: 28 percent are unsuccessful and 72 percent are successful.",backgroundImage:{height:210,url:"web+graphie://cdn.kastatic.org/ka-perseus-graphie/7c0a5afb8670fad738df800ffe16c5e516b48777",width:210},box:[210,210],caption:"Source: NASA “Current and Past Missions”",labels:[],range:[[0,10],[0,10]],static:!1,title:"Percentage of Successful Cometary Missions (1978-2014)"},static:!1,type:"image",version:{major:0,minor:0}}}},answer:null},o=200,pt={title:"Perseus/Components/Graphie"},r=i=>c(g,{box:[o,o],setDrawingAreaAvailable:()=>{},setup:()=>{}}),t=i=>c(d,{item:h});r.__docgenInfo={description:"",methods:[],displayName:"SquareBoxSizeAndOtherwiseEmpty"};t.__docgenInfo={description:"",methods:[],displayName:"PieChartGraphieLabels"};var e,m,p;r.parameters={...r.parameters,docs:{...(e=r.parameters)==null?void 0:e.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return {}} setup={() => {}} />; }`,...(p=(m=r.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};var a,s,n;t.parameters={...t.parameters,docs:{...(a=t.parameters)==null?void 0:a.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/group.stories-kxv9L3Cs.js b/assets/group.stories-kxv9L3Cs.js index c9bac086b5..2ba3f1febf 100644 --- a/assets/group.stories-kxv9L3Cs.js +++ b/assets/group.stories-kxv9L3Cs.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{R as n}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const a={content:`![](https://ka-perseus-graphie.s3.amazonaws.com/3e6d0981127dea205c2becc0ead24702fbe862a1.png) +import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{R as n}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const a={content:`![](https://ka-perseus-graphie.s3.amazonaws.com/3e6d0981127dea205c2becc0ead24702fbe862a1.png) ===== diff --git a/assets/hints-renderer.stories-7y20-3N4.js b/assets/hints-renderer.stories-7y20-3N4.js index f28b31ff91..01301dedcc 100644 --- a/assets/hints-renderer.stories-7y20-3N4.js +++ b/assets/hints-renderer.stories-7y20-3N4.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{V as Y}from"./index-6h5t6F0w.js";import{H as Z}from"./hints-renderer-GjKFBH8K.js";import{i as e}from"./interactive-graph-question-builder-kDutykZc.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./index-deFLJwr4.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";const Ee={title:"Perseus/Renderers/Hints Renderer",component:Z,decorators:[X=>m(Y,{style:{left:80},children:m(X,{})})],argTypes:{hintsVisible:{control:{min:0},defaultValue:3}}},r={args:{hints:[{content:"this is hint 1",images:{},replace:!1,widgets:{}},{content:"this is hint 2",images:{},replace:!1,widgets:{}},{content:"this is hint 3",images:{},replace:!1,widgets:{}}]}},i={args:{apiOptions:{flags:{mafs:{angle:!0,circle:!0,linear:!0,"linear-system":!0,point:!0,polygon:!0,ray:!0,segment:!0,quadratic:!0,sinusoid:!0}}},hints:[{...e().withAngle().build(),replace:!1},{...e().withCircle().build(),replace:!1},{...e().withLinear().build(),replace:!1},{...e().withLinearSystem().build(),replace:!1},{...e().withPoints(3).build(),replace:!1},{...e().withPolygon().build(),replace:!1},{...e().withRay().build(),replace:!1},{...e().withSegments().build(),replace:!1},{...e().withQuadratic().build(),replace:!1},{...e().withSinusoid().build(),replace:!1}]}},a={args:{apiOptions:{flags:{mafs:{segment:!0}}},hints:[{...e().build(),replace:!1}]}},n={args:{apiOptions:{flags:{mafs:{linear:!0}}},hints:[{...e().withLinear().build(),replace:!1}]}},t={args:{apiOptions:{flags:{mafs:{"linear-system":!0}}},hints:[{...e().withLinearSystem().build(),replace:!1}]}},s={args:{apiOptions:{flags:{mafs:{ray:!0}}},hints:[{...e().withRay().build(),replace:!1}]}},l={args:{apiOptions:{flags:{mafs:{circle:!0}}},hints:[{...e().withCircle().build(),replace:!1}]}},o={args:{apiOptions:{flags:{mafs:{quadratic:!0}}},hints:[{...e().withQuadratic().build(),replace:!1}]}},p={args:{apiOptions:{flags:{mafs:{circle:!0}}},hints:[{...e().withSinusoid().build(),replace:!1}]}},c={args:{apiOptions:{flags:{mafs:{polygon:!0}}},hints:[{...e().withPolygon().build(),replace:!1},{...e().withPolygon("angles").build(),replace:!1},{...e().withPolygon("sides").build(),replace:!1}]}},u={args:{apiOptions:{flags:{mafs:{point:!0}}},hints:[{...e().withPoints(3).build(),replace:!1}]}},h={args:{apiOptions:{flags:{mafs:{angle:!0}}},hints:[{...e().withAngle().build(),replace:!1}]}};var d,g,f;r.parameters={...r.parameters,docs:{...(d=r.parameters)==null?void 0:d.docs,source:{originalSource:`{ +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{V as Y}from"./index-6h5t6F0w.js";import{H as Z}from"./hints-renderer-GjKFBH8K.js";import{i as e}from"./interactive-graph-question-builder-kDutykZc.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./index-deFLJwr4.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";const Ee={title:"Perseus/Renderers/Hints Renderer",component:Z,decorators:[X=>m(Y,{style:{left:80},children:m(X,{})})],argTypes:{hintsVisible:{control:{min:0},defaultValue:3}}},r={args:{hints:[{content:"this is hint 1",images:{},replace:!1,widgets:{}},{content:"this is hint 2",images:{},replace:!1,widgets:{}},{content:"this is hint 3",images:{},replace:!1,widgets:{}}]}},i={args:{apiOptions:{flags:{mafs:{angle:!0,circle:!0,linear:!0,"linear-system":!0,point:!0,polygon:!0,ray:!0,segment:!0,quadratic:!0,sinusoid:!0}}},hints:[{...e().withAngle().build(),replace:!1},{...e().withCircle().build(),replace:!1},{...e().withLinear().build(),replace:!1},{...e().withLinearSystem().build(),replace:!1},{...e().withPoints(3).build(),replace:!1},{...e().withPolygon().build(),replace:!1},{...e().withRay().build(),replace:!1},{...e().withSegments().build(),replace:!1},{...e().withQuadratic().build(),replace:!1},{...e().withSinusoid().build(),replace:!1}]}},a={args:{apiOptions:{flags:{mafs:{segment:!0}}},hints:[{...e().build(),replace:!1}]}},n={args:{apiOptions:{flags:{mafs:{linear:!0}}},hints:[{...e().withLinear().build(),replace:!1}]}},t={args:{apiOptions:{flags:{mafs:{"linear-system":!0}}},hints:[{...e().withLinearSystem().build(),replace:!1}]}},s={args:{apiOptions:{flags:{mafs:{ray:!0}}},hints:[{...e().withRay().build(),replace:!1}]}},l={args:{apiOptions:{flags:{mafs:{circle:!0}}},hints:[{...e().withCircle().build(),replace:!1}]}},o={args:{apiOptions:{flags:{mafs:{quadratic:!0}}},hints:[{...e().withQuadratic().build(),replace:!1}]}},p={args:{apiOptions:{flags:{mafs:{circle:!0}}},hints:[{...e().withSinusoid().build(),replace:!1}]}},c={args:{apiOptions:{flags:{mafs:{polygon:!0}}},hints:[{...e().withPolygon().build(),replace:!1},{...e().withPolygon("angles").build(),replace:!1},{...e().withPolygon("sides").build(),replace:!1}]}},u={args:{apiOptions:{flags:{mafs:{point:!0}}},hints:[{...e().withPoints(3).build(),replace:!1}]}},h={args:{apiOptions:{flags:{mafs:{angle:!0}}},hints:[{...e().withAngle().build(),replace:!1}]}};var d,g,f;r.parameters={...r.parameters,docs:{...(d=r.parameters)==null?void 0:d.docs,source:{originalSource:`{ args: { hints: [{ content: "this is hint 1", diff --git a/assets/iframe-xIQlSkwS.js b/assets/iframe-xIQlSkwS.js index a4f10ec322..1ef6c82470 100644 --- a/assets/iframe-xIQlSkwS.js +++ b/assets/iframe-xIQlSkwS.js @@ -1,7 +1,7 @@ import"../sb-preview/runtime.js";(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))p(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const r of t.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&p(r)}).observe(document,{childList:!0,subtree:!0});function a(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function p(e){if(e.ep)return;e.ep=!0;const t=a(e);fetch(e.href,t)}})();const l="modulepreload",g=function(_,i){return new URL(_,i).href},d={},s=function(i,a,p){let e=Promise.resolve();if(a&&a.length>0){const t=document.getElementsByTagName("link");e=Promise.all(a.map(r=>{if(r=g(r,p),r in d)return;d[r]=!0;const c=r.endsWith(".css"),E=c?'[rel="stylesheet"]':"";if(!!p)for(let m=t.length-1;m>=0;m--){const u=t[m];if(u.href===r&&(!c||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${E}`))return;const o=document.createElement("link");if(o.rel=c?"stylesheet":l,c||(o.as="script",o.crossOrigin=""),o.href=r,document.head.appendChild(o),c)return new Promise((m,u)=>{o.addEventListener("load",m),o.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${r}`)))})}))}return e.then(()=>i()).catch(t=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=t,window.dispatchEvent(r),!r.defaultPrevented)throw t})},{createBrowserChannel:O}=__STORYBOOK_MODULE_CHANNELS__,{addons:v}=__STORYBOOK_MODULE_PREVIEW_API__,n=O({page:"preview"});v.setChannel(n);window.__STORYBOOK_ADDONS_CHANNEL__=n;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=n);const R={"./packages/math-input/src/components/keypad/keypad-button.stories.tsx":async()=>s(()=>import("./keypad-button.stories-tDGMB8WS.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url),"./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx":async()=>s(()=>import("./keypad-mathquill.stories-f3PwEzb7.js"),__vite__mapDeps([15,1,2,3,16,10,11,17,18,19,12,13,20,14,21,22,23,7,24,25,26,27,9,8,28,29,30,31]),import.meta.url),"./packages/math-input/src/components/keypad/keypad-pages/keypad-pages.stories.tsx":async()=>s(()=>import("./keypad-pages.stories-UYZo0hoJ.js"),__vite__mapDeps([32,1,2,3,4,5,6,33,28,7,8,9,10,11,12,13,14]),import.meta.url),"./packages/math-input/src/components/keypad/navigation-pad.stories.tsx":async()=>s(()=>import("./navigation-pad.stories-qTnieBG4.js"),__vite__mapDeps([34,1,2,3,4,5,6,29,10,11,14,7,9,12,13]),import.meta.url),"./packages/math-input/src/components/tabbar/tabbar.stories.tsx":async()=>s(()=>import("./tabbar.stories-XOe59aSK.js"),__vite__mapDeps([35,1,2,3,26,10,11,27,9,12,13,14]),import.meta.url),"./packages/math-input/src/components/tabbar/tabbaritem.stories.tsx":async()=>s(()=>import("./tabbaritem.stories-mdibAqRo.js"),__vite__mapDeps([36,27,1,2,3,9,10,11,12,13,14]),import.meta.url),"./packages/math-input/src/full-keypad.stories.tsx":async()=>s(()=>import("./full-keypad.stories-GPmJXYWw.js"),__vite__mapDeps([37,1,2,3,4,5,6,33,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29]),import.meta.url),"./packages/math-input/src/full-mobile-input.stories.tsx":async()=>s(()=>import("./full-mobile-input.stories-nmERbKsP.js"),__vite__mapDeps([38,1,2,3,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,4,5,6,39,40,30,31,41,42,43]),import.meta.url),"./packages/perseus-editor/src/__stories__/article-editor.stories.tsx":async()=>s(()=>import("./article-editor.stories-pGtSApHs.js"),__vite__mapDeps([44,1,2,3,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166]),import.meta.url),"./packages/perseus-editor/src/__stories__/content-preview.stories.tsx":async()=>s(()=>import("./content-preview.stories-64c0o_I7.js"),__vite__mapDeps([167,1,2,3,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,168,169,112,113,170,111,171]),import.meta.url),"./packages/perseus-editor/src/__stories__/editor-page.stories.tsx":async()=>s(()=>import("./editor-page.stories-f5GLxGWU.js"),__vite__mapDeps([172,1,2,3,114,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,115,111,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,173,4,5,6,174,170,113,112,175,176]),import.meta.url),"./packages/perseus-editor/src/__stories__/editor.stories.tsx":async()=>s(()=>import("./editor.stories-SCDv_rUh.js"),__vite__mapDeps([177,1,2,3,10,11,4,5,6,178,40,110,45,46,47,39,24,17,21,25,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,170,179,180,181,174,175,182,171,183,176]),import.meta.url),"./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx":async()=>s(()=>import("./interactive-graph-editor.stories-RstKQZMc.js"),__vite__mapDeps([184,1,2,3,10,11,85,14,23,4,5,6,178,40,110,45,46,47,39,24,17,21,25,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,170,179,180,181,174,175,182,171,185,186,173,176]),import.meta.url),"./packages/perseus-editor/src/__stories__/item-editor.stories.tsx":async()=>s(()=>import("./item-editor.stories-tLpgVM79.js"),__vite__mapDeps([187,1,2,3,175,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,171]),import.meta.url),"./packages/perseus-editor/src/__stories__/tex-error-view.stories.tsx":async()=>s(()=>import("./tex-error-view.stories-vwGgGZvn.js"),__vite__mapDeps([188,124,1,2,3,10,11,125,69]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/blur-input.stories.tsx":async()=>s(()=>import("./blur-input.stories-6PTTWtP8.js"),__vite__mapDeps([189,1,2,3,4,5,6,118]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/color-select.stories.tsx":async()=>s(()=>import("./color-select.stories-mNqFLHPY.js"),__vite__mapDeps([190,1,2,3,142,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,143]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/color-swatch.stories.tsx":async()=>s(()=>import("./color-swatch.stories--rQT3YkY.js"),__vite__mapDeps([191,1,2,3,143,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/device-framer.stories.tsx":async()=>s(()=>import("./device-framer.stories-8Ab3hVpr.js"),__vite__mapDeps([192,1,2,3,121,14,112,45,46,40,47,39,24,11,17,21,25,10,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,113]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/graph-settings.stories.tsx":async()=>s(()=>import("./graph-settings.stories-nmay4LcO.js"),__vite__mapDeps([193,1,2,3,129,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,117]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.stories.tsx":async()=>s(()=>import("./interactive-graph-settings.stories-1FqvCDej.js"),__vite__mapDeps([194,1,2,3,135,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,134,123,125,195]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-ellipse-settings.stories.tsx":async()=>s(()=>import("./locked-ellipse-settings.stories-vorDLiC2.js"),__vite__mapDeps([196,1,2,3,137,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,138,139,140,141,142,143,144,145]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-figures-section.stories.tsx":async()=>s(()=>import("./locked-figures-section.stories-0h1kV5Lj.js"),__vite__mapDeps([197,1,2,3,10,11,14,136,83,12,13,20,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,134,123,125,93,77,48,40,46,25,50,51,52,53,55,58,59,60,61,66,67,137,45,39,24,26,27,9,7,8,28,29,30,31,42,43,68,72,74,75,76,78,79,80,82,90,91,92,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-function-settings.stories.tsx":async()=>s(()=>import("./locked-function-settings.stories-_Ttn4wBr.js"),__vite__mapDeps([198,1,2,3,146,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,93,77,48,40,46,25,50,51,52,53,55,58,59,60,61,66,67,76,141,139,138,142,45,39,24,26,27,9,7,8,28,29,30,31,42,43,68,72,74,75,78,79,80,82,90,91,92,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,143,144,147,145]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-label-settings.stories.tsx":async()=>s(()=>import("./locked-label-settings.stories-tW6zKvNo.js"),__vite__mapDeps([199,1,2,3,145,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,141,139,142,143]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-line-settings.stories.tsx":async()=>s(()=>import("./locked-line-settings.stories-AHKtxLnH.js"),__vite__mapDeps([200,1,2,3,148,46,40,47,51,11,10,14,49,52,53,54,17,25,55,56,57,58,83,12,13,20,23,84,19,69,73,85,16,18,21,22,70,71,86,62,63,41,64,65,81,87,88,89,93,77,48,50,59,60,61,66,67,138,96,97,98,141,139,76,142,45,39,24,26,27,9,7,8,28,29,30,31,42,43,68,72,74,75,78,79,80,82,90,91,92,94,95,99,100,101,102,103,104,105,106,107,108,109,143,144,147,145,149,150]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-point-settings.stories.tsx":async()=>s(()=>import("./locked-point-settings.stories-UR8DHQGi.js"),__vite__mapDeps([201,1,2,3,149,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,138,141,139,76,77,93,48,40,46,25,50,51,52,53,55,58,59,60,61,66,67,142,45,39,24,26,27,9,7,8,28,29,30,31,42,43,68,72,74,75,78,79,80,82,90,91,92,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,143,150,145]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-polygon-settings.stories.tsx":async()=>s(()=>import("./locked-polygon-settings.stories-mYwPM9vO.js"),__vite__mapDeps([202,1,2,3,151,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,141,139,138,142,143,150,144]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/locked-vector-settings.stories.tsx":async()=>s(()=>import("./locked-vector-settings.stories-gLUV6rz1.js"),__vite__mapDeps([203,1,2,3,152,46,40,47,51,11,10,14,49,52,53,54,17,25,55,56,57,58,83,12,13,20,23,84,19,69,73,85,16,18,21,22,70,71,86,62,63,41,64,65,81,87,88,89,138,96,97,98,141,139,76,77,93,48,50,59,60,61,66,67,142,45,39,24,26,27,9,7,8,28,29,30,31,42,43,68,72,74,75,78,79,80,82,90,91,92,94,95,99,100,101,102,103,104,105,106,107,108,109,143,147,145]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/scrollless-number-text-field.stories.tsx":async()=>s(()=>import("./scrollless-number-text-field.stories-nOE7CJ-i.js"),__vite__mapDeps([204,1,2,3,10,11,23,139,76,14,69,77]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/section-control-button.stories.tsx":async()=>s(()=>import("./section-control-button.stories-8aUUAp2J.js"),__vite__mapDeps([205,1,2,3,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,122,111,123]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/toggleable-caret.stories.tsx":async()=>s(()=>import("./toggleable-caret.stories-nhN-z0SF.js"),__vite__mapDeps([206,1,2,3,21,125,69,10,11]),import.meta.url),"./packages/perseus-editor/src/components/__stories__/viewport-resizer.stories.tsx":async()=>s(()=>import("./viewport-resizer.stories-FucH3aHd.js"),__vite__mapDeps([207,1,2,3,4,5,6,170,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,113]),import.meta.url),"./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx":async()=>s(()=>import("./structured-item-diff.stories-HKAnnSGX.js"),__vite__mapDeps([208,1,2,3,179,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,180,111,117,181,209]),import.meta.url),"./packages/perseus-editor/src/diffs/__stories__/tags-diff.stories.tsx":async()=>s(()=>import("./tags-diff.stories-hP5HdUXh.js"),__vite__mapDeps([210,1,2,3,181,180,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,117,209]),import.meta.url),"./packages/perseus-editor/src/diffs/__stories__/text-diff.stories.tsx":async()=>s(()=>import("./text-diff.stories-tItjiiD9.js"),__vite__mapDeps([211,1,2,3,180,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,117,209]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/categorizer-editor.stories.tsx":async()=>s(()=>import("./categorizer-editor.stories-wnQG-men.js"),__vite__mapDeps([212,1,2,3,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,4,5,6,115,111,116,117]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/definition-editor.stories.tsx":async()=>s(()=>import("./definition-editor.stories-QuLoj61I.js"),__vite__mapDeps([213,1,2,3,4,5,6,119,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,116,117,120,121,122,123,124,125]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/dropdown-editor.stories.tsx":async()=>s(()=>import("./dropdown-editor.stories-0LZOUAK7.js"),__vite__mapDeps([214,1,2,3,4,5,6,126,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,116,117]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/explanation-editor.stories.tsx":async()=>s(()=>import("./explanation-editor.stories-oa1mYYdV.js"),__vite__mapDeps([215,1,2,3,4,5,6,127,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,116,117,120,121,122,123,124,125]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/expression-editor.stories.tsx":async()=>s(()=>import("./expression-editor.stories-BbgOXF15.js"),__vite__mapDeps([216,1,2,3,11,217,83,10,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218,128,111,117]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/image-editor.stories.tsx":async()=>s(()=>import("./image-editor.stories-n33hE2ea.js"),__vite__mapDeps([219,1,2,3,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,4,5,6,130,111,116,118,120,117,121,122,123,124,125]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/input-number-editor.stories.tsx":async()=>s(()=>import("./input-number-editor.stories-UBlHwKhn.js"),__vite__mapDeps([220,1,2,3,4,5,6,131,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,118]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/interaction-editor.stories.tsx":async()=>s(()=>import("./interaction-editor.stories-xlopIOIU.js"),__vite__mapDeps([221,1,2,3,132,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,116,129,111,117]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.stories.tsx":async()=>s(()=>import("./interactive-graph-editor.stories-6QcOpVbv.js"),__vite__mapDeps([222,1,2,3,176,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,133,111,134,123,125,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,195]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/label-image-editor.stories.tsx":async()=>s(()=>import("./label-image-editor.stories-pHQfTQip.js"),__vite__mapDeps([223,1,2,3,11,153,45,46,40,47,39,24,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,116,154,155,111,156,157,158,140,159]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/matcher-editor.stories.tsx":async()=>s(()=>import("./matcher-editor.stories-VhSbgn8n.js"),__vite__mapDeps([224,1,2,3,4,5,6,160,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,117]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/number-line-editor.stories.tsx":async()=>s(()=>import("./number-line-editor.stories-hRWWl3QQ.js"),__vite__mapDeps([225,1,2,3,4,5,6,161,46,40,47,45,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,116,117]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/numeric-input-editor.stories.tsx":async()=>s(()=>import("./numeric-input-editor.stories-fY_IpzQi.js"),__vite__mapDeps([226,1,2,3,4,5,6,162,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,116,120,117,121,122,123,124,125]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/phet-simulation-editor.stories.tsx":async()=>s(()=>import("./phet-simulation-editor.stories-J1pcmI4p.js"),__vite__mapDeps([227,4,5,6,163,1,2,3,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/python-program-editor.stories.tsx":async()=>s(()=>import("./python-program-editor.stories-98ezWXxc.js"),__vite__mapDeps([228,1,2,3,4,5,6,164,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/radio-editor.stories.tsx":async()=>s(()=>import("./radio-editor.stories-rwjrRVKp.js"),__vite__mapDeps([229,1,2,3,11,165,45,46,40,47,39,24,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,117,120,121,122,123,124,125]),import.meta.url),"./packages/perseus-editor/src/widgets/__stories__/sorter-editor.stories.tsx":async()=>s(()=>import("./sorter-editor.stories-Ci63zVAS.js"),__vite__mapDeps([230,1,2,3,4,5,6,166,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,117]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/answer-choices.stories.tsx":async()=>s(()=>import("./answer-choices.stories-8XsGaiBy.js"),__vite__mapDeps([231,1,2,3,4,5,6,11,155,45,46,40,47,39,24,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,154]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/behavior.stories.tsx":async()=>s(()=>import("./behavior.stories-Yiw6bHtg.js"),__vite__mapDeps([232,1,2,3,4,5,6,156,45,46,40,47,39,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/marker.stories.tsx":async()=>s(()=>import("./marker.stories-0Ij7TTdM.js"),__vite__mapDeps([233,1,2,3,4,5,6,11,158,45,46,40,47,39,24,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,140,154]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/question-markers.stories.tsx":async()=>s(()=>import("./question-markers.stories-Z5AMeqyc.js"),__vite__mapDeps([234,1,2,3,11,157,45,46,40,47,39,24,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,158,111,140,154]),import.meta.url),"./packages/perseus-editor/src/widgets/label-image/__stories__/select-image.stories.tsx":async()=>s(()=>import("./select-image.stories-QhCZaGhR.js"),__vite__mapDeps([235,1,2,3,11,159,45,46,40,47,39,24,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,154]),import.meta.url),"./packages/perseus/src/__stories__/article-renderer.stories.tsx":async()=>s(()=>import("./article-renderer.stories-ofIk6Qof.js"),__vite__mapDeps([236,1,2,3,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,4,5,6,237,218,45,46,40,47,39,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,238,168,239]),import.meta.url),"./packages/perseus/src/__stories__/hints-renderer.stories.tsx":async()=>s(()=>import("./hints-renderer.stories-7y20-3N4.js"),__vite__mapDeps([240,1,2,3,10,11,109,48,40,46,47,41,25,49,17,50,51,14,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,70,71,81,82,185,96,97,98]),import.meta.url),"./packages/perseus/src/__stories__/server-item-renderer.stories.tsx":async()=>s(()=>import("./server-item-renderer.stories-kpjb0s8f.js"),__vite__mapDeps([241,1,2,3,242,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,243,183,237,218,238]),import.meta.url),"./packages/perseus/src/components/__stories__/button-group.stories.tsx":async()=>s(()=>import("./button-group.stories-Jd2GkQu3.js"),__vite__mapDeps([244,1,2,3,94,11]),import.meta.url),"./packages/perseus/src/components/__stories__/fixed-to-responsive.stories.tsx":async()=>s(()=>import("./fixed-to-responsive.stories-5lHeA-vn.js"),__vite__mapDeps([245,1,2,3,52,53,49,54]),import.meta.url),"./packages/perseus/src/components/__stories__/graph.stories.tsx":async()=>s(()=>import("./graph.stories-VjjKtYEX.js"),__vite__mapDeps([246,1,2,3,95,46,40,47,51,11,10,14,49,52,53,54,17,25,55,56,57,58,50]),import.meta.url),"./packages/perseus/src/components/__stories__/graphie.stories.tsx":async()=>s(()=>import("./graphie.stories-T0Om1gnV.js"),__vite__mapDeps([247,1,2,3,242,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,243,183,237,218,238]),import.meta.url),"./packages/perseus/src/components/__stories__/hud.stories.tsx":async()=>s(()=>import("./hud.stories-uFVe3Cbh.js"),__vite__mapDeps([248,1,2,3,99,11,54]),import.meta.url),"./packages/perseus/src/components/__stories__/icon.stories.tsx":async()=>s(()=>import("./icon.stories-XuV9p1XS.js"),__vite__mapDeps([249,1,2,3,57,86]),import.meta.url),"./packages/perseus/src/components/__stories__/image-loader.stories.tsx":async()=>s(()=>import("./image-loader.stories-EA1-XT2A.js"),__vite__mapDeps([250,1,2,3,58,52]),import.meta.url),"./packages/perseus/src/components/__stories__/info-tip.stories.tsx":async()=>s(()=>import("./info-tip.stories-EgkjpDRN.js"),__vite__mapDeps([251,1,2,3,68,69,10,11,14,17,18,19,12,13,20,21,23,22]),import.meta.url),"./packages/perseus/src/components/__stories__/inline-icon.stories.tsx":async()=>s(()=>import("./inline-icon.stories-7-dBjnI0.js"),__vite__mapDeps([252,1,2,3,56]),import.meta.url),"./packages/perseus/src/components/__stories__/input-with-examples.stories.tsx":async()=>s(()=>import("./input-with-examples.stories-QT1um2Ve.js"),__vite__mapDeps([253,1,2,3,74,48,40,46,47,41,25,49,17,50,51,11,10,14,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,70,71,75,76,23,69,77,78]),import.meta.url),"./packages/perseus/src/components/__stories__/lint.stories.tsx":async()=>s(()=>import("./lint.stories-nJ_Oxwzz.js"),__vite__mapDeps([254,1,2,3,66,11,17,54,56]),import.meta.url),"./packages/perseus/src/components/__stories__/math-input.stories.tsx":async()=>s(()=>import("./math-input.stories-6v1Hp3Uf.js"),__vite__mapDeps([255,1,2,3,72,39,40,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,73,16,18,19,20,22,23,49,47,70,71]),import.meta.url),"./packages/perseus/src/components/__stories__/multi-button-group.stories.tsx":async()=>s(()=>import("./multi-button-group.stories-Cjx9YjZ1.js"),__vite__mapDeps([256,1,2,3,100,11,17]),import.meta.url),"./packages/perseus/src/components/__stories__/number-input.stories.tsx":async()=>s(()=>import("./number-input.stories-upCNzoBF.js"),__vite__mapDeps([257,1,2,3,101,46,40,47,49,63,41,17,70,71]),import.meta.url),"./packages/perseus/src/components/__stories__/range-input.stories.tsx":async()=>s(()=>import("./range-input.stories-LiUT95hU.js"),__vite__mapDeps([258,1,2,3,102,63,41,101,46,40,47,49,17,70,71]),import.meta.url),"./packages/perseus/src/components/__stories__/simple-keypad-input.stories.tsx":async()=>s(()=>import("./simple-keypad-input.stories-tZsmCiIG.js"),__vite__mapDeps([259,1,2,3,79,39,40,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,30,31,41,42,43,63]),import.meta.url),"./packages/perseus/src/components/__stories__/sortable.stories.tsx":async()=>s(()=>import("./sortable.stories-2X9kmvIN.js"),__vite__mapDeps([260,1,2,3,105,48,40,46,47,41,25,49,17,50,51,11,10,14,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,70,71]),import.meta.url),"./packages/perseus/src/components/__stories__/stub-tag-editor.stories.tsx":async()=>s(()=>import("./stub-tag-editor.stories-L-kojrKS.js"),__vite__mapDeps([261,1,2,3,64,63,41,65,47,17]),import.meta.url),"./packages/perseus/src/components/__stories__/svg-image.stories.tsx":async()=>s(()=>import("./svg-image.stories-DDO6IGo3.js"),__vite__mapDeps([262,1,2,3,51,40,46,47,11,10,14,49,52,53,54,17,25,55,56,57,58]),import.meta.url),"./packages/perseus/src/components/__stories__/tex.stories.tsx":async()=>s(()=>import("./tex.stories-EbmgsjH-.js"),__vite__mapDeps([263,1,2,3,59,52]),import.meta.url),"./packages/perseus/src/components/__stories__/text-input.stories.tsx":async()=>s(()=>import("./text-input.stories-4UlPFEkn.js"),__vite__mapDeps([264,1,2,3,75,76,10,11,14,23,69,77,17]),import.meta.url),"./packages/perseus/src/components/__stories__/text-list-editor.stories.tsx":async()=>s(()=>import("./text-list-editor.stories-IcrK9bTU.js"),__vite__mapDeps([265,1,2,3,4,5,6,65,47,63,41,17]),import.meta.url),"./packages/perseus/src/components/__stories__/tooltip.stories.tsx":async()=>s(()=>import("./tooltip.stories-oMVPbUSS.js"),__vite__mapDeps([266,1,2,3,10,11,78,17]),import.meta.url),"./packages/perseus/src/components/__stories__/zoomable-tex.stories.tsx":async()=>s(()=>import("./zoomable-tex.stories-3wtGigPF.js"),__vite__mapDeps([267,1,2,3,61,50,59,52,60,17]),import.meta.url),"./packages/perseus/src/components/__stories__/zoomable.stories.tsx":async()=>s(()=>import("./zoomable.stories-i6qkT2VG.js"),__vite__mapDeps([268,1,2,3,60,17]),import.meta.url),"./packages/perseus/src/components/visibility-observer/__stories__/visibility-observer.stories.tsx":async()=>s(()=>import("./visibility-observer.stories-pidMot5o.js"),__vite__mapDeps([269,1,2,3,17]),import.meta.url),"./packages/perseus/src/multi-items/__stories__/multi-renderer.stories.tsx":async()=>s(()=>import("./multi-renderer.stories-vZvfsxg9.js"),__vite__mapDeps([270,1,2,3,10,11,23,83,12,13,20,14,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,182,243,183,237,218,238]),import.meta.url),"./packages/perseus/src/widgets/categorizer/categorizer.stories.tsx":async()=>s(()=>import("./categorizer.stories-ofGCD9ry.js"),__vite__mapDeps([271,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/cs-program/cs-program.stories.tsx":async()=>s(()=>import("./cs-program.stories-H0GMon8_.js"),__vite__mapDeps([272,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/definition/definition.stories.tsx":async()=>s(()=>import("./definition.stories-0_b0K8aZ.js"),__vite__mapDeps([273,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218,237,238]),import.meta.url),"./packages/perseus/src/widgets/deprecated-standin/__stories__/deprecated-standin.stories.tsx":async()=>s(()=>import("./deprecated-standin.stories-zZFVpdPS.js"),__vite__mapDeps([274,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/dropdown/dropdown.stories.tsx":async()=>s(()=>import("./dropdown.stories-szoyYkPw.js"),__vite__mapDeps([275,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/explanation/explanation.stories.tsx":async()=>s(()=>import("./explanation.stories-IJa8Dz5q.js"),__vite__mapDeps([276,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/expression/expression.stories.tsx":async()=>s(()=>import("./expression.stories--0GavJhy.js"),__vite__mapDeps([277,1,2,3,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,39,40,30,31,41,42,43,4,5,6,242,83,20,23,84,19,69,73,85,16,18,22,49,70,71,86,62,63,64,65,47,81,54,87,56,57,88,89,45,46,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,243,183,237,218,238,239]),import.meta.url),"./packages/perseus/src/widgets/graded-group-set/graded-group-set.stories.tsx":async()=>s(()=>import("./graded-group-set.stories-kyCA6Zcs.js"),__vite__mapDeps([278,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/graded-group/graded-group.stories.tsx":async()=>s(()=>import("./graded-group.stories-0-0BkGHZ.js"),__vite__mapDeps([279,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/grapher/grapher.stories.tsx":async()=>s(()=>import("./grapher.stories-dDPRW5-o.js"),__vite__mapDeps([280,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/group/group.stories.tsx":async()=>s(()=>import("./group.stories-kxv9L3Cs.js"),__vite__mapDeps([281,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/iframe/iframe.stories.tsx":async()=>s(()=>import("./iframe.stories-ChqbE3sF.js"),__vite__mapDeps([282,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/image/image.stories.tsx":async()=>s(()=>import("./image.stories-_egU-70u.js"),__vite__mapDeps([283,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/input-number/input-number.stories.tsx":async()=>s(()=>import("./input-number.stories-0nJZj6b3.js"),__vite__mapDeps([284,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/interaction/interaction.stories.tsx":async()=>s(()=>import("./interaction.stories-Hkm4pHD_.js"),__vite__mapDeps([285,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/interactive-graphs/interactive-graph-regression.stories.tsx":async()=>s(()=>import("./interactive-graph-regression.stories-Beq-FXRU.js"),__vite__mapDeps([286,1,2,3,48,40,46,47,41,25,49,17,50,51,11,10,14,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,71,185,96,97,98]),import.meta.url),"./packages/perseus/src/widgets/interactive-graphs/interactive-graph.stories.tsx":async()=>s(()=>import("./interactive-graph.stories-iUtI6Lki.js"),__vite__mapDeps([287,1,2,3,91,11,19,10,12,13,20,14,84,69,92,23,70,71,52,54,83,73,85,16,17,18,21,22,49,86,62,63,41,64,65,47,81,87,56,57,88,89,106,68,25,45,46,40,39,24,26,27,9,7,8,28,29,30,31,42,43,48,50,51,53,55,58,59,60,61,66,67,72,74,75,76,77,78,79,80,82,90,93,94,95,96,97,98,99,100,101,102,103,104,105,107,108,109,217,183,218,186,185]),import.meta.url),"./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-functions.stories.tsx":async()=>s(()=>import("./locked-functions.stories-HTj8ViPr.js"),__vite__mapDeps([288,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218,186,185]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/answer-choices.stories.tsx":async()=>s(()=>import("./answer-choices.stories-bD3wCjIX.js"),__vite__mapDeps([289,1,2,3,23,10,11,93,20,12,13,14,69,77,17,19,21,22,18,70,71,48,40,46,47,41,25,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/answer-pill.stories.tsx":async()=>s(()=>import("./answer-pill.stories-91EV8Ogl.js"),__vite__mapDeps([290,1,2,3,104,10,11,20,12,13,14,23,22,17,70,71,48,40,46,47,41,25,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/label-image.stories.tsx":async()=>s(()=>import("./label-image.stories-Q3z39CEp.js"),__vite__mapDeps([291,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/label-image/__stories__/marker.stories.tsx":async()=>s(()=>import("./marker.stories-k1jjniKt.js"),__vite__mapDeps([292,1,2,3,11,103,10,14,70,71,86,57,104,20,12,13,23,22,17,48,40,46,47,41,25,49,50,51,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67]),import.meta.url),"./packages/perseus/src/widgets/matcher/matcher.stories.tsx":async()=>s(()=>import("./matcher.stories-Wvqif8HG.js"),__vite__mapDeps([293,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/matrix/matrix.stories.tsx":async()=>s(()=>import("./matrix.stories-mor64b5d.js"),__vite__mapDeps([294,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/number-line/number-line.stories.tsx":async()=>s(()=>import("./number-line.stories-iMYV5V1B.js"),__vite__mapDeps([295,1,2,3,24,11,17,21,25,10,14,26,27,9,12,13,7,8,28,29,217,83,20,23,84,19,69,73,85,16,18,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218,242,243,237,238,239,4,5,6]),import.meta.url),"./packages/perseus/src/widgets/numeric-input/numeric-input.stories.tsx":async()=>s(()=>import("./numeric-input.stories-SJ7CeI_S.js"),__vite__mapDeps([296,1,2,3,4,5,6,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/orderer/orderer.stories.tsx":async()=>s(()=>import("./orderer.stories-WehRfD_H.js"),__vite__mapDeps([297,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/passage-ref/passage-ref.stories.tsx":async()=>s(()=>import("./passage-ref.stories-RS8yZLtd.js"),__vite__mapDeps([298,1,2,3,10,11,217,83,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/passage/passage.stories.tsx":async()=>s(()=>import("./passage.stories-QLEPP2cB.js"),__vite__mapDeps([299,1,2,3,10,11,217,83,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/phet-simulation/phet-simulation.stories.tsx":async()=>s(()=>import("./phet-simulation.stories-CMJcYcK_.js"),__vite__mapDeps([300,91,1,2,3,11,19,10,12,13,20,14,84,69,92,23,70,71,52,54]),import.meta.url),"./packages/perseus/src/widgets/plotter/plotter.stories.tsx":async()=>s(()=>import("./plotter.stories-eCNg_xQ1.js"),__vite__mapDeps([301,1,2,3,10,11,217,83,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/python-program/python-program.stories.tsx":async()=>s(()=>import("./python-program.stories-xl40LxxK.js"),__vite__mapDeps([302,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/base-radio.stories.tsx":async()=>s(()=>import("./base-radio.stories-HsgX9pke.js"),__vite__mapDeps([303,1,2,3,4,5,6,80,11,49,17,47,70,71,62,63,41,64,65,54,81,82,46,40,83,10,12,13,20,14,23,84,19,69,73,85,16,18,21,22,86,87,56,57,88,89,90,48,25,50,51,52,53,55,58,59,60,61,66,67]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/choice-icon.stories.tsx":async()=>s(()=>import("./choice-icon.stories-A9BIRyST.js"),__vite__mapDeps([304,1,2,3,87,14,11,70,71,56,57,54,88]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/choice-none-above.stories.tsx":async()=>s(()=>import("./choice-none-above.stories-5tKq4ftc.js"),__vite__mapDeps([305,1,2,3,4,5,6,90,70,71,48,40,46,47,41,25,49,17,50,51,11,10,14,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,83,12,13,20,23,84,19,69,73,85,16,18,21,22,86,81,87,88,89]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/choice.stories.tsx":async()=>s(()=>import("./choice.stories-CaPa6g2I.js"),__vite__mapDeps([306,1,2,3,4,5,6,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/focus-ring.stories.tsx":async()=>s(()=>import("./focus-ring.stories-K51oxFam.js"),__vite__mapDeps([307,1,2,3,54,88,11]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/option-status.stories.tsx":async()=>s(()=>import("./option-status.stories-fqNu8JNa.js"),__vite__mapDeps([308,1,2,3,89,14,11,70,71]),import.meta.url),"./packages/perseus/src/widgets/radio/__stories__/radio.stories.tsx":async()=>s(()=>import("./radio.stories-28ncjrw-.js"),__vite__mapDeps([309,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218,169]),import.meta.url),"./packages/perseus/src/widgets/sorter/sorter.stories.tsx":async()=>s(()=>import("./sorter.stories-rp7zabAk.js"),__vite__mapDeps([310,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url),"./packages/perseus/src/widgets/video/video-transcript-link.stories.tsx":async()=>s(()=>import("./video-transcript-link.stories-LWRoilbr.js"),__vite__mapDeps([311,1,2,3,106,10,11,85,14,92,12,13,20,69,70,71,52]),import.meta.url),"./packages/perseus/src/widgets/video/video.stories.tsx":async()=>s(()=>import("./video.stories-3el4H2aK.js"),__vite__mapDeps([312,1,2,3,217,83,10,11,12,13,20,14,23,84,19,69,73,85,16,17,18,21,22,49,70,71,86,62,63,41,64,65,47,81,54,87,56,57,88,89,45,46,40,39,24,25,26,27,9,7,8,28,29,30,31,42,43,48,50,51,52,53,55,58,59,60,61,66,67,68,72,74,75,76,77,78,79,80,82,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,183,108,109,218]),import.meta.url)};async function y(_){return R[_]()}const{composeConfigs:P,PreviewWeb:T,ClientApi:L}=__STORYBOOK_MODULE_PREVIEW_API__,I=async()=>{const _=await Promise.all([s(()=>import("./entry-preview-X1b_vaBy.js"),__vite__mapDeps([313,2,3,314,55,17]),import.meta.url),s(()=>import("./entry-preview-docs-9fNegKGE.js"),__vite__mapDeps([315,316,3,13,6,2]),import.meta.url),s(()=>import("./preview-VI2eoWmp.js"),__vite__mapDeps([317,318]),import.meta.url),s(()=>import("./preview-7cKvLe0o.js"),__vite__mapDeps([]),import.meta.url),s(()=>import("./preview-98732p1V.js"),__vite__mapDeps([319,5,6]),import.meta.url),s(()=>import("./preview-FekBEZxm.js"),__vite__mapDeps([320,6]),import.meta.url),s(()=>import("./preview-1MSgikpN.js"),__vite__mapDeps([321,97]),import.meta.url),s(()=>import("./preview-u8M_OEO2.js"),__vite__mapDeps([322,6]),import.meta.url),s(()=>import("./preview-bEa2SesL.js"),__vite__mapDeps([]),import.meta.url),s(()=>import("./preview-JBq3d4z1.js"),__vite__mapDeps([]),import.meta.url),s(()=>import("./preview-AMYt9N5q.js"),__vite__mapDeps([323,1,2,3,14,10,11,45,46,40,47,39,24,17,21,25,26,27,9,12,13,7,8,28,29,30,31,41,42,43,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,18,19,20,23,22,70,71,72,73,16,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,237,218,238]),import.meta.url)]);return P(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new T;window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;window.__STORYBOOK_CLIENT_API__=window.__STORYBOOK_CLIENT_API__||new L({storyStore:window.__STORYBOOK_PREVIEW__.storyStore});window.__STORYBOOK_PREVIEW__.initialize({importFn:y,getProjectAnnotations:I});export{s as _}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./keypad-button.stories-tDGMB8WS.js","./jsx-runtime-FVsy8kgq.js","./index-TT1qJ6UJ.js","./_commonjsHelpers-4gQjN7DL.js","./chunk-WFFRPTHA-zlNDxfrq.js","./preview-errors-7FWlPnjy.js","./index-PPLHz8o0.js","./button-assets-txIojR3b.js","./keypad-button-rKskH7oM.js","./index-WNT3sUKf.js","./index-6h5t6F0w.js","./index-awljIyHI.js","./react-router-dom-W_e8xVUu.js","./index-tvtfaFq4.js","./index-deFLJwr4.js","./keypad-mathquill.stories-f3PwEzb7.js","./index-BPSWBbj5.js","./index-7vsPyIck.js","./index-YCTzZMik.js","./index-rfN0X25E.js","./index-o3wWn3Y5.js","./index-CkAxGj88.js","./Popper-kGnKOid7.js","./index-h_CiYGGb.js","./mobile-keypad-hKjeQGNp.js","./index-J2t_5nK1.js","./tabbar-WYCYDof0.js","./item-X9tjzx12.js","./operators-page-C_EsmjPW.js","./navigation-pad-ss7r0FKW.js","./key-translator-IA-2V2LV.js","./_commonjs-dynamic-modules-h-SxKiO4.js","./keypad-pages.stories-UYZo0hoJ.js","./index-VDi1Le_1.js","./navigation-pad.stories-qTnieBG4.js","./tabbar.stories-XOe59aSK.js","./tabbaritem.stories-mdibAqRo.js","./full-keypad.stories-GPmJXYWw.js","./full-mobile-input.stories-nmERbKsP.js","./prop-types-3bOVFRDQ.js","./version-akiLXZts.js","./invariant-bu5zBsRS.js","./prop-types-mRar-0kQ.css","./enums-x5qaTru7.js","./article-editor.stories-pGtSApHs.js","./article-renderer-o95CuJpS.js","./util-XcxTwqb0.js","./jquery-yG1GhClm.js","./renderer-4_U4OAry.js","./index-dnMhQZ-1.js","./asset-context-I7yIqWki.js","./svg-image-Rjw-_QTV.js","./dependencies-8XILypbq.js","./fixed-to-responsive-1fSZ1n--.js","./constants-I_nlPaPx.js","./client-rbWgHzHN.js","./inline-icon-tKY1iMkH.js","./icon-paths-AuJwhOz7.js","./image-loader-mgyZcN0j.js","./tex-VP4hirbI.js","./zoomable-CA1NzpZD.js","./zoomable-tex-MZi7Hqbp.js","./perseus-api-mOiZT07d.js","./index-k-0mNqHS.js","./stub-tag-editor-Hmby24Jq.js","./text-list-editor-pe7AGDAl.js","./lint-I_5mQeXl.js","./renderer-qr6V1vrR.css","./index-K9BSJPWl.js","./index-xuPsLuPk.js","./i18n-context-hxuRe8oU.js","./strings-OAjNfY6D.js","./math-input-b6JdL4xR.js","./index-2dmvOE3q.js","./input-with-examples-1e8gjW5y.js","./text-input-15gEhfDF.js","./index-QCAhLhLD.js","./minus-bold-ONmDo3Ve.js","./tooltip-S_hcgkAT.js","./simple-keypad-input-zNNuoI83.js","./base-radio-sE9E2UC2.js","./media-queries-MaBBbpNq.js","./shared-3pf9YZIg.js","./choice-E4eyMygy.js","./index-ngddCaVG.js","./index-qUyqkRvh.js","./icon-YuYiVxsK.js","./choice-icon-LAaL9HdM.js","./focus-ring-sgSTt4fM.js","./option-status-6glEGOB8.js","./choice-none-above-o4v4BTO3.js","./phet-simulation-I2_BZVd2.js","./arrow-square-out-bold-090vdhrx.js","./answer-choices-vbrLThK4.js","./button-group-nsoLlHtM.js","./graph-sgfCFYpv.js","./index-IIMKO4_x.js","./tiny-invariant-bHgPayXn.js","./bundle.esm-7jAAHVxW.js","./hud-FI3E3dT_.js","./multi-button-group-a0iIfrwx.js","./number-input-dpusjjfa.js","./range-input-R0Q6JH86.js","./marker-vUQ60Bu-.js","./answer-pill-uwg1DdPG.js","./sortable-w6DA86Qg.js","./video-transcript-link-WVgIZGhp.js","./article-renderer-bsRD8PfZ.css","./multi-renderer-Nglq5SzN.js","./hints-renderer-GjKFBH8K.js","./article-editor-BfWGyfWk.js","./components-0kNWnYe6.js","./device-framer-wVZUBEZD.js","./constants-hQyjCzwz.js","./register-all-widgets-and-editors-for-testing-Ftx4wZEN.js","./categorizer-editor-aJj5kcPa.js","./editor-jsonify-yP45H1ib.js","./index-0C4KXdeC.js","./blur-input-hjJsfoK9.js","./definition-editor-koC6zgjU.js","./editor-SZLWA5DH.js","./index-SM3muJE2.js","./section-control-button-VtgjGcq5.js","./index-tFzzSRL2.js","./tex-error-view-Y2BSLjwB.js","./toggleable-caret-lFiCktzo.js","./dropdown-editor-vzCR7Y_E.js","./explanation-editor-QNDSiyWl.js","./expression-editor-gbMGfXvL.js","./graph-settings-LBBYDOUY.js","./image-editor-ifkVG3z1.js","./input-number-editor-ncl_GOvQ.js","./index-uK3b_Y1s.js","./interactive-graph-editor-PeMztHwk.js","./heading-8aCiuWUg.js","./interactive-graph-settings-3oLklA_Z.js","./locked-figures-section-nxp-trxv.js","./locked-ellipse-settings-H2lz6Mnf.js","./plus-circle-JCxQSzSv.js","./scrollless-number-text-field-U5Bx_xXb.js","./util-qk2aeK8X.js","./locked-figure-settings-actions-WSW3YvFI.js","./color-select-aXibMsPD.js","./util-7LGRm2EO.js","./line-stroke-select-ZTaE76uS.js","./locked-label-settings-qoc_z_IC.js","./locked-function-settings-RE4yVDE6.js","./line-swatch-YWYea0Do.js","./locked-line-settings-h25vlmkK.js","./locked-point-settings-7pJS5tix.js","./labeled-switch-OVGss_VI.js","./locked-polygon-settings-pkXY4ncz.js","./locked-vector-settings-EnKejgQ9.js","./label-image-editor-Z5_dot8_.js","./form-wrapped-text-field-tsI8XMXi.js","./answer-choices-jhnMapjR.js","./behavior-RYjJdmKF.js","./question-markers-KN3OrYEl.js","./marker-st5wrvmE.js","./select-image-_eHoVMfM.js","./matcher-editor-hlzTMdtB.js","./number-line-editor-t3bGT3LG.js","./numeric-input-editor-QUZ56KMx.js","./phet-simulation-editor-0655QF05.js","./python-program-editor-SPqpWu4A.js","./editor-8WwPqQi6.js","./sorter-editor-Kj6XqnPI.js","./content-preview.stories-64c0o_I7.js","./article-renderer.testdata-spwNviYy.js","./radio.testdata-sITJ8lxE.js","./viewport-resizer-YtC0KtaX.js","./perseus-editor-1P1vlgv9.css","./editor-page.stories-f5GLxGWU.js","./editor-page-with-storybook-preview-tHaT_Czh.js","./editor-page-91uXOpaV.js","./item-extras-editor-2Be_tCWc.js","./flags-for-api-options-NwahBZpL.js","./editor.stories-SCDv_rUh.js","./index-pUnNHf6v.js","./structured-item-diff-C8S6VB9q.js","./text-diff-RbGWUAEg.js","./tags-diff-loewY876.js","./multi-items-MzI04jIx.js","./side-by-side-kpK-8vW0.js","./interactive-graph-editor.stories-RstKQZMc.js","./interactive-graph-question-builder-kDutykZc.js","./interactive-graph.testdata-syb_sPmB.js","./item-editor.stories-tLpgVM79.js","./tex-error-view.stories-vwGgGZvn.js","./blur-input.stories-6PTTWtP8.js","./color-select.stories-mNqFLHPY.js","./color-swatch.stories--rQT3YkY.js","./device-framer.stories-8Ab3hVpr.js","./graph-settings.stories-nmay4LcO.js","./interactive-graph-settings.stories-1FqvCDej.js","./interactive-graph-settings.argtypes-6T40gg9D.js","./locked-ellipse-settings.stories-vorDLiC2.js","./locked-figures-section.stories-0h1kV5Lj.js","./locked-function-settings.stories-_Ttn4wBr.js","./locked-label-settings.stories-tW6zKvNo.js","./locked-line-settings.stories-AHKtxLnH.js","./locked-point-settings.stories-UR8DHQGi.js","./locked-polygon-settings.stories-mYwPM9vO.js","./locked-vector-settings.stories-gLUV6rz1.js","./scrollless-number-text-field.stories-nOE7CJ-i.js","./section-control-button.stories-8aUUAp2J.js","./toggleable-caret.stories-nhN-z0SF.js","./viewport-resizer.stories-FucH3aHd.js","./structured-item-diff.stories-HKAnnSGX.js","./perseus-diff-wrapper-dJxBlkDd.js","./tags-diff.stories-hP5HdUXh.js","./text-diff.stories-tItjiiD9.js","./categorizer-editor.stories-wnQG-men.js","./definition-editor.stories-QuLoj61I.js","./dropdown-editor.stories-0LZOUAK7.js","./explanation-editor.stories-oa1mYYdV.js","./expression-editor.stories-BbgOXF15.js","./renderer-with-debug-ui-o6OVhJgg.js","./register-all-widgets-for-testing-fawnePoa.js","./image-editor.stories-n33hE2ea.js","./input-number-editor.stories-UBlHwKhn.js","./interaction-editor.stories-xlopIOIU.js","./interactive-graph-editor.stories-6QcOpVbv.js","./label-image-editor.stories-pHQfTQip.js","./matcher-editor.stories-VhSbgn8n.js","./number-line-editor.stories-hRWWl3QQ.js","./numeric-input-editor.stories-fY_IpzQi.js","./phet-simulation-editor.stories-J1pcmI4p.js","./python-program-editor.stories-98ezWXxc.js","./radio-editor.stories-rwjrRVKp.js","./sorter-editor.stories-Ci63zVAS.js","./answer-choices.stories-8XsGaiBy.js","./behavior.stories-Yiw6bHtg.js","./marker.stories-0Ij7TTdM.js","./question-markers.stories-Z5AMeqyc.js","./select-image.stories-QhCZaGhR.js","./article-renderer.stories-ofIk6Qof.js","./test-dependencies-3HLxfOjs.js","./test-dependencies-vi99l57r.css","./test-keypad-context-wrapper-UieRILfg.js","./hints-renderer.stories-7y20-3N4.js","./server-item-renderer.stories-kpjb0s8f.js","./server-item-renderer-with-debug-ui-G785FGTt.js","./ke-score-ui-xy7p6xf5.js","./button-group.stories-Jd2GkQu3.js","./fixed-to-responsive.stories-5lHeA-vn.js","./graph.stories-VjjKtYEX.js","./graphie.stories-T0Om1gnV.js","./hud.stories-uFVe3Cbh.js","./icon.stories-XuV9p1XS.js","./image-loader.stories-EA1-XT2A.js","./info-tip.stories-EgkjpDRN.js","./inline-icon.stories-7-dBjnI0.js","./input-with-examples.stories-QT1um2Ve.js","./lint.stories-nJ_Oxwzz.js","./math-input.stories-6v1Hp3Uf.js","./multi-button-group.stories-Cjx9YjZ1.js","./number-input.stories-upCNzoBF.js","./range-input.stories-LiUT95hU.js","./simple-keypad-input.stories-tZsmCiIG.js","./sortable.stories-2X9kmvIN.js","./stub-tag-editor.stories-L-kojrKS.js","./svg-image.stories-DDO6IGo3.js","./tex.stories-EbmgsjH-.js","./text-input.stories-4UlPFEkn.js","./text-list-editor.stories-IcrK9bTU.js","./tooltip.stories-oMVPbUSS.js","./zoomable-tex.stories-3wtGigPF.js","./zoomable.stories-i6qkT2VG.js","./visibility-observer.stories-pidMot5o.js","./multi-renderer.stories-vZvfsxg9.js","./categorizer.stories-ofGCD9ry.js","./cs-program.stories-H0GMon8_.js","./definition.stories-0_b0K8aZ.js","./deprecated-standin.stories-zZFVpdPS.js","./dropdown.stories-szoyYkPw.js","./explanation.stories-IJa8Dz5q.js","./expression.stories--0GavJhy.js","./graded-group-set.stories-kyCA6Zcs.js","./graded-group.stories-0-0BkGHZ.js","./grapher.stories-dDPRW5-o.js","./group.stories-kxv9L3Cs.js","./iframe.stories-ChqbE3sF.js","./image.stories-_egU-70u.js","./input-number.stories-0nJZj6b3.js","./interaction.stories-Hkm4pHD_.js","./interactive-graph-regression.stories-Beq-FXRU.js","./interactive-graph.stories-iUtI6Lki.js","./locked-functions.stories-HTj8ViPr.js","./answer-choices.stories-bD3wCjIX.js","./answer-pill.stories-91EV8Ogl.js","./label-image.stories-Q3z39CEp.js","./marker.stories-k1jjniKt.js","./matcher.stories-Wvqif8HG.js","./matrix.stories-mor64b5d.js","./number-line.stories-iMYV5V1B.js","./numeric-input.stories-SJ7CeI_S.js","./orderer.stories-WehRfD_H.js","./passage-ref.stories-RS8yZLtd.js","./passage.stories-QLEPP2cB.js","./phet-simulation.stories-CMJcYcK_.js","./plotter.stories-eCNg_xQ1.js","./python-program.stories-xl40LxxK.js","./base-radio.stories-HsgX9pke.js","./choice-icon.stories-A9BIRyST.js","./choice-none-above.stories-5tKq4ftc.js","./choice.stories-CaPa6g2I.js","./focus-ring.stories-K51oxFam.js","./option-status.stories-fqNu8JNa.js","./radio.stories-28ncjrw-.js","./sorter.stories-rp7zabAk.js","./video-transcript-link.stories-LWRoilbr.js","./video.stories-3el4H2aK.js","./entry-preview-X1b_vaBy.js","./react-18-N0svEjlN.js","./entry-preview-docs-9fNegKGE.js","./_getPrototype-bjD8Yebc.js","./preview-VI2eoWmp.js","./index-ogXoivrg.js","./preview-98732p1V.js","./preview-FekBEZxm.js","./preview-1MSgikpN.js","./preview-u8M_OEO2.js","./preview-AMYt9N5q.js"] + __vite__mapDeps.viteFileDeps = ["./keypad-button.stories-tDGMB8WS.js","./jsx-runtime-FVsy8kgq.js","./index-TT1qJ6UJ.js","./_commonjsHelpers-4gQjN7DL.js","./chunk-WFFRPTHA-zlNDxfrq.js","./preview-errors-7FWlPnjy.js","./index-PPLHz8o0.js","./button-assets-txIojR3b.js","./keypad-button-rKskH7oM.js","./index-2dmvOE3q.js","./index-6h5t6F0w.js","./index-awljIyHI.js","./react-router-dom-W_e8xVUu.js","./index-tvtfaFq4.js","./index-deFLJwr4.js","./keypad-mathquill.stories-f3PwEzb7.js","./index-BPSWBbj5.js","./index-7vsPyIck.js","./index-YCTzZMik.js","./index-rfN0X25E.js","./index-o3wWn3Y5.js","./index-CkAxGj88.js","./Popper-kGnKOid7.js","./index-h_CiYGGb.js","./mobile-keypad-hKjeQGNp.js","./index-J2t_5nK1.js","./tabbar-WYCYDof0.js","./item-X9tjzx12.js","./operators-page-C_EsmjPW.js","./navigation-pad-ss7r0FKW.js","./key-translator-IA-2V2LV.js","./_commonjs-dynamic-modules-h-SxKiO4.js","./keypad-pages.stories-UYZo0hoJ.js","./index-VDi1Le_1.js","./navigation-pad.stories-qTnieBG4.js","./tabbar.stories-XOe59aSK.js","./tabbaritem.stories-mdibAqRo.js","./full-keypad.stories-GPmJXYWw.js","./full-mobile-input.stories-nmERbKsP.js","./prop-types-3bOVFRDQ.js","./version-akiLXZts.js","./invariant-bu5zBsRS.js","./prop-types-mRar-0kQ.css","./enums-x5qaTru7.js","./article-editor.stories-pGtSApHs.js","./article-renderer-o95CuJpS.js","./util-XcxTwqb0.js","./jquery-yG1GhClm.js","./renderer-4_U4OAry.js","./index-dnMhQZ-1.js","./asset-context-I7yIqWki.js","./svg-image-Rjw-_QTV.js","./dependencies-8XILypbq.js","./fixed-to-responsive-1fSZ1n--.js","./constants-I_nlPaPx.js","./client-rbWgHzHN.js","./inline-icon-tKY1iMkH.js","./icon-paths-AuJwhOz7.js","./image-loader-mgyZcN0j.js","./tex-VP4hirbI.js","./zoomable-CA1NzpZD.js","./zoomable-tex-MZi7Hqbp.js","./perseus-api-mOiZT07d.js","./index-0C4KXdeC.js","./stub-tag-editor-Hmby24Jq.js","./text-list-editor-pe7AGDAl.js","./lint-I_5mQeXl.js","./renderer-qr6V1vrR.css","./index-K9BSJPWl.js","./index-xuPsLuPk.js","./i18n-context-hxuRe8oU.js","./strings-OAjNfY6D.js","./math-input-b6JdL4xR.js","./index-WNT3sUKf.js","./input-with-examples-1e8gjW5y.js","./text-input-15gEhfDF.js","./index-QCAhLhLD.js","./minus-bold-ONmDo3Ve.js","./tooltip-S_hcgkAT.js","./simple-keypad-input-zNNuoI83.js","./base-radio-sE9E2UC2.js","./media-queries-MaBBbpNq.js","./shared-3pf9YZIg.js","./choice-E4eyMygy.js","./index-ngddCaVG.js","./index-qUyqkRvh.js","./icon-YuYiVxsK.js","./choice-icon-LAaL9HdM.js","./focus-ring-sgSTt4fM.js","./option-status-6glEGOB8.js","./choice-none-above-o4v4BTO3.js","./phet-simulation-I2_BZVd2.js","./arrow-square-out-bold-090vdhrx.js","./answer-choices-vbrLThK4.js","./button-group-nsoLlHtM.js","./graph-sgfCFYpv.js","./index-IIMKO4_x.js","./tiny-invariant-bHgPayXn.js","./bundle.esm-7jAAHVxW.js","./hud-FI3E3dT_.js","./multi-button-group-a0iIfrwx.js","./number-input-dpusjjfa.js","./range-input-R0Q6JH86.js","./marker-vUQ60Bu-.js","./answer-pill-uwg1DdPG.js","./sortable-w6DA86Qg.js","./video-transcript-link-WVgIZGhp.js","./article-renderer-bsRD8PfZ.css","./multi-renderer-Nglq5SzN.js","./hints-renderer-GjKFBH8K.js","./article-editor-BfWGyfWk.js","./components-0kNWnYe6.js","./device-framer-wVZUBEZD.js","./constants-hQyjCzwz.js","./register-all-widgets-and-editors-for-testing-Ftx4wZEN.js","./categorizer-editor-aJj5kcPa.js","./editor-jsonify-yP45H1ib.js","./index-k-0mNqHS.js","./blur-input-hjJsfoK9.js","./definition-editor-koC6zgjU.js","./editor-SZLWA5DH.js","./index-SM3muJE2.js","./section-control-button-VtgjGcq5.js","./index-tFzzSRL2.js","./tex-error-view-Y2BSLjwB.js","./toggleable-caret-lFiCktzo.js","./dropdown-editor-vzCR7Y_E.js","./explanation-editor-QNDSiyWl.js","./expression-editor-gbMGfXvL.js","./graph-settings-LBBYDOUY.js","./image-editor-ifkVG3z1.js","./input-number-editor-ncl_GOvQ.js","./index-uK3b_Y1s.js","./interactive-graph-editor-PeMztHwk.js","./heading-8aCiuWUg.js","./interactive-graph-settings-3oLklA_Z.js","./locked-figures-section-nxp-trxv.js","./locked-ellipse-settings-H2lz6Mnf.js","./plus-circle-JCxQSzSv.js","./scrollless-number-text-field-U5Bx_xXb.js","./util-qk2aeK8X.js","./locked-figure-settings-actions-WSW3YvFI.js","./color-select-aXibMsPD.js","./util-7LGRm2EO.js","./line-stroke-select-ZTaE76uS.js","./locked-label-settings-qoc_z_IC.js","./locked-function-settings-RE4yVDE6.js","./line-swatch-YWYea0Do.js","./locked-line-settings-h25vlmkK.js","./locked-point-settings-7pJS5tix.js","./labeled-switch-OVGss_VI.js","./locked-polygon-settings-pkXY4ncz.js","./locked-vector-settings-EnKejgQ9.js","./label-image-editor-Z5_dot8_.js","./form-wrapped-text-field-tsI8XMXi.js","./answer-choices-jhnMapjR.js","./behavior-RYjJdmKF.js","./question-markers-KN3OrYEl.js","./marker-st5wrvmE.js","./select-image-_eHoVMfM.js","./matcher-editor-hlzTMdtB.js","./number-line-editor-t3bGT3LG.js","./numeric-input-editor-QUZ56KMx.js","./phet-simulation-editor-0655QF05.js","./python-program-editor-SPqpWu4A.js","./editor-8WwPqQi6.js","./sorter-editor-Kj6XqnPI.js","./content-preview.stories-64c0o_I7.js","./article-renderer.testdata-spwNviYy.js","./radio.testdata-sITJ8lxE.js","./viewport-resizer-YtC0KtaX.js","./perseus-editor-1P1vlgv9.css","./editor-page.stories-f5GLxGWU.js","./editor-page-with-storybook-preview-tHaT_Czh.js","./editor-page-91uXOpaV.js","./item-extras-editor-2Be_tCWc.js","./flags-for-api-options-NwahBZpL.js","./editor.stories-SCDv_rUh.js","./index-pUnNHf6v.js","./structured-item-diff-C8S6VB9q.js","./text-diff-RbGWUAEg.js","./tags-diff-loewY876.js","./multi-items-MzI04jIx.js","./side-by-side-kpK-8vW0.js","./interactive-graph-editor.stories-RstKQZMc.js","./interactive-graph-question-builder-kDutykZc.js","./interactive-graph.testdata-syb_sPmB.js","./item-editor.stories-tLpgVM79.js","./tex-error-view.stories-vwGgGZvn.js","./blur-input.stories-6PTTWtP8.js","./color-select.stories-mNqFLHPY.js","./color-swatch.stories--rQT3YkY.js","./device-framer.stories-8Ab3hVpr.js","./graph-settings.stories-nmay4LcO.js","./interactive-graph-settings.stories-1FqvCDej.js","./interactive-graph-settings.argtypes-6T40gg9D.js","./locked-ellipse-settings.stories-vorDLiC2.js","./locked-figures-section.stories-0h1kV5Lj.js","./locked-function-settings.stories-_Ttn4wBr.js","./locked-label-settings.stories-tW6zKvNo.js","./locked-line-settings.stories-AHKtxLnH.js","./locked-point-settings.stories-UR8DHQGi.js","./locked-polygon-settings.stories-mYwPM9vO.js","./locked-vector-settings.stories-gLUV6rz1.js","./scrollless-number-text-field.stories-nOE7CJ-i.js","./section-control-button.stories-8aUUAp2J.js","./toggleable-caret.stories-nhN-z0SF.js","./viewport-resizer.stories-FucH3aHd.js","./structured-item-diff.stories-HKAnnSGX.js","./perseus-diff-wrapper-dJxBlkDd.js","./tags-diff.stories-hP5HdUXh.js","./text-diff.stories-tItjiiD9.js","./categorizer-editor.stories-wnQG-men.js","./definition-editor.stories-QuLoj61I.js","./dropdown-editor.stories-0LZOUAK7.js","./explanation-editor.stories-oa1mYYdV.js","./expression-editor.stories-BbgOXF15.js","./renderer-with-debug-ui-o6OVhJgg.js","./register-all-widgets-for-testing-fawnePoa.js","./image-editor.stories-n33hE2ea.js","./input-number-editor.stories-UBlHwKhn.js","./interaction-editor.stories-xlopIOIU.js","./interactive-graph-editor.stories-6QcOpVbv.js","./label-image-editor.stories-pHQfTQip.js","./matcher-editor.stories-VhSbgn8n.js","./number-line-editor.stories-hRWWl3QQ.js","./numeric-input-editor.stories-fY_IpzQi.js","./phet-simulation-editor.stories-J1pcmI4p.js","./python-program-editor.stories-98ezWXxc.js","./radio-editor.stories-rwjrRVKp.js","./sorter-editor.stories-Ci63zVAS.js","./answer-choices.stories-8XsGaiBy.js","./behavior.stories-Yiw6bHtg.js","./marker.stories-0Ij7TTdM.js","./question-markers.stories-Z5AMeqyc.js","./select-image.stories-QhCZaGhR.js","./article-renderer.stories-ofIk6Qof.js","./test-dependencies-3HLxfOjs.js","./test-dependencies-vi99l57r.css","./test-keypad-context-wrapper-UieRILfg.js","./hints-renderer.stories-7y20-3N4.js","./server-item-renderer.stories-kpjb0s8f.js","./server-item-renderer-with-debug-ui-G785FGTt.js","./ke-score-ui-xy7p6xf5.js","./button-group.stories-Jd2GkQu3.js","./fixed-to-responsive.stories-5lHeA-vn.js","./graph.stories-VjjKtYEX.js","./graphie.stories-T0Om1gnV.js","./hud.stories-uFVe3Cbh.js","./icon.stories-XuV9p1XS.js","./image-loader.stories-EA1-XT2A.js","./info-tip.stories-EgkjpDRN.js","./inline-icon.stories-7-dBjnI0.js","./input-with-examples.stories-QT1um2Ve.js","./lint.stories-nJ_Oxwzz.js","./math-input.stories-6v1Hp3Uf.js","./multi-button-group.stories-Cjx9YjZ1.js","./number-input.stories-upCNzoBF.js","./range-input.stories-LiUT95hU.js","./simple-keypad-input.stories-tZsmCiIG.js","./sortable.stories-2X9kmvIN.js","./stub-tag-editor.stories-L-kojrKS.js","./svg-image.stories-DDO6IGo3.js","./tex.stories-EbmgsjH-.js","./text-input.stories-4UlPFEkn.js","./text-list-editor.stories-IcrK9bTU.js","./tooltip.stories-oMVPbUSS.js","./zoomable-tex.stories-3wtGigPF.js","./zoomable.stories-i6qkT2VG.js","./visibility-observer.stories-pidMot5o.js","./multi-renderer.stories-vZvfsxg9.js","./categorizer.stories-ofGCD9ry.js","./cs-program.stories-H0GMon8_.js","./definition.stories-0_b0K8aZ.js","./deprecated-standin.stories-zZFVpdPS.js","./dropdown.stories-szoyYkPw.js","./explanation.stories-IJa8Dz5q.js","./expression.stories--0GavJhy.js","./graded-group-set.stories-kyCA6Zcs.js","./graded-group.stories-0-0BkGHZ.js","./grapher.stories-dDPRW5-o.js","./group.stories-kxv9L3Cs.js","./iframe.stories-ChqbE3sF.js","./image.stories-_egU-70u.js","./input-number.stories-0nJZj6b3.js","./interaction.stories-Hkm4pHD_.js","./interactive-graph-regression.stories-Beq-FXRU.js","./interactive-graph.stories-iUtI6Lki.js","./locked-functions.stories-HTj8ViPr.js","./answer-choices.stories-bD3wCjIX.js","./answer-pill.stories-91EV8Ogl.js","./label-image.stories-Q3z39CEp.js","./marker.stories-k1jjniKt.js","./matcher.stories-Wvqif8HG.js","./matrix.stories-mor64b5d.js","./number-line.stories-iMYV5V1B.js","./numeric-input.stories-SJ7CeI_S.js","./orderer.stories-WehRfD_H.js","./passage-ref.stories-RS8yZLtd.js","./passage.stories-QLEPP2cB.js","./phet-simulation.stories-CMJcYcK_.js","./plotter.stories-eCNg_xQ1.js","./python-program.stories-xl40LxxK.js","./base-radio.stories-HsgX9pke.js","./choice-icon.stories-A9BIRyST.js","./choice-none-above.stories-5tKq4ftc.js","./choice.stories-CaPa6g2I.js","./focus-ring.stories-K51oxFam.js","./option-status.stories-fqNu8JNa.js","./radio.stories-28ncjrw-.js","./sorter.stories-rp7zabAk.js","./video-transcript-link.stories-LWRoilbr.js","./video.stories-3el4H2aK.js","./entry-preview-X1b_vaBy.js","./react-18-N0svEjlN.js","./entry-preview-docs-9fNegKGE.js","./_getPrototype-bjD8Yebc.js","./preview-VI2eoWmp.js","./index-ogXoivrg.js","./preview-98732p1V.js","./preview-FekBEZxm.js","./preview-1MSgikpN.js","./preview-u8M_OEO2.js","./preview-AMYt9N5q.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } diff --git a/assets/iframe.stories-ChqbE3sF.js b/assets/iframe.stories-ChqbE3sF.js index 86f0d72742..291b48fd8a 100644 --- a/assets/iframe.stories-ChqbE3sF.js +++ b/assets/iframe.stories-ChqbE3sF.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const e={content:`Try matching the target image +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const e={content:`Try matching the target image [[☃ iframe 1]] `,images:{"https://ka-perseus-images.s3.amazonaws.com/8e518475587bc83767c72b49ff094e5870c3edc3.png":{width:760,height:688}},widgets:{"iframe 1":{graded:!0,version:{major:0,minor:0},static:!1,type:"iframe",options:{settings:[{name:"hue",value:"210"},{name:"subdivisions",value:"0"},{name:"zoom",value:"2"},{name:"seed",value:"6"},{name:"",value:""}],url:"4960944252",height:"410",width:"410",allowFullScreen:!0,static:!1},alignment:"default"}}},Yt={title:"Perseus/Widgets/IFrame"},t=s=>m(p,{question:e});t.__docgenInfo={description:"",methods:[],displayName:"Question1"};var r,i,o;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/image-editor-ifkVG3z1.js b/assets/image-editor-ifkVG3z1.js index e5f61ff4d9..5979ab029d 100644 --- a/assets/image-editor-ifkVG3z1.js +++ b/assets/image-editor-ifkVG3z1.js @@ -1,4 +1,4 @@ -import{a as o,j as a}from"./jsx-runtime-FVsy8kgq.js";import{c as f}from"./article-renderer-o95CuJpS.js";import{_ as r}from"./jquery-yG1GhClm.js";import{U as p}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as b}from"./components-0kNWnYe6.js";import{c as y}from"./icon-paths-AuJwhOz7.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{E as w}from"./editor-jsonify-yP45H1ib.js";import{r as C}from"./index-TT1qJ6UJ.js";import{B as v}from"./blur-input-hjJsfoK9.js";import{E as m}from"./editor-SZLWA5DH.js";const{InfoTip:c,InlineIcon:R,RangeInput:k}=b,u=400,h=[0,10],I={url:null,width:0,height:0},x="(ka-.*.s3.amazonaws.com|(fastly|cdn).kastatic.org|khanacademy.org|kasandbox.org)",E=new RegExp("^(https?|web\\+graphie)://[^/]*"+x),T=["center","above","above right","right","below right","below","below left","left","above left"],s=class s extends C.Component{constructor(){super(...arguments),this._isMounted=!1,this.state={backgroundImageError:""}}componentDidMount(){this._isMounted=!0}componentWillUnmount(){this._isMounted=!1}_renderRowForLabel(e,t){return o("tr",{children:[a("td",{children:a(k,{value:e.coordinates,onChange:this.onCoordinateChange.bind(this,t)})}),a("td",{style:{verticalAlign:"bottom",width:"5px"},children:a("input",{type:"text",className:"graph-settings-axis-label",value:e.content,onChange:this.onContentChange.bind(this,t)})}),a("td",{children:a("select",{className:"perseus-widget-dropdown",value:e.alignment,onChange:this.onAlignmentChange.bind(this,t),children:T.map(function(n,l){return a("option",{value:n,children:n},""+l)},this)})}),a("td",{children:a("a",{href:"#",className:"simple-button orange delete-label",title:"Remove this label",onClick:this.removeLabel.bind(this,t),children:a(R,{...y})})})]},t)}change(...e){return f.apply(this,e)}removeLabel(e,t){t.preventDefault();const n=[...this.props.labels];n.splice(e,1),this.props.onChange({labels:n})}onCoordinateChange(e,t){const n=this.props.labels.slice();n[e]=r.extend({},n[e],{coordinates:t}),this.props.onChange({labels:n})}onContentChange(e,t){const n=t.target.value,l=this.props.labels.slice();l[e]=r.extend({},l[e],{content:n}),this.props.onChange({labels:l})}onAlignmentChange(e,t){const n=t.target.value,l=this.props.labels.slice();l[e]=r.extend({},l[e],{alignment:n}),this.props.onChange({labels:l})}setUrl(e,t,n,l){if(!this._isMounted)return;const i=r.clone(this.props.backgroundImage);i.url=e,i.width=t,i.height=n;const g=[i.width,i.height];this.props.onChange({backgroundImage:i,box:g},null,l)}async onUrlChange(e,t){if(!e){this.setUrl(e,0,0,t);return}if(!E.test(e)){this.setState({backgroundImageError:"Images must be from sites hosted by Khan Academy. Please input a Khan Academy-owned address, or use the Add Image tool to rehost an existing image"});return}this.setState({backgroundImageError:""});try{const n=await p.getImageSizeModern(e);this.setUrl(e,n[0],n[1],!0)}catch(n){this.setState({backgroundImageError:`There was an error loading the image URL: ${JSON.stringify(n,null,2)}`})}}onRangeChange(e,t){const n=this.props.range.slice();n[e]=t,this.props.onChange({range:n})}serialize(){return w.serialize.call(this)}render(){const e=this.props.backgroundImage,t=o("div",{className:"image-settings",children:[!p.isLabeledSVG(e.url)&&a("div",{children:o("label",{children:[a("div",{children:"Preview:"}),a("img",{alt:"Editor preview of image",src:e.url,style:{width:"100%"}})]})}),a("div",{children:o("label",{children:[a("div",{children:"Dimensions:"}),o("p",{children:[e.width,"x",e.height]})]})}),a("div",{children:o("label",{children:[o("div",{children:["Alt text:",a(c,{children:"This is important for screenreaders. The content of this alt text will be formatted as markdown (tables, emphasis, etc. are supported)."})]}),a(m,{apiOptions:this.props.apiOptions,content:this.props.alt,onChange:l=>{l.content!=null&&this.change("alt",l.content)},widgetEnabled:!1})]})}),a("div",{children:o("label",{children:[a("div",{children:"Caption:"}),a(m,{apiOptions:this.props.apiOptions,content:this.props.caption,onChange:l=>{l.content!=null&&this.change("caption",l.content)},widgetEnabled:!1})]})})]}),n=a("div",{className:"renderer-widget-error",children:this.state.backgroundImageError});return o("div",{className:"perseus-image-editor",children:[o("label",{children:["Image url:",a(c,{children:"Paste an image or graphie image URL."}),this.state.backgroundImageError&&n,a(v,{value:e.url||"",style:{width:332},onChange:l=>this.onUrlChange(l,!1)})]}),e.url&&t]})}};s.displayName="ImageEditor",s.widgetName="image",s.defaultProps={title:"",range:[h,h],box:[u,u],backgroundImage:I,labels:[],alt:"",caption:""};let d=s;d.__docgenInfo={description:"",methods:[{name:"_renderRowForLabel",docblock:null,modifiers:[],params:[{name:"label",optional:!1,type:null},{name:"i",optional:!1,type:null}],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"removeLabel",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"onCoordinateChange",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"newCoordinates",optional:!1,type:null}],returns:null},{name:"onContentChange",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"onAlignmentChange",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"setUrl",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:null},{name:"width",optional:!1,type:null},{name:"height",optional:!1,type:null},{name:"silent",optional:!1,type:null}],returns:null},{name:"onUrlChange",docblock:null,modifiers:["async"],params:[{name:"url",optional:!1,type:{name:"union",raw:"string | undefined | null",elements:[{name:"string"},{name:"undefined"},{name:"null"}]}},{name:"silent",optional:!1,type:{name:"boolean"}}],returns:null},{name:"onRangeChange",docblock:null,modifiers:[],params:[{name:"type",optional:!1,type:null},{name:"newRange",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ImageEditor",props:{apiOptions:{required:!0,tsType:{name:"APIOptions"},description:""},title:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},range:{required:!1,tsType:{name:"tuple",raw:"[Readonly, Readonly]",elements:[{name:"Readonly",elements:[{name:"Range"}],raw:"Readonly"},{name:"Readonly",elements:[{name:"Range"}],raw:"Readonly"}]},description:"",defaultValue:{value:"[defaultRange, defaultRange]",computed:!1}},box:{required:!1,tsType:{name:"Size"},description:"",defaultValue:{value:"[defaultBoxSize, defaultBoxSize]",computed:!1}},backgroundImage:{required:!1,tsType:{name:"any"},description:"",defaultValue:{value:`{ +import{a as o,j as a}from"./jsx-runtime-FVsy8kgq.js";import{c as f}from"./article-renderer-o95CuJpS.js";import{_ as r}from"./jquery-yG1GhClm.js";import{U as p}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as b}from"./components-0kNWnYe6.js";import{c as y}from"./icon-paths-AuJwhOz7.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{E as w}from"./editor-jsonify-yP45H1ib.js";import{r as C}from"./index-TT1qJ6UJ.js";import{B as v}from"./blur-input-hjJsfoK9.js";import{E as m}from"./editor-SZLWA5DH.js";const{InfoTip:c,InlineIcon:R,RangeInput:k}=b,u=400,h=[0,10],I={url:null,width:0,height:0},x="(ka-.*.s3.amazonaws.com|(fastly|cdn).kastatic.org|khanacademy.org|kasandbox.org)",E=new RegExp("^(https?|web\\+graphie)://[^/]*"+x),T=["center","above","above right","right","below right","below","below left","left","above left"],s=class s extends C.Component{constructor(){super(...arguments),this._isMounted=!1,this.state={backgroundImageError:""}}componentDidMount(){this._isMounted=!0}componentWillUnmount(){this._isMounted=!1}_renderRowForLabel(e,t){return o("tr",{children:[a("td",{children:a(k,{value:e.coordinates,onChange:this.onCoordinateChange.bind(this,t)})}),a("td",{style:{verticalAlign:"bottom",width:"5px"},children:a("input",{type:"text",className:"graph-settings-axis-label",value:e.content,onChange:this.onContentChange.bind(this,t)})}),a("td",{children:a("select",{className:"perseus-widget-dropdown",value:e.alignment,onChange:this.onAlignmentChange.bind(this,t),children:T.map(function(n,l){return a("option",{value:n,children:n},""+l)},this)})}),a("td",{children:a("a",{href:"#",className:"simple-button orange delete-label",title:"Remove this label",onClick:this.removeLabel.bind(this,t),children:a(R,{...y})})})]},t)}change(...e){return f.apply(this,e)}removeLabel(e,t){t.preventDefault();const n=[...this.props.labels];n.splice(e,1),this.props.onChange({labels:n})}onCoordinateChange(e,t){const n=this.props.labels.slice();n[e]=r.extend({},n[e],{coordinates:t}),this.props.onChange({labels:n})}onContentChange(e,t){const n=t.target.value,l=this.props.labels.slice();l[e]=r.extend({},l[e],{content:n}),this.props.onChange({labels:l})}onAlignmentChange(e,t){const n=t.target.value,l=this.props.labels.slice();l[e]=r.extend({},l[e],{alignment:n}),this.props.onChange({labels:l})}setUrl(e,t,n,l){if(!this._isMounted)return;const i=r.clone(this.props.backgroundImage);i.url=e,i.width=t,i.height=n;const g=[i.width,i.height];this.props.onChange({backgroundImage:i,box:g},null,l)}async onUrlChange(e,t){if(!e){this.setUrl(e,0,0,t);return}if(!E.test(e)){this.setState({backgroundImageError:"Images must be from sites hosted by Khan Academy. Please input a Khan Academy-owned address, or use the Add Image tool to rehost an existing image"});return}this.setState({backgroundImageError:""});try{const n=await p.getImageSizeModern(e);this.setUrl(e,n[0],n[1],!0)}catch(n){this.setState({backgroundImageError:`There was an error loading the image URL: ${JSON.stringify(n,null,2)}`})}}onRangeChange(e,t){const n=this.props.range.slice();n[e]=t,this.props.onChange({range:n})}serialize(){return w.serialize.call(this)}render(){const e=this.props.backgroundImage,t=o("div",{className:"image-settings",children:[!p.isLabeledSVG(e.url)&&a("div",{children:o("label",{children:[a("div",{children:"Preview:"}),a("img",{alt:"Editor preview of image",src:e.url,style:{width:"100%"}})]})}),a("div",{children:o("label",{children:[a("div",{children:"Dimensions:"}),o("p",{children:[e.width,"x",e.height]})]})}),a("div",{children:o("label",{children:[o("div",{children:["Alt text:",a(c,{children:"This is important for screenreaders. The content of this alt text will be formatted as markdown (tables, emphasis, etc. are supported)."})]}),a(m,{apiOptions:this.props.apiOptions,content:this.props.alt,onChange:l=>{l.content!=null&&this.change("alt",l.content)},widgetEnabled:!1})]})}),a("div",{children:o("label",{children:[a("div",{children:"Caption:"}),a(m,{apiOptions:this.props.apiOptions,content:this.props.caption,onChange:l=>{l.content!=null&&this.change("caption",l.content)},widgetEnabled:!1})]})})]}),n=a("div",{className:"renderer-widget-error",children:this.state.backgroundImageError});return o("div",{className:"perseus-image-editor",children:[o("label",{children:["Image url:",a(c,{children:"Paste an image or graphie image URL."}),this.state.backgroundImageError&&n,a(v,{value:e.url||"",style:{width:332},onChange:l=>this.onUrlChange(l,!1)})]}),e.url&&t]})}};s.displayName="ImageEditor",s.widgetName="image",s.defaultProps={title:"",range:[h,h],box:[u,u],backgroundImage:I,labels:[],alt:"",caption:""};let d=s;d.__docgenInfo={description:"",methods:[{name:"_renderRowForLabel",docblock:null,modifiers:[],params:[{name:"label",optional:!1,type:null},{name:"i",optional:!1,type:null}],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"removeLabel",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"onCoordinateChange",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"newCoordinates",optional:!1,type:null}],returns:null},{name:"onContentChange",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"onAlignmentChange",docblock:null,modifiers:[],params:[{name:"labelIndex",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"setUrl",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:null},{name:"width",optional:!1,type:null},{name:"height",optional:!1,type:null},{name:"silent",optional:!1,type:null}],returns:null},{name:"onUrlChange",docblock:null,modifiers:["async"],params:[{name:"url",optional:!1,type:{name:"union",raw:"string | undefined | null",elements:[{name:"string"},{name:"undefined"},{name:"null"}]}},{name:"silent",optional:!1,type:{name:"boolean"}}],returns:null},{name:"onRangeChange",docblock:null,modifiers:[],params:[{name:"type",optional:!1,type:null},{name:"newRange",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ImageEditor",props:{apiOptions:{required:!0,tsType:{name:"APIOptions"},description:""},title:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},range:{required:!1,tsType:{name:"tuple",raw:"[Readonly, Readonly]",elements:[{name:"Readonly",elements:[{name:"Range"}],raw:"Readonly"},{name:"Readonly",elements:[{name:"Range"}],raw:"Readonly"}]},description:"",defaultValue:{value:"[defaultRange, defaultRange]",computed:!1}},box:{required:!1,tsType:{name:"Size"},description:"",defaultValue:{value:"[defaultBoxSize, defaultBoxSize]",computed:!1}},backgroundImage:{required:!1,tsType:{name:"any"},description:"",defaultValue:{value:`{ url: null, width: 0, height: 0, diff --git a/assets/image-editor.stories-n33hE2ea.js b/assets/image-editor.stories-n33hE2ea.js index f1ab3936eb..e1c6032f62 100644 --- a/assets/image-editor.stories-n33hE2ea.js +++ b/assets/image-editor.stories-n33hE2ea.js @@ -1,3 +1,3 @@ -import{j as o,a as p}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as d}from"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{V as u}from"./index-6h5t6F0w.js";import{s as f}from"./index-deFLJwr4.js";import{b as g}from"./index-h_CiYGGb.js";import{a as h}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as y}from"./index-awljIyHI.js";import{r as e}from"./index-TT1qJ6UJ.js";import{I as S}from"./image-editor-ifkVG3z1.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./icon-paths-AuJwhOz7.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./shared-3pf9YZIg.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-vbrLThK4.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./video-transcript-link-WVgIZGhp.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-Hmby24Jq.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./choice-none-above-o4v4BTO3.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./index-QCAhLhLD.js";import"./strings-OAjNfY6D.js";import"./bundle.esm-7jAAHVxW.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./components-0kNWnYe6.js";import"./editor-jsonify-yP45H1ib.js";import"./blur-input-hjJsfoK9.js";import"./editor-SZLWA5DH.js";import"./index-0C4KXdeC.js";import"./index-SM3muJE2.js";import"./section-control-button-VtgjGcq5.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const Ir={title:"PerseusEditor/Widgets/Image Editor"},b=y.StyleSheet.create({wrapper:{width:338,margin:20}}),w=h("onChange"),E=()=>{const r=e.useRef(null),[l,c]=e.useState({backgroundImage:{url:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png"}});return p(u,{style:b.wrapper,children:[p(g,{style:{fontStyle:"italic",marginBottom:f.small_12},children:[o("b",{children:"Note"})," that this editor has a known-issue where it does not calculate the image dimensions initially if they aren't provided. It does update the dimensions when you blur the 'Image url:' field."]}),o(S,{...l,apiOptions:d.defaults,onChange:i=>{var m;w(i),c({...(m=r.current)==null?void 0:m.serialize(),...i})},ref:r})]})},t=r=>o(E,{});t.__docgenInfo={description:"",methods:[],displayName:"Default"};var a,s,n;t.parameters={...t.parameters,docs:{...(a=t.parameters)==null?void 0:a.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as o,a as p}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import{A as d}from"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{V as u}from"./index-6h5t6F0w.js";import{s as f}from"./index-deFLJwr4.js";import{b as g}from"./index-h_CiYGGb.js";import{a as h}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as y}from"./index-awljIyHI.js";import{r as e}from"./index-TT1qJ6UJ.js";import{I as S}from"./image-editor-ifkVG3z1.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./icon-paths-AuJwhOz7.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./shared-3pf9YZIg.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-vbrLThK4.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./video-transcript-link-WVgIZGhp.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-Hmby24Jq.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./choice-none-above-o4v4BTO3.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./index-QCAhLhLD.js";import"./strings-OAjNfY6D.js";import"./bundle.esm-7jAAHVxW.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./components-0kNWnYe6.js";import"./editor-jsonify-yP45H1ib.js";import"./blur-input-hjJsfoK9.js";import"./editor-SZLWA5DH.js";import"./index-k-0mNqHS.js";import"./index-SM3muJE2.js";import"./section-control-button-VtgjGcq5.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const Ir={title:"PerseusEditor/Widgets/Image Editor"},b=y.StyleSheet.create({wrapper:{width:338,margin:20}}),w=h("onChange"),E=()=>{const r=e.useRef(null),[l,c]=e.useState({backgroundImage:{url:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png"}});return p(u,{style:b.wrapper,children:[p(g,{style:{fontStyle:"italic",marginBottom:f.small_12},children:[o("b",{children:"Note"})," that this editor has a known-issue where it does not calculate the image dimensions initially if they aren't provided. It does update the dimensions when you blur the 'Image url:' field."]}),o(S,{...l,apiOptions:d.defaults,onChange:i=>{var m;w(i),c({...(m=r.current)==null?void 0:m.serialize(),...i})},ref:r})]})},t=r=>o(E,{});t.__docgenInfo={description:"",methods:[],displayName:"Default"};var a,s,n;t.parameters={...t.parameters,docs:{...(a=t.parameters)==null?void 0:a.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(n=(s=t.parameters)==null?void 0:s.docs)==null?void 0:n.source}}};const xr=["Default"];export{t as Default,xr as __namedExportsOrder,Ir as default}; diff --git a/assets/image.stories-_egU-70u.js b/assets/image.stories-_egU-70u.js index 7004af9419..c90070cf46 100644 --- a/assets/image.stories-_egU-70u.js +++ b/assets/image.stories-_egU-70u.js @@ -1,4 +1,4 @@ -import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{R as c}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const t={content:`[[☃ image 1]] +import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{R as c}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const t={content:`[[☃ image 1]] ===== diff --git a/assets/index-pUnNHf6v.js b/assets/index-pUnNHf6v.js index 77282f68af..13d208f0a8 100644 --- a/assets/index-pUnNHf6v.js +++ b/assets/index-pUnNHf6v.js @@ -1,4 +1,4 @@ -import{a as F}from"./version-akiLXZts.js";import"./article-editor-BfWGyfWk.js";import"./device-framer-wVZUBEZD.js";import"./viewport-resizer-YtC0KtaX.js";import{j as t,a as p}from"./jsx-runtime-FVsy8kgq.js";import{P as d}from"./index-0C4KXdeC.js";import{r as y}from"./index-TT1qJ6UJ.js";import{_ as N}from"./jquery-yG1GhClm.js";import{R as M,W as U}from"./structured-item-diff-C8S6VB9q.js";import{H as W,E as J}from"./editor-page-91uXOpaV.js";import{E as $}from"./editor-SZLWA5DH.js";import{a as G,w as Q}from"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import{b as Y,r as Z,a as K,c as X}from"./renderer-4_U4OAry.js";import{A as ee}from"./perseus-api-mOiZT07d.js";import{l as u,g as te,e as re}from"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./dependencies-8XILypbq.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{J as ne,A as oe}from"./register-all-widgets-and-editors-for-testing-Ftx4wZEN.js";import{c as se}from"./components-0kNWnYe6.js";import{I as ae}from"./icon-paths-AuJwhOz7.js";import{M as ie}from"./multi-items-MzI04jIx.js";import{l as i}from"./index-awljIyHI.js";import{R as le}from"./index-7vsPyIck.js";/* empty css */const ce="@khanacademy/perseus-editor",de="__lib_version__";F(ce,de);const A=d.shape({content:d.string,images:d.objectOf(d.any),widgets:d.objectOf(d.any)}),v=class v extends y.Component{constructor(){super(...arguments),this.state=v._stateFromProps(this.props)}UNSAFE_componentWillReceiveProps(e){this.setState(v._stateFromProps(e))}render(){const{before:e,after:r}=this.state,n=Math.max(e.length,r.length),a=N.times(n,l=>t(M,{before:l{const{before:r,after:n}=e;return{before:Array.isArray(r)?r:[r],after:Array.isArray(n)?n:[n]}};let T=v;T.__docgenInfo={description:"",methods:[{name:"_stateFromProps",docblock:null,modifiers:["static"],params:[{name:"props",optional:!1,type:null}],returns:null}],displayName:"ArticleDiff",props:{after:{description:"",type:{name:"union",value:[{name:"custom",raw:"rendererProps"},{name:"arrayOf",value:{name:"custom",raw:"rendererProps"}}]},required:!0},before:{description:"",type:{name:"union",value:[{name:"custom",raw:"rendererProps"},{name:"arrayOf",value:{name:"custom",raw:"rendererProps"}}]},required:!0}}};const q=d.shape({question:d.shape({}).isRequired,answerArea:d.shape({}).isRequired,hints:d.arrayOf(d.any).isRequired}),H=class H extends y.Component{render(){const{before:e,after:r}=this.props,n=Math.max(e.hints.length,r.hints.length),a=t(M,{before:e.question,after:r.question,title:"Question",showAlignmentOptions:!1,showSeparator:!0}),l=t(U,{before:e.answerArea,after:r.answerArea,title:"Question extras"}),c=N.times(n,function(m){return t(M,{before:m{}};let w=x;const S=i.StyleSheet.create({baseButton:{top:"0",fontSize:"11px",padding:"3px 10px",backgroundRepeat:"repeat-x",borderColor:` +import{a as F}from"./version-akiLXZts.js";import"./article-editor-BfWGyfWk.js";import"./device-framer-wVZUBEZD.js";import"./viewport-resizer-YtC0KtaX.js";import{j as t,a as p}from"./jsx-runtime-FVsy8kgq.js";import{P as d}from"./index-k-0mNqHS.js";import{r as y}from"./index-TT1qJ6UJ.js";import{_ as N}from"./jquery-yG1GhClm.js";import{R as M,W as U}from"./structured-item-diff-C8S6VB9q.js";import{H as W,E as J}from"./editor-page-91uXOpaV.js";import{E as $}from"./editor-SZLWA5DH.js";import{a as G,w as Q}from"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import{b as Y,r as Z,a as K,c as X}from"./renderer-4_U4OAry.js";import{A as ee}from"./perseus-api-mOiZT07d.js";import{l as u,g as te,e as re}from"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./dependencies-8XILypbq.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{J as ne,A as oe}from"./register-all-widgets-and-editors-for-testing-Ftx4wZEN.js";import{c as se}from"./components-0kNWnYe6.js";import{I as ae}from"./icon-paths-AuJwhOz7.js";import{M as ie}from"./multi-items-MzI04jIx.js";import{l as i}from"./index-awljIyHI.js";import{R as le}from"./index-7vsPyIck.js";/* empty css */const ce="@khanacademy/perseus-editor",de="__lib_version__";F(ce,de);const A=d.shape({content:d.string,images:d.objectOf(d.any),widgets:d.objectOf(d.any)}),v=class v extends y.Component{constructor(){super(...arguments),this.state=v._stateFromProps(this.props)}UNSAFE_componentWillReceiveProps(e){this.setState(v._stateFromProps(e))}render(){const{before:e,after:r}=this.state,n=Math.max(e.length,r.length),a=N.times(n,l=>t(M,{before:l{const{before:r,after:n}=e;return{before:Array.isArray(r)?r:[r],after:Array.isArray(n)?n:[n]}};let T=v;T.__docgenInfo={description:"",methods:[{name:"_stateFromProps",docblock:null,modifiers:["static"],params:[{name:"props",optional:!1,type:null}],returns:null}],displayName:"ArticleDiff",props:{after:{description:"",type:{name:"union",value:[{name:"custom",raw:"rendererProps"},{name:"arrayOf",value:{name:"custom",raw:"rendererProps"}}]},required:!0},before:{description:"",type:{name:"union",value:[{name:"custom",raw:"rendererProps"},{name:"arrayOf",value:{name:"custom",raw:"rendererProps"}}]},required:!0}}};const q=d.shape({question:d.shape({}).isRequired,answerArea:d.shape({}).isRequired,hints:d.arrayOf(d.any).isRequired}),H=class H extends y.Component{render(){const{before:e,after:r}=this.props,n=Math.max(e.hints.length,r.hints.length),a=t(M,{before:e.question,after:r.question,title:"Question",showAlignmentOptions:!1,showSeparator:!0}),l=t(U,{before:e.answerArea,after:r.answerArea,title:"Question extras"}),c=N.times(n,function(m){return t(M,{before:m{}};let w=x;const S=i.StyleSheet.create({baseButton:{top:"0",fontSize:"11px",padding:"3px 10px",backgroundRepeat:"repeat-x",borderColor:` rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25) diff --git a/assets/index-uK3b_Y1s.js b/assets/index-uK3b_Y1s.js index b8c00da003..9f920b2a9a 100644 --- a/assets/index-uK3b_Y1s.js +++ b/assets/index-uK3b_Y1s.js @@ -1,4 +1,4 @@ -import{a as s,j as e,F as $}from"./jsx-runtime-FVsy8kgq.js";import{c as h}from"./article-renderer-o95CuJpS.js";import{_ as r}from"./jquery-yG1GhClm.js";import{U as H}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import{a as g,g as j}from"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import{K as p}from"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{E as f}from"./editor-jsonify-yP45H1ib.js";import{r as d}from"./index-TT1qJ6UJ.js";import{G as Q}from"./graph-settings-LBBYDOUY.js";import{c}from"./components-0kNWnYe6.js";import{b as Z,d as ee,e as ne,f as te,c as ae}from"./icon-paths-AuJwhOz7.js";import"./prop-types-3bOVFRDQ.js";import{c as se}from"./key-translator-IA-2V2LV.js";import"./mobile-keypad-hKjeQGNp.js";import{u as re}from"./button-assets-txIojR3b.js";import{V as ie}from"./index-6h5t6F0w.js";import{c as K}from"./index-deFLJwr4.js";import{l as le}from"./index-awljIyHI.js";const{InlineIcon:b}=c,D=class D extends d.Component{constructor(n){super(n),this.toggle=t=>{t.preventDefault(),this.setState({show:!this.state.show})},this.state={show:n.initiallyVisible}}render(){return s("div",{className:"perseus-interaction-element",children:[s("a",{href:"#",className:"perseus-interaction-element-title "+(this.state.show?"open":"closed"),onClick:this.toggle,children:[this.state.show?e(b,{...Z}):e(b,{...ee}),this.props.title]}),s("div",{className:"perseus-interaction-element-content "+(this.state.show?"enter":"leave"),children:[this.props.children,(this.props.onUp!=null||this.props.onDown!=null||this.props.onDelete!=null)&&s("div",{className:"edit-controls",children:[this.props.onUp!=null&&e("button",{onClick:this.props.onUp,children:e(b,{...ne})}),this.props.onDown!=null&&e("button",{onClick:this.props.onDown,children:e(b,{...te})}),this.props.onDelete!=null&&e("button",{onClick:this.props.onDelete,children:e(b,{...ae})})]})]})]})}};D.defaultProps={initiallyVisible:!1,title:"More"};let u=D;u.__docgenInfo={description:"",methods:[{name:"toggle",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactSyntheticEvent",raw:"React.SyntheticEvent",alias:"React.SyntheticEvent"}}],returns:null}],displayName:"ElementContainer",props:{children:{required:!0,tsType:{name:"union",raw:"React.ReactElement | ReadonlyArray>",elements:[{name:"ReactReactElement",raw:"React.ReactElement",elements:[{name:"any"}]},{name:"ReadonlyArray",elements:[{name:"ReactReactElement",raw:"React.ReactElement",elements:[{name:"any"}]}],raw:"ReadonlyArray>"}]},description:""},initiallyVisible:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onDelete:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void | null | undefined",signature:{arguments:[],return:{name:"union",raw:"void | null | undefined",elements:[{name:"void"},{name:"null"},{name:"undefined"}]}}},description:""},onDown:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void | null | undefined",signature:{arguments:[],return:{name:"union",raw:"void | null | undefined",elements:[{name:"void"},{name:"null"},{name:"undefined"}]}}},description:""},onUp:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void | null | undefined",signature:{arguments:[],return:{name:"union",raw:"void | null | undefined",elements:[{name:"void"},{name:"null"},{name:"undefined"}]}}},description:""},title:{required:!1,tsType:{name:"union",raw:"string | React.ReactElement",elements:[{name:"string"},{name:"ReactReactElement",raw:"React.ReactElement",elements:[{name:"any"}]}]},description:"",defaultValue:{value:'"More"',computed:!1}}}};const{ButtonGroup:oe}=c,pe=[p.BLACK,p.BLUE,p.GREEN,p.PINK,p.PURPLE,p.RED,p.GRAY],de=[p.LIGHT_BLUE,p.LIGHT_ORANGE,p.LIGHT_PINK,p.LIGHT_GREEN,p.LIGHT_PURPLE,p.LIGHT_RED,"#fff"],X=class X extends d.Component{render(){const n=this.props.lightColors?de:pe;return e(oe,{value:this.props.value,allowEmpty:!1,buttons:r.map(n,t=>({value:t,content:s("span",{children:[e("span",{className:"colorpicker-circle",style:{background:t}})," "]})})),onChange:this.props.onChange})}};X.defaultProps={value:p.BLACK,lightColors:!1};let m=X;m.__docgenInfo={description:"",methods:[],displayName:"ColorPicker",props:{lightColors:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},value:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"KhanColors.BLACK",computed:!0}}}};const{ButtonGroup:ue}=c,M=class M extends d.Component{render(){return e(ue,{value:this.props.value,allowEmpty:!1,buttons:[{value:"",content:e("span",{children:"—"})},{value:"-",content:e("span",{children:"–––"})},{value:"- ",content:e("span",{children:"–  –"})},{value:".",content:e("span",{children:"····"})},{value:". ",content:e("span",{children:"· · ·"})}],onChange:this.props.onChange})}};M.defaultProps={value:""};let y=M;y.__docgenInfo={description:"",methods:[],displayName:"DashPicker",props:{value:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}}}};function i(W){const n=d.useRef(null),t=d.useRef(),{locale:a,strings:o}=re();return d.useEffect(()=>{n.current&&!t.current&&(t.current=se(n.current,a,o,l=>({...l,handlers:{edit:v=>{let _=v.latex();_=_.replace(/<>/g,"\\ne"),W.value!==_&&W.onChange(_)},upOutOf:v=>{v.typedText("^")}}})))}),e(ie,{style:ce.outerWrapper,children:e("span",{ref:n,className:"perseus-math-input mq-editable-field mq-math-mode"})})}const ce=le.StyleSheet.create({outerWrapper:{display:"inline-block",borderStyle:"solid",borderWidth:1,borderColor:K.offBlack50,borderRadius:3,background:K.white}});i.__docgenInfo={description:`A simple Mathquill MathField input for the InteractionEditor. +import{a as s,j as e,F as $}from"./jsx-runtime-FVsy8kgq.js";import{c as h}from"./article-renderer-o95CuJpS.js";import{_ as r}from"./jquery-yG1GhClm.js";import{U as H}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import{a as g,g as j}from"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import{K as p}from"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{E as f}from"./editor-jsonify-yP45H1ib.js";import{r as d}from"./index-TT1qJ6UJ.js";import{G as Q}from"./graph-settings-LBBYDOUY.js";import{c}from"./components-0kNWnYe6.js";import{b as Z,d as ee,e as ne,f as te,c as ae}from"./icon-paths-AuJwhOz7.js";import"./prop-types-3bOVFRDQ.js";import{c as se}from"./key-translator-IA-2V2LV.js";import"./mobile-keypad-hKjeQGNp.js";import{u as re}from"./button-assets-txIojR3b.js";import{V as ie}from"./index-6h5t6F0w.js";import{c as K}from"./index-deFLJwr4.js";import{l as le}from"./index-awljIyHI.js";const{InlineIcon:b}=c,D=class D extends d.Component{constructor(n){super(n),this.toggle=t=>{t.preventDefault(),this.setState({show:!this.state.show})},this.state={show:n.initiallyVisible}}render(){return s("div",{className:"perseus-interaction-element",children:[s("a",{href:"#",className:"perseus-interaction-element-title "+(this.state.show?"open":"closed"),onClick:this.toggle,children:[this.state.show?e(b,{...Z}):e(b,{...ee}),this.props.title]}),s("div",{className:"perseus-interaction-element-content "+(this.state.show?"enter":"leave"),children:[this.props.children,(this.props.onUp!=null||this.props.onDown!=null||this.props.onDelete!=null)&&s("div",{className:"edit-controls",children:[this.props.onUp!=null&&e("button",{onClick:this.props.onUp,children:e(b,{...ne})}),this.props.onDown!=null&&e("button",{onClick:this.props.onDown,children:e(b,{...te})}),this.props.onDelete!=null&&e("button",{onClick:this.props.onDelete,children:e(b,{...ae})})]})]})]})}};D.defaultProps={initiallyVisible:!1,title:"More"};let u=D;u.__docgenInfo={description:"",methods:[{name:"toggle",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactSyntheticEvent",raw:"React.SyntheticEvent",alias:"React.SyntheticEvent"}}],returns:null}],displayName:"ElementContainer",props:{children:{required:!0,tsType:{name:"union",raw:"React.ReactElement | ReadonlyArray>",elements:[{name:"ReactReactElement",raw:"React.ReactElement",elements:[{name:"any"}]},{name:"ReadonlyArray",elements:[{name:"ReactReactElement",raw:"React.ReactElement",elements:[{name:"any"}]}],raw:"ReadonlyArray>"}]},description:""},initiallyVisible:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onDelete:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void | null | undefined",signature:{arguments:[],return:{name:"union",raw:"void | null | undefined",elements:[{name:"void"},{name:"null"},{name:"undefined"}]}}},description:""},onDown:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void | null | undefined",signature:{arguments:[],return:{name:"union",raw:"void | null | undefined",elements:[{name:"void"},{name:"null"},{name:"undefined"}]}}},description:""},onUp:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void | null | undefined",signature:{arguments:[],return:{name:"union",raw:"void | null | undefined",elements:[{name:"void"},{name:"null"},{name:"undefined"}]}}},description:""},title:{required:!1,tsType:{name:"union",raw:"string | React.ReactElement",elements:[{name:"string"},{name:"ReactReactElement",raw:"React.ReactElement",elements:[{name:"any"}]}]},description:"",defaultValue:{value:'"More"',computed:!1}}}};const{ButtonGroup:oe}=c,pe=[p.BLACK,p.BLUE,p.GREEN,p.PINK,p.PURPLE,p.RED,p.GRAY],de=[p.LIGHT_BLUE,p.LIGHT_ORANGE,p.LIGHT_PINK,p.LIGHT_GREEN,p.LIGHT_PURPLE,p.LIGHT_RED,"#fff"],X=class X extends d.Component{render(){const n=this.props.lightColors?de:pe;return e(oe,{value:this.props.value,allowEmpty:!1,buttons:r.map(n,t=>({value:t,content:s("span",{children:[e("span",{className:"colorpicker-circle",style:{background:t}})," "]})})),onChange:this.props.onChange})}};X.defaultProps={value:p.BLACK,lightColors:!1};let m=X;m.__docgenInfo={description:"",methods:[],displayName:"ColorPicker",props:{lightColors:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},value:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"KhanColors.BLACK",computed:!0}}}};const{ButtonGroup:ue}=c,M=class M extends d.Component{render(){return e(ue,{value:this.props.value,allowEmpty:!1,buttons:[{value:"",content:e("span",{children:"—"})},{value:"-",content:e("span",{children:"–––"})},{value:"- ",content:e("span",{children:"–  –"})},{value:".",content:e("span",{children:"····"})},{value:". ",content:e("span",{children:"· · ·"})}],onChange:this.props.onChange})}};M.defaultProps={value:""};let y=M;y.__docgenInfo={description:"",methods:[],displayName:"DashPicker",props:{value:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}}}};function i(W){const n=d.useRef(null),t=d.useRef(),{locale:a,strings:o}=re();return d.useEffect(()=>{n.current&&!t.current&&(t.current=se(n.current,a,o,l=>({...l,handlers:{edit:v=>{let _=v.latex();_=_.replace(/<>/g,"\\ne"),W.value!==_&&W.onChange(_)},upOutOf:v=>{v.typedText("^")}}})))}),e(ie,{style:ce.outerWrapper,children:e("span",{ref:n,className:"perseus-math-input mq-editable-field mq-math-mode"})})}const ce=le.StyleSheet.create({outerWrapper:{display:"inline-block",borderStyle:"solid",borderWidth:1,borderColor:K.offBlack50,borderRadius:3,background:K.white}});i.__docgenInfo={description:`A simple Mathquill MathField input for the InteractionEditor. Unlike our other uses of Mathquill, we're not using a keypad here; it's just the input itself for use writing TeX.`,methods:[],displayName:"MathquillInput",props:{value:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:""}}};const{NumberInput:he}=c,{getDependencies:me}=g,L=class L extends d.Component{constructor(){super(...arguments),this.change=(...n)=>h.apply(this,n),this.serialize=()=>f.serialize.call(this)}render(){const{TeX:n}=me();return s("div",{className:"graph-settings",children:[s("div",{className:"perseus-widget-row",children:[e(n,{children:this.props.funcName+"(x)="})," ",e(i,{value:this.props.value,onChange:this.change("value")})]}),s("div",{className:"perseus-widget-row",children:["Range: ",e(n,{children:"\\Large("}),e(i,{value:this.props.rangeMin,onChange:this.change("rangeMin")}),e(n,{children:","})," ",e(i,{value:this.props.rangeMax,onChange:this.change("rangeMax")}),e(n,{children:"\\Large)"})]}),e("div",{className:"perseus-widget-row",children:e(m,{value:this.props.color,onChange:this.change("color")})}),e("div",{className:"perseus-widget-row",children:e(y,{value:this.props.strokeDasharray,onChange:this.change("strokeDasharray")})}),e("div",{className:"perseus-widget-row",children:s("div",{className:"perseus-widget-left-col",children:["Width:"," ",e(he,{value:this.props.strokeWidth,placeholder:2,onChange:this.change("strokeWidth")})]})})]})}};L.defaultProps={value:"x",rangeMin:"-10",rangeMax:"10",color:p.BLUE,strokeDasharray:"",strokeWidth:2};let w=L;w.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"FunctionEditor",props:{value:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"x"',computed:!1}},rangeMin:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"-10"',computed:!1}},rangeMax:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"10"',computed:!1}},color:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"KhanColors.BLUE",computed:!0}},strokeDasharray:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},strokeWidth:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"2",computed:!1}}}};const{TextInput:ge}=c,{getDependencies:fe}=g,Y=class Y extends d.Component{constructor(){super(...arguments),this.change=(...n)=>h.apply(this,n),this.serialize=()=>f.serialize.call(this)}render(){const{TeX:n}=fe();return s("div",{className:"graph-settings",children:[e("div",{className:"perseus-widget-row",children:e(ge,{value:this.props.label,onChange:this.change("label"),style:{width:"100%"}})}),s("div",{className:"perseus-widget-row",children:["Location: ",e(n,{children:"\\Large("}),e(i,{value:this.props.coordX,onChange:this.change("coordX")}),e(n,{children:","})," ",e(i,{value:this.props.coordY,onChange:this.change("coordY")}),e(n,{children:"\\Large)"})]}),e("div",{className:"perseus-widget-row",children:e(m,{value:this.props.color,onChange:this.change("color")})})]})}};Y.defaultProps={coordX:"0",coordY:"0",color:p.BLACK,label:"\\phi"};let N=Y;N.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"LabelEditor",props:{color:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"KhanColors.BLACK",computed:!0}},coordX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},coordY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},label:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"\\\\phi"',computed:!1}}}};const{ButtonGroup:ye}=c,I=class I extends d.Component{render(){return e(ye,{value:this.props.value,allowEmpty:!1,buttons:[{value:"",content:e("span",{children:"—"})},{value:"->",content:e("span",{children:"→"})}],onChange:this.props.onChange})}};I.defaultProps={value:""};let S=I;S.__docgenInfo={description:"",methods:[],displayName:"ArrowPicker",props:{value:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}}}};const{NumberInput:ve}=c,{getDependencies:be}=g,U=class U extends d.Component{constructor(){super(...arguments),this.change=(...n)=>h.apply(this,n),this.serialize=()=>f.serialize.call(this)}render(){const{TeX:n}=be();return s("div",{className:"graph-settings",children:[s("div",{className:"perseus-widget-row",children:["Start: ",e(n,{children:"\\Large("}),e(i,{value:this.props.startX,onChange:this.change("startX")}),e(n,{children:","})," ",e(i,{value:this.props.startY,onChange:this.change("startY")}),e(n,{children:"\\Large)"})]}),s("div",{className:"perseus-widget-row",children:["End: ",e(n,{children:"\\Large("}),e(i,{value:this.props.endX,onChange:this.change("endX")}),e(n,{children:","})," ",e(i,{value:this.props.endY,onChange:this.change("endY")}),e(n,{children:"\\Large)"})]}),e("div",{className:"perseus-widget-row",children:e(m,{value:this.props.color,onChange:this.change("color")})}),s("div",{className:"perseus-widget-row",children:[e(y,{value:this.props.strokeDasharray,onChange:this.change("strokeDasharray")}),"   ",e(S,{value:this.props.arrows,onChange:this.change("arrows")})]}),e("div",{className:"perseus-widget-row",children:s("div",{className:"perseus-widget-left-col",children:["Width:"," ",e(ve,{value:this.props.strokeWidth,placeholder:2,onChange:this.change("strokeWidth")})]})})]})}};U.defaultProps={startX:"-5",startY:"5",endX:"5",endY:"5",color:p.BLACK,strokeDasharray:"",arrows:"",strokeWidth:2};let C=U;C.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"LineEditor",props:{startX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"-5"',computed:!1}},startY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},endX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},endY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},color:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"KhanColors.BLACK",computed:!0}},strokeDasharray:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},arrows:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},strokeWidth:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"2",computed:!1}}}};const{ButtonGroup:we,NumberInput:Ne}=c,P=class P extends d.Component{constructor(){super(...arguments),this.change=n=>h.call(this,n)}render(){const{TeX:n}=j();return s("div",{children:[s("div",{className:"perseus-widget-row",children:["Constraint:"," ",e(we,{value:this.props.constraint,allowEmpty:!1,buttons:[{value:"none",content:"None"},{value:"snap",content:"Snap"},{value:"x",content:"x="},{value:"y",content:"y="}],onChange:this.change("constraint")})]}),this.props.constraint==="snap"&&s("div",{className:"perseus-widget-row",children:["Snap:"," ",e(Ne,{value:this.props.snap,placeholder:0,onChange:this.change("snap")})]}),this.props.constraint==="x"&&e("div",{className:"graph-settings",children:s("div",{className:"perseus-widget-row",children:[e(n,{children:"x="})," ",e(i,{value:this.props.constraintFn,onChange:this.change("constraintFn")})]})}),this.props.constraint==="y"&&e("div",{className:"graph-settings",children:s("div",{className:"perseus-widget-row",children:[e(n,{children:"y="})," ",e(i,{value:this.props.constraintFn,onChange:this.change("constraintFn")})]})}),"Ensure these are set so nothing can be dragged off the canvas:",e("div",{className:"perseus-widget-row",children:s("div",{className:"perseus-widget-row",children:[e(n,{children:"x \\in \\Large["})," ",e(i,{value:this.props.constraintXMin,onChange:this.change("constraintXMin")}),e(n,{children:", "})," ",e(i,{value:this.props.constraintXMax,onChange:this.change("constraintXMax")})," ",e(n,{children:"\\Large]"})]})}),e("div",{className:"perseus-widget-row",children:s("div",{className:"perseus-widget-row",children:[e(n,{children:"y \\in \\Large["})," ",e(i,{value:this.props.constraintYMin,onChange:this.change("constraintYMin")}),e(n,{children:", "})," ",e(i,{value:this.props.constraintYMax,onChange:this.change("constraintYMax")})," ",e(n,{children:"\\Large]"})]})})]})}};P.defaultProps={constraint:"none",snap:.5,constraintFn:"0",constraintXMin:"-10",constraintXMax:"10",constraintYMin:"-10",constraintYMax:"10"};let k=P;k.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"propName",optional:!1,type:{name:"string"}}],returns:{type:{name:"unknown"}}}],displayName:"ConstraintEditor",props:{constraint:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"none"',computed:!1}},constraintFn:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},constraintXMax:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"10"',computed:!1}},constraintXMin:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"-10"',computed:!1}},constraintYMax:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"10"',computed:!1}},constraintYMin:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"-10"',computed:!1}},snap:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0.5",computed:!1}}}};const{NumberInput:J}=c,{getDependencies:Ce}=g,z=class z extends d.Component{constructor(){super(...arguments),this.change=(...n)=>h.apply(this,n),this.serialize=()=>f.serialize.call(this)}render(){const{TeX:n}=Ce();return s("div",{className:"graph-settings",children:["Initial position:",s("div",{className:"perseus-widget-row",children:["Start: ",e(n,{children:"\\Large("}),e(i,{value:this.props.startX,onChange:this.change("startX")}),e(n,{children:","})," ",e(i,{value:this.props.startY,onChange:this.change("startY")}),e(n,{children:"\\Large)"})]}),s("div",{className:"perseus-widget-row",children:["End: ",e(n,{children:"\\Large("}),e(i,{value:this.props.endX,onChange:this.change("endX")}),e(n,{children:","})," ",e(i,{value:this.props.endY,onChange:this.change("endY")}),e(n,{children:"\\Large)"})]}),s("div",{className:"perseus-widget-row",children:["Start updates ",e(n,{children:"(x_n, y_n)"})," for ",e(n,{children:"n ="}),e(J,{value:this.props.startSubscript,placeholder:0,onChange:this.change("startSubscript")})]}),s("div",{className:"perseus-widget-row",children:["End updates ",e(n,{children:"(x_m, y_m)"})," for ",e(n,{children:"m ="}),e(J,{value:this.props.endSubscript,placeholder:0,onChange:this.change("endSubscript")})]}),e("div",{className:"perseus-widget-row",children:"All constraints are applied to the start point."}),e(k,{...this.props})]})}};z.defaultProps={startX:"-5",startY:"5",endX:"5",endY:"5",constraint:"none",snap:.5,constraintFn:"0",constraintXMin:"-10",constraintXMax:"10",constraintYMin:"-10",constraintYMax:"10"};let R=z;R.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MovableLineEditor",props:{startX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"-5"',computed:!1}},startY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},endX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},endY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},constraint:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"none"',computed:!1}},snap:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0.5",computed:!1}},constraintFn:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},startSubscript:{required:!0,tsType:{name:"number"},description:""},endSubscript:{required:!0,tsType:{name:"number"},description:""},constraintXMin:{defaultValue:{value:'"-10"',computed:!1},required:!1},constraintXMax:{defaultValue:{value:'"10"',computed:!1},required:!1},constraintYMin:{defaultValue:{value:'"-10"',computed:!1},required:!1},constraintYMax:{defaultValue:{value:'"10"',computed:!1},required:!1}}};const{NumberInput:ke}=c,{getDependencies:Re}=g,G=class G extends d.Component{constructor(){super(...arguments),this.change=(...n)=>h.apply(this,n),this.serialize=()=>f.serialize.call(this)}render(){const{TeX:n}=Re();return s("div",{className:"graph-settings",children:[s("div",{className:"perseus-widget-row",children:["Start: ",e(n,{children:"\\Large("}),e(i,{value:this.props.startX,onChange:this.change("startX")}),e(n,{children:","})," ",e(i,{value:this.props.startY,onChange:this.change("startY")}),e(n,{children:"\\Large)"})]}),s("div",{className:"perseus-widget-row",children:["Update ",e(n,{children:"(x_n, y_n)"})," for ",e(n,{children:"n ="})," ",e(ke,{value:this.props.varSubscript,placeholder:0,onChange:this.change("varSubscript")})]}),e(k,{...this.props})]})}};G.defaultProps={startX:"0",startY:"0",constraint:"none",snap:.5,constraintFn:"0",constraintXMin:"-10",constraintXMax:"10",constraintYMin:"-10",constraintYMax:"10"};let q=G;q.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MovablePointEditor",props:{startX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},startY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},constraint:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"none"',computed:!1}},snap:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0.5",computed:!1}},constraintFn:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},varSubscript:{required:!0,tsType:{name:"number"},description:""},constraintXMin:{defaultValue:{value:'"-10"',computed:!1},required:!1},constraintXMax:{defaultValue:{value:'"10"',computed:!1},required:!1},constraintYMin:{defaultValue:{value:'"-10"',computed:!1},required:!1},constraintYMax:{defaultValue:{value:'"10"',computed:!1},required:!1}}};const{NumberInput:qe}=c,{getDependencies:xe}=g,B=class B extends d.Component{constructor(){super(...arguments),this.change=(...n)=>h.apply(this,n),this.serialize=()=>f.serialize.call(this)}render(){const{TeX:n}=xe();return s("div",{className:"graph-settings",children:[s("div",{className:"perseus-widget-row",children:[e(n,{children:"X(t) ="})," ",e(i,{value:this.props.x,onChange:this.change("x")})]}),s("div",{className:"perseus-widget-row",children:[e(n,{children:"Y(t) ="})," ",e(i,{value:this.props.y,onChange:this.change("y")})]}),s("div",{className:"perseus-widget-row",children:["Range: ",e(n,{children:"\\Large("}),e(i,{value:this.props.rangeMin,onChange:this.change("rangeMin")}),e(n,{children:","})," ",e(i,{value:this.props.rangeMax,onChange:this.change("rangeMax")}),e(n,{children:"\\Large)"})]}),e("div",{className:"perseus-widget-row",children:e(m,{value:this.props.color,onChange:this.change("color")})}),e("div",{className:"perseus-widget-row",children:e(y,{value:this.props.strokeDasharray,onChange:this.change("strokeDasharray")})}),e("div",{className:"perseus-widget-row",children:s("div",{className:"perseus-widget-left-col",children:["Width:"," ",e(qe,{value:this.props.strokeWidth,placeholder:2,onChange:this.change("strokeWidth")})]})})]})}};B.defaultProps={x:"cos(t)",y:"sin(t)",rangeMin:"0",rangeMax:"2\\pi",color:p.BLUE,strokeDasharray:"",strokeWidth:2};let x=B;x.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ParametricEditor",props:{x:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"cos(t)"',computed:!1}},y:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"sin(t)"',computed:!1}},rangeMin:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},rangeMax:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"2\\\\pi"',computed:!1}},color:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"KhanColors.BLUE",computed:!0}},strokeDasharray:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},strokeWidth:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"2",computed:!1}}}};const{getDependencies:Te}=g,F=class F extends d.Component{constructor(){super(...arguments),this.change=(...n)=>h.apply(this,n),this.serialize=()=>f.serialize.call(this)}render(){const{TeX:n}=Te();return s("div",{className:"graph-settings",children:[s("div",{className:"perseus-widget-row",children:["Coordinate: ",e(n,{children:"\\Large("}),e(i,{value:this.props.coordX,onChange:this.change("coordX")}),e(n,{children:","})," ",e(i,{value:this.props.coordY,onChange:this.change("coordY")}),e(n,{children:"\\Large)"})]}),e("div",{className:"perseus-widget-row",children:e(m,{value:this.props.color,onChange:this.change("color")})})]})}};F.defaultProps={coordX:"0",coordY:"0",color:p.BLACK};let T=F;T.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PointEditor",props:{coordX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},coordY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"0"',computed:!1}},color:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"KhanColors.BLACK",computed:!0}}}};const{getDependencies:Ae}=g,O=class O extends d.Component{constructor(){super(...arguments),this.change=(...n)=>h.apply(this,n),this.serialize=()=>f.serialize.call(this)}render(){const{TeX:n}=Ae();return s("div",{className:"graph-settings",children:[s("div",{className:"perseus-widget-row",children:["Bottom left: ",e(n,{children:"\\Large("}),e(i,{value:this.props.coordX,onChange:this.change("coordX")}),e(n,{children:","})," ",e(i,{value:this.props.coordY,onChange:this.change("coordY")}),e(n,{children:"\\Large)"})]}),s("div",{className:"perseus-widget-row",children:["Width:"," ",e(i,{value:this.props.width,onChange:this.change("width")})]}),s("div",{className:"perseus-widget-row",children:["Height:"," ",e(i,{value:this.props.height,onChange:this.change("height")})]}),e("div",{className:"perseus-widget-row",children:e(m,{value:this.props.color,lightColors:!0,onChange:this.change("color")})}),e("div",{className:"perseus-widget-row",children:"You want a border? Sorry, draw your own."})]})}};O.defaultProps={coordX:"-5",coordY:"5",width:"2",height:"3",color:p.LIGHT_BLUE};let A=O;A.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"RectangleEditor",props:{color:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"KhanColors.LIGHT_BLUE",computed:!0}},coordX:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"-5"',computed:!1}},coordY:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"5"',computed:!1}},height:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"3"',computed:!1}},width:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"2"',computed:!1}}}};const{getDependencies:_e}=g,{unescapeMathMode:Se}=H,Ve={graph:{box:[400,400],labels:["x","y"],range:[[-10,10],[-10,10]],tickStep:[1,1],gridStep:[1,1],markings:"graph"},elements:[]},E=class E extends d.Component{constructor(){super(...arguments),this.state={usedVarSubscripts:this._getAllVarSubscripts(this.props.elements),usedFunctionNames:this._getAllFunctionNames(this.props.elements)},this._updateGraphProps=n=>{this.change({graph:r.extend(r.omit(n,"step"),{tickStep:n.step})})},this._addNewElement=n=>{const t=n.target.value;if(t==="")return;n.target.value="";const a={type:t,key:t+"-"+(Math.random()*16777215<<0).toString(16),options:t==="point"?r.clone(T.defaultProps):t==="line"?r.clone(C.defaultProps):t==="movable-point"?r.clone(q.defaultProps):t==="movable-line"?r.clone(R.defaultProps):t==="function"?r.clone(w.defaultProps):t==="parametric"?r.clone(x.defaultProps):t==="label"?r.clone(N.defaultProps):t==="rectangle"?r.clone(A.defaultProps):{}};let o;if(t==="movable-point")o=r.max([r.max(this.state.usedVarSubscripts),-1])+1,a.options.varSubscript=o;else if(t==="movable-line")o=r.max([r.max(this.state.usedVarSubscripts),-1])+1,a.options.startSubscript=o,a.options.endSubscript=o+1;else if(t==="function"){const l=String.fromCharCode(r.max([r.max(r.map(this.state.usedFunctionNames,function(v){return v.charCodeAt(0)})),101])+1);a.options.funcName=l}this.change({elements:this.props.elements.concat(a)})},this._deleteElement=n=>{const t=this.props.elements[n];this.change({elements:r.without(this.props.elements,t)})},this._moveElementUp=n=>{const t=this.props.elements[n],a=r.without(this.props.elements,t);a.splice(n-1,0,t),this.change({elements:a})},this._moveElementDown=n=>{const t=this.props.elements[n],a=r.without(this.props.elements,t);a.splice(n+1,0,t),this.change({elements:a})},this.change=(...n)=>h.apply(this,n),this.serialize=()=>f.serialize.call(this)}UNSAFE_componentWillReceiveProps(n){this.setState({usedVarSubscripts:this._getAllVarSubscripts(n.elements),usedFunctionNames:this._getAllFunctionNames(n.elements)})}_getAllVarSubscripts(n){return r.map(r.where(n,{type:"movable-point"}),t=>t.options.varSubscript).concat(r.map(r.where(n,{type:"movable-line"}),t=>t.options.startSubscript)).concat(r.map(r.where(n,{type:"movable-line"}),t=>t.options.endSubscript))}_getAllFunctionNames(n){return r.map(r.where(n,{type:"function"}),t=>t.options.funcName)}render(){const{TeX:n}=_e();return s("div",{className:"perseus-widget-interaction-editor",children:[s(u,{title:"Grid settings",children:[e(Q,{editableSettings:["canvas","graph"],box:this.props.graph.box,labels:this.props.graph.labels,range:this.props.graph.range,step:this.props.graph.tickStep,gridStep:this.props.graph.gridStep,markings:this.props.graph.markings,onChange:this._updateGraphProps}),e($,{children:this.props.graph.valid!==!0&&e("div",{children:this.props.graph.valid})})]}),r.map(this.props.elements,function(t,a){if(t.type==="movable-point")return e(u,{title:s("span",{children:["Movable point"," ",e(n,{children:"(x_{"+t.options.varSubscript+"}, y_{"+t.options.varSubscript+"})"})]}),onUp:a===0?null:this._moveElementUp.bind(this,a),onDown:a===this.props.elements.length-1?null:this._moveElementDown.bind(this,a),onDelete:this._deleteElement.bind(this,a),children:e(q,{...t.options,onChange:o=>{const l=JSON.parse(JSON.stringify(this.props.elements));r.extend(l[a].options,o),this.change({elements:l})}})},t.key);if(t.type==="movable-line")return e(u,{title:s("span",{children:["Movable line"," ",e(n,{children:"(x_{"+t.options.startSubscript+"}, y_{"+t.options.startSubscript+"})"})," ","to"," ",e(n,{children:"(x_{"+t.options.endSubscript+"}, y_{"+t.options.endSubscript+"})"})]}),onUp:a===0?null:this._moveElementUp.bind(this,a),onDown:a===this.props.elements.length-1?null:this._moveElementDown.bind(this,a),onDelete:this._deleteElement.bind(this,a),children:e(R,{...t.options,onChange:o=>{const l=JSON.parse(JSON.stringify(this.props.elements));r.extend(l[a].options,o),this.change({elements:l})}})},t.key);if(t.type==="point")return e(u,{title:s("span",{children:["Point"," ",e(n,{children:"("+t.options.coordX+", "+t.options.coordY+")"})]}),onUp:a===0?null:this._moveElementUp.bind(this,a),onDown:a===this.props.elements.length-1?null:this._moveElementDown.bind(this,a),onDelete:this._deleteElement.bind(this,a),children:e(T,{...t.options,onChange:o=>{const l=JSON.parse(JSON.stringify(this.props.elements));r.extend(l[a].options,o),this.change({elements:l})}})},t.key);if(t.type==="line")return e(u,{title:s("span",{children:["Line"," ",e(n,{children:"("+t.options.startX+", "+t.options.startY+")"})," ","to"," ",e(n,{children:"("+t.options.endX+", "+t.options.endY+")"})]}),onUp:a===0?null:this._moveElementUp.bind(this,a),onDown:a===this.props.elements.length-1?null:this._moveElementDown.bind(this,a),onDelete:this._deleteElement.bind(this,a),children:e(C,{...t.options,onChange:o=>{const l=JSON.parse(JSON.stringify(this.props.elements));r.extend(l[a].options,o),this.change({elements:l})}})},t.key);if(t.type==="function")return e(u,{title:s("span",{children:["Function"," ",e(n,{children:t.options.funcName+"(x) = "+t.options.value})]}),onUp:a===0?null:this._moveElementUp.bind(this,a),onDown:a===this.props.elements.length-1?null:this._moveElementDown.bind(this,a),onDelete:this._deleteElement,children:e(w,{...t.options,onChange:o=>{const l=JSON.parse(JSON.stringify(this.props.elements));r.extend(l[a].options,o),this.change({elements:l})}})},t.key);if(t.type==="parametric")return e(u,{title:e("span",{children:"Parametric"}),onUp:a===0?null:this._moveElementUp.bind(this,a),onDown:a===this.props.elements.length-1?null:this._moveElementDown.bind(this,a),onDelete:this._deleteElement,children:e(x,{...t.options,onChange:o=>{const l=JSON.parse(JSON.stringify(this.props.elements));r.extend(l[a].options,o),this.change({elements:l})}})},t.key);if(t.type==="label")return e(u,{title:s("span",{children:["Label"," ",e(n,{children:Se(t.options.label)})," "]}),onUp:a===0?null:this._moveElementUp.bind(this,a),onDown:a===this.props.elements.length-1?null:this._moveElementDown.bind(this,a),onDelete:this._deleteElement,children:e(N,{...t.options,onChange:o=>{const l=JSON.parse(JSON.stringify(this.props.elements));r.extend(l[a].options,o),this.change({elements:l})}})},t.key);if(t.type==="rectangle")return e(u,{title:s("span",{children:["Rectangle"," ",e(n,{children:"("+t.options.coordX+", "+t.options.coordY+")"})," — ",e(n,{children:t.options.width+" \\times "+t.options.height})]}),onUp:a===0?null:this._moveElementUp.bind(this,a),onDown:a===this.props.elements.length-1?null:this._moveElementDown.bind(this,a),onDelete:this._deleteElement,children:e(A,{...t.options,onChange:o=>{const l=JSON.parse(JSON.stringify(this.props.elements));r.extend(l[a].options,o),this.change({elements:l})}})},t.key)},this),e("div",{className:"perseus-widget-interaction-editor-select-element",children:s("select",{onChange:this._addNewElement,children:[s("option",{value:"",children:["Add an element","…"]}),e("option",{disabled:!0,children:"--"}),e("option",{value:"point",children:"Point"}),e("option",{value:"line",children:"Line segment"}),e("option",{value:"function",children:"Function plot"}),e("option",{value:"parametric",children:"Parametric plot"}),e("option",{value:"label",children:"Label"}),e("option",{value:"rectangle",children:"Rectangle"}),e("option",{value:"movable-point",children:"★ Movable point"}),e("option",{value:"movable-line",children:"★ Movable line segment"})]})})]})}};E.widgetName="interaction",E.defaultProps=Ve;let V=E;V.__docgenInfo={description:"",methods:[{name:"_getAllVarSubscripts",docblock:null,modifiers:[],params:[{name:"elements",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:{type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray"}}},{name:"_getAllFunctionNames",docblock:null,modifiers:[],params:[{name:"elements",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:{type:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"}}},{name:"_updateGraphProps",docblock:null,modifiers:[],params:[{name:"newProps",optional:!1,type:null}],returns:null},{name:"_addNewElement",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_deleteElement",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null}],returns:null},{name:"_moveElementUp",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null}],returns:null},{name:"_moveElementDown",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null}],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"InteractionEditor",props:{elements:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"any"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[]",computed:!1}},graph:{required:!1,tsType:{name:"signature",type:"object",raw:`{ box: ReadonlyArray; diff --git a/assets/input-number-editor-ncl_GOvQ.js b/assets/input-number-editor-ncl_GOvQ.js index 3e8bbf8378..26c717cfa1 100644 --- a/assets/input-number-editor-ncl_GOvQ.js +++ b/assets/input-number-editor-ncl_GOvQ.js @@ -1,4 +1,4 @@ -import{j as e,a as i}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import{_ as m}from"./jquery-yG1GhClm.js";import{U as l}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as u}from"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";import{P as d}from"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{r as p}from"./index-TT1qJ6UJ.js";import{B as c}from"./blur-input-hjJsfoK9.js";const{InfoTip:t}=u,h={number:{name:"Numbers",forms:"integer, decimal, proper, improper, mixed"},decimal:{name:"Decimals",forms:"decimal"},integer:{name:"Integers",forms:"integer"},rational:{name:"Fractions and mixed numbers",forms:"integer, proper, improper, mixed"},improper:{name:"Improper numbers (no mixed)",forms:"integer, proper, improper"},mixed:{name:"Mixed numbers (no improper)",forms:"integer, proper, mixed"},percent:{name:"Numbers or percents",forms:"integer, decimal, proper, improper, mixed, percent"},pi:{name:"Numbers with pi",forms:"pi"}},n=class n extends p.Component{constructor(){super(...arguments),this.input=p.createRef(),this.handleAnswerChange=a=>{const r=l.firstNumericalParse(a,this.context.strings)||0;this.props.onChange({value:r})},this.focus=()=>{var a;return(a=this.input.current)==null||a.focus(),!0},this.serialize=()=>({value:this.props.value,simplify:this.props.simplify,size:this.props.size,inexact:this.props.inexact,maxError:this.props.maxError,answerType:this.props.answerType,rightAlign:this.props.rightAlign})}render(){const a=m.map(h,function(r,s){return e("option",{value:s,children:r.name},s)},this);return i("div",{children:[e("div",{children:i("label",{children:["Correct answer:"," ",e(c,{value:""+this.props.value,onChange:this.handleAnswerChange,ref:this.input})]})}),i("div",{children:[i("label",{children:["Unsimplified answers"," ",i("select",{value:this.props.simplify,onChange:r=>{this.props.onChange({simplify:r.target.value})},children:[e("option",{value:"required",children:"will not be graded"}),e("option",{value:"optional",children:"will be accepted"}),e("option",{value:"enforced",children:"will be marked wrong"})]})]}),i(t,{children:[e("p",{children:'Normally select "will not be graded". This will give the user a message saying the answer is correct but not simplified. The user will then have to simplify it and re-enter, but will not be penalized. (5th grade and anything after)'}),e("p",{children:'Select "will be accepted" only if the user is not expected to know how to simplify fractions yet. (Anything prior to 5th grade)'}),e("p",{children:'Select "will be marked wrong" only if we are specifically assessing the ability to simplify.'})]})]}),i("div",{children:[i("label",{children:[e("input",{type:"checkbox",checked:this.props.inexact,onChange:r=>{this.props.onChange({inexact:r.target.checked})}})," ","Allow inexact answers"]}),i("label",{children:[e("input",{type:"checkbox",style:{visibility:"hidden"}}),"Max error:"," ",e("input",{type:"text",disabled:!this.props.inexact,defaultValue:this.props.maxError,"aria-label":"Max error",onBlur:r=>{const s=""+(l.firstNumericalParse(r.target.value,this.context.strings)||0);r.target.value=s,this.props.onChange({maxError:s})}})]})]}),i("div",{children:["Answer type:"," ",e("select",{value:this.props.answerType,onChange:r=>{this.props.onChange({answerType:r.target.value})},"aria-label":"Answer type",children:a}),e(t,{children:e("p",{children:'Use the default "Numbers" unless the answer must be in a specific form (e.g., question is about converting decimals to fractions).'})})]}),i("div",{children:[i("label",{children:["Width"," ",i("select",{value:this.props.size,onChange:r=>{this.props.onChange({size:r.target.value})},children:[e("option",{value:"normal",children:"Normal (80px)"}),e("option",{value:"small",children:"Small (40px)"})]})]}),e(t,{children:e("p",{children:'Use size "Normal" for all text boxes, unless there are multiple text boxes in one line and the answer area is too narrow to fit them.'})})]}),e("div",{children:i("label",{children:[e("input",{type:"checkbox",checked:this.props.rightAlign,onChange:r=>{this.props.onChange({rightAlign:r.target.checked})}})," ","Right alignment"]})})]})}};n.contextType=d,n.widgetName="input-number",n.defaultProps={value:0,simplify:"required",size:"normal",inexact:!1,maxError:.1,answerType:"number",rightAlign:!1};let o=n;o.__docgenInfo={description:"",methods:[{name:"handleAnswerChange",docblock:null,modifiers:[],params:[{name:"str",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"InputNumberEditor",props:{value:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},simplify:{required:!1,tsType:{name:'PropsFor["simplify"]',raw:'PropsFor["simplify"]'},description:"",defaultValue:{value:'"required"',computed:!1}},size:{required:!1,tsType:{name:'PropsFor["size"]',raw:'PropsFor["size"]'},description:"",defaultValue:{value:'"normal"',computed:!1}},inexact:{required:!1,tsType:{name:'PropsFor["reviewModeRubric"]["inexact"]',raw:'PropsFor["reviewModeRubric"]["inexact"]'},description:"",defaultValue:{value:"false",computed:!1}},maxError:{required:!1,tsType:{name:'PropsFor["reviewModeRubric"]["maxError"]',raw:`PropsFor< +import{j as e,a as i}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import{_ as m}from"./jquery-yG1GhClm.js";import{U as l}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as u}from"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";import{P as d}from"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{r as p}from"./index-TT1qJ6UJ.js";import{B as c}from"./blur-input-hjJsfoK9.js";const{InfoTip:t}=u,h={number:{name:"Numbers",forms:"integer, decimal, proper, improper, mixed"},decimal:{name:"Decimals",forms:"decimal"},integer:{name:"Integers",forms:"integer"},rational:{name:"Fractions and mixed numbers",forms:"integer, proper, improper, mixed"},improper:{name:"Improper numbers (no mixed)",forms:"integer, proper, improper"},mixed:{name:"Mixed numbers (no improper)",forms:"integer, proper, mixed"},percent:{name:"Numbers or percents",forms:"integer, decimal, proper, improper, mixed, percent"},pi:{name:"Numbers with pi",forms:"pi"}},n=class n extends p.Component{constructor(){super(...arguments),this.input=p.createRef(),this.handleAnswerChange=a=>{const r=l.firstNumericalParse(a,this.context.strings)||0;this.props.onChange({value:r})},this.focus=()=>{var a;return(a=this.input.current)==null||a.focus(),!0},this.serialize=()=>({value:this.props.value,simplify:this.props.simplify,size:this.props.size,inexact:this.props.inexact,maxError:this.props.maxError,answerType:this.props.answerType,rightAlign:this.props.rightAlign})}render(){const a=m.map(h,function(r,s){return e("option",{value:s,children:r.name},s)},this);return i("div",{children:[e("div",{children:i("label",{children:["Correct answer:"," ",e(c,{value:""+this.props.value,onChange:this.handleAnswerChange,ref:this.input})]})}),i("div",{children:[i("label",{children:["Unsimplified answers"," ",i("select",{value:this.props.simplify,onChange:r=>{this.props.onChange({simplify:r.target.value})},children:[e("option",{value:"required",children:"will not be graded"}),e("option",{value:"optional",children:"will be accepted"}),e("option",{value:"enforced",children:"will be marked wrong"})]})]}),i(t,{children:[e("p",{children:'Normally select "will not be graded". This will give the user a message saying the answer is correct but not simplified. The user will then have to simplify it and re-enter, but will not be penalized. (5th grade and anything after)'}),e("p",{children:'Select "will be accepted" only if the user is not expected to know how to simplify fractions yet. (Anything prior to 5th grade)'}),e("p",{children:'Select "will be marked wrong" only if we are specifically assessing the ability to simplify.'})]})]}),i("div",{children:[i("label",{children:[e("input",{type:"checkbox",checked:this.props.inexact,onChange:r=>{this.props.onChange({inexact:r.target.checked})}})," ","Allow inexact answers"]}),i("label",{children:[e("input",{type:"checkbox",style:{visibility:"hidden"}}),"Max error:"," ",e("input",{type:"text",disabled:!this.props.inexact,defaultValue:this.props.maxError,"aria-label":"Max error",onBlur:r=>{const s=""+(l.firstNumericalParse(r.target.value,this.context.strings)||0);r.target.value=s,this.props.onChange({maxError:s})}})]})]}),i("div",{children:["Answer type:"," ",e("select",{value:this.props.answerType,onChange:r=>{this.props.onChange({answerType:r.target.value})},"aria-label":"Answer type",children:a}),e(t,{children:e("p",{children:'Use the default "Numbers" unless the answer must be in a specific form (e.g., question is about converting decimals to fractions).'})})]}),i("div",{children:[i("label",{children:["Width"," ",i("select",{value:this.props.size,onChange:r=>{this.props.onChange({size:r.target.value})},children:[e("option",{value:"normal",children:"Normal (80px)"}),e("option",{value:"small",children:"Small (40px)"})]})]}),e(t,{children:e("p",{children:'Use size "Normal" for all text boxes, unless there are multiple text boxes in one line and the answer area is too narrow to fit them.'})})]}),e("div",{children:i("label",{children:[e("input",{type:"checkbox",checked:this.props.rightAlign,onChange:r=>{this.props.onChange({rightAlign:r.target.checked})}})," ","Right alignment"]})})]})}};n.contextType=d,n.widgetName="input-number",n.defaultProps={value:0,simplify:"required",size:"normal",inexact:!1,maxError:.1,answerType:"number",rightAlign:!1};let o=n;o.__docgenInfo={description:"",methods:[{name:"handleAnswerChange",docblock:null,modifiers:[],params:[{name:"str",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"InputNumberEditor",props:{value:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},simplify:{required:!1,tsType:{name:'PropsFor["simplify"]',raw:'PropsFor["simplify"]'},description:"",defaultValue:{value:'"required"',computed:!1}},size:{required:!1,tsType:{name:'PropsFor["size"]',raw:'PropsFor["size"]'},description:"",defaultValue:{value:'"normal"',computed:!1}},inexact:{required:!1,tsType:{name:'PropsFor["reviewModeRubric"]["inexact"]',raw:'PropsFor["reviewModeRubric"]["inexact"]'},description:"",defaultValue:{value:"false",computed:!1}},maxError:{required:!1,tsType:{name:'PropsFor["reviewModeRubric"]["maxError"]',raw:`PropsFor< typeof InputNumber.widget >["reviewModeRubric"]["maxError"]`},description:"",defaultValue:{value:"0.1",computed:!1}},answerType:{required:!1,tsType:{name:'PropsFor["answerType"]',raw:'PropsFor["answerType"]'},description:"",defaultValue:{value:'"number"',computed:!1}},rightAlign:{required:!1,tsType:{name:'PropsFor["rightAlign"]',raw:'PropsFor["rightAlign"]'},description:"",defaultValue:{value:"false",computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:`(arg1: { value?: ParsedValue | 0; diff --git a/assets/input-number-editor.stories-UBlHwKhn.js b/assets/input-number-editor.stories-UBlHwKhn.js index d06e034241..04f50e5143 100644 --- a/assets/input-number-editor.stories-UBlHwKhn.js +++ b/assets/input-number-editor.stories-UBlHwKhn.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{I as e}from"./input-number-editor-ncl_GOvQ.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./blur-input-hjJsfoK9.js";const rt={title:"PerseusEditor/Widgets/InputNumber Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{I as e}from"./input-number-editor-ncl_GOvQ.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./blur-input-hjJsfoK9.js";const rt={title:"PerseusEditor/Widgets/InputNumber Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(o=r.parameters)==null?void 0:o.docs)==null?void 0:i.source}}};const tt=["Default"];export{r as Default,tt as __namedExportsOrder,rt as default}; diff --git a/assets/input-number.stories-0nJZj6b3.js b/assets/input-number.stories-0nJZj6b3.js index 627f5e28f8..38015cf1c8 100644 --- a/assets/input-number.stories-0nJZj6b3.js +++ b/assets/input-number.stories-0nJZj6b3.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{R as o}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const f={content:`Denis baked a peach pie and cut it into $3$ equal-sized pieces. Denis's dad eats $1$ section of the pie. +import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{R as o}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const f={content:`Denis baked a peach pie and cut it into $3$ equal-sized pieces. Denis's dad eats $1$ section of the pie. **What fraction of the pie did Denis's dad eat?** ![](https://ka-perseus-graphie.s3.amazonaws.com/74a2b7583a2c26ebfb3ad714e29867541253fc97.png) diff --git a/assets/input-with-examples.stories-QT1um2Ve.js b/assets/input-with-examples.stories-QT1um2Ve.js index 209ab87b38..873d4beb3b 100644 --- a/assets/input-with-examples.stories-QT1um2Ve.js +++ b/assets/input-with-examples.stories-QT1um2Ve.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{I as o}from"./input-with-examples-1e8gjW5y.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./index-h_CiYGGb.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";const me={title:"Perseus/Components/Input with Examples"},p={examples:[],id:"",onChange:()=>{},value:""},i=["Sample 1","Sample 2","Sample 3"],e=m=>a(o,{...p}),t=m=>a(o,{...p,examples:i}),r=m=>a(o,{...p,examples:i,labelText:"Test label"}),s=m=>a(o,{...p,disabled:!0,examples:i});e.__docgenInfo={description:"",methods:[],displayName:"DefaultAndMostlyEmptyProps"};t.__docgenInfo={description:"",methods:[],displayName:"ListOfExamples"};r.__docgenInfo={description:"",methods:[],displayName:"AriaLabelTextWithListOfExamples"};s.__docgenInfo={description:"",methods:[],displayName:"DisabledInput"};var l,n,c;e.parameters={...e.parameters,docs:{...(l=e.parameters)==null?void 0:l.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{I as o}from"./input-with-examples-1e8gjW5y.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./index-h_CiYGGb.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";const me={title:"Perseus/Components/Input with Examples"},p={examples:[],id:"",onChange:()=>{},value:""},i=["Sample 1","Sample 2","Sample 3"],e=m=>a(o,{...p}),t=m=>a(o,{...p,examples:i}),r=m=>a(o,{...p,examples:i,labelText:"Test label"}),s=m=>a(o,{...p,disabled:!0,examples:i});e.__docgenInfo={description:"",methods:[],displayName:"DefaultAndMostlyEmptyProps"};t.__docgenInfo={description:"",methods:[],displayName:"ListOfExamples"};r.__docgenInfo={description:"",methods:[],displayName:"AriaLabelTextWithListOfExamples"};s.__docgenInfo={description:"",methods:[],displayName:"DisabledInput"};var l,n,c;e.parameters={...e.parameters,docs:{...(l=e.parameters)==null?void 0:l.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(c=(n=e.parameters)==null?void 0:n.docs)==null?void 0:c.source}}};var d,u,x;t.parameters={...t.parameters,docs:{...(d=t.parameters)==null?void 0:d.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/interaction-editor.stories-xlopIOIU.js b/assets/interaction-editor.stories-xlopIOIU.js index 6f92ee0019..21f9d1aee1 100644 --- a/assets/interaction-editor.stories-xlopIOIU.js +++ b/assets/interaction-editor.stories-xlopIOIU.js @@ -1,4 +1,4 @@ -import{j as l}from"./jsx-runtime-FVsy8kgq.js";import{r as o}from"./index-TT1qJ6UJ.js";import{I as h}from"./index-uK3b_Y1s.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./editor-jsonify-yP45H1ib.js";import"./graph-settings-LBBYDOUY.js";import"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";const pr={title:"PerseusEditor/Widgets/Interaction Editor"},t=d=>{const[e,n]=o.useState(),[s,a]=o.useState();function c(r){r.graph&&a(r.graph),r.elements&&n(r.elements)}return l(h,{onChange:c,elements:e,graph:s})};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,m,p;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as l}from"./jsx-runtime-FVsy8kgq.js";import{r as o}from"./index-TT1qJ6UJ.js";import{I as h}from"./index-uK3b_Y1s.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./editor-jsonify-yP45H1ib.js";import"./graph-settings-LBBYDOUY.js";import"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";const pr={title:"PerseusEditor/Widgets/Interaction Editor"},t=d=>{const[e,n]=o.useState(),[s,a]=o.useState();function c(r){r.graph&&a(r.graph),r.elements&&n(r.elements)}return l(h,{onChange:c,elements:e,graph:s})};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,m,p;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const [elements, setElements] = useState(); const [graph, setGraph] = useState(); function handleChange(next) { diff --git a/assets/interaction.stories-Hkm4pHD_.js b/assets/interaction.stories-Hkm4pHD_.js index 243b3b4d96..8b794fdf21 100644 --- a/assets/interaction.stories-Hkm4pHD_.js +++ b/assets/interaction.stories-Hkm4pHD_.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{R as a}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const p={content:`Drag the dot all the way to the right. +import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{R as a}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const p={content:`Drag the dot all the way to the right. [[☃ interaction 1]] diff --git a/assets/interactive-graph-editor-PeMztHwk.js b/assets/interactive-graph-editor-PeMztHwk.js index dee4c936cf..3b68e5022c 100644 --- a/assets/interactive-graph-editor-PeMztHwk.js +++ b/assets/interactive-graph-editor-PeMztHwk.js @@ -1,4 +1,4 @@ -import{j as r,a as s,F as x}from"./jsx-runtime-FVsy8kgq.js";import{U as ce}from"./util-XcxTwqb0.js";import{l as we,s as be,e as Ve}from"./svg-image-Rjw-_QTV.js";import{i as Ce,j as Se,k as ve,m as xe,n as ke,o as Te,q as qe,r as Pe,s as Ie,u as He}from"./article-renderer-o95CuJpS.js";import{_ as q}from"./jquery-yG1GhClm.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import{S as je}from"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as Qe}from"./components-0kNWnYe6.js";import{i as Xe}from"./constants-I_nlPaPx.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import{w as Ae}from"./index-J2t_5nK1.js";import"./index-IIMKO4_x.js";import{V as d}from"./index-6h5t6F0w.js";import{S as P,O as p}from"./answer-choices-vbrLThK4.js";import{T as Ye,a as Ze,C as ue}from"./index-QCAhLhLD.js";import{s as o,c as y,a as V}from"./index-deFLJwr4.js";import{c as _e,f as W,L as u,a as H,b as ge}from"./index-h_CiYGGb.js";import{l as b}from"./index-awljIyHI.js";import{r as D}from"./index-TT1qJ6UJ.js";import{i as m}from"./tiny-invariant-bHgPayXn.js";import{H as j}from"./heading-8aCiuWUg.js";import{S as g}from"./index-qUyqkRvh.js";import{L as T,I as Je}from"./interactive-graph-settings-3oLklA_Z.js";import{L as Ke}from"./locked-figures-section-nxp-trxv.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import{B as er}from"./choice-E4eyMygy.js";import{C as f,P as rr}from"./locked-figure-settings-actions-WSW3YvFI.js";import{S as tr}from"./scrollless-number-text-field-U5Bx_xXb.js";const M="unlimited",Le=t=>{const e=parseInt(t,10);return isNaN(e)||e===0?M:e},Ge=({numPoints:t=1,onChange:e})=>r(P,{selectedValue:`${t}`,onChange:n=>{e(Le(n))},placeholder:"",style:nr.singleSelectShort,children:[...[...Array(7).keys()].map(n=>r(p,{value:`${n}`,label:`${n} point${n>1?"s":""}`},n)),r(p,{value:M,label:"unlimited"},"unlimited")]}),nr=b.StyleSheet.create({singleSelectShort:{height:26}});Ge.__docgenInfo={description:"",methods:[],displayName:"GraphPointsCountSelector",props:{numPoints:{required:!1,tsType:{name:"union",raw:"number | typeof UNLIMITED",elements:[{name:"number"},{name:"UNLIMITED"}]},description:"",defaultValue:{value:"1",computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(points: PointValue) => void",signature:{arguments:[{type:{name:"union",raw:"number | typeof UNLIMITED",elements:[{name:"number"},{name:"UNLIMITED"}]},name:"points"}],return:{name:"void"}}},description:""}}};const De=t=>s(P,{selectedValue:t.graphType,onChange:t.onChange,placeholder:"Select an answer type",style:ar.singleSelectShort,children:[t.showNoneOption&&r(p,{value:"none",label:"None"}),r(p,{value:"linear",label:"Linear function"}),r(p,{value:"quadratic",label:"Quadratic function"}),r(p,{value:"sinusoid",label:"Sinusoid function"}),r(p,{value:"circle",label:"Circle"}),r(p,{value:"point",label:"Point(s)"}),r(p,{value:"linear-system",label:"Linear System"}),r(p,{value:"polygon",label:"Polygon"}),r(p,{value:"segment",label:"Line Segment(s)"}),r(p,{value:"ray",label:"Ray"}),r(p,{value:"angle",label:"Angle"})]}),ar=b.StyleSheet.create({singleSelectShort:{height:26}});De.__docgenInfo={description:"",methods:[],displayName:"GraphTypeSelector",props:{graphType:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newGraphType: string) => void",signature:{arguments:[{type:{name:"string"},name:"newGraphType"}],return:{name:"void"}}},description:""},showNoneOption:{required:!0,tsType:{name:"boolean"},description:""}}};function Ne(t){return s(x,{children:[r(j,{title:"Correct Answer",isOpen:!0,isCollapsible:!1}),s(d,{children:[s(d,{children:[r(_e,{style:{paddingTop:o.xxSmall_6,paddingBottom:o.xxSmall_6,color:y.offBlack64},children:"Graph the correct answer in the graph below and ensure the equation or point coordinates displayed represent the correct answer."}),r(W,{style:{fontSize:12,backgroundColor:"#eee",paddingInline:o.xxSmall_6,borderColor:"#ccc",borderStyle:"solid",borderWidth:1},children:t.equationString})]}),t.children]})]})}Ne.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphCorrectAnswer",props:{equationString:{required:!0,tsType:{name:"string"},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};function ze(t){const{ariaLabelValue:e,ariaDescriptionValue:n,onChange:a}=t,[i,c]=D.useState(!0);return s(x,{children:[r(j,{title:"Description",isCollapsible:!0,isOpen:i,onToggle:c}),i&&s(d,{children:[r(_e,{style:U.caption,children:"Use these fields to describe the graph as a whole. These are used by screen readers to describe content to users who are visually impaired."}),s(u,{tag:"label",children:["Title",r(Ye,{value:e,onChange:l=>a({fullGraphAriaLabel:l||void 0}),style:U.spaceAbove})]}),r(g,{size:o.small_12}),s(u,{tag:"label",children:["Description",r(Ze,{rows:8,resizeType:"vertical",value:n,onChange:l=>a({fullGraphAriaDescription:l||void 0}),style:U.spaceAbove})]})]})]})}const U=b.StyleSheet.create({caption:{color:y.offBlack64,paddingTop:o.xxSmall_6,paddingBottom:o.xxSmall_6},spaceAbove:{marginTop:o.xxxSmall_4}});ze.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphDescription",props:{ariaLabelValue:{required:!0,tsType:{name:"string"},description:""},ariaDescriptionValue:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(graphProps: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"signature",type:"object",raw:`{ +import{j as r,a as s,F as x}from"./jsx-runtime-FVsy8kgq.js";import{U as ce}from"./util-XcxTwqb0.js";import{l as we,s as be,e as Ve}from"./svg-image-Rjw-_QTV.js";import{i as Ce,j as Se,k as ve,m as xe,n as ke,o as Te,q as qe,r as Pe,s as Ie,u as He}from"./article-renderer-o95CuJpS.js";import{_ as q}from"./jquery-yG1GhClm.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import{S as je}from"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as Qe}from"./components-0kNWnYe6.js";import{i as Xe}from"./constants-I_nlPaPx.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import{w as Ae}from"./index-J2t_5nK1.js";import"./index-IIMKO4_x.js";import{V as d}from"./index-6h5t6F0w.js";import{S as P,O as p}from"./answer-choices-vbrLThK4.js";import{T as Ye,a as Ze,C as ue}from"./index-QCAhLhLD.js";import{s as o,c as y,a as V}from"./index-deFLJwr4.js";import{c as _e,f as W,L as u,a as H,b as ge}from"./index-h_CiYGGb.js";import{l as b}from"./index-awljIyHI.js";import{r as D}from"./index-TT1qJ6UJ.js";import{i as m}from"./tiny-invariant-bHgPayXn.js";import{H as j}from"./heading-8aCiuWUg.js";import{S as g}from"./index-qUyqkRvh.js";import{L as T,I as Je}from"./interactive-graph-settings-3oLklA_Z.js";import{L as Ke}from"./locked-figures-section-nxp-trxv.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import{B as er}from"./choice-E4eyMygy.js";import{C as f,P as rr}from"./locked-figure-settings-actions-WSW3YvFI.js";import{S as tr}from"./scrollless-number-text-field-U5Bx_xXb.js";const M="unlimited",Le=t=>{const e=parseInt(t,10);return isNaN(e)||e===0?M:e},Ge=({numPoints:t=1,onChange:e})=>r(P,{selectedValue:`${t}`,onChange:n=>{e(Le(n))},placeholder:"",style:nr.singleSelectShort,children:[...[...Array(7).keys()].map(n=>r(p,{value:`${n}`,label:`${n} point${n>1?"s":""}`},n)),r(p,{value:M,label:"unlimited"},"unlimited")]}),nr=b.StyleSheet.create({singleSelectShort:{height:26}});Ge.__docgenInfo={description:"",methods:[],displayName:"GraphPointsCountSelector",props:{numPoints:{required:!1,tsType:{name:"union",raw:"number | typeof UNLIMITED",elements:[{name:"number"},{name:"UNLIMITED"}]},description:"",defaultValue:{value:"1",computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(points: PointValue) => void",signature:{arguments:[{type:{name:"union",raw:"number | typeof UNLIMITED",elements:[{name:"number"},{name:"UNLIMITED"}]},name:"points"}],return:{name:"void"}}},description:""}}};const De=t=>s(P,{selectedValue:t.graphType,onChange:t.onChange,placeholder:"Select an answer type",style:ar.singleSelectShort,children:[t.showNoneOption&&r(p,{value:"none",label:"None"}),r(p,{value:"linear",label:"Linear function"}),r(p,{value:"quadratic",label:"Quadratic function"}),r(p,{value:"sinusoid",label:"Sinusoid function"}),r(p,{value:"circle",label:"Circle"}),r(p,{value:"point",label:"Point(s)"}),r(p,{value:"linear-system",label:"Linear System"}),r(p,{value:"polygon",label:"Polygon"}),r(p,{value:"segment",label:"Line Segment(s)"}),r(p,{value:"ray",label:"Ray"}),r(p,{value:"angle",label:"Angle"})]}),ar=b.StyleSheet.create({singleSelectShort:{height:26}});De.__docgenInfo={description:"",methods:[],displayName:"GraphTypeSelector",props:{graphType:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(newGraphType: string) => void",signature:{arguments:[{type:{name:"string"},name:"newGraphType"}],return:{name:"void"}}},description:""},showNoneOption:{required:!0,tsType:{name:"boolean"},description:""}}};function Ne(t){return s(x,{children:[r(j,{title:"Correct Answer",isOpen:!0,isCollapsible:!1}),s(d,{children:[s(d,{children:[r(_e,{style:{paddingTop:o.xxSmall_6,paddingBottom:o.xxSmall_6,color:y.offBlack64},children:"Graph the correct answer in the graph below and ensure the equation or point coordinates displayed represent the correct answer."}),r(W,{style:{fontSize:12,backgroundColor:"#eee",paddingInline:o.xxSmall_6,borderColor:"#ccc",borderStyle:"solid",borderWidth:1},children:t.equationString})]}),t.children]})]})}Ne.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphCorrectAnswer",props:{equationString:{required:!0,tsType:{name:"string"},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};function ze(t){const{ariaLabelValue:e,ariaDescriptionValue:n,onChange:a}=t,[i,c]=D.useState(!0);return s(x,{children:[r(j,{title:"Description",isCollapsible:!0,isOpen:i,onToggle:c}),i&&s(d,{children:[r(_e,{style:U.caption,children:"Use these fields to describe the graph as a whole. These are used by screen readers to describe content to users who are visually impaired."}),s(u,{tag:"label",children:["Title",r(Ye,{value:e,onChange:l=>a({fullGraphAriaLabel:l||void 0}),style:U.spaceAbove})]}),r(g,{size:o.small_12}),s(u,{tag:"label",children:["Description",r(Ze,{rows:8,resizeType:"vertical",value:n,onChange:l=>a({fullGraphAriaDescription:l||void 0}),style:U.spaceAbove})]})]})]})}const U=b.StyleSheet.create({caption:{color:y.offBlack64,paddingTop:o.xxSmall_6,paddingBottom:o.xxSmall_6},spaceAbove:{marginTop:o.xxxSmall_4}});ze.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphDescription",props:{ariaLabelValue:{required:!0,tsType:{name:"string"},description:""},ariaDescriptionValue:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(graphProps: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"signature",type:"object",raw:`{ apiOptions: APIOptionsWithDefaults; /** diff --git a/assets/interactive-graph-editor.stories-6QcOpVbv.js b/assets/interactive-graph-editor.stories-6QcOpVbv.js index 9fefeb926a..e77b215e31 100644 --- a/assets/interactive-graph-editor.stories-6QcOpVbv.js +++ b/assets/interactive-graph-editor.stories-6QcOpVbv.js @@ -1,4 +1,4 @@ -import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{r as c}from"./index-TT1qJ6UJ.js";import{f as $}from"./flags-for-api-options-NwahBZpL.js";import{I as s}from"./interactive-graph-editor-PeMztHwk.js";import{g as ee}from"./util-7LGRm2EO.js";import{I as te}from"./interactive-graph-settings.argtypes-6T40gg9D.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./heading-8aCiuWUg.js";import"./index-tFzzSRL2.js";import"./toggleable-caret-lFiCktzo.js";import"./interactive-graph-settings-3oLklA_Z.js";import"./locked-figures-section-nxp-trxv.js";import"./locked-ellipse-settings-H2lz6Mnf.js";import"./plus-circle-JCxQSzSv.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./color-select-aXibMsPD.js";import"./line-stroke-select-ZTaE76uS.js";import"./locked-label-settings-qoc_z_IC.js";import"./locked-function-settings-RE4yVDE6.js";import"./line-swatch-YWYea0Do.js";import"./locked-line-settings-h25vlmkK.js";import"./locked-point-settings-7pJS5tix.js";import"./labeled-switch-OVGss_VI.js";import"./locked-polygon-settings-pkXY4ncz.js";import"./locked-vector-settings-EnKejgQ9.js";const re={apiOptions:{control:{type:"object"},type:{name:"object",required:!0}},correct:{control:{type:null},type:{name:"object",required:!1}},graph:{control:{type:"object"},type:{name:"object",required:!0}},lockedFigures:{control:{type:"object"},type:{name:"Array",required:!1}},onChange:{control:{type:"function"},type:{name:"(props: Partial) => void",required:!0}},...te},m={apiOptions:{flags:$},graph:{type:"segment"},correct:{type:"segment"}},a=ee("point"),hr={title:"PerseusEditor/Widgets/Interactive Graph Editor",component:s,argTypes:re},d=i=>p(s,{...i});d.args={box:[288,288],gridStep:[1,1],labels:["x","y"],markings:"graph",range:[[-10,10],[-10,10]],rulerLabel:"",rulerTicks:10,showProtractor:!1,showRuler:!1,showTooltips:!1,snapStep:[1,1],step:[1,1]};const l={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{});return p(s,{...t,onChange:r})}},u={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,m);return p(s,{...t,onChange:r})}},h={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,graph:{type:"polygon"},correct:{type:"polygon",numSides:4,showAngles:!0,showSides:!0,snapTo:"angles"}});return p(s,{...t,onChange:r})}},g={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,lockedFigures:[{...a,coord:[1,1]},{...a,coord:[-1,-1]}]});return p(s,{...t,onChange:r})}},f={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,lockedFigures:[{type:"line",kind:"line",points:[{...a,coord:[0,2]},{...a,coord:[2,3]}],color:"green",lineStyle:"solid",showPoint1:!1,showPoint2:!1},{type:"line",kind:"ray",points:[{...a,color:"pink",coord:[0,0]},{...a,color:"pink",coord:[4,2]}],color:"pink",lineStyle:"solid",showPoint1:!0,showPoint2:!1},{type:"line",kind:"segment",points:[{...a,color:"grayH",coord:[0,-2]},{...a,color:"grayH",coord:[4,0]}],color:"grayH",lineStyle:"solid",showPoint1:!0,showPoint2:!0}]});return p(s,{...t,onChange:r})}},y={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,lockedFigures:[{type:"ellipse",center:[0,0],radius:[5,2],angle:0,color:"green",fillStyle:"translucent",strokeStyle:"solid"}]});return p(s,{...t,onChange:r})}},k={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,lockedFigures:[{type:"polygon",points:[[-9,4],[-6,4],[-6,1],[-9,1]],color:"green",fillStyle:"translucent",strokeStyle:"solid"}]});return p(s,{...t,onChange:r})}};d.__docgenInfo={description:"",methods:[],displayName:"Default"};var w,S,P;d.parameters={...d.parameters,docs:{...(w=d.parameters)==null?void 0:w.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{r as c}from"./index-TT1qJ6UJ.js";import{f as $}from"./flags-for-api-options-NwahBZpL.js";import{I as s}from"./interactive-graph-editor-PeMztHwk.js";import{g as ee}from"./util-7LGRm2EO.js";import{I as te}from"./interactive-graph-settings.argtypes-6T40gg9D.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./heading-8aCiuWUg.js";import"./index-tFzzSRL2.js";import"./toggleable-caret-lFiCktzo.js";import"./interactive-graph-settings-3oLklA_Z.js";import"./locked-figures-section-nxp-trxv.js";import"./locked-ellipse-settings-H2lz6Mnf.js";import"./plus-circle-JCxQSzSv.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./color-select-aXibMsPD.js";import"./line-stroke-select-ZTaE76uS.js";import"./locked-label-settings-qoc_z_IC.js";import"./locked-function-settings-RE4yVDE6.js";import"./line-swatch-YWYea0Do.js";import"./locked-line-settings-h25vlmkK.js";import"./locked-point-settings-7pJS5tix.js";import"./labeled-switch-OVGss_VI.js";import"./locked-polygon-settings-pkXY4ncz.js";import"./locked-vector-settings-EnKejgQ9.js";const re={apiOptions:{control:{type:"object"},type:{name:"object",required:!0}},correct:{control:{type:null},type:{name:"object",required:!1}},graph:{control:{type:"object"},type:{name:"object",required:!0}},lockedFigures:{control:{type:"object"},type:{name:"Array",required:!1}},onChange:{control:{type:"function"},type:{name:"(props: Partial) => void",required:!0}},...te},m={apiOptions:{flags:$},graph:{type:"segment"},correct:{type:"segment"}},a=ee("point"),hr={title:"PerseusEditor/Widgets/Interactive Graph Editor",component:s,argTypes:re},d=i=>p(s,{...i});d.args={box:[288,288],gridStep:[1,1],labels:["x","y"],markings:"graph",range:[[-10,10],[-10,10]],rulerLabel:"",rulerTicks:10,showProtractor:!1,showRuler:!1,showTooltips:!1,snapStep:[1,1],step:[1,1]};const l={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{});return p(s,{...t,onChange:r})}},u={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,m);return p(s,{...t,onChange:r})}},h={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,graph:{type:"polygon"},correct:{type:"polygon",numSides:4,showAngles:!0,showSides:!0,snapTo:"angles"}});return p(s,{...t,onChange:r})}},g={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,lockedFigures:[{...a,coord:[1,1]},{...a,coord:[-1,-1]}]});return p(s,{...t,onChange:r})}},f={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,lockedFigures:[{type:"line",kind:"line",points:[{...a,coord:[0,2]},{...a,coord:[2,3]}],color:"green",lineStyle:"solid",showPoint1:!1,showPoint2:!1},{type:"line",kind:"ray",points:[{...a,color:"pink",coord:[0,0]},{...a,color:"pink",coord:[4,2]}],color:"pink",lineStyle:"solid",showPoint1:!0,showPoint2:!1},{type:"line",kind:"segment",points:[{...a,color:"grayH",coord:[0,-2]},{...a,color:"grayH",coord:[4,0]}],color:"grayH",lineStyle:"solid",showPoint1:!0,showPoint2:!0}]});return p(s,{...t,onChange:r})}},y={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,lockedFigures:[{type:"ellipse",center:[0,0],radius:[5,2],angle:0,color:"green",fillStyle:"translucent",strokeStyle:"solid"}]});return p(s,{...t,onChange:r})}},k={render:function(){const e=(n,o)=>({...n,...o}),[t,r]=c.useReducer(e,{...m,lockedFigures:[{type:"polygon",points:[[-9,4],[-6,4],[-6,1],[-9,1]],color:"green",fillStyle:"translucent",strokeStyle:"solid"}]});return p(s,{...t,onChange:r})}};d.__docgenInfo={description:"",methods:[],displayName:"Default"};var w,S,P;d.parameters={...d.parameters,docs:{...(w=d.parameters)==null?void 0:w.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(P=(S=d.parameters)==null?void 0:S.docs)==null?void 0:P.source}}};var R,E,v,I,G;l.parameters={...l.parameters,docs:{...(R=l.parameters)==null?void 0:R.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/interactive-graph-editor.stories-RstKQZMc.js b/assets/interactive-graph-editor.stories-RstKQZMc.js index a55d310d51..4a5ad03d0b 100644 --- a/assets/interactive-graph-editor.stories-RstKQZMc.js +++ b/assets/interactive-graph-editor.stories-RstKQZMc.js @@ -1,4 +1,4 @@ -import{j as e,a as M}from"./jsx-runtime-FVsy8kgq.js";import{V as C}from"./index-6h5t6F0w.js";import{S as st}from"./index-qUyqkRvh.js";import{s as l,c as A}from"./index-deFLJwr4.js";import{L as it,B as nt}from"./index-h_CiYGGb.js";import{a as lt}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as ct}from"./index-awljIyHI.js";import{r as a}from"./index-TT1qJ6UJ.js";import"./index-pUnNHf6v.js";import{i as pt}from"./interactive-graph-question-builder-kDutykZc.js";import{i as mt,s as dt,a as ut,l as gt,b as ft,r as ht,c as bt,q as kt,d as vt,p as St,e as Wt,f as Lt,g as o}from"./interactive-graph.testdata-syb_sPmB.js";import{r as yt}from"./register-all-widgets-and-editors-for-testing-Ftx4wZEN.js";import{E as t}from"./editor-page-with-storybook-preview-tHaT_Czh.js";import{f as s}from"./flags-for-api-options-NwahBZpL.js";import{E as Pt}from"./editor-page-91uXOpaV.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./version-akiLXZts.js";import"./article-editor-BfWGyfWk.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./device-framer-wVZUBEZD.js";import"./constants-hQyjCzwz.js";import"./section-control-button-VtgjGcq5.js";import"./index-tFzzSRL2.js";import"./editor-SZLWA5DH.js";import"./index-0C4KXdeC.js";import"./index-SM3muJE2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";import"./viewport-resizer-YtC0KtaX.js";import"./structured-item-diff-C8S6VB9q.js";import"./text-diff-RbGWUAEg.js";import"./tags-diff-loewY876.js";import"./multi-items-MzI04jIx.js";/* empty css */import"./categorizer-editor-aJj5kcPa.js";import"./editor-jsonify-yP45H1ib.js";import"./blur-input-hjJsfoK9.js";import"./definition-editor-koC6zgjU.js";import"./dropdown-editor-vzCR7Y_E.js";import"./explanation-editor-QNDSiyWl.js";import"./expression-editor-gbMGfXvL.js";import"./graph-settings-LBBYDOUY.js";import"./image-editor-ifkVG3z1.js";import"./input-number-editor-ncl_GOvQ.js";import"./index-uK3b_Y1s.js";import"./interactive-graph-editor-PeMztHwk.js";import"./heading-8aCiuWUg.js";import"./interactive-graph-settings-3oLklA_Z.js";import"./locked-figures-section-nxp-trxv.js";import"./locked-ellipse-settings-H2lz6Mnf.js";import"./plus-circle-JCxQSzSv.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./color-select-aXibMsPD.js";import"./util-7LGRm2EO.js";import"./line-stroke-select-ZTaE76uS.js";import"./locked-label-settings-qoc_z_IC.js";import"./locked-function-settings-RE4yVDE6.js";import"./line-swatch-YWYea0Do.js";import"./locked-line-settings-h25vlmkK.js";import"./locked-point-settings-7pJS5tix.js";import"./labeled-switch-OVGss_VI.js";import"./locked-polygon-settings-pkXY4ncz.js";import"./locked-vector-settings-EnKejgQ9.js";import"./label-image-editor-Z5_dot8_.js";import"./form-wrapped-text-field-tsI8XMXi.js";import"./answer-choices-jhnMapjR.js";import"./behavior-RYjJdmKF.js";import"./question-markers-KN3OrYEl.js";import"./marker-st5wrvmE.js";import"./select-image-_eHoVMfM.js";import"./matcher-editor-hlzTMdtB.js";import"./number-line-editor-t3bGT3LG.js";import"./numeric-input-editor-QUZ56KMx.js";import"./phet-simulation-editor-0655QF05.js";import"./python-program-editor-SPqpWu4A.js";import"./editor-8WwPqQi6.js";import"./sorter-editor-Kj6XqnPI.js";import"./item-extras-editor-2Be_tCWc.js";yt();const Fa={title:"PerseusEditor/Widgets/Interactive Graph"},Rt=lt("onChange"),c=()=>e(t,{question:mt}),p=()=>e(t,{question:dt}),m=()=>e(t,{question:ut}),d=()=>e(t,{question:gt}),u=()=>e(t,{question:ft}),g=()=>e(t,{question:ht}),f=()=>e(t,{question:bt}),h=()=>e(t,{question:kt}),b=()=>e(t,{question:vt}),k=()=>e(t,{question:St}),v=()=>e(t,{question:Wt}),S=()=>e(t,{question:Lt}),W=()=>e(t,{question:pt().withNoInteractiveFigure().addLockedFunction("5*sin(x)",{color:"red"}).build()}),i=()=>e(t,{apiOptions:{isMobile:!1,flags:{mafs:{...s.mafs,"interactive-graph-locked-features-labels":!1,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-function-labels":!1}}},question:o});i.parameters={chromatic:{disable:!0}};const L=()=>e(t,{apiOptions:{flags:{mafs:{...s.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-function-labels":!1}}},question:o}),y=()=>e(t,{apiOptions:{flags:{mafs:{...s.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!0,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-function-labels":!1}}},question:o}),P=()=>e(t,{apiOptions:{flags:{mafs:{...s.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!0,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-function-labels":!1}}},question:o}),R=()=>e(t,{apiOptions:{flags:{mafs:{...s.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!0,"locked-ellipse-labels":!1,"locked-function-labels":!1}}},question:o}),I=()=>e(t,{apiOptions:{flags:{mafs:{...s.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!0,"locked-function-labels":!1}}},question:o}),w=()=>e(t,{apiOptions:{flags:{mafs:{...s.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-function-labels":!0}}},question:o}),E=()=>e(t,{question:o}),n=()=>{const[Ue,Ye]=a.useState("phone"),[$e,Ke]=a.useState(!1),[Xe,Ze]=a.useState(),[G,et]=a.useState(o),[F,tt]=a.useState(),[rt,ot]=a.useState([]),q=a.useRef(null);return a.useEffect(()=>{if(q.current){const r=q.current.getSaveWarnings();ot(r)}},[q,G,F]),M(C,{style:_.container,children:[e(Pt,{ref:q,apiOptions:{isMobile:!1,flags:s},previewDevice:Ue,onPreviewDeviceChange:r=>Ye(r),developerMode:!0,jsonMode:$e,answerArea:Xe,question:G,hints:F,frameSource:"about:blank",previewURL:"about:blank",itemId:"1",onChange:r=>{Rt(r),"jsonMode"in r&&Ke(r.jsonMode),"answerArea"in r&&Ze(r.answerArea),"question"in r&&et(r.question),"hints"in r&&tt(r.hints)}}),M(C,{style:_.errorContainer,children:[e(it,{children:"Save Warnings:"}),e(st,{size:l.small_12}),rt.map((r,at)=>e(nt,{style:_.errorMessage,children:r},at))]})]})};n.parameters={chromatic:{disable:!0}};const _=ct.StyleSheet.create({container:{flexDirection:"row"},errorContainer:{border:`1px solid ${A.offBlack}`,padding:l.medium_16,flexGrow:1,marginRight:l.xLarge_32,height:"80vh",position:"sticky",top:l.xLarge_32,overflowY:"auto"},errorMessage:{color:A.red,marginBottom:l.small_12}});c.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphWithAriaLabel"};p.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphSegment"};m.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphSegments"};d.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphLinear"};u.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphLinearSystem"};g.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphRay"};f.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphCircle"};h.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphQuadratic"};b.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphSinusoid"};k.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphPoint"};v.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphPolygon"};S.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphAngle"};W.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphNone"};i.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedFiguresCurrent"};L.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedLabelsFlag"};y.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedPointLabelsFlag"};P.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedLineLabelsFlag"};R.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedVectorLabelsFlag"};I.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedEllipseLabelsFlag"};w.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedFunctionLabelsFlag"};E.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedFigureLabelsAllFlags"};n.__docgenInfo={description:"",methods:[],displayName:"WithSaveWarnings"};var Q,N,O;c.parameters={...c.parameters,docs:{...(Q=c.parameters)==null?void 0:Q.docs,source:{originalSource:"(): React.ReactElement => ",...(O=(N=c.parameters)==null?void 0:N.docs)==null?void 0:O.source}}};var x,D,j;p.parameters={...p.parameters,docs:{...(x=p.parameters)==null?void 0:x.docs,source:{originalSource:`(): React.ReactElement => { +import{j as e,a as M}from"./jsx-runtime-FVsy8kgq.js";import{V as C}from"./index-6h5t6F0w.js";import{S as st}from"./index-qUyqkRvh.js";import{s as l,c as A}from"./index-deFLJwr4.js";import{L as it,B as nt}from"./index-h_CiYGGb.js";import{a as lt}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as ct}from"./index-awljIyHI.js";import{r as a}from"./index-TT1qJ6UJ.js";import"./index-pUnNHf6v.js";import{i as pt}from"./interactive-graph-question-builder-kDutykZc.js";import{i as mt,s as dt,a as ut,l as gt,b as ft,r as ht,c as bt,q as kt,d as vt,p as St,e as Wt,f as Lt,g as o}from"./interactive-graph.testdata-syb_sPmB.js";import{r as yt}from"./register-all-widgets-and-editors-for-testing-Ftx4wZEN.js";import{E as t}from"./editor-page-with-storybook-preview-tHaT_Czh.js";import{f as s}from"./flags-for-api-options-NwahBZpL.js";import{E as Pt}from"./editor-page-91uXOpaV.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./version-akiLXZts.js";import"./article-editor-BfWGyfWk.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./device-framer-wVZUBEZD.js";import"./constants-hQyjCzwz.js";import"./section-control-button-VtgjGcq5.js";import"./index-tFzzSRL2.js";import"./editor-SZLWA5DH.js";import"./index-k-0mNqHS.js";import"./index-SM3muJE2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";import"./viewport-resizer-YtC0KtaX.js";import"./structured-item-diff-C8S6VB9q.js";import"./text-diff-RbGWUAEg.js";import"./tags-diff-loewY876.js";import"./multi-items-MzI04jIx.js";/* empty css */import"./categorizer-editor-aJj5kcPa.js";import"./editor-jsonify-yP45H1ib.js";import"./blur-input-hjJsfoK9.js";import"./definition-editor-koC6zgjU.js";import"./dropdown-editor-vzCR7Y_E.js";import"./explanation-editor-QNDSiyWl.js";import"./expression-editor-gbMGfXvL.js";import"./graph-settings-LBBYDOUY.js";import"./image-editor-ifkVG3z1.js";import"./input-number-editor-ncl_GOvQ.js";import"./index-uK3b_Y1s.js";import"./interactive-graph-editor-PeMztHwk.js";import"./heading-8aCiuWUg.js";import"./interactive-graph-settings-3oLklA_Z.js";import"./locked-figures-section-nxp-trxv.js";import"./locked-ellipse-settings-H2lz6Mnf.js";import"./plus-circle-JCxQSzSv.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./color-select-aXibMsPD.js";import"./util-7LGRm2EO.js";import"./line-stroke-select-ZTaE76uS.js";import"./locked-label-settings-qoc_z_IC.js";import"./locked-function-settings-RE4yVDE6.js";import"./line-swatch-YWYea0Do.js";import"./locked-line-settings-h25vlmkK.js";import"./locked-point-settings-7pJS5tix.js";import"./labeled-switch-OVGss_VI.js";import"./locked-polygon-settings-pkXY4ncz.js";import"./locked-vector-settings-EnKejgQ9.js";import"./label-image-editor-Z5_dot8_.js";import"./form-wrapped-text-field-tsI8XMXi.js";import"./answer-choices-jhnMapjR.js";import"./behavior-RYjJdmKF.js";import"./question-markers-KN3OrYEl.js";import"./marker-st5wrvmE.js";import"./select-image-_eHoVMfM.js";import"./matcher-editor-hlzTMdtB.js";import"./number-line-editor-t3bGT3LG.js";import"./numeric-input-editor-QUZ56KMx.js";import"./phet-simulation-editor-0655QF05.js";import"./python-program-editor-SPqpWu4A.js";import"./editor-8WwPqQi6.js";import"./sorter-editor-Kj6XqnPI.js";import"./item-extras-editor-2Be_tCWc.js";yt();const Fa={title:"PerseusEditor/Widgets/Interactive Graph"},Rt=lt("onChange"),c=()=>e(t,{question:mt}),p=()=>e(t,{question:dt}),m=()=>e(t,{question:ut}),d=()=>e(t,{question:gt}),u=()=>e(t,{question:ft}),g=()=>e(t,{question:ht}),f=()=>e(t,{question:bt}),h=()=>e(t,{question:kt}),b=()=>e(t,{question:vt}),k=()=>e(t,{question:St}),v=()=>e(t,{question:Wt}),S=()=>e(t,{question:Lt}),W=()=>e(t,{question:pt().withNoInteractiveFigure().addLockedFunction("5*sin(x)",{color:"red"}).build()}),i=()=>e(t,{apiOptions:{isMobile:!1,flags:{mafs:{...s.mafs,"interactive-graph-locked-features-labels":!1,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-function-labels":!1}}},question:o});i.parameters={chromatic:{disable:!0}};const L=()=>e(t,{apiOptions:{flags:{mafs:{...s.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-function-labels":!1}}},question:o}),y=()=>e(t,{apiOptions:{flags:{mafs:{...s.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!0,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-function-labels":!1}}},question:o}),P=()=>e(t,{apiOptions:{flags:{mafs:{...s.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!0,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-function-labels":!1}}},question:o}),R=()=>e(t,{apiOptions:{flags:{mafs:{...s.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!0,"locked-ellipse-labels":!1,"locked-function-labels":!1}}},question:o}),I=()=>e(t,{apiOptions:{flags:{mafs:{...s.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!0,"locked-function-labels":!1}}},question:o}),w=()=>e(t,{apiOptions:{flags:{mafs:{...s.mafs,"interactive-graph-locked-features-labels":!0,"locked-point-labels":!1,"locked-line-labels":!1,"locked-vector-labels":!1,"locked-ellipse-labels":!1,"locked-function-labels":!0}}},question:o}),E=()=>e(t,{question:o}),n=()=>{const[Ue,Ye]=a.useState("phone"),[$e,Ke]=a.useState(!1),[Xe,Ze]=a.useState(),[G,et]=a.useState(o),[F,tt]=a.useState(),[rt,ot]=a.useState([]),q=a.useRef(null);return a.useEffect(()=>{if(q.current){const r=q.current.getSaveWarnings();ot(r)}},[q,G,F]),M(C,{style:_.container,children:[e(Pt,{ref:q,apiOptions:{isMobile:!1,flags:s},previewDevice:Ue,onPreviewDeviceChange:r=>Ye(r),developerMode:!0,jsonMode:$e,answerArea:Xe,question:G,hints:F,frameSource:"about:blank",previewURL:"about:blank",itemId:"1",onChange:r=>{Rt(r),"jsonMode"in r&&Ke(r.jsonMode),"answerArea"in r&&Ze(r.answerArea),"question"in r&&et(r.question),"hints"in r&&tt(r.hints)}}),M(C,{style:_.errorContainer,children:[e(it,{children:"Save Warnings:"}),e(st,{size:l.small_12}),rt.map((r,at)=>e(nt,{style:_.errorMessage,children:r},at))]})]})};n.parameters={chromatic:{disable:!0}};const _=ct.StyleSheet.create({container:{flexDirection:"row"},errorContainer:{border:`1px solid ${A.offBlack}`,padding:l.medium_16,flexGrow:1,marginRight:l.xLarge_32,height:"80vh",position:"sticky",top:l.xLarge_32,overflowY:"auto"},errorMessage:{color:A.red,marginBottom:l.small_12}});c.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphWithAriaLabel"};p.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphSegment"};m.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphSegments"};d.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphLinear"};u.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphLinearSystem"};g.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphRay"};f.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphCircle"};h.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphQuadratic"};b.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphSinusoid"};k.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphPoint"};v.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphPolygon"};S.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphAngle"};W.__docgenInfo={description:"",methods:[],displayName:"InteractiveGraphNone"};i.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedFiguresCurrent"};L.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedLabelsFlag"};y.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedPointLabelsFlag"};P.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedLineLabelsFlag"};R.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedVectorLabelsFlag"};I.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedEllipseLabelsFlag"};w.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedFunctionLabelsFlag"};E.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedFigureLabelsAllFlags"};n.__docgenInfo={description:"",methods:[],displayName:"WithSaveWarnings"};var Q,N,O;c.parameters={...c.parameters,docs:{...(Q=c.parameters)==null?void 0:Q.docs,source:{originalSource:"(): React.ReactElement => ",...(O=(N=c.parameters)==null?void 0:N.docs)==null?void 0:O.source}}};var x,D,j;p.parameters={...p.parameters,docs:{...(x=p.parameters)==null?void 0:x.docs,source:{originalSource:`(): React.ReactElement => { return ; }`,...(j=(D=p.parameters)==null?void 0:D.docs)==null?void 0:j.source}}};var V,B,H;m.parameters={...m.parameters,docs:{...(V=m.parameters)==null?void 0:V.docs,source:{originalSource:`(): React.ReactElement => { return ; diff --git a/assets/interactive-graph-regression.stories-Beq-FXRU.js b/assets/interactive-graph-regression.stories-Beq-FXRU.js index 7f1d343df2..e4f6de174b 100644 --- a/assets/interactive-graph-regression.stories-Beq-FXRU.js +++ b/assets/interactive-graph-regression.stories-Beq-FXRU.js @@ -1,4 +1,4 @@ -import{j as e,F as k}from"./jsx-runtime-FVsy8kgq.js";import{R as os}from"./renderer-4_U4OAry.js";import{m as ns}from"./strings-OAjNfY6D.js";import{i as t}from"./interactive-graph-question-builder-kDutykZc.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";const $s={title:"Perseus/Widgets/Interactive Graph Visual Regression Tests"},a=s=>e(r,{question:t().withAxisLabels("\\text{Custom $x$ label}","\\text{Custom $y$ label}").build()}),i=s=>e(r,{question:t().withGridStep(2.571,3.123).build()}),o=s=>e(r,{question:t().withTickStep(1.5,1.5).build()}),n=s=>e(r,{question:t().withMarkings("grid").build()}),c=s=>e(r,{question:t().withMarkings("none").build()}),d=s=>e(r,{question:t().withXRange(-2,2).withYRange(-2,2).build()}),u=s=>e(r,{question:t().withXRange(-50,50).withYRange(-50,50).build()}),m=s=>e(k,{children:e(r,{question:t().withXRange(0,20).addLockedLine([1,1],[5,2]).build()})}),p=s=>e(k,{children:e(r,{question:t().withXRange(-1,20).addLockedLine([1,1],[5,2]).build()})}),g=s=>e(k,{children:e(r,{question:t().withXRange(-3,20).addLockedLine([1,1],[5,2]).build()})}),l=s=>e(r,{question:t().withXRange(1,20).build()}),h=s=>e(r,{question:t().withXRange(6,20).build()}),f=s=>e(r,{question:t().withXRange(-20,0).build()}),R=s=>e(r,{question:t().withXRange(-20,-1).build()}),M=s=>e(r,{question:t().withYRange(0,20).build()}),A=s=>e(r,{question:t().withYRange(-1,20).build()}),W=s=>e(r,{question:t().withYRange(1,20).build()}),S=s=>e(k,{children:e(r,{question:t().withYRange(-3,20).addLockedLine([-3,2],[5,16]).build()})}),b=s=>e(r,{question:t().withYRange(-20,0).build()}),L=s=>e(r,{question:t().withYRange(-20,-1).build()}),w=s=>e("div",{className:"framework-perseus perseus-mobile",children:e(r,{question:t().build()})}),q=s=>e(r,{question:t().withSegments({numSegments:3}).build()}),_=s=>e("div",{className:"framework-perseus perseus-mobile",children:e(r,{question:t().withCircle().withXRange(-10,10).withYRange(-5,5).build()})}),x=s=>e(r,{question:t().addLockedLine([-3,-3],[3,3]).withXRange(-5,5).withYRange(-10,10).build()}),y=s=>e(r,{question:t().addLockedPointAt(3,2).addLockedPointAt(-1,1).addLockedPointAt(0,-4).build()}),Q=s=>e(r,{question:t().addLockedLine([-1,1],[2,3]).build()}),N=s=>e(r,{question:t().withProtractor().build()});function r(s){const{question:G}=s;return e(os,{strings:ns,content:G.content,widgets:G.widgets,images:G.images,apiOptions:{flags:{mafs:{segment:!0,circle:!0,linear:!0}}}})}a.__docgenInfo={description:"",methods:[],displayName:"MafsWithCustomAxisLabels"};i.__docgenInfo={description:"",methods:[],displayName:"MafsWithFractionalGridStep"};o.__docgenInfo={description:"",methods:[],displayName:"MafsWithFractionalAxisTicks"};n.__docgenInfo={description:"",methods:[],displayName:"MafsWithGridMarkings"};c.__docgenInfo={description:"",methods:[],displayName:"MafsWithNoMarkings"};d.__docgenInfo={description:"",methods:[],displayName:"MafsWithSmallRange"};u.__docgenInfo={description:"",methods:[],displayName:"MafsWithLargeRange"};m.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisAtLeft"};p.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisNearLeft"};g.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisJustOverLeft"};l.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisOffLeft"};h.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisOffFarLeft"};f.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisAtRight"};R.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisOffRight"};M.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisAtBottom"};A.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisNearBottom"};W.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisOffBottom"};S.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisJustOverBottom"};b.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisAtTop"};L.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisOffTop"};w.__docgenInfo={description:"",methods:[],displayName:"MafsInMobileContainer"};q.__docgenInfo={description:"",methods:[],displayName:"MafsWithMultipleSegments"};_.__docgenInfo={description:"",methods:[],displayName:"MafsCircleGraphWithNonsquareRange"};x.__docgenInfo={description:"",methods:[],displayName:"MafsLineGraphWithNonsquareRange"};y.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedPoints"};Q.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedLine"};N.__docgenInfo={description:"",methods:[],displayName:"MafsWithProtractor"};var v,Y,B;a.parameters={...a.parameters,docs:{...(v=a.parameters)==null?void 0:v.docs,source:{originalSource:'(args: StoryArgs): React.ReactElement => ',...(B=(Y=a.parameters)==null?void 0:Y.docs)==null?void 0:B.source}}};var X,I,E;i.parameters={...i.parameters,docs:{...(X=i.parameters)==null?void 0:X.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(E=(I=i.parameters)==null?void 0:I.docs)==null?void 0:E.source}}};var O,C,P;o.parameters={...o.parameters,docs:{...(O=o.parameters)==null?void 0:O.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(P=(C=o.parameters)==null?void 0:C.docs)==null?void 0:P.source}}};var T,F,$;n.parameters={...n.parameters,docs:{...(T=n.parameters)==null?void 0:T.docs,source:{originalSource:'(args: StoryArgs): React.ReactElement => ',...($=(F=n.parameters)==null?void 0:F.docs)==null?void 0:$.source}}};var J,j,V;c.parameters={...c.parameters,docs:{...(J=c.parameters)==null?void 0:J.docs,source:{originalSource:'(args: StoryArgs): React.ReactElement => ',...(V=(j=c.parameters)==null?void 0:j.docs)==null?void 0:V.source}}};var z,D,H;d.parameters={...d.parameters,docs:{...(z=d.parameters)==null?void 0:z.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(H=(D=d.parameters)==null?void 0:D.docs)==null?void 0:H.source}}};var K,U,Z;u.parameters={...u.parameters,docs:{...(K=u.parameters)==null?void 0:K.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(Z=(U=u.parameters)==null?void 0:U.docs)==null?void 0:Z.source}}};var ee,se,te;m.parameters={...m.parameters,docs:{...(ee=m.parameters)==null?void 0:ee.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => <> +import{j as e,F as k}from"./jsx-runtime-FVsy8kgq.js";import{R as os}from"./renderer-4_U4OAry.js";import{m as ns}from"./strings-OAjNfY6D.js";import{i as t}from"./interactive-graph-question-builder-kDutykZc.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";const $s={title:"Perseus/Widgets/Interactive Graph Visual Regression Tests"},a=s=>e(r,{question:t().withAxisLabels("\\text{Custom $x$ label}","\\text{Custom $y$ label}").build()}),i=s=>e(r,{question:t().withGridStep(2.571,3.123).build()}),o=s=>e(r,{question:t().withTickStep(1.5,1.5).build()}),n=s=>e(r,{question:t().withMarkings("grid").build()}),c=s=>e(r,{question:t().withMarkings("none").build()}),d=s=>e(r,{question:t().withXRange(-2,2).withYRange(-2,2).build()}),u=s=>e(r,{question:t().withXRange(-50,50).withYRange(-50,50).build()}),m=s=>e(k,{children:e(r,{question:t().withXRange(0,20).addLockedLine([1,1],[5,2]).build()})}),p=s=>e(k,{children:e(r,{question:t().withXRange(-1,20).addLockedLine([1,1],[5,2]).build()})}),g=s=>e(k,{children:e(r,{question:t().withXRange(-3,20).addLockedLine([1,1],[5,2]).build()})}),l=s=>e(r,{question:t().withXRange(1,20).build()}),h=s=>e(r,{question:t().withXRange(6,20).build()}),f=s=>e(r,{question:t().withXRange(-20,0).build()}),R=s=>e(r,{question:t().withXRange(-20,-1).build()}),M=s=>e(r,{question:t().withYRange(0,20).build()}),A=s=>e(r,{question:t().withYRange(-1,20).build()}),W=s=>e(r,{question:t().withYRange(1,20).build()}),S=s=>e(k,{children:e(r,{question:t().withYRange(-3,20).addLockedLine([-3,2],[5,16]).build()})}),b=s=>e(r,{question:t().withYRange(-20,0).build()}),L=s=>e(r,{question:t().withYRange(-20,-1).build()}),w=s=>e("div",{className:"framework-perseus perseus-mobile",children:e(r,{question:t().build()})}),q=s=>e(r,{question:t().withSegments({numSegments:3}).build()}),_=s=>e("div",{className:"framework-perseus perseus-mobile",children:e(r,{question:t().withCircle().withXRange(-10,10).withYRange(-5,5).build()})}),x=s=>e(r,{question:t().addLockedLine([-3,-3],[3,3]).withXRange(-5,5).withYRange(-10,10).build()}),y=s=>e(r,{question:t().addLockedPointAt(3,2).addLockedPointAt(-1,1).addLockedPointAt(0,-4).build()}),Q=s=>e(r,{question:t().addLockedLine([-1,1],[2,3]).build()}),N=s=>e(r,{question:t().withProtractor().build()});function r(s){const{question:G}=s;return e(os,{strings:ns,content:G.content,widgets:G.widgets,images:G.images,apiOptions:{flags:{mafs:{segment:!0,circle:!0,linear:!0}}}})}a.__docgenInfo={description:"",methods:[],displayName:"MafsWithCustomAxisLabels"};i.__docgenInfo={description:"",methods:[],displayName:"MafsWithFractionalGridStep"};o.__docgenInfo={description:"",methods:[],displayName:"MafsWithFractionalAxisTicks"};n.__docgenInfo={description:"",methods:[],displayName:"MafsWithGridMarkings"};c.__docgenInfo={description:"",methods:[],displayName:"MafsWithNoMarkings"};d.__docgenInfo={description:"",methods:[],displayName:"MafsWithSmallRange"};u.__docgenInfo={description:"",methods:[],displayName:"MafsWithLargeRange"};m.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisAtLeft"};p.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisNearLeft"};g.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisJustOverLeft"};l.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisOffLeft"};h.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisOffFarLeft"};f.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisAtRight"};R.__docgenInfo={description:"",methods:[],displayName:"MafsWithYAxisOffRight"};M.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisAtBottom"};A.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisNearBottom"};W.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisOffBottom"};S.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisJustOverBottom"};b.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisAtTop"};L.__docgenInfo={description:"",methods:[],displayName:"MafsWithXAxisOffTop"};w.__docgenInfo={description:"",methods:[],displayName:"MafsInMobileContainer"};q.__docgenInfo={description:"",methods:[],displayName:"MafsWithMultipleSegments"};_.__docgenInfo={description:"",methods:[],displayName:"MafsCircleGraphWithNonsquareRange"};x.__docgenInfo={description:"",methods:[],displayName:"MafsLineGraphWithNonsquareRange"};y.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedPoints"};Q.__docgenInfo={description:"",methods:[],displayName:"MafsWithLockedLine"};N.__docgenInfo={description:"",methods:[],displayName:"MafsWithProtractor"};var v,Y,B;a.parameters={...a.parameters,docs:{...(v=a.parameters)==null?void 0:v.docs,source:{originalSource:'(args: StoryArgs): React.ReactElement => ',...(B=(Y=a.parameters)==null?void 0:Y.docs)==null?void 0:B.source}}};var X,I,E;i.parameters={...i.parameters,docs:{...(X=i.parameters)==null?void 0:X.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(E=(I=i.parameters)==null?void 0:I.docs)==null?void 0:E.source}}};var O,C,P;o.parameters={...o.parameters,docs:{...(O=o.parameters)==null?void 0:O.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(P=(C=o.parameters)==null?void 0:C.docs)==null?void 0:P.source}}};var T,F,$;n.parameters={...n.parameters,docs:{...(T=n.parameters)==null?void 0:T.docs,source:{originalSource:'(args: StoryArgs): React.ReactElement => ',...($=(F=n.parameters)==null?void 0:F.docs)==null?void 0:$.source}}};var J,j,V;c.parameters={...c.parameters,docs:{...(J=c.parameters)==null?void 0:J.docs,source:{originalSource:'(args: StoryArgs): React.ReactElement => ',...(V=(j=c.parameters)==null?void 0:j.docs)==null?void 0:V.source}}};var z,D,H;d.parameters={...d.parameters,docs:{...(z=d.parameters)==null?void 0:z.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(H=(D=d.parameters)==null?void 0:D.docs)==null?void 0:H.source}}};var K,U,Z;u.parameters={...u.parameters,docs:{...(K=u.parameters)==null?void 0:K.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(Z=(U=u.parameters)==null?void 0:U.docs)==null?void 0:Z.source}}};var ee,se,te;m.parameters={...m.parameters,docs:{...(ee=m.parameters)==null?void 0:ee.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => <> `,...(te=(se=m.parameters)==null?void 0:se.docs)==null?void 0:te.source}}};var re,ae,ie;p.parameters={...p.parameters,docs:{...(re=p.parameters)==null?void 0:re.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => <> diff --git a/assets/interactive-graph-settings-3oLklA_Z.js b/assets/interactive-graph-settings-3oLklA_Z.js index 500447836a..ddd635ecd8 100644 --- a/assets/interactive-graph-settings-3oLklA_Z.js +++ b/assets/interactive-graph-settings-3oLklA_Z.js @@ -1,4 +1,4 @@ -import{j as a,a as d,F as N}from"./jsx-runtime-FVsy8kgq.js";import{c as C}from"./article-renderer-o95CuJpS.js";import{_ as l}from"./jquery-yG1GhClm.js";import{U as k}from"./util-XcxTwqb0.js";import{B as E}from"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as z}from"./components-0kNWnYe6.js";import{i as P}from"./constants-I_nlPaPx.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{V as v}from"./index-6h5t6F0w.js";import{C as B}from"./index-QCAhLhLD.js";import{s as m,c as q}from"./index-deFLJwr4.js";import{l as R}from"./index-awljIyHI.js";import{r as w}from"./index-TT1qJ6UJ.js";import{H}from"./heading-8aCiuWUg.js";import{b as G}from"./index-h_CiYGGb.js";const h=x=>{const{children:n,label:e,labelSide:t="left",style:s}=x;return a("label",{className:R.css(S.label),children:d(v,{style:[S.row,s],children:[t==="start"||a(G,{style:S.spaceEnd,children:e}),n,t==="end"&&a(G,{style:S.spaceStart,children:e})]})})},S=R.StyleSheet.create({label:{width:"fit-content"},row:{flexDirection:"row",marginTop:m.xSmall_8,alignItems:"center",width:"fit-content"},spaceStart:{marginInlineStart:m.xSmall_8},spaceEnd:{marginInlineEnd:m.xSmall_8}});h.__docgenInfo={description:"",methods:[],displayName:"LabeledRow",props:{id:{required:!1,tsType:{name:"string"},description:""},label:{required:!0,tsType:{name:"string"},description:""},labelSide:{required:!1,tsType:{name:"union",raw:'"start" | "end"',elements:[{name:"literal",value:'"start"'},{name:"literal",value:'"end"'}]},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};const{ButtonGroup:V,InfoTip:_,RangeInput:b}=z,U={url:null,width:0,height:0};function A(x,n){return Math.floor((x[1]-x[0])/n)}const y=class y extends w.Component{constructor(n){super(n),this._isMounted=!1,this.bgUrlRef=w.createRef(),this.labelXRef=w.createRef(),this.labelYRef=w.createRef(),this.change=(...e)=>C.apply(this,e),this.changeBackgroundUrl=e=>{var i;if(e.type==="keypress"&&e.key!=="Enter")return;const t=(p,o,r)=>{const u={...this.props.backgroundImage};u.url=p,u.width=o,u.height=r,this.setState({backgroundImage:u},this.changeGraph)},s=(i=this.bgUrlRef.current)==null?void 0:i.value;s?k.getImageSize(s,(p,o)=>{this._isMounted&&t(s,p,o)}):t(null,0,0)},this.renderLabelChoices=e=>e.map(t=>a("option",{value:t[1],children:t[0]},t[1])),this.validRange=e=>l.every(e,function(s){return l.isFinite(s)})?e[0]>=e[1]?"Range must have a higher number on the right":!0:"Range must be a valid number",this.validateStepValue=e=>{const{step:t,range:s,name:i,minTicks:p,maxTicks:o}=e,r=A(s,t);return ro?i+" is too small, there can be at most "+o+" ticks.":!0},this.validSnapStep=(e,t)=>this.validateStepValue({step:e,range:t,name:"Snap step",minTicks:5,maxTicks:60}),this.validGridStep=(e,t)=>this.validateStepValue({step:e,range:t,name:"Grid step",minTicks:3,maxTicks:60}),this.validStep=(e,t)=>this.validateStepValue({step:e,range:t,name:"Step",minTicks:3,maxTicks:20}),this.validBackgroundImageSize=e=>e.url?e.width<=450&&e.height<=450?!0:"Image must be smaller than 450px x 450px.":!0,this.validateGraphSettings=(e,t,s,i,p)=>{const o=this;let r;if(!l.every(e,function(g){return r=o.validRange(g),r===!0})||!l.every(t,function(g,c){return r=o.validStep(g,e[c]),r===!0})||!l.every(s,function(g,c){return r=o.validGridStep(g,e[c]),r===!0})||!l.every(i,function(g,c){return r=o.validSnapStep(g,e[c]),r===!0}))return r;const I=this.validBackgroundImageSize(p);return I!==!0?(r=I,r):!0},this.changeLabel=(e,t)=>{const s=t.target.value,i=this.state.labelsTextbox.slice();i[e]=s,this.setState({labelsTextbox:i},this.changeGraph)},this.changeRange=(e,t)=>{const s=this.state.rangeTextbox.slice();s[e]=t;const i=this.state.stepTextbox.slice(),p=this.state.gridStepTextbox.slice(),o=this.state.snapStepTextbox.slice(),r=k.scaleFromExtent(s[e],this.props.box[e]);if(this.validRange(s[e])===!0){i[e]=k.tickStepFromExtent(s[e],this.props.box[e]);const u=k.gridStepFromTickStep(i[e],r);u&&(p[e]=u),o[e]=p[e]/2}this.setState({stepTextbox:i,gridStepTextbox:p,snapStepTextbox:o,rangeTextbox:s},this.changeGraph)},this.changeStep=e=>{this.setState({stepTextbox:e},this.changeGraph)},this.changeSnapStep=e=>{this.setState({snapStepTextbox:e},this.changeGraph)},this.changeGridStep=e=>{this.setState({gridStepTextbox:e,snapStepTextbox:l.map(e,function(t){return t/2})},this.changeGraph)},this.changeGraph=()=>{const e=this.state.labelsTextbox,t=l.map(this.state.rangeTextbox,function(u){return l.map(u,Number)}),s=l.map(this.state.stepTextbox,Number),i=this.state.gridStepTextbox,p=this.state.snapStepTextbox,o=this.state.backgroundImage,r=this.validateGraphSettings(t,s,i,p,o);r===!0?this.change({valid:!0,labels:e,range:t,step:s,gridStep:i,snapStep:p,backgroundImage:o}):this.change({valid:r})},this.state={isExpanded:!0,...y.stateFromProps(n)}}static stateFromProps(n){return{labelsTextbox:n.labels,gridStepTextbox:n.gridStep,snapStepTextbox:n.snapStep,stepTextbox:n.step,rangeTextbox:n.range,backgroundImage:{...n.backgroundImage}}}componentDidMount(){this._isMounted=!0,this.changeGraph=l.debounce(this.changeGraph,300)}UNSAFE_componentWillReceiveProps(n){(!l.isEqual(this.props.labels,n.labels)||!l.isEqual(this.props.gridStep,n.gridStep)||!l.isEqual(this.props.snapStep,n.snapStep)||!l.isEqual(this.props.step,n.step)||!l.isEqual(this.props.range,n.range)||!l.isEqual(this.props.backgroundImage,n.backgroundImage))&&this.setState(y.stateFromProps(n))}componentWillUnmount(){this._isMounted=!1}render(){return d(N,{children:[a(H,{title:"Common Graph Settings",isOpen:this.state.isExpanded,isCollapsible:!0,onToggle:()=>this.setState({isExpanded:!this.state.isExpanded})}),this.state.isExpanded&&d(v,{children:[d("div",{className:"graph-settings",children:[d("div",{className:"perseus-widget-row",children:[a("div",{className:"perseus-widget-left-col",children:a(h,{label:"x Label",children:a("input",{type:"text",className:"graph-settings-axis-label",ref:this.labelXRef,onChange:n=>this.changeLabel(0,n),value:this.state.labelsTextbox[0]||""})})}),a("div",{className:"perseus-widget-right-col",children:a(h,{label:"y Label",children:a("input",{type:"text",className:"graph-settings-axis-label",ref:this.labelYRef,onChange:n=>this.changeLabel(1,n),value:this.state.labelsTextbox[1]||""})})})]}),d("div",{className:"perseus-widget-row",children:[a("div",{className:"perseus-widget-left-col",children:a(h,{label:"x Range",children:a(b,{value:this.state.rangeTextbox[0],onChange:n=>this.changeRange(0,n)})})}),a("div",{className:"perseus-widget-right-col",children:a(h,{label:"y Range",children:a(b,{value:this.state.rangeTextbox[1],onChange:n=>this.changeRange(1,n)})})})]}),d("div",{className:"perseus-widget-row",children:[a("div",{className:"perseus-widget-left-col",children:a(h,{label:"Tick Step",children:a(b,{value:this.state.stepTextbox,onChange:this.changeStep})})}),a("div",{className:"perseus-widget-right-col",children:a(h,{label:"Grid Step",children:a(b,{value:this.state.gridStepTextbox,onChange:this.changeGridStep})})})]}),a("div",{className:"perseus-widget-row",children:a("div",{className:"perseus-widget-left-col",children:a(h,{label:"Snap Step",children:a(b,{value:this.state.snapStepTextbox,onChange:this.changeSnapStep})})})}),a("div",{className:"perseus-widget-row",children:a(h,{label:"Markings:",children:a(V,{value:this.props.markings,allowEmpty:!1,buttons:[{value:"graph",content:"Graph"},{value:"grid",content:"Grid"},{value:"none",content:"None"}],onChange:this.change("markings")})})}),a("div",{className:"perseus-widget-left-col",children:a(B,{label:"Show tooltips",checked:this.props.showTooltips,onChange:n=>{this.change({showTooltips:n})}})})]}),d(h,{label:"Background image URL:",style:f.resetSpaceTop,children:[a("input",{type:"text",className:R.css(f.backgroundUrlInput),ref:this.bgUrlRef,value:this.state.backgroundImage.url||"",onChange:n=>{const e={...this.props.backgroundImage};e.url=n.target.value,this.setState({backgroundImage:e})},onKeyPress:this.changeBackgroundUrl,onBlur:this.changeBackgroundUrl}),a(_,{children:a("p",{children:'Create an image in graphie, or use the "Add image" function to create a background.'})})]}),d(v,{style:f.protractorSection,children:[a(v,{style:f.checkboxRow,children:a(B,{label:"Show protractor",checked:this.props.showProtractor,onChange:n=>{this.change({showProtractor:n})},style:f.resetSpaceTop})}),this.props.showProtractor&&a(E,{layout:"floating",text:"The protractor is not accessible. Please consider an alternate approach.",kind:"warning"})]})]})]})}};y.defaultProps={box:[P.defaultBoxSizeSmall,P.defaultBoxSizeSmall],labels:["x","y"],range:[[-10,10],[-10,10]],step:[1,1],gridStep:[1,1],snapStep:[1,1],valid:!0,backgroundImage:U,markings:"graph",showProtractor:!1,showTooltips:!1};let T=y;const f=R.StyleSheet.create({resetSpaceTop:{marginTop:0},backgroundUrlInput:{border:`1px solid ${q.offBlack32}`,borderRadius:m.xxxSmall_4,padding:m.xxxSmall_4},checkboxRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:m.xSmall_8},protractorSection:{marginTop:m.xSmall_8,borderTop:`1px solid ${q.offBlack16}`,paddingTop:m.xSmall_8,paddingBottom:m.xSmall_8,borderBottom:`1px solid ${q.offBlack16}`}}),ge=T;T.__docgenInfo={description:"",methods:[{name:"stateFromProps",docblock:null,modifiers:["static"],params:[{name:"props",optional:!1,type:{name:"signature",type:"object",raw:`{ +import{j as a,a as d,F as N}from"./jsx-runtime-FVsy8kgq.js";import{c as C}from"./article-renderer-o95CuJpS.js";import{_ as l}from"./jquery-yG1GhClm.js";import{U as k}from"./util-XcxTwqb0.js";import{B as E}from"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as z}from"./components-0kNWnYe6.js";import{i as P}from"./constants-I_nlPaPx.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{V as v}from"./index-6h5t6F0w.js";import{C as B}from"./index-QCAhLhLD.js";import{s as m,c as q}from"./index-deFLJwr4.js";import{l as R}from"./index-awljIyHI.js";import{r as w}from"./index-TT1qJ6UJ.js";import{H}from"./heading-8aCiuWUg.js";import{b as G}from"./index-h_CiYGGb.js";const h=x=>{const{children:n,label:e,labelSide:t="left",style:s}=x;return a("label",{className:R.css(S.label),children:d(v,{style:[S.row,s],children:[t==="start"||a(G,{style:S.spaceEnd,children:e}),n,t==="end"&&a(G,{style:S.spaceStart,children:e})]})})},S=R.StyleSheet.create({label:{width:"fit-content"},row:{flexDirection:"row",marginTop:m.xSmall_8,alignItems:"center",width:"fit-content"},spaceStart:{marginInlineStart:m.xSmall_8},spaceEnd:{marginInlineEnd:m.xSmall_8}});h.__docgenInfo={description:"",methods:[],displayName:"LabeledRow",props:{id:{required:!1,tsType:{name:"string"},description:""},label:{required:!0,tsType:{name:"string"},description:""},labelSide:{required:!1,tsType:{name:"union",raw:'"start" | "end"',elements:[{name:"literal",value:'"start"'},{name:"literal",value:'"end"'}]},description:""},style:{required:!1,tsType:{name:"StyleType"},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};const{ButtonGroup:V,InfoTip:_,RangeInput:b}=z,U={url:null,width:0,height:0};function A(x,n){return Math.floor((x[1]-x[0])/n)}const y=class y extends w.Component{constructor(n){super(n),this._isMounted=!1,this.bgUrlRef=w.createRef(),this.labelXRef=w.createRef(),this.labelYRef=w.createRef(),this.change=(...e)=>C.apply(this,e),this.changeBackgroundUrl=e=>{var i;if(e.type==="keypress"&&e.key!=="Enter")return;const t=(p,o,r)=>{const u={...this.props.backgroundImage};u.url=p,u.width=o,u.height=r,this.setState({backgroundImage:u},this.changeGraph)},s=(i=this.bgUrlRef.current)==null?void 0:i.value;s?k.getImageSize(s,(p,o)=>{this._isMounted&&t(s,p,o)}):t(null,0,0)},this.renderLabelChoices=e=>e.map(t=>a("option",{value:t[1],children:t[0]},t[1])),this.validRange=e=>l.every(e,function(s){return l.isFinite(s)})?e[0]>=e[1]?"Range must have a higher number on the right":!0:"Range must be a valid number",this.validateStepValue=e=>{const{step:t,range:s,name:i,minTicks:p,maxTicks:o}=e,r=A(s,t);return ro?i+" is too small, there can be at most "+o+" ticks.":!0},this.validSnapStep=(e,t)=>this.validateStepValue({step:e,range:t,name:"Snap step",minTicks:5,maxTicks:60}),this.validGridStep=(e,t)=>this.validateStepValue({step:e,range:t,name:"Grid step",minTicks:3,maxTicks:60}),this.validStep=(e,t)=>this.validateStepValue({step:e,range:t,name:"Step",minTicks:3,maxTicks:20}),this.validBackgroundImageSize=e=>e.url?e.width<=450&&e.height<=450?!0:"Image must be smaller than 450px x 450px.":!0,this.validateGraphSettings=(e,t,s,i,p)=>{const o=this;let r;if(!l.every(e,function(g){return r=o.validRange(g),r===!0})||!l.every(t,function(g,c){return r=o.validStep(g,e[c]),r===!0})||!l.every(s,function(g,c){return r=o.validGridStep(g,e[c]),r===!0})||!l.every(i,function(g,c){return r=o.validSnapStep(g,e[c]),r===!0}))return r;const I=this.validBackgroundImageSize(p);return I!==!0?(r=I,r):!0},this.changeLabel=(e,t)=>{const s=t.target.value,i=this.state.labelsTextbox.slice();i[e]=s,this.setState({labelsTextbox:i},this.changeGraph)},this.changeRange=(e,t)=>{const s=this.state.rangeTextbox.slice();s[e]=t;const i=this.state.stepTextbox.slice(),p=this.state.gridStepTextbox.slice(),o=this.state.snapStepTextbox.slice(),r=k.scaleFromExtent(s[e],this.props.box[e]);if(this.validRange(s[e])===!0){i[e]=k.tickStepFromExtent(s[e],this.props.box[e]);const u=k.gridStepFromTickStep(i[e],r);u&&(p[e]=u),o[e]=p[e]/2}this.setState({stepTextbox:i,gridStepTextbox:p,snapStepTextbox:o,rangeTextbox:s},this.changeGraph)},this.changeStep=e=>{this.setState({stepTextbox:e},this.changeGraph)},this.changeSnapStep=e=>{this.setState({snapStepTextbox:e},this.changeGraph)},this.changeGridStep=e=>{this.setState({gridStepTextbox:e,snapStepTextbox:l.map(e,function(t){return t/2})},this.changeGraph)},this.changeGraph=()=>{const e=this.state.labelsTextbox,t=l.map(this.state.rangeTextbox,function(u){return l.map(u,Number)}),s=l.map(this.state.stepTextbox,Number),i=this.state.gridStepTextbox,p=this.state.snapStepTextbox,o=this.state.backgroundImage,r=this.validateGraphSettings(t,s,i,p,o);r===!0?this.change({valid:!0,labels:e,range:t,step:s,gridStep:i,snapStep:p,backgroundImage:o}):this.change({valid:r})},this.state={isExpanded:!0,...y.stateFromProps(n)}}static stateFromProps(n){return{labelsTextbox:n.labels,gridStepTextbox:n.gridStep,snapStepTextbox:n.snapStep,stepTextbox:n.step,rangeTextbox:n.range,backgroundImage:{...n.backgroundImage}}}componentDidMount(){this._isMounted=!0,this.changeGraph=l.debounce(this.changeGraph,300)}UNSAFE_componentWillReceiveProps(n){(!l.isEqual(this.props.labels,n.labels)||!l.isEqual(this.props.gridStep,n.gridStep)||!l.isEqual(this.props.snapStep,n.snapStep)||!l.isEqual(this.props.step,n.step)||!l.isEqual(this.props.range,n.range)||!l.isEqual(this.props.backgroundImage,n.backgroundImage))&&this.setState(y.stateFromProps(n))}componentWillUnmount(){this._isMounted=!1}render(){return d(N,{children:[a(H,{title:"Common Graph Settings",isOpen:this.state.isExpanded,isCollapsible:!0,onToggle:()=>this.setState({isExpanded:!this.state.isExpanded})}),this.state.isExpanded&&d(v,{children:[d("div",{className:"graph-settings",children:[d("div",{className:"perseus-widget-row",children:[a("div",{className:"perseus-widget-left-col",children:a(h,{label:"x Label",children:a("input",{type:"text",className:"graph-settings-axis-label",ref:this.labelXRef,onChange:n=>this.changeLabel(0,n),value:this.state.labelsTextbox[0]||""})})}),a("div",{className:"perseus-widget-right-col",children:a(h,{label:"y Label",children:a("input",{type:"text",className:"graph-settings-axis-label",ref:this.labelYRef,onChange:n=>this.changeLabel(1,n),value:this.state.labelsTextbox[1]||""})})})]}),d("div",{className:"perseus-widget-row",children:[a("div",{className:"perseus-widget-left-col",children:a(h,{label:"x Range",children:a(b,{value:this.state.rangeTextbox[0],onChange:n=>this.changeRange(0,n)})})}),a("div",{className:"perseus-widget-right-col",children:a(h,{label:"y Range",children:a(b,{value:this.state.rangeTextbox[1],onChange:n=>this.changeRange(1,n)})})})]}),d("div",{className:"perseus-widget-row",children:[a("div",{className:"perseus-widget-left-col",children:a(h,{label:"Tick Step",children:a(b,{value:this.state.stepTextbox,onChange:this.changeStep})})}),a("div",{className:"perseus-widget-right-col",children:a(h,{label:"Grid Step",children:a(b,{value:this.state.gridStepTextbox,onChange:this.changeGridStep})})})]}),a("div",{className:"perseus-widget-row",children:a("div",{className:"perseus-widget-left-col",children:a(h,{label:"Snap Step",children:a(b,{value:this.state.snapStepTextbox,onChange:this.changeSnapStep})})})}),a("div",{className:"perseus-widget-row",children:a(h,{label:"Markings:",children:a(V,{value:this.props.markings,allowEmpty:!1,buttons:[{value:"graph",content:"Graph"},{value:"grid",content:"Grid"},{value:"none",content:"None"}],onChange:this.change("markings")})})}),a("div",{className:"perseus-widget-left-col",children:a(B,{label:"Show tooltips",checked:this.props.showTooltips,onChange:n=>{this.change({showTooltips:n})}})})]}),d(h,{label:"Background image URL:",style:f.resetSpaceTop,children:[a("input",{type:"text",className:R.css(f.backgroundUrlInput),ref:this.bgUrlRef,value:this.state.backgroundImage.url||"",onChange:n=>{const e={...this.props.backgroundImage};e.url=n.target.value,this.setState({backgroundImage:e})},onKeyPress:this.changeBackgroundUrl,onBlur:this.changeBackgroundUrl}),a(_,{children:a("p",{children:'Create an image in graphie, or use the "Add image" function to create a background.'})})]}),d(v,{style:f.protractorSection,children:[a(v,{style:f.checkboxRow,children:a(B,{label:"Show protractor",checked:this.props.showProtractor,onChange:n=>{this.change({showProtractor:n})},style:f.resetSpaceTop})}),this.props.showProtractor&&a(E,{layout:"floating",text:"The protractor is not accessible. Please consider an alternate approach.",kind:"warning"})]})]})]})}};y.defaultProps={box:[P.defaultBoxSizeSmall,P.defaultBoxSizeSmall],labels:["x","y"],range:[[-10,10],[-10,10]],step:[1,1],gridStep:[1,1],snapStep:[1,1],valid:!0,backgroundImage:U,markings:"graph",showProtractor:!1,showTooltips:!1};let T=y;const f=R.StyleSheet.create({resetSpaceTop:{marginTop:0},backgroundUrlInput:{border:`1px solid ${q.offBlack32}`,borderRadius:m.xxxSmall_4,padding:m.xxxSmall_4},checkboxRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:m.xSmall_8},protractorSection:{marginTop:m.xSmall_8,borderTop:`1px solid ${q.offBlack16}`,paddingTop:m.xSmall_8,paddingBottom:m.xSmall_8,borderBottom:`1px solid ${q.offBlack16}`}}),ge=T;T.__docgenInfo={description:"",methods:[{name:"stateFromProps",docblock:null,modifiers:["static"],params:[{name:"props",optional:!1,type:{name:"signature",type:"object",raw:`{ /** * The size of the graph area in pixels. */ diff --git a/assets/interactive-graph-settings.stories-1FqvCDej.js b/assets/interactive-graph-settings.stories-1FqvCDej.js index b5179aeeac..0a4a018a70 100644 --- a/assets/interactive-graph-settings.stories-1FqvCDej.js +++ b/assets/interactive-graph-settings.stories-1FqvCDej.js @@ -1,4 +1,4 @@ -import{j as u}from"./jsx-runtime-FVsy8kgq.js";import{r as x}from"./index-TT1qJ6UJ.js";import{I as o}from"./interactive-graph-settings-3oLklA_Z.js";import{I}from"./interactive-graph-settings.argtypes-6T40gg9D.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./heading-8aCiuWUg.js";import"./index-tFzzSRL2.js";import"./toggleable-caret-lFiCktzo.js";const ut={title:"PerseusEditor/Components/Interactive Graph Settings",component:o,argTypes:I},r=p=>u(o,{...p});r.args={box:[288,288],gridStep:[1,1],labels:["x","y"],markings:"graph",range:[[-10,10],[-10,10]],rulerLabel:"",rulerTicks:10,showProtractor:!1,showRuler:!1,showTooltips:!1,snapStep:[1,1],step:[1,1]};const t={render:function(){const l=(f,S)=>({...f,...S}),[h,g]=x.useReducer(l,{});return u(o,{...h,onChange:g})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,e,m;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as u}from"./jsx-runtime-FVsy8kgq.js";import{r as x}from"./index-TT1qJ6UJ.js";import{I as o}from"./interactive-graph-settings-3oLklA_Z.js";import{I}from"./interactive-graph-settings.argtypes-6T40gg9D.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./heading-8aCiuWUg.js";import"./index-tFzzSRL2.js";import"./toggleable-caret-lFiCktzo.js";const ut={title:"PerseusEditor/Components/Interactive Graph Settings",component:o,argTypes:I},r=p=>u(o,{...p});r.args={box:[288,288],gridStep:[1,1],labels:["x","y"],markings:"graph",range:[[-10,10],[-10,10]],rulerLabel:"",rulerTicks:10,showProtractor:!1,showRuler:!1,showTooltips:!1,snapStep:[1,1],step:[1,1]};const t={render:function(){const l=(f,S)=>({...f,...S}),[h,g]=x.useReducer(l,{});return u(o,{...h,onChange:g})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,e,m;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(m=(e=r.parameters)==null?void 0:e.docs)==null?void 0:m.source}}};var s,a,n,c,d;t.parameters={...t.parameters,docs:{...(s=t.parameters)==null?void 0:s.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/interactive-graph.stories-iUtI6Lki.js b/assets/interactive-graph.stories-iUtI6Lki.js index ed1aeea9f6..e01ecaee61 100644 --- a/assets/interactive-graph.stories-iUtI6Lki.js +++ b/assets/interactive-graph.stories-iUtI6Lki.js @@ -1,4 +1,4 @@ -import{j as o,a as y,F as X}from"./jsx-runtime-FVsy8kgq.js";import{B as Kt}from"./phet-simulation-I2_BZVd2.js";import{B as ne}from"./choice-E4eyMygy.js";import{b as pe,a as Dt,_ as k,V as b}from"./index-6h5t6F0w.js";import{r as c}from"./index-TT1qJ6UJ.js";import{l as Z}from"./index-awljIyHI.js";import{L as Ht,c as Jt}from"./react-router-dom-W_e8xVUu.js";import{i as Yt}from"./index-o3wWn3Y5.js";import{P as he}from"./index-xuPsLuPk.js";import{m as Xt,c as Zt,u as eo,T as to}from"./index-rfN0X25E.js";import{c as n,b as L,s as g}from"./index-deFLJwr4.js";import{S as oe}from"./index-qUyqkRvh.js";import{L as oo}from"./video-transcript-link-WVgIZGhp.js";import{a as ro,S as no}from"./index-CkAxGj88.js";import{b as so,L as io,H as ao}from"./index-h_CiYGGb.js";import{T as fe}from"./index-K9BSJPWl.js";import{w as co}from"./index-J2t_5nK1.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import{a as lo}from"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import{R as uo}from"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import{S as po}from"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{m as mo}from"./strings-OAjNfY6D.js";import{R as d}from"./renderer-with-debug-ui-o6OVhJgg.js";import{j as Mt,k as go,m as ho,n as fo,o as yo,t as me,u as bo,v as So,w as vo,x as ko,y as Ro,z as Io,A as wo,B as xo,C as Lo,D as qo,E as _o,F as Co,G as Wo,H as Ao}from"./interactive-graph.testdata-syb_sPmB.js";import"./index-ngddCaVG.js";import"./arrow-square-out-bold-090vdhrx.js";import"./constants-I_nlPaPx.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-YCTzZMik.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./media-queries-MaBBbpNq.js";import"./choice-icon-LAaL9HdM.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./index-tvtfaFq4.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./shared-3pf9YZIg.js";import"./answer-choices-vbrLThK4.js";import"./minus-bold-ONmDo3Ve.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./stub-tag-editor-Hmby24Jq.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./choice-none-above-o4v4BTO3.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./side-by-side-kpK-8vW0.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./interactive-graph-question-builder-kDutykZc.js";const Eo=e=>{switch(e){case"xsmall":return"small";case"small":return"medium";case"medium":return"medium";case"large":return"medium"}},Oo=e=>({xsmall:24,small:32,medium:40,large:48})[e],se={color:{bg:{hovered:"transparent",active:"transparent",disabled:"transparent",filled:{action:{hovered:"transparent",active:"transparent"},critical:{hovered:"transparent",active:"transparent"}}},stroke:{disabled:{default:n.offBlack32,inverse:n.white50},inverse:n.white,action:{default:n.blue,active:n.activeBlue,inverse:n.fadedBlue},critical:{default:n.red,active:n.activeRed,inverse:n.fadedRed},primary:{action:{hovered:n.blue,active:n.activeBlue},critical:{hovered:n.red,active:n.activeRed},inverse:{default:n.white,hovered:n.white}},secondary:{default:n.offBlack},tertiary:{default:n.offBlack64},filled:{action:{hovered:n.blue,active:n.activeBlue},critical:{hovered:n.red,active:n.activeRed}}}},border:{width:{default:L.width.thin,active:L.width.none,hovered:L.width.thin,hoveredInverse:L.width.thin},radius:{default:L.radius.medium_4}}},No=Xt(se,{color:{bg:{hovered:n.white,active:n.white64,filled:{action:{hovered:n.blue,active:n.activeBlue},critical:{hovered:n.red,active:n.activeRed}}},stroke:{action:{inverse:n.eggplant},critical:{inverse:n.eggplant},primary:{action:{hovered:n.eggplant,active:n.eggplant},critical:{hovered:n.eggplant,active:n.eggplant},inverse:{hovered:n.eggplant}},filled:{action:{hovered:n.white,active:n.white},critical:{hovered:n.white,active:n.white}}}},border:{width:{hovered:L.width.none,hoveredInverse:L.width.none}}}),Qo={default:se,khanmigo:No},Tt=Zt(se);function Po(e){var t;const s=c.useContext(to),a=(t=Qo[s])!=null?t:se;return c.createElement(Tt.Provider,{value:a},e.children)}const Bo=["color","disabled","href","icon","kind","light","size","skipClientNav","style","testId"];function Do({icon:e,size:t}){switch(Eo(t)){case"small":return c.createElement(he,{size:"small",color:"currentColor",icon:e});case"medium":default:return c.createElement(he,{size:"medium",color:"currentColor",icon:e})}}const Mo=pe("a"),To=pe("button"),Uo=pe(Ht),zo=c.forwardRef(function(t,s){const{color:a,disabled:r,href:l,icon:u,kind:m="primary",light:p=!1,size:i="medium",skipClientNav:v,style:q,testId:I}=t,w=Dt(t,Bo),{theme:x,themeName:S}=eo(Tt),R=ce=>{const ge=Fo(a,m,p,i,x,S),jt=[Go.shared,ge.default,r&&ge.disabled],le=c.createElement(Do,{size:i,icon:u}),de=k({"data-testid":I,style:[jt,q]},w);return l&&!r?ce&&!v&&Yt(l)?c.createElement(Uo,k({},de,{to:l,ref:s}),le):c.createElement(Mo,k({},de,{href:l,ref:s}),le):c.createElement(To,k({type:"button"},de,{onClick:r?void 0:w.onClick,"aria-disabled":r,ref:s}),le)};return c.createElement(Jt.Consumer,null,ce=>R(ce))}),Go=Z.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",padding:0,cursor:"pointer",border:"none",outline:"none",textDecoration:"none",background:"none",margin:-8,touchAction:"manipulation"}}),re={};function $o(e,t,s,a,r){switch(e){case"primary":const l=r==="destructive"?t.color.stroke.primary.critical.hovered:t.color.stroke.primary.action.hovered;return{":hover":{backgroundColor:t.color.bg.hovered,color:a?t.color.stroke.primary.inverse.hovered:l,outlineColor:a?t.color.stroke.inverse:s,outlineOffset:1,outlineStyle:"solid",outlineWidth:a?t.border.width.hoveredInverse:t.border.width.hovered},":active":{backgroundColor:t.color.bg.active}};case"secondary":case"tertiary":return{":hover":{backgroundColor:r==="destructive"?t.color.bg.filled.critical.hovered:t.color.bg.filled.action.hovered,color:r==="destructive"?t.color.stroke.filled.critical.hovered:t.color.stroke.filled.action.hovered,outlineWidth:t.border.width.active},":active":{backgroundColor:r==="destructive"?t.color.bg.filled.critical.active:t.color.bg.filled.action.active,color:r==="destructive"?t.color.stroke.filled.critical.active:t.color.stroke.filled.action.active,outlineWidth:t.border.width.active}};default:return{":focus-visible":{},":hover":{},":active":{}}}}const Fo=(e="default",t,s,a,r,l)=>{const u=e==="destructive"?r.color.stroke.critical.default:r.color.stroke.action.default,m=`${u}-${t}-${s}-${a}-${l}`;if(re[m])return re[m];if(s&&t!=="primary")throw new Error("Light is only supported for primary IconButtons");const p=(()=>{switch(t){case"primary":return s?r.color.stroke.primary.inverse.default:u;case"secondary":return r.color.stroke.secondary.default;case"tertiary":return r.color.stroke.tertiary.default;default:throw new Error("IconButton kind not recognized")}})(),i=Oo(a),v=$o(t,r,u,s,e),q=e==="destructive"?r.color.stroke.critical.inverse:r.color.stroke.action.inverse,I=e==="destructive"?r.color.stroke.critical.active:r.color.stroke.action.active,w=s?r.color.stroke.inverse:u,x=s?r.color.stroke.disabled.inverse:r.color.stroke.disabled.default,S={backgroundColor:r.color.bg.disabled,color:x,outlineColor:x},R={default:{height:i,width:i,color:p,borderRadius:r.border.radius.default,":hover":k({boxShadow:"none",color:w,borderRadius:r.border.radius.default,outlineWidth:r.border.width.default},v[":hover"]),"@media not (hover: hover)":{":hover":{boxShadow:"none",color:p,borderRadius:r.border.radius.default,outline:"none",backgroundColor:"transparent"}},":focus":{boxShadow:`0 0 0 ${r.border.width.default}px ${w}`,borderRadius:r.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":k({boxShadow:"none",outlineWidth:r.border.width.default,outlineColor:w,outlineOffset:1,outlineStyle:"solid",borderRadius:r.border.radius.default},v[":focus-visible"]),":active":k({color:s?q:I,outlineWidth:r.border.width.default,outlineColor:s?q:I,outlineOffset:1,outlineStyle:"solid",borderRadius:r.border.radius.default},v[":active"])},disabled:{color:x,cursor:"not-allowed",":hover":k({},S,{outline:"none"}),":active":k({},S,{outline:"none"}),":focus":{boxShadow:`0 0 0 ${r.border.width.default}px ${x}`,borderRadius:r.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":S}};return re[m]=Z.StyleSheet.create(R),re[m]},Vo=["color","disabled","href","kind","light","size","skipClientNav","tabIndex","target"],ye=c.forwardRef(function(t,s){const{color:a="default",disabled:r=!1,href:l,kind:u="primary",light:m=!1,size:p="medium",skipClientNav:i,tabIndex:v,target:q}=t,I=Dt(t,Vo);function w(S){const R=S.key;!l&&(R==="Enter"||R==="Space")&&S.preventDefault()}function x(S){const R=S.key;!l&&(R==="Enter"||R==="Space")&&I.onClick&&I.onClick(S)}return c.createElement(Po,null,c.createElement(zo,k({},I,{color:a,disabled:r,href:l,kind:u,light:m,ref:s,skipClientNav:i,size:p,target:q,tabIndex:v,onKeyDown:w,onKeyUp:x})))});class ie extends c.Component{render(){const{color:t,leftContent:s,rightContent:a,size:r,subtitle:l,title:u}=this.props,m=l?io:ao;return c.createElement(b,{style:[h.container,t==="dark"&&h.dark,r==="small"&&h.small]},c.createElement(b,{style:[h.column,h.leftColumn,u?h.withTitle:null]},s),u&&c.createElement(b,{style:[h.column,h.wideColumn]},c.createElement(b,{style:[h.titles,h.center]},c.createElement(m,{id:"wb-toolbar-title"},u),l&&c.createElement(so,{style:t==="light"&&h.subtitle},l))),c.createElement(b,{style:[h.column,h.rightColumn,u?h.withTitle:null]},a))}}ie.defaultProps={color:"light",leftContent:null,rightContent:null,size:"medium"};const h=Z.StyleSheet.create({container:{border:`1px solid ${n.offBlack16}`,flex:1,flexDirection:"row",justifyContent:"space-between",minHeight:66,paddingLeft:g.medium_16,paddingRight:g.medium_16,width:"100%"},small:{minHeight:50},dark:{backgroundColor:n.darkBlue,boxShadow:`0 1px 0 0 ${n.white64}`,color:"white"},column:{justifyContent:"center"},withTitle:{flex:1},wideColumn:{flex:1,flexBasis:"50%"},leftColumn:{alignItems:"center",flexDirection:"row",flexShrink:0,justifyContent:"flex-start"},rightColumn:{alignItems:"center",flexDirection:"row",justifyContent:"flex-end"},center:{textAlign:"center"},subtitle:{color:n.offBlack64},titles:{padding:g.small_12}}),jo=""+new URL("camera-slash-Oge78uaV.svg",import.meta.url).href,Ko=""+new URL("graph-RU2fqeKx.svg",import.meta.url).href,Ho=""+new URL("image-PFUjt3DK.svg",import.meta.url).href,Jo=["angle","segment","linear","linear-system","ray","polygon","point","circle","quadratic","sinusoid","unlimited-point"],Yo=Jo.reduce((e,t)=>(e[t]=!0,e),{});function Ut(e){const{value:t,onInput:s,...a}=e,[r,l]=c.useState(!1),[u,m]=c.useState("");return o("input",{...a,value:r?u:t,onChange:p=>{m(p.target.value),s(p.target.value)},onFocus:()=>{m(t),l(!0)},onBlur:()=>{l(!1)}})}Ut.__docgenInfo={description:"",methods:[],displayName:"EditableControlledInput",props:{value:{required:!0,tsType:{name:"string"},description:""},onInput:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: string) => unknown",signature:{arguments:[{type:{name:"string"},name:"newValue"}],return:{name:"unknown"}}},description:""}}};function ee(e){let t;return s=>((t==null||s!==t.arg)&&(t={arg:s,result:e(s)}),t.result)}const Xo={type:"next"},Zo={type:"previous"},er=e=>lr(e)?{type:"jump-to-index",index:parseInt(e,10)-1}:{type:"noop"};function tr(e){return{type:"set-questions",questions:e}}function or(e){return{type:"load-questions-from-storage",questions:e}}const rr={type:"remove-current-question"};function nr(e,t){switch(t.type){case"next":return ue(e,s=>s+1);case"previous":return ue(e,s=>s-1);case"jump-to-index":return ue(e,()=>t.index);case"set-questions":return{...e,questions:t.questions};case"load-questions-from-storage":return e.questions||!t.questions?e:{...e,questions:t.questions};case"remove-current-question":{const s=te(e);return{...e,questions:e.questions.split(` +import{j as o,a as y,F as X}from"./jsx-runtime-FVsy8kgq.js";import{B as Kt}from"./phet-simulation-I2_BZVd2.js";import{B as ne}from"./choice-E4eyMygy.js";import{b as pe,a as Dt,_ as k,V as b}from"./index-6h5t6F0w.js";import{r as c}from"./index-TT1qJ6UJ.js";import{l as Z}from"./index-awljIyHI.js";import{L as Ht,c as Jt}from"./react-router-dom-W_e8xVUu.js";import{i as Yt}from"./index-o3wWn3Y5.js";import{P as he}from"./index-xuPsLuPk.js";import{m as Xt,c as Zt,u as eo,T as to}from"./index-rfN0X25E.js";import{c as n,b as L,s as g}from"./index-deFLJwr4.js";import{S as oe}from"./index-qUyqkRvh.js";import{L as oo}from"./video-transcript-link-WVgIZGhp.js";import{a as ro,S as no}from"./index-CkAxGj88.js";import{b as so,L as io,H as ao}from"./index-h_CiYGGb.js";import{T as fe}from"./index-K9BSJPWl.js";import{w as co}from"./index-J2t_5nK1.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import{a as lo}from"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import{R as uo}from"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import{S as po}from"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{m as mo}from"./strings-OAjNfY6D.js";import{R as d}from"./renderer-with-debug-ui-o6OVhJgg.js";import{j as Mt,k as go,m as ho,n as fo,o as yo,t as me,u as bo,v as So,w as vo,x as ko,y as Ro,z as Io,A as wo,B as xo,C as Lo,D as qo,E as _o,F as Co,G as Wo,H as Ao}from"./interactive-graph.testdata-syb_sPmB.js";import"./index-ngddCaVG.js";import"./arrow-square-out-bold-090vdhrx.js";import"./constants-I_nlPaPx.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-YCTzZMik.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./media-queries-MaBBbpNq.js";import"./choice-icon-LAaL9HdM.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./index-tvtfaFq4.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./shared-3pf9YZIg.js";import"./answer-choices-vbrLThK4.js";import"./minus-bold-ONmDo3Ve.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./stub-tag-editor-Hmby24Jq.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./choice-none-above-o4v4BTO3.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./index-QCAhLhLD.js";import"./bundle.esm-7jAAHVxW.js";import"./side-by-side-kpK-8vW0.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./interactive-graph-question-builder-kDutykZc.js";const Eo=e=>{switch(e){case"xsmall":return"small";case"small":return"medium";case"medium":return"medium";case"large":return"medium"}},Oo=e=>({xsmall:24,small:32,medium:40,large:48})[e],se={color:{bg:{hovered:"transparent",active:"transparent",disabled:"transparent",filled:{action:{hovered:"transparent",active:"transparent"},critical:{hovered:"transparent",active:"transparent"}}},stroke:{disabled:{default:n.offBlack32,inverse:n.white50},inverse:n.white,action:{default:n.blue,active:n.activeBlue,inverse:n.fadedBlue},critical:{default:n.red,active:n.activeRed,inverse:n.fadedRed},primary:{action:{hovered:n.blue,active:n.activeBlue},critical:{hovered:n.red,active:n.activeRed},inverse:{default:n.white,hovered:n.white}},secondary:{default:n.offBlack},tertiary:{default:n.offBlack64},filled:{action:{hovered:n.blue,active:n.activeBlue},critical:{hovered:n.red,active:n.activeRed}}}},border:{width:{default:L.width.thin,active:L.width.none,hovered:L.width.thin,hoveredInverse:L.width.thin},radius:{default:L.radius.medium_4}}},No=Xt(se,{color:{bg:{hovered:n.white,active:n.white64,filled:{action:{hovered:n.blue,active:n.activeBlue},critical:{hovered:n.red,active:n.activeRed}}},stroke:{action:{inverse:n.eggplant},critical:{inverse:n.eggplant},primary:{action:{hovered:n.eggplant,active:n.eggplant},critical:{hovered:n.eggplant,active:n.eggplant},inverse:{hovered:n.eggplant}},filled:{action:{hovered:n.white,active:n.white},critical:{hovered:n.white,active:n.white}}}},border:{width:{hovered:L.width.none,hoveredInverse:L.width.none}}}),Qo={default:se,khanmigo:No},Tt=Zt(se);function Po(e){var t;const s=c.useContext(to),a=(t=Qo[s])!=null?t:se;return c.createElement(Tt.Provider,{value:a},e.children)}const Bo=["color","disabled","href","icon","kind","light","size","skipClientNav","style","testId"];function Do({icon:e,size:t}){switch(Eo(t)){case"small":return c.createElement(he,{size:"small",color:"currentColor",icon:e});case"medium":default:return c.createElement(he,{size:"medium",color:"currentColor",icon:e})}}const Mo=pe("a"),To=pe("button"),Uo=pe(Ht),zo=c.forwardRef(function(t,s){const{color:a,disabled:r,href:l,icon:u,kind:m="primary",light:p=!1,size:i="medium",skipClientNav:v,style:q,testId:I}=t,w=Dt(t,Bo),{theme:x,themeName:S}=eo(Tt),R=ce=>{const ge=Fo(a,m,p,i,x,S),jt=[Go.shared,ge.default,r&&ge.disabled],le=c.createElement(Do,{size:i,icon:u}),de=k({"data-testid":I,style:[jt,q]},w);return l&&!r?ce&&!v&&Yt(l)?c.createElement(Uo,k({},de,{to:l,ref:s}),le):c.createElement(Mo,k({},de,{href:l,ref:s}),le):c.createElement(To,k({type:"button"},de,{onClick:r?void 0:w.onClick,"aria-disabled":r,ref:s}),le)};return c.createElement(Jt.Consumer,null,ce=>R(ce))}),Go=Z.StyleSheet.create({shared:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",padding:0,cursor:"pointer",border:"none",outline:"none",textDecoration:"none",background:"none",margin:-8,touchAction:"manipulation"}}),re={};function $o(e,t,s,a,r){switch(e){case"primary":const l=r==="destructive"?t.color.stroke.primary.critical.hovered:t.color.stroke.primary.action.hovered;return{":hover":{backgroundColor:t.color.bg.hovered,color:a?t.color.stroke.primary.inverse.hovered:l,outlineColor:a?t.color.stroke.inverse:s,outlineOffset:1,outlineStyle:"solid",outlineWidth:a?t.border.width.hoveredInverse:t.border.width.hovered},":active":{backgroundColor:t.color.bg.active}};case"secondary":case"tertiary":return{":hover":{backgroundColor:r==="destructive"?t.color.bg.filled.critical.hovered:t.color.bg.filled.action.hovered,color:r==="destructive"?t.color.stroke.filled.critical.hovered:t.color.stroke.filled.action.hovered,outlineWidth:t.border.width.active},":active":{backgroundColor:r==="destructive"?t.color.bg.filled.critical.active:t.color.bg.filled.action.active,color:r==="destructive"?t.color.stroke.filled.critical.active:t.color.stroke.filled.action.active,outlineWidth:t.border.width.active}};default:return{":focus-visible":{},":hover":{},":active":{}}}}const Fo=(e="default",t,s,a,r,l)=>{const u=e==="destructive"?r.color.stroke.critical.default:r.color.stroke.action.default,m=`${u}-${t}-${s}-${a}-${l}`;if(re[m])return re[m];if(s&&t!=="primary")throw new Error("Light is only supported for primary IconButtons");const p=(()=>{switch(t){case"primary":return s?r.color.stroke.primary.inverse.default:u;case"secondary":return r.color.stroke.secondary.default;case"tertiary":return r.color.stroke.tertiary.default;default:throw new Error("IconButton kind not recognized")}})(),i=Oo(a),v=$o(t,r,u,s,e),q=e==="destructive"?r.color.stroke.critical.inverse:r.color.stroke.action.inverse,I=e==="destructive"?r.color.stroke.critical.active:r.color.stroke.action.active,w=s?r.color.stroke.inverse:u,x=s?r.color.stroke.disabled.inverse:r.color.stroke.disabled.default,S={backgroundColor:r.color.bg.disabled,color:x,outlineColor:x},R={default:{height:i,width:i,color:p,borderRadius:r.border.radius.default,":hover":k({boxShadow:"none",color:w,borderRadius:r.border.radius.default,outlineWidth:r.border.width.default},v[":hover"]),"@media not (hover: hover)":{":hover":{boxShadow:"none",color:p,borderRadius:r.border.radius.default,outline:"none",backgroundColor:"transparent"}},":focus":{boxShadow:`0 0 0 ${r.border.width.default}px ${w}`,borderRadius:r.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":k({boxShadow:"none",outlineWidth:r.border.width.default,outlineColor:w,outlineOffset:1,outlineStyle:"solid",borderRadius:r.border.radius.default},v[":focus-visible"]),":active":k({color:s?q:I,outlineWidth:r.border.width.default,outlineColor:s?q:I,outlineOffset:1,outlineStyle:"solid",borderRadius:r.border.radius.default},v[":active"])},disabled:{color:x,cursor:"not-allowed",":hover":k({},S,{outline:"none"}),":active":k({},S,{outline:"none"}),":focus":{boxShadow:`0 0 0 ${r.border.width.default}px ${x}`,borderRadius:r.border.radius.default},":focus:not(:focus-visible)":{boxShadow:"none"},":focus-visible":S}};return re[m]=Z.StyleSheet.create(R),re[m]},Vo=["color","disabled","href","kind","light","size","skipClientNav","tabIndex","target"],ye=c.forwardRef(function(t,s){const{color:a="default",disabled:r=!1,href:l,kind:u="primary",light:m=!1,size:p="medium",skipClientNav:i,tabIndex:v,target:q}=t,I=Dt(t,Vo);function w(S){const R=S.key;!l&&(R==="Enter"||R==="Space")&&S.preventDefault()}function x(S){const R=S.key;!l&&(R==="Enter"||R==="Space")&&I.onClick&&I.onClick(S)}return c.createElement(Po,null,c.createElement(zo,k({},I,{color:a,disabled:r,href:l,kind:u,light:m,ref:s,skipClientNav:i,size:p,target:q,tabIndex:v,onKeyDown:w,onKeyUp:x})))});class ie extends c.Component{render(){const{color:t,leftContent:s,rightContent:a,size:r,subtitle:l,title:u}=this.props,m=l?io:ao;return c.createElement(b,{style:[h.container,t==="dark"&&h.dark,r==="small"&&h.small]},c.createElement(b,{style:[h.column,h.leftColumn,u?h.withTitle:null]},s),u&&c.createElement(b,{style:[h.column,h.wideColumn]},c.createElement(b,{style:[h.titles,h.center]},c.createElement(m,{id:"wb-toolbar-title"},u),l&&c.createElement(so,{style:t==="light"&&h.subtitle},l))),c.createElement(b,{style:[h.column,h.rightColumn,u?h.withTitle:null]},a))}}ie.defaultProps={color:"light",leftContent:null,rightContent:null,size:"medium"};const h=Z.StyleSheet.create({container:{border:`1px solid ${n.offBlack16}`,flex:1,flexDirection:"row",justifyContent:"space-between",minHeight:66,paddingLeft:g.medium_16,paddingRight:g.medium_16,width:"100%"},small:{minHeight:50},dark:{backgroundColor:n.darkBlue,boxShadow:`0 1px 0 0 ${n.white64}`,color:"white"},column:{justifyContent:"center"},withTitle:{flex:1},wideColumn:{flex:1,flexBasis:"50%"},leftColumn:{alignItems:"center",flexDirection:"row",flexShrink:0,justifyContent:"flex-start"},rightColumn:{alignItems:"center",flexDirection:"row",justifyContent:"flex-end"},center:{textAlign:"center"},subtitle:{color:n.offBlack64},titles:{padding:g.small_12}}),jo=""+new URL("camera-slash-Oge78uaV.svg",import.meta.url).href,Ko=""+new URL("graph-RU2fqeKx.svg",import.meta.url).href,Ho=""+new URL("image-PFUjt3DK.svg",import.meta.url).href,Jo=["angle","segment","linear","linear-system","ray","polygon","point","circle","quadratic","sinusoid","unlimited-point"],Yo=Jo.reduce((e,t)=>(e[t]=!0,e),{});function Ut(e){const{value:t,onInput:s,...a}=e,[r,l]=c.useState(!1),[u,m]=c.useState("");return o("input",{...a,value:r?u:t,onChange:p=>{m(p.target.value),s(p.target.value)},onFocus:()=>{m(t),l(!0)},onBlur:()=>{l(!1)}})}Ut.__docgenInfo={description:"",methods:[],displayName:"EditableControlledInput",props:{value:{required:!0,tsType:{name:"string"},description:""},onInput:{required:!0,tsType:{name:"signature",type:"function",raw:"(newValue: string) => unknown",signature:{arguments:[{type:{name:"string"},name:"newValue"}],return:{name:"unknown"}}},description:""}}};function ee(e){let t;return s=>((t==null||s!==t.arg)&&(t={arg:s,result:e(s)}),t.result)}const Xo={type:"next"},Zo={type:"previous"},er=e=>lr(e)?{type:"jump-to-index",index:parseInt(e,10)-1}:{type:"noop"};function tr(e){return{type:"set-questions",questions:e}}function or(e){return{type:"load-questions-from-storage",questions:e}}const rr={type:"remove-current-question"};function nr(e,t){switch(t.type){case"next":return ue(e,s=>s+1);case"previous":return ue(e,s=>s-1);case"jump-to-index":return ue(e,()=>t.index);case"set-questions":return{...e,questions:t.questions};case"load-questions-from-storage":return e.questions||!t.questions?e:{...e,questions:t.questions};case"remove-current-question":{const s=te(e);return{...e,questions:e.questions.split(` `).filter((a,r)=>r!==s).join(` `)}}}return e}function ue(e,t){const s=te(e),a=ae(e);return{...e,requestedIndex:zt(t(s),a)}}function zt(e,t){return t.length===0||e<0?0:e>=t.length?t.length-1:e}const Gt=ee(e=>e.questions.split(` `).map(t=>t.trim()).filter(Boolean)),ae=ee(e=>Gt(e).map(cr)),sr=ee(e=>ae(e)[te(e)]??null),ir=ee(e=>Gt(e)[te(e)]??null),ar=ee(e=>ae(e).length),te=e=>zt(e.requestedIndex,ae(e));function cr(e){try{return JSON.parse(e)}catch{return{content:"**Could not parse the JSON for this question.**\n\n```\n"+e+"\n```",widgets:{},images:{}}}}function lr(e){return/^\d+$/.test(e)&&+e>0}const dr=Z.StyleSheet.create({header:{display:"flex",alignItems:"center",boxShadow:"0 0 10px #0002",borderBlockEnd:`1px solid ${n.offBlack32}`,background:n.offBlack8,padding:g.small_12,justifyContent:"space-between",flexDirection:"row-reverse",flexWrap:"wrap"}}),$t=({children:e})=>o("header",{className:Z.css(dr.header),children:e});$t.__docgenInfo={description:"",methods:[],displayName:"Header"};const ur=` diff --git a/assets/item-X9tjzx12.js b/assets/item-X9tjzx12.js index 86eb13fcb9..e87bf561de 100644 --- a/assets/item-X9tjzx12.js +++ b/assets/item-X9tjzx12.js @@ -1,4 +1,4 @@ -import{j as e,a as h}from"./jsx-runtime-FVsy8kgq.js";import{C as w}from"./index-WNT3sUKf.js";import{V as m}from"./index-6h5t6F0w.js";import{c as a}from"./index-deFLJwr4.js";import{l as g}from"./index-awljIyHI.js";import{r as f}from"./index-TT1qJ6UJ.js";const b=function({tintColor:l,type:n}){switch(n){case"Geometry":return e("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.57584 7.09442c.35139-.16458.76626-.11103 1.06434.13737L26.6402 22.2318c.3234.2695.4434.7128.3001 1.1086C26.7969 23.7363 26.421 24 26 24H8c-.55228 0-1-.4477-1-1V8.00001c0-.38802.22446-.74101.57584-.90559zM9 10.1351V17h4c.5523 0 1 .4477 1 1v4h9.238L9 10.1351zM12 22v-3H9v3h3z",fill:l})});case"Operators":return e("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M29 6h1v1h-1V6zm-2 0c0-1.10457.8954-2 2-2h1c1.1046 0 2 .89543 2 2v1c0 1.10457-.8954 2-2 2h-1c-1.1046 0-2-.89543-2-2V6zm-15.8682.50386C11.3098 6.19229 11.6411 6 12 6h2c.5523 0 1 .44772 1 1s-.4477 1-1 1h-1.4197l-3.71206 6.4961c-.18297.3202-.52733.5137-.89599.5035-.36865-.0102-.70175-.2225-.86668-.5524l-2-4c-.24699-.49396-.04676-1.09464.44722-1.34163.49397-.24699 1.09465-.04676 1.34164.44722L8.0588 11.8815l3.073-5.37764zM7.70676 16.2925c.39072.3904.39103 1.0235.00069 1.4143-.42202.4224-.86362 1.0235-1.19588 1.659C6.17039 20.0184 6 20.601 6 21c0 .3789.17235.9897.51638 1.6649.33677.661.7685 1.2472 1.15148 1.5908.41106.3689.44528 1.0011.07643 1.4122-.36885.411-1.00109.4452-1.41215.0764-.61604-.5528-1.18431-1.3599-1.5978-2.1715C4.32813 22.7755 3.99999 21.8345 4 21c.00001-.8609.3301-1.7783.73917-2.5608.41798-.7995.97637-1.5684 1.55338-2.146.39033-.3907 1.0235-.391 1.41421-.0007zm3.58644 0c.3908-.3903 1.0239-.39 1.4143.0007.577.5776 1.1353 1.3465 1.5533 2.146C14.6699 19.2217 15 20.1391 15 21c0 .8345-.3281 1.7755-.7343 2.5728-.4135.8116-.9818 1.6187-1.5978 2.1715-.4111.3688-1.0433.3346-1.4122-.0764-.3688-.4111-.3346-1.0433.0764-1.4122.383-.3436.8148-.9298 1.1515-1.5908.344-.6752.5164-1.286.5164-1.6649 0-.399-.1704-.9816-.5116-1.6342-.3322-.6355-.7738-1.2366-1.1959-1.659-.3903-.3908-.39-1.0239.0007-1.4143zm16.6431 1.3564c.1939.5171-.0681 1.0935-.5852 1.2874L21.848 21l5.5031 2.0637c.5171.1939.7791.7703.5852 1.2874-.1939.5171-.7703.7791-1.2874.5852l-8-3C18.2586 21.79 18 21.4168 18 21c0-.4168.2586-.79.6489-.9363l8-3c.5171-.1939 1.0935.0681 1.2874.5852zM21 8v5h3V8h-3zm-1-2c-.5523 0-1 .44772-1 1v7c0 .5523.4477 1 1 1h5c.5523 0 1-.4477 1-1V7c0-.55228-.4477-1-1-1h-5z",fill:l})});case"Numbers":return e("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M10.4123 19.5794v1.421H4.71434v-1.421h2.016v-5.558c0-.1213.00233-.245.007-.371.00466-.126.01166-.2543.021-.385l-1.33 1.106c-.09334.07-.18434.1144-.273.133-.08867.0187-.17267.021-.252.007-.07934-.0186-.14934-.0466-.21-.084-.06067-.042-.10734-.084-.14-.126l-.609-.819 3.122-2.646h1.589v8.743h1.75696zm8.3801-.35c.21 0 .3734.0584.49.175.1214.1167.182.2707.182.462v1.134h-7.042v-.63c0-.1213.0257-.252.077-.392.0514-.1446.1377-.2753.259-.392l3.01-3.017c.2567-.2566.483-.5016.679-.735.196-.238.3594-.469.49-.693.1307-.2286.2287-.4596.294-.693.0654-.2333.098-.4783.098-.735 0-.4526-.1166-.7956-.35-1.029-.2333-.238-.5623-.357-.987-.357-.1866 0-.3593.028-.518.084-.154.0514-.294.1237-.42.217-.1213.0934-.2263.203-.315.329-.0886.126-.154.2637-.196.413-.084.2334-.1983.3897-.343.469-.14.0747-.3406.091-.602.049l-1.022-.182c.0747-.4946.2147-.9286.42-1.302.2054-.3733.462-.6836.77-.931.308-.2473.6604-.4316 1.057-.553.3967-.126.8237-.189 1.281-.189.4807 0 .917.0724 1.309.217.3967.14.735.3384 1.015.595.28.252.497.5577.651.917.154.3594.231.756.231 1.19 0 .3734-.0536.7187-.161 1.036-.1073.3174-.2543.6207-.441.91-.182.2847-.3943.5624-.637.833-.2426.2707-.4993.5437-.77.819l-2.156 2.205c.238-.07.4737-.1236.707-.161.2334-.042.4527-.063.658-.063h2.282zm2.6611-5.523c.0747-.4946.2147-.9286.42-1.302.2054-.3733.462-.6836.77-.931.308-.2473.658-.4316 1.05-.553.3967-.126.8237-.189 1.281-.189.4854 0 .9194.07 1.302.21.3874.1354.714.322.98.56.266.238.469.5157.609.833.1447.3174.217.658.217 1.022 0 .322-.035.6067-.105.854-.0653.2427-.1656.455-.301.637-.1306.182-.294.336-.49.462-.1913.126-.413.231-.665.315 1.1667.3827 1.75 1.1597 1.75 2.331 0 .518-.0956.9754-.287 1.372-.1913.392-.448.721-.77.987s-.6976.4667-1.127.602c-.4246.1307-.8703.196-1.337.196-.4946 0-.931-.056-1.309-.168-.378-.112-.7116-.28-1.001-.504-.2846-.224-.5296-.504-.735-.84-.2053-.3406-.385-.7373-.539-1.19l.854-.35c.224-.0933.4317-.119.623-.077.196.042.336.1447.42.308.0934.1774.1914.3407.294.49.1074.1494.2264.28.357.392.1307.1074.2777.1914.441.252.168.0607.3594.091.574.091.2707 0 .5064-.0443.707-.133.2007-.0886.3687-.203.504-.343.1354-.1446.2357-.3056.301-.483.07-.182.105-.3616.105-.539 0-.2333-.021-.4433-.063-.63-.042-.1913-.14-.3523-.294-.483-.1493-.1353-.3733-.238-.672-.308-.294-.0746-.6953-.112-1.204-.112v-1.358c.4247 0 .7724-.035 1.043-.105.2707-.07.483-.168.637-.294.154-.126.259-.2776.315-.455.0607-.1773.091-.371.091-.581 0-.4433-.1166-.7816-.35-1.015-.2286-.2333-.5553-.35-.98-.35-.1866 0-.3593.028-.518.084-.154.0514-.294.1237-.42.217-.1213.0934-.2263.203-.315.329-.0886.126-.154.2637-.196.413-.0886.2334-.203.3897-.343.469-.14.0747-.343.091-.609.049l-1.015-.182z",fill:l})});case"Extras":return h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32",children:[h("g",{clipPath:"url(#a)",children:[e("path",{fill:l,fillRule:"evenodd",d:"M6.127 10.454c.224-.032.403-.05.53-.05.591 0 1.137.153 1.63.459.398.239.713.529.94.872l.188-.248.005-.007.006-.006c.619-.703 1.347-1.07 2.178-1.07.691 0 1.269.204 1.71.626.454.403.686.91.686 1.51 0 .533-.156.994-.476 1.37-.312.383-.738.574-1.254.574-.345 0-.643-.101-.878-.317a1.1 1.1 0 0 1-.353-.843c0-.405.11-.76.342-1.051.153-.193.354-.352.596-.479a1.416 1.416 0 0 0-.492-.07c-.195 0-.316.016-.38.035-.53.226-.938.694-1.208 1.445l-.001.003c-.02.05-.085.289-.202.74-.115.443-.275 1.077-.481 1.901-.414 1.641-.633 2.547-.662 2.74l-.002.01a3.423 3.423 0 0 0-.067.673c0 .337.097.581.272.756.176.177.413.272.733.272.6 0 1.15-.247 1.657-.768.518-.549.864-1.146 1.044-1.791l.001-.004a1.2 1.2 0 0 1 .088-.224.368.368 0 0 1 .161-.164.564.564 0 0 1 .198-.056 2.19 2.19 0 0 1 .276-.014c.159 0 .305.016.42.064.059.025.12.063.167.122.05.063.073.137.073.213 0 .023-.004.048-.005.057a12.52 12.52 0 0 1-.046.245l-.004.015c-.281 1.026-.86 1.917-1.73 2.67l-.007.007c-.776.611-1.605.925-2.484.925-1.08 0-1.93-.45-2.53-1.33-.453.605-1.015 1.024-1.685 1.248l-.01.003-.011.002a3.23 3.23 0 0 1-.664.053c-.974 0-1.703-.35-2.13-1.078A2.05 2.05 0 0 1 2 19.437c0-.52.158-.975.478-1.349.326-.38.749-.572 1.252-.572.372 0 .69.091.913.31.224.218.318.531.318.898 0 .327-.078.621-.241.874a1.706 1.706 0 0 1-.707.597l-.018.009c.158.063.331.095.52.095.467 0 .902-.285 1.295-.966l.002-.005c.071-.115.185-.417.341-.938.154-.51.341-1.209.563-2.096v-.002c.095-.364.198-.767.31-1.21.11-.444.188-.78.235-1.014l.002-.013c.058-.216.098-.36.119-.425.077-.42.113-.709.113-.877 0-.342-.092-.588-.254-.762-.159-.171-.384-.267-.704-.267-.652 0-1.217.251-1.704.768l-.002.002A4.215 4.215 0 0 0 3.79 14.28a1.084 1.084 0 0 1-.065.207.41.41 0 0 1-.14.176l-.01.007-.012.006a.35.35 0 0 1-.104.03 1.16 1.16 0 0 1-.095.01 5.04 5.04 0 0 1-.275.006H2.67l-.061-.061c-.109-.11-.204-.247-.204-.41v-.015l.003-.015c.07-.472.335-1.05.768-1.723l.001-.002c.771-1.165 1.754-1.857 2.949-2.042h.002Z",clipRule:"evenodd"}),e("path",{fill:l,d:"M21.084 10.284c.932-.008 2.301-.013 4.107-.013 1.325 0 2.327.003 3.007.007a75.812 75.812 0 0 1 .99.013c.025 0 .047.002.065.003h.002c.01 0 .04.003.067.01l.01.002.011.004c.201.07.37.183.488.347a.966.966 0 0 1 .169.574c0 .3-.078.568-.248.79-.168.221-.411.377-.708.479h-.002a1.01 1.01 0 0 1-.221.034 8.213 8.213 0 0 1-.35.016c-.29.008-.696.012-1.219.012h-1.39l-.038.223v.001c-.198 1.185-.295 2.156-.295 2.916 0 1.446.251 2.746.75 3.905l.004.007c.059.153.105.284.137.393.03.103.053.205.053.29 0 .359-.16.68-.44.961-.278.296-.63.445-1.041.445-.255 0-.492-.03-.654-.139l-.009-.006-.008-.006c-.126-.101-.236-.274-.338-.477l-.006-.012c-.331-.768-.49-1.722-.49-2.852 0-.595.007-1.002.025-1.212v-.005c.118-1.157.377-2.551.776-4.18v-.002c.024-.096.045-.18.061-.25h-1.948c-.008.038-.02.086-.034.143l-.002.007a35.14 35.14 0 0 0-.146.537c-.05.232-.1.448-.15.648v.001a230.673 230.673 0 0 1-1.312 4.936 41.285 41.285 0 0 1-.411 1.384c-.104.322-.19.557-.256.681-.115.262-.28.473-.5.617-.225.146-.49.212-.783.212-.449 0-.807-.173-1.006-.549l-.006-.011-.005-.012a1.37 1.37 0 0 1-.067-.486v-.326l.346-.745c1.24-2.61 2.136-4.858 2.695-6.747l.002-.008.094-.281h-.463c-.662 0-1.105.025-1.346.07-.198.04-.47.173-.824.43l-.007.005-.007.005c-.366.228-.69.542-.97.947-.044.069-.085.13-.125.18a.651.651 0 0 1-.141.136l-.027.017-.03.01a.8.8 0 0 1-.19.03c-.07.005-.156.008-.258.008-.17 0-.335-.021-.465-.09a.437.437 0 0 1-.216-.546c.014-.042.034-.086.057-.132.047-.093.113-.208.198-.343l.003-.005c1.147-1.745 2.311-2.774 3.508-2.96a2.345 2.345 0 0 1 .158-.015 60.295 60.295 0 0 1 1.369-.026Z"})]}),e("defs",{children:e("clipPath",{id:"a",children:e("path",{fill:"#fff",d:"M0 0h28v11.457H0z",transform:"translate(2 10.271)"})})})]});case"Dismiss":return e("svg",{width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.7071 15.2929C28.3166 14.9024 27.6834 14.9024 27.2929 15.2929L22 20.5858L16.7071 15.2929C16.3166 14.9024 15.6834 14.9024 15.2929 15.2929C14.9024 15.6834 14.9024 16.3166 15.2929 16.7071L20.5858 22L15.2929 27.2929C14.9024 27.6834 14.9024 28.3166 15.2929 28.7071C15.6834 29.0976 16.3166 29.0976 16.7071 28.7071L22 23.4142L27.2929 28.7071C27.6834 29.0976 28.3166 29.0976 28.7071 28.7071C29.0976 28.3166 29.0976 27.6834 28.7071 27.2929L23.4142 22L28.7071 16.7071C29.0976 16.3166 29.0976 15.6834 28.7071 15.2929Z",fill:l})});case"Fractions":return e("svg",{width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg"});default:throw new Error(`Invalid icon type: ${n}`)}};b.__docgenInfo={description:"",methods:[],displayName:"IconAsset",props:{tintColor:{required:!0,tsType:{name:"string"},description:""},type:{required:!0,tsType:{name:"union",raw:`| "Geometry" +import{j as e,a as h}from"./jsx-runtime-FVsy8kgq.js";import{C as w}from"./index-2dmvOE3q.js";import{V as m}from"./index-6h5t6F0w.js";import{c as a}from"./index-deFLJwr4.js";import{l as g}from"./index-awljIyHI.js";import{r as f}from"./index-TT1qJ6UJ.js";const b=function({tintColor:l,type:n}){switch(n){case"Geometry":return e("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.57584 7.09442c.35139-.16458.76626-.11103 1.06434.13737L26.6402 22.2318c.3234.2695.4434.7128.3001 1.1086C26.7969 23.7363 26.421 24 26 24H8c-.55228 0-1-.4477-1-1V8.00001c0-.38802.22446-.74101.57584-.90559zM9 10.1351V17h4c.5523 0 1 .4477 1 1v4h9.238L9 10.1351zM12 22v-3H9v3h3z",fill:l})});case"Operators":return e("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M29 6h1v1h-1V6zm-2 0c0-1.10457.8954-2 2-2h1c1.1046 0 2 .89543 2 2v1c0 1.10457-.8954 2-2 2h-1c-1.1046 0-2-.89543-2-2V6zm-15.8682.50386C11.3098 6.19229 11.6411 6 12 6h2c.5523 0 1 .44772 1 1s-.4477 1-1 1h-1.4197l-3.71206 6.4961c-.18297.3202-.52733.5137-.89599.5035-.36865-.0102-.70175-.2225-.86668-.5524l-2-4c-.24699-.49396-.04676-1.09464.44722-1.34163.49397-.24699 1.09465-.04676 1.34164.44722L8.0588 11.8815l3.073-5.37764zM7.70676 16.2925c.39072.3904.39103 1.0235.00069 1.4143-.42202.4224-.86362 1.0235-1.19588 1.659C6.17039 20.0184 6 20.601 6 21c0 .3789.17235.9897.51638 1.6649.33677.661.7685 1.2472 1.15148 1.5908.41106.3689.44528 1.0011.07643 1.4122-.36885.411-1.00109.4452-1.41215.0764-.61604-.5528-1.18431-1.3599-1.5978-2.1715C4.32813 22.7755 3.99999 21.8345 4 21c.00001-.8609.3301-1.7783.73917-2.5608.41798-.7995.97637-1.5684 1.55338-2.146.39033-.3907 1.0235-.391 1.41421-.0007zm3.58644 0c.3908-.3903 1.0239-.39 1.4143.0007.577.5776 1.1353 1.3465 1.5533 2.146C14.6699 19.2217 15 20.1391 15 21c0 .8345-.3281 1.7755-.7343 2.5728-.4135.8116-.9818 1.6187-1.5978 2.1715-.4111.3688-1.0433.3346-1.4122-.0764-.3688-.4111-.3346-1.0433.0764-1.4122.383-.3436.8148-.9298 1.1515-1.5908.344-.6752.5164-1.286.5164-1.6649 0-.399-.1704-.9816-.5116-1.6342-.3322-.6355-.7738-1.2366-1.1959-1.659-.3903-.3908-.39-1.0239.0007-1.4143zm16.6431 1.3564c.1939.5171-.0681 1.0935-.5852 1.2874L21.848 21l5.5031 2.0637c.5171.1939.7791.7703.5852 1.2874-.1939.5171-.7703.7791-1.2874.5852l-8-3C18.2586 21.79 18 21.4168 18 21c0-.4168.2586-.79.6489-.9363l8-3c.5171-.1939 1.0935.0681 1.2874.5852zM21 8v5h3V8h-3zm-1-2c-.5523 0-1 .44772-1 1v7c0 .5523.4477 1 1 1h5c.5523 0 1-.4477 1-1V7c0-.55228-.4477-1-1-1h-5z",fill:l})});case"Numbers":return e("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M10.4123 19.5794v1.421H4.71434v-1.421h2.016v-5.558c0-.1213.00233-.245.007-.371.00466-.126.01166-.2543.021-.385l-1.33 1.106c-.09334.07-.18434.1144-.273.133-.08867.0187-.17267.021-.252.007-.07934-.0186-.14934-.0466-.21-.084-.06067-.042-.10734-.084-.14-.126l-.609-.819 3.122-2.646h1.589v8.743h1.75696zm8.3801-.35c.21 0 .3734.0584.49.175.1214.1167.182.2707.182.462v1.134h-7.042v-.63c0-.1213.0257-.252.077-.392.0514-.1446.1377-.2753.259-.392l3.01-3.017c.2567-.2566.483-.5016.679-.735.196-.238.3594-.469.49-.693.1307-.2286.2287-.4596.294-.693.0654-.2333.098-.4783.098-.735 0-.4526-.1166-.7956-.35-1.029-.2333-.238-.5623-.357-.987-.357-.1866 0-.3593.028-.518.084-.154.0514-.294.1237-.42.217-.1213.0934-.2263.203-.315.329-.0886.126-.154.2637-.196.413-.084.2334-.1983.3897-.343.469-.14.0747-.3406.091-.602.049l-1.022-.182c.0747-.4946.2147-.9286.42-1.302.2054-.3733.462-.6836.77-.931.308-.2473.6604-.4316 1.057-.553.3967-.126.8237-.189 1.281-.189.4807 0 .917.0724 1.309.217.3967.14.735.3384 1.015.595.28.252.497.5577.651.917.154.3594.231.756.231 1.19 0 .3734-.0536.7187-.161 1.036-.1073.3174-.2543.6207-.441.91-.182.2847-.3943.5624-.637.833-.2426.2707-.4993.5437-.77.819l-2.156 2.205c.238-.07.4737-.1236.707-.161.2334-.042.4527-.063.658-.063h2.282zm2.6611-5.523c.0747-.4946.2147-.9286.42-1.302.2054-.3733.462-.6836.77-.931.308-.2473.658-.4316 1.05-.553.3967-.126.8237-.189 1.281-.189.4854 0 .9194.07 1.302.21.3874.1354.714.322.98.56.266.238.469.5157.609.833.1447.3174.217.658.217 1.022 0 .322-.035.6067-.105.854-.0653.2427-.1656.455-.301.637-.1306.182-.294.336-.49.462-.1913.126-.413.231-.665.315 1.1667.3827 1.75 1.1597 1.75 2.331 0 .518-.0956.9754-.287 1.372-.1913.392-.448.721-.77.987s-.6976.4667-1.127.602c-.4246.1307-.8703.196-1.337.196-.4946 0-.931-.056-1.309-.168-.378-.112-.7116-.28-1.001-.504-.2846-.224-.5296-.504-.735-.84-.2053-.3406-.385-.7373-.539-1.19l.854-.35c.224-.0933.4317-.119.623-.077.196.042.336.1447.42.308.0934.1774.1914.3407.294.49.1074.1494.2264.28.357.392.1307.1074.2777.1914.441.252.168.0607.3594.091.574.091.2707 0 .5064-.0443.707-.133.2007-.0886.3687-.203.504-.343.1354-.1446.2357-.3056.301-.483.07-.182.105-.3616.105-.539 0-.2333-.021-.4433-.063-.63-.042-.1913-.14-.3523-.294-.483-.1493-.1353-.3733-.238-.672-.308-.294-.0746-.6953-.112-1.204-.112v-1.358c.4247 0 .7724-.035 1.043-.105.2707-.07.483-.168.637-.294.154-.126.259-.2776.315-.455.0607-.1773.091-.371.091-.581 0-.4433-.1166-.7816-.35-1.015-.2286-.2333-.5553-.35-.98-.35-.1866 0-.3593.028-.518.084-.154.0514-.294.1237-.42.217-.1213.0934-.2263.203-.315.329-.0886.126-.154.2637-.196.413-.0886.2334-.203.3897-.343.469-.14.0747-.343.091-.609.049l-1.015-.182z",fill:l})});case"Extras":return h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32",children:[h("g",{clipPath:"url(#a)",children:[e("path",{fill:l,fillRule:"evenodd",d:"M6.127 10.454c.224-.032.403-.05.53-.05.591 0 1.137.153 1.63.459.398.239.713.529.94.872l.188-.248.005-.007.006-.006c.619-.703 1.347-1.07 2.178-1.07.691 0 1.269.204 1.71.626.454.403.686.91.686 1.51 0 .533-.156.994-.476 1.37-.312.383-.738.574-1.254.574-.345 0-.643-.101-.878-.317a1.1 1.1 0 0 1-.353-.843c0-.405.11-.76.342-1.051.153-.193.354-.352.596-.479a1.416 1.416 0 0 0-.492-.07c-.195 0-.316.016-.38.035-.53.226-.938.694-1.208 1.445l-.001.003c-.02.05-.085.289-.202.74-.115.443-.275 1.077-.481 1.901-.414 1.641-.633 2.547-.662 2.74l-.002.01a3.423 3.423 0 0 0-.067.673c0 .337.097.581.272.756.176.177.413.272.733.272.6 0 1.15-.247 1.657-.768.518-.549.864-1.146 1.044-1.791l.001-.004a1.2 1.2 0 0 1 .088-.224.368.368 0 0 1 .161-.164.564.564 0 0 1 .198-.056 2.19 2.19 0 0 1 .276-.014c.159 0 .305.016.42.064.059.025.12.063.167.122.05.063.073.137.073.213 0 .023-.004.048-.005.057a12.52 12.52 0 0 1-.046.245l-.004.015c-.281 1.026-.86 1.917-1.73 2.67l-.007.007c-.776.611-1.605.925-2.484.925-1.08 0-1.93-.45-2.53-1.33-.453.605-1.015 1.024-1.685 1.248l-.01.003-.011.002a3.23 3.23 0 0 1-.664.053c-.974 0-1.703-.35-2.13-1.078A2.05 2.05 0 0 1 2 19.437c0-.52.158-.975.478-1.349.326-.38.749-.572 1.252-.572.372 0 .69.091.913.31.224.218.318.531.318.898 0 .327-.078.621-.241.874a1.706 1.706 0 0 1-.707.597l-.018.009c.158.063.331.095.52.095.467 0 .902-.285 1.295-.966l.002-.005c.071-.115.185-.417.341-.938.154-.51.341-1.209.563-2.096v-.002c.095-.364.198-.767.31-1.21.11-.444.188-.78.235-1.014l.002-.013c.058-.216.098-.36.119-.425.077-.42.113-.709.113-.877 0-.342-.092-.588-.254-.762-.159-.171-.384-.267-.704-.267-.652 0-1.217.251-1.704.768l-.002.002A4.215 4.215 0 0 0 3.79 14.28a1.084 1.084 0 0 1-.065.207.41.41 0 0 1-.14.176l-.01.007-.012.006a.35.35 0 0 1-.104.03 1.16 1.16 0 0 1-.095.01 5.04 5.04 0 0 1-.275.006H2.67l-.061-.061c-.109-.11-.204-.247-.204-.41v-.015l.003-.015c.07-.472.335-1.05.768-1.723l.001-.002c.771-1.165 1.754-1.857 2.949-2.042h.002Z",clipRule:"evenodd"}),e("path",{fill:l,d:"M21.084 10.284c.932-.008 2.301-.013 4.107-.013 1.325 0 2.327.003 3.007.007a75.812 75.812 0 0 1 .99.013c.025 0 .047.002.065.003h.002c.01 0 .04.003.067.01l.01.002.011.004c.201.07.37.183.488.347a.966.966 0 0 1 .169.574c0 .3-.078.568-.248.79-.168.221-.411.377-.708.479h-.002a1.01 1.01 0 0 1-.221.034 8.213 8.213 0 0 1-.35.016c-.29.008-.696.012-1.219.012h-1.39l-.038.223v.001c-.198 1.185-.295 2.156-.295 2.916 0 1.446.251 2.746.75 3.905l.004.007c.059.153.105.284.137.393.03.103.053.205.053.29 0 .359-.16.68-.44.961-.278.296-.63.445-1.041.445-.255 0-.492-.03-.654-.139l-.009-.006-.008-.006c-.126-.101-.236-.274-.338-.477l-.006-.012c-.331-.768-.49-1.722-.49-2.852 0-.595.007-1.002.025-1.212v-.005c.118-1.157.377-2.551.776-4.18v-.002c.024-.096.045-.18.061-.25h-1.948c-.008.038-.02.086-.034.143l-.002.007a35.14 35.14 0 0 0-.146.537c-.05.232-.1.448-.15.648v.001a230.673 230.673 0 0 1-1.312 4.936 41.285 41.285 0 0 1-.411 1.384c-.104.322-.19.557-.256.681-.115.262-.28.473-.5.617-.225.146-.49.212-.783.212-.449 0-.807-.173-1.006-.549l-.006-.011-.005-.012a1.37 1.37 0 0 1-.067-.486v-.326l.346-.745c1.24-2.61 2.136-4.858 2.695-6.747l.002-.008.094-.281h-.463c-.662 0-1.105.025-1.346.07-.198.04-.47.173-.824.43l-.007.005-.007.005c-.366.228-.69.542-.97.947-.044.069-.085.13-.125.18a.651.651 0 0 1-.141.136l-.027.017-.03.01a.8.8 0 0 1-.19.03c-.07.005-.156.008-.258.008-.17 0-.335-.021-.465-.09a.437.437 0 0 1-.216-.546c.014-.042.034-.086.057-.132.047-.093.113-.208.198-.343l.003-.005c1.147-1.745 2.311-2.774 3.508-2.96a2.345 2.345 0 0 1 .158-.015 60.295 60.295 0 0 1 1.369-.026Z"})]}),e("defs",{children:e("clipPath",{id:"a",children:e("path",{fill:"#fff",d:"M0 0h28v11.457H0z",transform:"translate(2 10.271)"})})})]});case"Dismiss":return e("svg",{width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.7071 15.2929C28.3166 14.9024 27.6834 14.9024 27.2929 15.2929L22 20.5858L16.7071 15.2929C16.3166 14.9024 15.6834 14.9024 15.2929 15.2929C14.9024 15.6834 14.9024 16.3166 15.2929 16.7071L20.5858 22L15.2929 27.2929C14.9024 27.6834 14.9024 28.3166 15.2929 28.7071C15.6834 29.0976 16.3166 29.0976 16.7071 28.7071L22 23.4142L27.2929 28.7071C27.6834 29.0976 28.3166 29.0976 28.7071 28.7071C29.0976 28.3166 29.0976 27.6834 28.7071 27.2929L23.4142 22L28.7071 16.7071C29.0976 16.3166 29.0976 15.6834 28.7071 15.2929Z",fill:l})});case"Fractions":return e("svg",{width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg"});default:throw new Error(`Invalid icon type: ${n}`)}};b.__docgenInfo={description:"",methods:[],displayName:"IconAsset",props:{tintColor:{required:!0,tsType:{name:"string"},description:""},type:{required:!0,tsType:{name:"union",raw:`| "Geometry" | "Operators" | "Numbers" | "Fractions" diff --git a/assets/item-editor.stories-tLpgVM79.js b/assets/item-editor.stories-tLpgVM79.js index 9653523876..6fcd491f8a 100644 --- a/assets/item-editor.stories-tLpgVM79.js +++ b/assets/item-editor.stories-tLpgVM79.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{r as E}from"./index-TT1qJ6UJ.js";import{I as o}from"./item-extras-editor-2Be_tCWc.js";/* empty css */import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";const g=t=>{const{onChange:x,...n}=t,[c,d]=E.useState(n);return s(o,{...c,onChange:m=>{var i;(i=t.onChange)==null||i.call(t,m),d(u=>({...u,...m}))}})},pr={title:"PerseusEditor/Item Extras Editor",component:o,render:t=>s(g,{...t}),argTypes:{onChange:{action:"changed"}}},r={args:{...o.defaultProps}};var p,e,a;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`{ +import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{r as E}from"./index-TT1qJ6UJ.js";import{I as o}from"./item-extras-editor-2Be_tCWc.js";/* empty css */import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";const g=t=>{const{onChange:x,...n}=t,[c,d]=E.useState(n);return s(o,{...c,onChange:m=>{var i;(i=t.onChange)==null||i.call(t,m),d(u=>({...u,...m}))}})},pr={title:"PerseusEditor/Item Extras Editor",component:o,render:t=>s(g,{...t}),argTypes:{onChange:{action:"changed"}}},r={args:{...o.defaultProps}};var p,e,a;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`{ args: { ...ItemExtrasEditor.defaultProps } diff --git a/assets/item-extras-editor-2Be_tCWc.js b/assets/item-extras-editor-2Be_tCWc.js index e2617cfa68..6a2a2c952d 100644 --- a/assets/item-extras-editor-2Be_tCWc.js +++ b/assets/item-extras-editor-2Be_tCWc.js @@ -1 +1 @@ -import{j as a,a as o,F as h}from"./jsx-runtime-FVsy8kgq.js";import{I as u}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as p}from"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{V as r}from"./index-6h5t6F0w.js";import{C as f}from"./index-QCAhLhLD.js";import{s as d}from"./index-deFLJwr4.js";import{l as m}from"./index-awljIyHI.js";import{r as b}from"./index-TT1qJ6UJ.js";const{InfoTip:T}=p,l=class l extends b.Component{constructor(){super(...arguments),this.serialize=()=>{const e={...l.defaultProps};for(const s of u)e[s]=!!this.props[s];return e}}shouldShowFinancialCalculatorOptions(){return this.props.financialCalculatorMonthlyPayment||this.props.financialCalculatorTotalAmount||this.props.financialCalculatorTimeToPayOff}render(){return a("div",{className:"perseus-answer-editor",children:o("div",{className:"perseus-answer-options",children:[a(t,{label:"Show calculator",infoTip:"Use the calculator when completing difficult calculations is NOT the intent of the question. DON’T use the calculator when testing the student’s ability to complete different types of computations.",checked:this.props.calculator,onChange:e=>{this.props.onChange({calculator:e})}}),a(t,{label:"Show financial calculator",infoTip:"This provides the student with the ability to view a financial calculator, e.g., for answering financial questions. Once checked, requires at least one of the three options below to be checked.",checked:this.shouldShowFinancialCalculatorOptions(),onChange:e=>{this.props.onChange({financialCalculatorMonthlyPayment:e,financialCalculatorTotalAmount:e,financialCalculatorTimeToPayOff:e})}}),this.shouldShowFinancialCalculatorOptions()&&o(h,{children:[a(t,{label:"Include monthly payment",infoTip:"This provides the student with the ability to view a monthly payment calculator; e.g., given a loan amount, interest rate, and term, what is the monthly payment?",checked:this.props.financialCalculatorMonthlyPayment,onChange:e=>{this.props.onChange({financialCalculatorMonthlyPayment:e})},indent:!0}),a(t,{label:"Include total amount",infoTip:"This provides the student with the ability to view a total amount calculator; e.g., given a monthly payment, interest rate, and term, what is the total amount to be paid?",checked:this.props.financialCalculatorTotalAmount,onChange:e=>{this.props.onChange({financialCalculatorTotalAmount:e})},indent:!0}),a(t,{label:"Include time-to-pay-off",infoTip:"This provides the student with the ability to view a time to pay off calculator; e.g., given a loan amount, interest rate, and monthly payment, how long will it take to pay off the loan?",checked:this.props.financialCalculatorTimeToPayOff,onChange:e=>{this.props.onChange({financialCalculatorTimeToPayOff:e})},indent:!0})]}),a(t,{label:"Show periodic table",infoTip:"This provides the student with the ability to view a periodic table of the elements, e.g., for answering chemistry questions.",checked:this.props.periodicTable,onChange:e=>{this.props.onChange({periodicTable:e,periodicTableWithKey:!1})}}),this.props.periodicTable&&a(t,{label:"Include key/legend with periodic table",infoTip:"Include a key for HS courses; omit for AP chemistry.",checked:this.props.periodicTableWithKey,onChange:e=>{this.props.onChange({periodicTableWithKey:e})},indent:!0}),a(t,{label:"Show z table (statistics)",infoTip:"This provides the student with the ability to view a table of critical values for the z distribution, e.g. for answering statistics questions.",checked:this.props.zTable,onChange:e=>{this.props.onChange({zTable:e})}}),a(t,{label:"Show t table (statistics)",infoTip:"This provides the student with the ability to view a table of critical values for the Student's t distribution, e.g. for answering statistics questions.",checked:this.props.tTable,onChange:e=>{this.props.onChange({tTable:e})}}),a(t,{label:"Show chi-squared table (statistics)",infoTip:"This provides the student with the ability to view a table of critical values for the chi-squared distribution, e.g. for answering statistics questions.",checked:this.props.chi2Table,onChange:e=>{this.props.onChange({chi2Table:e})}})]})})}};l.defaultProps={calculator:!1,chi2Table:!1,financialCalculatorMonthlyPayment:!1,financialCalculatorTotalAmount:!1,financialCalculatorTimeToPayOff:!1,periodicTable:!1,periodicTableWithKey:!1,tTable:!1,zTable:!1};let n=l;const t=i=>a(r,{style:[c.checkbox,i.indent?c.indented:void 0],children:a(f,{label:o(r,{style:{flexDirection:"row"},children:[i.label," ",a(T,{children:i.infoTip})]}),checked:i.checked,onChange:e=>i.onChange(e)})}),c=m.StyleSheet.create({indented:{marginInlineStart:d.large_24}});n.__docgenInfo={description:"",methods:[{name:"shouldShowFinancialCalculatorOptions",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ItemExtrasEditor",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(props: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"PerseusAnswerArea"}],raw:"Partial"},name:"props"}],return:{name:"void"}}},description:""},calculator:{defaultValue:{value:"false",computed:!1},required:!1},chi2Table:{defaultValue:{value:"false",computed:!1},required:!1},financialCalculatorMonthlyPayment:{defaultValue:{value:"false",computed:!1},required:!1},financialCalculatorTotalAmount:{defaultValue:{value:"false",computed:!1},required:!1},financialCalculatorTimeToPayOff:{defaultValue:{value:"false",computed:!1},required:!1},periodicTable:{defaultValue:{value:"false",computed:!1},required:!1},periodicTableWithKey:{defaultValue:{value:"false",computed:!1},required:!1},tTable:{defaultValue:{value:"false",computed:!1},required:!1},zTable:{defaultValue:{value:"false",computed:!1},required:!1}}};export{n as I}; +import{j as a,a as o,F as h}from"./jsx-runtime-FVsy8kgq.js";import{I as u}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as p}from"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{V as r}from"./index-6h5t6F0w.js";import{C as f}from"./index-QCAhLhLD.js";import{s as d}from"./index-deFLJwr4.js";import{l as m}from"./index-awljIyHI.js";import{r as b}from"./index-TT1qJ6UJ.js";const{InfoTip:T}=p,l=class l extends b.Component{constructor(){super(...arguments),this.serialize=()=>{const e={...l.defaultProps};for(const s of u)e[s]=!!this.props[s];return e}}shouldShowFinancialCalculatorOptions(){return this.props.financialCalculatorMonthlyPayment||this.props.financialCalculatorTotalAmount||this.props.financialCalculatorTimeToPayOff}render(){return a("div",{className:"perseus-answer-editor",children:o("div",{className:"perseus-answer-options",children:[a(t,{label:"Show calculator",infoTip:"Use the calculator when completing difficult calculations is NOT the intent of the question. DON’T use the calculator when testing the student’s ability to complete different types of computations.",checked:this.props.calculator,onChange:e=>{this.props.onChange({calculator:e})}}),a(t,{label:"Show financial calculator",infoTip:"This provides the student with the ability to view a financial calculator, e.g., for answering financial questions. Once checked, requires at least one of the three options below to be checked.",checked:this.shouldShowFinancialCalculatorOptions(),onChange:e=>{this.props.onChange({financialCalculatorMonthlyPayment:e,financialCalculatorTotalAmount:e,financialCalculatorTimeToPayOff:e})}}),this.shouldShowFinancialCalculatorOptions()&&o(h,{children:[a(t,{label:"Include monthly payment",infoTip:"This provides the student with the ability to view a monthly payment calculator; e.g., given a loan amount, interest rate, and term, what is the monthly payment?",checked:this.props.financialCalculatorMonthlyPayment,onChange:e=>{this.props.onChange({financialCalculatorMonthlyPayment:e})},indent:!0}),a(t,{label:"Include total amount",infoTip:"This provides the student with the ability to view a total amount calculator; e.g., given a monthly payment, interest rate, and term, what is the total amount to be paid?",checked:this.props.financialCalculatorTotalAmount,onChange:e=>{this.props.onChange({financialCalculatorTotalAmount:e})},indent:!0}),a(t,{label:"Include time-to-pay-off",infoTip:"This provides the student with the ability to view a time to pay off calculator; e.g., given a loan amount, interest rate, and monthly payment, how long will it take to pay off the loan?",checked:this.props.financialCalculatorTimeToPayOff,onChange:e=>{this.props.onChange({financialCalculatorTimeToPayOff:e})},indent:!0})]}),a(t,{label:"Show periodic table",infoTip:"This provides the student with the ability to view a periodic table of the elements, e.g., for answering chemistry questions.",checked:this.props.periodicTable,onChange:e=>{this.props.onChange({periodicTable:e,periodicTableWithKey:!1})}}),this.props.periodicTable&&a(t,{label:"Include key/legend with periodic table",infoTip:"Include a key for HS courses; omit for AP chemistry.",checked:this.props.periodicTableWithKey,onChange:e=>{this.props.onChange({periodicTableWithKey:e})},indent:!0}),a(t,{label:"Show z table (statistics)",infoTip:"This provides the student with the ability to view a table of critical values for the z distribution, e.g. for answering statistics questions.",checked:this.props.zTable,onChange:e=>{this.props.onChange({zTable:e})}}),a(t,{label:"Show t table (statistics)",infoTip:"This provides the student with the ability to view a table of critical values for the Student's t distribution, e.g. for answering statistics questions.",checked:this.props.tTable,onChange:e=>{this.props.onChange({tTable:e})}}),a(t,{label:"Show chi-squared table (statistics)",infoTip:"This provides the student with the ability to view a table of critical values for the chi-squared distribution, e.g. for answering statistics questions.",checked:this.props.chi2Table,onChange:e=>{this.props.onChange({chi2Table:e})}})]})})}};l.defaultProps={calculator:!1,chi2Table:!1,financialCalculatorMonthlyPayment:!1,financialCalculatorTotalAmount:!1,financialCalculatorTimeToPayOff:!1,periodicTable:!1,periodicTableWithKey:!1,tTable:!1,zTable:!1};let n=l;const t=i=>a(r,{style:[c.checkbox,i.indent?c.indented:void 0],children:a(f,{label:o(r,{style:{flexDirection:"row"},children:[i.label," ",a(T,{children:i.infoTip})]}),checked:i.checked,onChange:e=>i.onChange(e)})}),c=m.StyleSheet.create({indented:{marginInlineStart:d.large_24}});n.__docgenInfo={description:"",methods:[{name:"shouldShowFinancialCalculatorOptions",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ItemExtrasEditor",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(props: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"PerseusAnswerArea"}],raw:"Partial"},name:"props"}],return:{name:"void"}}},description:""},calculator:{defaultValue:{value:"false",computed:!1},required:!1},chi2Table:{defaultValue:{value:"false",computed:!1},required:!1},financialCalculatorMonthlyPayment:{defaultValue:{value:"false",computed:!1},required:!1},financialCalculatorTotalAmount:{defaultValue:{value:"false",computed:!1},required:!1},financialCalculatorTimeToPayOff:{defaultValue:{value:"false",computed:!1},required:!1},periodicTable:{defaultValue:{value:"false",computed:!1},required:!1},periodicTableWithKey:{defaultValue:{value:"false",computed:!1},required:!1},tTable:{defaultValue:{value:"false",computed:!1},required:!1},zTable:{defaultValue:{value:"false",computed:!1},required:!1}}};export{n as I}; diff --git a/assets/keypad-button-rKskH7oM.js b/assets/keypad-button-rKskH7oM.js index ad0f0cf8bc..f2c7457bae 100644 --- a/assets/keypad-button-rKskH7oM.js +++ b/assets/keypad-button-rKskH7oM.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-FVsy8kgq.js";import{C as c}from"./index-WNT3sUKf.js";import{V as i}from"./index-6h5t6F0w.js";import{c as t}from"./index-deFLJwr4.js";import{l as m}from"./index-awljIyHI.js";import{B as g}from"./button-assets-txIojR3b.js";const h=({coord:a,keyConfig:o,onClickKey:s,style:u,secondary:l,action:p})=>{const d=l?"#F6F6F7":p?"#DBDCDD":void 0;return n(i,{style:{gridColumn:a[0]+1,gridRow:a[1]+1,...u},testId:o.id,children:n(c,{onClick:r=>s(o.id,r),onMouseDown:r=>r.preventDefault(),style:e.clickable,"aria-label":o.ariaLabel,children:({hovered:r,focused:y,pressed:b})=>n(i,{style:[e.outerBoxBase],children:n(i,{style:[e.base,d!=null?{background:d}:void 0,r&&e.hovered,y&&e.focused,b&&e.pressed],children:n(g,{id:o.id})})})})})},e=m.StyleSheet.create({base:{display:"flex",justifyContent:"center",alignItems:"center",boxShadow:`0px 1px 0px ${t.offBlack32}`,boxSizing:"border-box",background:t.white,borderRadius:4,borderWidth:2,borderStyle:"solid",borderColor:"transparent",flex:1,minHeight:42,minWidth:42,padding:1,fontFamily:'Lato, "Noto Sans", sans-serif'},hovered:{borderColor:t.blue,padding:1,boxShadow:"none"},focused:{borderColor:t.blue,padding:0,boxShadow:"none"},pressed:{border:"2px solid #1B50B3",padding:0,background:`linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${t.white}`,boxShadow:"none"},outerBoxBase:{padding:1,height:"100%",width:"100%",boxSizing:"border-box",borderRadius:7,border:"2px solid transparent"},clickable:{width:"100%",height:"100%",boxSizing:"border-box",":focus":{outline:"none"}}});h.__docgenInfo={description:"",methods:[],displayName:"KeypadButton",props:{coord:{required:!0,tsType:{name:"unknown"},description:""},keyConfig:{required:!0,tsType:{name:"signature",type:"object",raw:`{ +import{j as n}from"./jsx-runtime-FVsy8kgq.js";import{C as c}from"./index-2dmvOE3q.js";import{V as i}from"./index-6h5t6F0w.js";import{c as t}from"./index-deFLJwr4.js";import{l as m}from"./index-awljIyHI.js";import{B as g}from"./button-assets-txIojR3b.js";const h=({coord:a,keyConfig:o,onClickKey:s,style:u,secondary:l,action:p})=>{const d=l?"#F6F6F7":p?"#DBDCDD":void 0;return n(i,{style:{gridColumn:a[0]+1,gridRow:a[1]+1,...u},testId:o.id,children:n(c,{onClick:r=>s(o.id,r),onMouseDown:r=>r.preventDefault(),style:e.clickable,"aria-label":o.ariaLabel,children:({hovered:r,focused:y,pressed:b})=>n(i,{style:[e.outerBoxBase],children:n(i,{style:[e.base,d!=null?{background:d}:void 0,r&&e.hovered,y&&e.focused,b&&e.pressed],children:n(g,{id:o.id})})})})})},e=m.StyleSheet.create({base:{display:"flex",justifyContent:"center",alignItems:"center",boxShadow:`0px 1px 0px ${t.offBlack32}`,boxSizing:"border-box",background:t.white,borderRadius:4,borderWidth:2,borderStyle:"solid",borderColor:"transparent",flex:1,minHeight:42,minWidth:42,padding:1,fontFamily:'Lato, "Noto Sans", sans-serif'},hovered:{borderColor:t.blue,padding:1,boxShadow:"none"},focused:{borderColor:t.blue,padding:0,boxShadow:"none"},pressed:{border:"2px solid #1B50B3",padding:0,background:`linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${t.white}`,boxShadow:"none"},outerBoxBase:{padding:1,height:"100%",width:"100%",boxSizing:"border-box",borderRadius:7,border:"2px solid transparent"},clickable:{width:"100%",height:"100%",boxSizing:"border-box",":focus":{outline:"none"}}});h.__docgenInfo={description:"",methods:[],displayName:"KeypadButton",props:{coord:{required:!0,tsType:{name:"unknown"},description:""},keyConfig:{required:!0,tsType:{name:"signature",type:"object",raw:`{ id: Key; type: KeyType; icon: IconConfig; diff --git a/assets/keypad-button.stories-tDGMB8WS.js b/assets/keypad-button.stories-tDGMB8WS.js index cb0f418cbb..2d3485d3b0 100644 --- a/assets/keypad-button.stories-tDGMB8WS.js +++ b/assets/keypad-button.stories-tDGMB8WS.js @@ -1,4 +1,4 @@ -import{j as t,a as g}from"./jsx-runtime-FVsy8kgq.js";import{a as c}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{K as m,m as k}from"./button-assets-txIojR3b.js";import{K as l}from"./keypad-button-rKskH7oM.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-WNT3sUKf.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";const a=m(k),E={title:"math-input/components/Keypad Button",args:{keyConfig:a.PLUS,coord:[0,0]},argTypes:{keyConfig:{control:"select",options:{...a}}}},n=({keyConfig:o=m.PLUS,coord:e=[0,0]})=>t("div",{style:{width:200,height:200,backgroundColor:"#DBDCDD",display:"flex"},children:t("div",{style:{width:58,margin:"auto"},children:t(l,{keyConfig:o,coord:e,onClickKey:c("pressed")})})}),r=({...o})=>t("div",{style:{backgroundColor:"#DBDCDD",display:"grid",gridTemplateColumns:"repeat(6, 1fr)",gap:"25px"},children:Object.keys(a).map(e=>g("div",{style:{width:58,margin:"auto",overflowWrap:"break-word"},children:[e,t(l,{keyConfig:a[e],onClickKey:c("pressed"),coord:[0,0]})]},e))});n.__docgenInfo={description:"",methods:[],displayName:"Default",props:{coord:{required:!1,tsType:{name:"unknown"},description:"",defaultValue:{value:"[0, 0]",computed:!1}},keyConfig:{required:!1,tsType:{name:"signature",type:"object",raw:`{ +import{j as t,a as g}from"./jsx-runtime-FVsy8kgq.js";import{a as c}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{K as m,m as k}from"./button-assets-txIojR3b.js";import{K as l}from"./keypad-button-rKskH7oM.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-2dmvOE3q.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";const a=m(k),E={title:"math-input/components/Keypad Button",args:{keyConfig:a.PLUS,coord:[0,0]},argTypes:{keyConfig:{control:"select",options:{...a}}}},n=({keyConfig:o=m.PLUS,coord:e=[0,0]})=>t("div",{style:{width:200,height:200,backgroundColor:"#DBDCDD",display:"flex"},children:t("div",{style:{width:58,margin:"auto"},children:t(l,{keyConfig:o,coord:e,onClickKey:c("pressed")})})}),r=({...o})=>t("div",{style:{backgroundColor:"#DBDCDD",display:"grid",gridTemplateColumns:"repeat(6, 1fr)",gap:"25px"},children:Object.keys(a).map(e=>g("div",{style:{width:58,margin:"auto",overflowWrap:"break-word"},children:[e,t(l,{keyConfig:a[e],onClickKey:c("pressed"),coord:[0,0]})]},e))});n.__docgenInfo={description:"",methods:[],displayName:"Default",props:{coord:{required:!1,tsType:{name:"unknown"},description:"",defaultValue:{value:"[0, 0]",computed:!1}},keyConfig:{required:!1,tsType:{name:"signature",type:"object",raw:`{ id: Key; type: KeyType; icon: IconConfig; diff --git a/assets/keypad-mathquill.stories-f3PwEzb7.js b/assets/keypad-mathquill.stories-f3PwEzb7.js index 497cc3734f..8ff5cc686b 100644 --- a/assets/keypad-mathquill.stories-f3PwEzb7.js +++ b/assets/keypad-mathquill.stories-f3PwEzb7.js @@ -1,4 +1,4 @@ -import{a as k,j as n}from"./jsx-runtime-FVsy8kgq.js";import{P as F,a as g}from"./index-BPSWBbj5.js";import{c as K}from"./index-deFLJwr4.js";import{r as o}from"./index-TT1qJ6UJ.js";import{m as v}from"./button-assets-txIojR3b.js";import{C as b,K as M}from"./mobile-keypad-hKjeQGNp.js";import{c as R,g as p,a as S}from"./key-translator-IA-2V2LV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-h_CiYGGb.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";const te={title:"math-input/components/v2 Keypad With Mathquill"};function a(){const i=o.useRef(null),[t,h]=o.useState(),[s,l]=o.useState(!0),[y,d]=o.useState(b.NONE);o.useEffect(()=>{if(!t&&i.current){const e=R(i.current,"en",v,r=>({...r,handlers:{edit:x=>{d(p(x))}}}));h(e)}},[t]);const f=S("en",{sin:"sin",cos:"cos",tan:"tan"});function C(e){if(!t)return;e==="DISMISS"&&l(!1);const r=f[e];r?(r(t,e),d(p(t))):console.warn(`No translation to Mathquill for: ${e}`)}return k("div",{style:{maxWidth:"400px",margin:"2em"},children:[n(F,{content:n(g,{style:{padding:10,maxWidth:"initial"},children:n(M,{extraKeys:["x","y","PI","THETA"],onClickKey:C,cursorContext:y,advancedRelations:!0,basicRelations:!0,divisionKey:!0,logarithms:!0,convertDotToTimes:!0,preAlgebra:!0,trigonometry:!0,onAnalyticsEvent:async()=>{},showDismiss:!0})}),dismissEnabled:!0,opened:s,children:n("div",{style:{width:"100%",marginBottom:"1em",border:`1px solid ${K.offBlack16}`},ref:i})}),n("button",{onClick:()=>l(!s),children:s?"close keypad":"open keypad"})]})}a.__docgenInfo={description:"",methods:[],displayName:"V2KeypadWithMathquill"};var c,m,u;a.parameters={...a.parameters,docs:{...(c=a.parameters)==null?void 0:c.docs,source:{originalSource:`function V2KeypadWithMathquill() { +import{a as k,j as n}from"./jsx-runtime-FVsy8kgq.js";import{P as F,a as g}from"./index-BPSWBbj5.js";import{c as K}from"./index-deFLJwr4.js";import{r as o}from"./index-TT1qJ6UJ.js";import{m as v}from"./button-assets-txIojR3b.js";import{C as b,K as M}from"./mobile-keypad-hKjeQGNp.js";import{c as R,g as p,a as S}from"./key-translator-IA-2V2LV.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-h_CiYGGb.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";const te={title:"math-input/components/v2 Keypad With Mathquill"};function a(){const i=o.useRef(null),[t,h]=o.useState(),[s,l]=o.useState(!0),[y,d]=o.useState(b.NONE);o.useEffect(()=>{if(!t&&i.current){const e=R(i.current,"en",v,r=>({...r,handlers:{edit:x=>{d(p(x))}}}));h(e)}},[t]);const f=S("en",{sin:"sin",cos:"cos",tan:"tan"});function C(e){if(!t)return;e==="DISMISS"&&l(!1);const r=f[e];r?(r(t,e),d(p(t))):console.warn(`No translation to Mathquill for: ${e}`)}return k("div",{style:{maxWidth:"400px",margin:"2em"},children:[n(F,{content:n(g,{style:{padding:10,maxWidth:"initial"},children:n(M,{extraKeys:["x","y","PI","THETA"],onClickKey:C,cursorContext:y,advancedRelations:!0,basicRelations:!0,divisionKey:!0,logarithms:!0,convertDotToTimes:!0,preAlgebra:!0,trigonometry:!0,onAnalyticsEvent:async()=>{},showDismiss:!0})}),dismissEnabled:!0,opened:s,children:n("div",{style:{width:"100%",marginBottom:"1em",border:`1px solid ${K.offBlack16}`},ref:i})}),n("button",{onClick:()=>l(!s),children:s?"close keypad":"open keypad"})]})}a.__docgenInfo={description:"",methods:[],displayName:"V2KeypadWithMathquill"};var c,m,u;a.parameters={...a.parameters,docs:{...(c=a.parameters)==null?void 0:c.docs,source:{originalSource:`function V2KeypadWithMathquill() { const mathFieldWrapperRef = React.useRef(null); const [mathField, setMathField] = React.useState(); const [keypadOpen, setKeypadOpen] = React.useState(true); diff --git a/assets/keypad-pages.stories-UYZo0hoJ.js b/assets/keypad-pages.stories-UYZo0hoJ.js index 309cf4a229..2a86655245 100644 --- a/assets/keypad-pages.stories-UYZo0hoJ.js +++ b/assets/keypad-pages.stories-UYZo0hoJ.js @@ -1 +1 @@ -import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{a}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{I as g}from"./index-VDi1Le_1.js";import{N as y,O as I,G as k}from"./operators-page-C_EsmjPW.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./index-WNT3sUKf.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";const x={title:"math-input/components/Keypad pages",parameters:{backgrounds:{values:[{name:"light background",value:"white",default:!0}]},viewport:{defaultViewport:"iphone6",viewports:g}}},e=()=>o(y,{onClickKey:a("onClickKey")}),r=()=>o(I,{onClickKey:a("onClickKey"),preAlgebra:!0,logarithms:!0,basicRelations:!0,advancedRelations:!0}),t=()=>o(k,{onClickKey:a("onClickKey")});e.__docgenInfo={description:"",methods:[],displayName:"NumericInput"};r.__docgenInfo={description:"",methods:[],displayName:"PreAlgebraInput"};t.__docgenInfo={description:"",methods:[],displayName:"TrigonometryInput"};var i,s,n;e.parameters={...e.parameters,docs:{...(i=e.parameters)==null?void 0:i.docs,source:{originalSource:'(): React.ReactElement => ',...(n=(s=e.parameters)==null?void 0:s.docs)==null?void 0:n.source}}};var c,p,m;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:'(): React.ReactElement => ',...(m=(p=r.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};var u,l,d;t.parameters={...t.parameters,docs:{...(u=t.parameters)==null?void 0:u.docs,source:{originalSource:'(): React.ReactElement => ',...(d=(l=t.parameters)==null?void 0:l.docs)==null?void 0:d.source}}};const G=["NumericInput","PreAlgebraInput","TrigonometryInput"];export{e as NumericInput,r as PreAlgebraInput,t as TrigonometryInput,G as __namedExportsOrder,x as default}; +import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{a}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{I as g}from"./index-VDi1Le_1.js";import{N as y,O as I,G as k}from"./operators-page-C_EsmjPW.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./index-2dmvOE3q.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";const x={title:"math-input/components/Keypad pages",parameters:{backgrounds:{values:[{name:"light background",value:"white",default:!0}]},viewport:{defaultViewport:"iphone6",viewports:g}}},e=()=>o(y,{onClickKey:a("onClickKey")}),r=()=>o(I,{onClickKey:a("onClickKey"),preAlgebra:!0,logarithms:!0,basicRelations:!0,advancedRelations:!0}),t=()=>o(k,{onClickKey:a("onClickKey")});e.__docgenInfo={description:"",methods:[],displayName:"NumericInput"};r.__docgenInfo={description:"",methods:[],displayName:"PreAlgebraInput"};t.__docgenInfo={description:"",methods:[],displayName:"TrigonometryInput"};var i,s,n;e.parameters={...e.parameters,docs:{...(i=e.parameters)==null?void 0:i.docs,source:{originalSource:'(): React.ReactElement => ',...(n=(s=e.parameters)==null?void 0:s.docs)==null?void 0:n.source}}};var c,p,m;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:'(): React.ReactElement => ',...(m=(p=r.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};var u,l,d;t.parameters={...t.parameters,docs:{...(u=t.parameters)==null?void 0:u.docs,source:{originalSource:'(): React.ReactElement => ',...(d=(l=t.parameters)==null?void 0:l.docs)==null?void 0:d.source}}};const G=["NumericInput","PreAlgebraInput","TrigonometryInput"];export{e as NumericInput,r as PreAlgebraInput,t as TrigonometryInput,G as __namedExportsOrder,x as default}; diff --git a/assets/label-image-editor-Z5_dot8_.js b/assets/label-image-editor-Z5_dot8_.js index bb9879de9d..60cc4e0855 100644 --- a/assets/label-image-editor-Z5_dot8_.js +++ b/assets/label-image-editor-Z5_dot8_.js @@ -1 +1 @@ -import{a as g,j as i}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import{U as f}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{E as y}from"./editor-jsonify-yP45H1ib.js";import{l}from"./index-awljIyHI.js";import{r as C}from"./index-TT1qJ6UJ.js";import{F as k}from"./form-wrapped-text-field-tsI8XMXi.js";import{A}from"./answer-choices-jhnMapjR.js";import{B as v}from"./behavior-RYjJdmKF.js";import{Q as w}from"./question-markers-KN3OrYEl.js";import{S as b}from"./select-image-_eHoVMfM.js";const h=class h extends C.Component{constructor(){super(...arguments),this.getSaveWarnings=()=>{const{choices:e,imageAlt:t,imageUrl:s,markers:a}=this.props,r=[];if(e.length<2&&r.push("Question requires at least two answer choices"),s?t||r.push("Question image has no alt text"):r.push("Image is not specified for question"),!a.length)r.push("Question has no markers, to label answers on image");else{let n=0,o=0;for(const m of a)m.answers.length||n++,m.label||o++;n&&r.push(`Question has ${n} markers with no answers selected`),o&&r.push(`Question has ${o} markers with no ARIA label`)}return r},this.handleImageChange=e=>{this.props.onChange({imageUrl:e,imageWidth:0,imageHeight:0}),e&&f.getImageSize(e,(t,s)=>{this.props.onChange({imageWidth:t,imageHeight:s})})},this.handleAltChange=e=>{this.props.onChange({imageAlt:e})},this.handleChoicesChange=e=>{this.props.onChange({choices:e})},this.handleMarkersChange=e=>{this.props.onChange({markers:e})},this.handleBehaviorChange=e=>{this.props.onChange(e)}}componentDidUpdate(e){const t={};e.markers.forEach(a=>t[`${a.x}.${a.y}`]=a);const s=this.props.markers.map((a,r)=>t.hasOwnProperty(`${a.x}.${a.y}`)?-1:r).filter(a=>a!==-1);s.length&&this._questionMarkers&&this._questionMarkers.openDropdownForMarkerIndices(s)}serialize(){return y.serialize.call(this)}render(){const{choices:e,imageAlt:t,imageUrl:s,imageWidth:a,imageHeight:r,markers:n,multipleAnswers:o,hideChoicesFromInstructions:m}=this.props,c=s&&a>0&&r>0;return g("div",{children:[i(b,{onChange:this.handleImageChange,url:s}),i("div",{className:l.css(p.smallSpacer)}),c&&i(k,{placeholder:"Alt text (for screen readers)",onChange:d=>this.handleAltChange(d.target.value),value:t,width:"100%"}),i("div",{className:l.css(p.largeSpacer)}),i(w,{choices:e,imageUrl:c?s:"",imageWidth:a,imageHeight:r,markers:n,onChange:this.handleMarkersChange,ref:d=>this._questionMarkers=d}),i("div",{className:l.css(p.largeSpacer)}),i(A,{choices:e,onChange:this.handleChoicesChange}),i("div",{className:l.css(p.largeSpacer)}),i(v,{preferredPopoverDirection:"NONE",multipleAnswers:o,hideChoicesFromInstructions:m,onChange:this.handleBehaviorChange})]})}};h.defaultProps={choices:[],imageAlt:"",imageUrl:"",imageWidth:0,imageHeight:0,markers:[],multipleAnswers:!1,hideChoicesFromInstructions:!1},h.widgetName="label-image";let u=h;const p=l.StyleSheet.create({largeSpacer:{height:32},smallSpacer:{height:16}});u.__docgenInfo={description:"",methods:[{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"any"}}},{name:"handleImageChange",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:{name:"string"}}],returns:null},{name:"handleAltChange",docblock:null,modifiers:[],params:[{name:"alt",optional:!1,type:{name:"string"}}],returns:null},{name:"handleChoicesChange",docblock:null,modifiers:[],params:[{name:"choices",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:null},{name:"handleMarkersChange",docblock:null,modifiers:[],params:[{name:"markers",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"MarkerType"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:null},{name:"handleBehaviorChange",docblock:null,modifiers:[],params:[{name:"options",optional:!1,type:{name:"any"}}],returns:null}],displayName:"LabelImageEditor",props:{choices:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[]",computed:!1}},imageAlt:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},imageUrl:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},imageWidth:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},imageHeight:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},markers:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"MarkerType"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[]",computed:!1}},multipleAnswers:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},hideChoicesFromInstructions:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(options: any) => void",signature:{arguments:[{type:{name:"any"},name:"options"}],return:{name:"void"}}},description:""}}};export{u as L}; +import{a as g,j as i}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import{U as f}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{E as y}from"./editor-jsonify-yP45H1ib.js";import{l}from"./index-awljIyHI.js";import{r as C}from"./index-TT1qJ6UJ.js";import{F as k}from"./form-wrapped-text-field-tsI8XMXi.js";import{A}from"./answer-choices-jhnMapjR.js";import{B as v}from"./behavior-RYjJdmKF.js";import{Q as w}from"./question-markers-KN3OrYEl.js";import{S as b}from"./select-image-_eHoVMfM.js";const h=class h extends C.Component{constructor(){super(...arguments),this.getSaveWarnings=()=>{const{choices:e,imageAlt:t,imageUrl:s,markers:a}=this.props,r=[];if(e.length<2&&r.push("Question requires at least two answer choices"),s?t||r.push("Question image has no alt text"):r.push("Image is not specified for question"),!a.length)r.push("Question has no markers, to label answers on image");else{let n=0,o=0;for(const m of a)m.answers.length||n++,m.label||o++;n&&r.push(`Question has ${n} markers with no answers selected`),o&&r.push(`Question has ${o} markers with no ARIA label`)}return r},this.handleImageChange=e=>{this.props.onChange({imageUrl:e,imageWidth:0,imageHeight:0}),e&&f.getImageSize(e,(t,s)=>{this.props.onChange({imageWidth:t,imageHeight:s})})},this.handleAltChange=e=>{this.props.onChange({imageAlt:e})},this.handleChoicesChange=e=>{this.props.onChange({choices:e})},this.handleMarkersChange=e=>{this.props.onChange({markers:e})},this.handleBehaviorChange=e=>{this.props.onChange(e)}}componentDidUpdate(e){const t={};e.markers.forEach(a=>t[`${a.x}.${a.y}`]=a);const s=this.props.markers.map((a,r)=>t.hasOwnProperty(`${a.x}.${a.y}`)?-1:r).filter(a=>a!==-1);s.length&&this._questionMarkers&&this._questionMarkers.openDropdownForMarkerIndices(s)}serialize(){return y.serialize.call(this)}render(){const{choices:e,imageAlt:t,imageUrl:s,imageWidth:a,imageHeight:r,markers:n,multipleAnswers:o,hideChoicesFromInstructions:m}=this.props,c=s&&a>0&&r>0;return g("div",{children:[i(b,{onChange:this.handleImageChange,url:s}),i("div",{className:l.css(p.smallSpacer)}),c&&i(k,{placeholder:"Alt text (for screen readers)",onChange:d=>this.handleAltChange(d.target.value),value:t,width:"100%"}),i("div",{className:l.css(p.largeSpacer)}),i(w,{choices:e,imageUrl:c?s:"",imageWidth:a,imageHeight:r,markers:n,onChange:this.handleMarkersChange,ref:d=>this._questionMarkers=d}),i("div",{className:l.css(p.largeSpacer)}),i(A,{choices:e,onChange:this.handleChoicesChange}),i("div",{className:l.css(p.largeSpacer)}),i(v,{preferredPopoverDirection:"NONE",multipleAnswers:o,hideChoicesFromInstructions:m,onChange:this.handleBehaviorChange})]})}};h.defaultProps={choices:[],imageAlt:"",imageUrl:"",imageWidth:0,imageHeight:0,markers:[],multipleAnswers:!1,hideChoicesFromInstructions:!1},h.widgetName="label-image";let u=h;const p=l.StyleSheet.create({largeSpacer:{height:32},smallSpacer:{height:16}});u.__docgenInfo={description:"",methods:[{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"any"}}},{name:"handleImageChange",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:{name:"string"}}],returns:null},{name:"handleAltChange",docblock:null,modifiers:[],params:[{name:"alt",optional:!1,type:{name:"string"}}],returns:null},{name:"handleChoicesChange",docblock:null,modifiers:[],params:[{name:"choices",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:null},{name:"handleMarkersChange",docblock:null,modifiers:[],params:[{name:"markers",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"MarkerType"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:null},{name:"handleBehaviorChange",docblock:null,modifiers:[],params:[{name:"options",optional:!1,type:{name:"any"}}],returns:null}],displayName:"LabelImageEditor",props:{choices:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[]",computed:!1}},imageAlt:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},imageUrl:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},imageWidth:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},imageHeight:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},markers:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"MarkerType"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[]",computed:!1}},multipleAnswers:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},hideChoicesFromInstructions:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(options: any) => void",signature:{arguments:[{type:{name:"any"},name:"options"}],return:{name:"void"}}},description:""}}};export{u as L}; diff --git a/assets/label-image-editor.stories-pHQfTQip.js b/assets/label-image-editor.stories-pHQfTQip.js index 907039d768..40c01612e0 100644 --- a/assets/label-image-editor.stories-pHQfTQip.js +++ b/assets/label-image-editor.stories-pHQfTQip.js @@ -1,3 +1,3 @@ -import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{l as e}from"./index-awljIyHI.js";import{r as s}from"./index-TT1qJ6UJ.js";import{L as n}from"./label-image-editor-Z5_dot8_.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./editor-jsonify-yP45H1ib.js";import"./form-wrapped-text-field-tsI8XMXi.js";import"./answer-choices-jhnMapjR.js";import"./components-0kNWnYe6.js";import"./behavior-RYjJdmKF.js";import"./question-markers-KN3OrYEl.js";import"./marker-st5wrvmE.js";import"./util-qk2aeK8X.js";import"./select-image-_eHoVMfM.js";const st={title:"PerseusEditor/Widgets/Label Image Editor"},l=e.StyleSheet.create({wrapper:{width:338}});class c extends s.Component{constructor(){super(...arguments),this.state={imageAlt:"Map of Europe",choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],imageUrl:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",imageWidth:1280,imageHeight:1024,markers:[{answers:["BMW","Volkswagen","Porsche"],label:"Germany",x:37.3,y:53.6},{answers:[],label:"",x:21,y:46},{answers:["Lamborghini","Fiat","Ferrari"],label:"Italy",x:41.4,y:78.8}]}}render(){return o("div",{className:e.css(l.wrapper),children:o(n,{...this.state,onChange:t=>this.setState({...this._widget.serialize(),...t}),ref:t=>this._widget=t})})}}const r=a=>o(c,{});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,m,p;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{l as e}from"./index-awljIyHI.js";import{r as s}from"./index-TT1qJ6UJ.js";import{L as n}from"./label-image-editor-Z5_dot8_.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./editor-jsonify-yP45H1ib.js";import"./form-wrapped-text-field-tsI8XMXi.js";import"./answer-choices-jhnMapjR.js";import"./components-0kNWnYe6.js";import"./behavior-RYjJdmKF.js";import"./question-markers-KN3OrYEl.js";import"./marker-st5wrvmE.js";import"./util-qk2aeK8X.js";import"./select-image-_eHoVMfM.js";const st={title:"PerseusEditor/Widgets/Label Image Editor"},l=e.StyleSheet.create({wrapper:{width:338}});class c extends s.Component{constructor(){super(...arguments),this.state={imageAlt:"Map of Europe",choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],imageUrl:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",imageWidth:1280,imageHeight:1024,markers:[{answers:["BMW","Volkswagen","Porsche"],label:"Germany",x:37.3,y:53.6},{answers:[],label:"",x:21,y:46},{answers:["Lamborghini","Fiat","Ferrari"],label:"Italy",x:41.4,y:78.8}]}}render(){return o("div",{className:e.css(l.wrapper),children:o(n,{...this.state,onChange:t=>this.setState({...this._widget.serialize(),...t}),ref:t=>this._widget=t})})}}const r=a=>o(c,{});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,m,p;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(p=(m=r.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};const nt=["Default"];export{r as Default,nt as __namedExportsOrder,st as default}; diff --git a/assets/label-image.stories-Q3z39CEp.js b/assets/label-image.stories-Q3z39CEp.js index 73ab3b802b..7dd1a15bf7 100644 --- a/assets/label-image.stories-Q3z39CEp.js +++ b/assets/label-image.stories-Q3z39CEp.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{R as l}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const W={content:`Carol created a chart and a bar graph to show how many of each type of vehicle were in her supermarket parking lot. +import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{R as l}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const W={content:`Carol created a chart and a bar graph to show how many of each type of vehicle were in her supermarket parking lot. Vehicle Type | Number in the parking lot :- | :-: diff --git a/assets/line-swatch-YWYea0Do.js b/assets/line-swatch-YWYea0Do.js index d64908358f..d6d54f4775 100644 --- a/assets/line-swatch-YWYea0Do.js +++ b/assets/line-swatch-YWYea0Do.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-FVsy8kgq.js";import{l}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{V as i}from"./index-6h5t6F0w.js";import{c as a,s as e}from"./index-deFLJwr4.js";import{l as s}from"./index-awljIyHI.js";const n=p=>{const{color:r,lineStyle:o}=p;return t(i,{style:m.container,children:t(i,{"aria-label":`${r}, ${o}`,style:[m.lineSwatch,{border:`5px ${o} ${l[r]}`}]})})},m=s.StyleSheet.create({container:{backgroundColor:a.white,justifyContent:"center",padding:e.xSmall_8,borderRadius:e.xxxSmall_4},lineSwatch:{width:40}});n.__docgenInfo={description:"",methods:[],displayName:"LineSwatch",props:{color:{required:!0,tsType:{name:"LockedFigureColor"},description:""},lineStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""}}};export{n as L}; +import{j as t}from"./jsx-runtime-FVsy8kgq.js";import{l}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{V as i}from"./index-6h5t6F0w.js";import{c as a,s as e}from"./index-deFLJwr4.js";import{l as s}from"./index-awljIyHI.js";const n=p=>{const{color:r,lineStyle:o}=p;return t(i,{style:m.container,children:t(i,{"aria-label":`${r}, ${o}`,style:[m.lineSwatch,{border:`5px ${o} ${l[r]}`}]})})},m=s.StyleSheet.create({container:{backgroundColor:a.white,justifyContent:"center",padding:e.xSmall_8,borderRadius:e.xxxSmall_4},lineSwatch:{width:40}});n.__docgenInfo={description:"",methods:[],displayName:"LineSwatch",props:{color:{required:!0,tsType:{name:"LockedFigureColor"},description:""},lineStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""}}};export{n as L}; diff --git a/assets/locked-ellipse-settings-H2lz6Mnf.js b/assets/locked-ellipse-settings-H2lz6Mnf.js index b1b9371ded..588f249f4b 100644 --- a/assets/locked-ellipse-settings-H2lz6Mnf.js +++ b/assets/locked-ellipse-settings-H2lz6Mnf.js @@ -1,4 +1,4 @@ -import{a as m,j as r,F as U}from"./jsx-runtime-FVsy8kgq.js";import{l as v,h as F}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as W}from"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{B as D}from"./choice-E4eyMygy.js";import{V as u}from"./index-6h5t6F0w.js";import{S as M,O as V}from"./answer-choices-vbrLThK4.js";import{S as g}from"./index-qUyqkRvh.js";import{s as a,c as b}from"./index-deFLJwr4.js";import{a as P,L as G}from"./index-h_CiYGGb.js";import{p as H}from"./plus-circle-JCxQSzSv.js";import{l as w}from"./index-awljIyHI.js";import{r as J}from"./index-TT1qJ6UJ.js";import{S as K}from"./scrollless-number-text-field-U5Bx_xXb.js";import{r as Q,d as X}from"./util-qk2aeK8X.js";import{P as Y,C as L,L as Z}from"./locked-figure-settings-actions-WSW3YvFI.js";import{C as ee}from"./color-select-aXibMsPD.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import{L as te}from"./line-stroke-select-ZTaE76uS.js";import{L as re}from"./locked-label-settings-qoc_z_IC.js";import{g as oe}from"./util-7LGRm2EO.js";const I=c=>{const{angle:l,onChange:o}=c,[p,y]=J.useState(Q(l).toString());function h(t){y(t),!(isNaN(+t)||t==="")&&o(X(t))}return m(P,{tag:"label",style:T.row,children:["angle (degrees)",r(g,{size:a.xxSmall_6}),r(K,{value:p,onChange:h,style:T.textField}),r(g,{size:a.xxSmall_6})]})},T=w.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},textField:{width:a.xxxLarge_64}});I.__docgenInfo={description:"",methods:[],displayName:"AngleInput",props:{angle:{required:!0,tsType:{name:"number"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(angle: number) => void",signature:{arguments:[{type:{name:"number"},name:"angle"}],return:{name:"void"}}},description:""}}};const $=c=>{const{color:l,fillStyle:o,strokeStyle:p}=c;return r(u,{"aria-label":`${l}, stroke ${p}, fill ${o}`,style:[_.container,{border:`4px ${p} ${v[l]}`}],children:r(u,{style:[_.innerCircle,{backgroundColor:v[l],opacity:o==="white"?0:F[o]}]})})},_=w.StyleSheet.create({container:{outline:`2px solid ${b.offWhite}`,borderRadius:"50%",width:a.xLarge_32,height:a.large_24,backgroundColor:b.white,alignItems:"center",justifyContent:"center"},innerCircle:{width:28,height:20,borderRadius:"50%"}});$.__docgenInfo={description:"",methods:[],displayName:"EllipseSwatch",props:{color:{required:!0,tsType:{name:"LockedFigureColor"},description:""},fillStyle:{required:!0,tsType:{name:"LockedFigureFillType"},description:""},strokeStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""}}};const{InfoTip:ne}=W,q=c=>{var k;const{flags:l,center:o,radius:p,angle:y,color:h,labels:t,fillStyle:C,strokeStyle:x,expanded:E,onToggle:A,onChangeProps:s,onMove:O,onRemove:R}=c;function z(e){const n=e[0]-o[0],d=e[1]-o[1],f={center:e};f.labels=t==null?void 0:t.map(S=>({...S,coord:[S.coord[0]+n,S.coord[1]+d]})),s(f)}function N(e){const n={color:e};n.labels=t==null?void 0:t.map(d=>({...d,color:e})),s(n)}function j(e,n){if(!t)return;const d=[...t];d[n]={...t[n],...e},s({labels:d})}function B(e){if(!t)return;const n=t.filter((d,f)=>f!==e);s({labels:n})}return m(Y,{expanded:E,onToggle:A,header:m(u,{style:i.row,children:[r(G,{children:`Ellipse (${o[0]}, ${o[1]}), radius ${p[0]}, ${p[1]}`}),r(g,{size:a.xSmall_8}),r($,{color:c.color,fillStyle:C,strokeStyle:x})]}),children:[m(u,{style:i.row,children:[r(L,{coord:o,style:i.spaceUnder,onChange:z}),r(u,{style:i.spaceUnder,children:r(ne,{children:"The coordinates for the center of the ellipse."})})]}),r(L,{coord:p,labels:["x radius","y radius"],style:i.spaceUnder,onChange:e=>s({radius:e})}),r(I,{angle:y,onChange:e=>s({angle:e})}),r(g,{size:a.xSmall_8}),m(u,{style:[i.row,i.spaceUnder],children:[r(ee,{selectedValue:h,onChange:N}),r(g,{size:a.medium_16}),m(P,{tag:"label",style:[i.row,i.truncatedWidth],children:["fill",r(g,{size:a.xxSmall_6}),r(M,{selectedValue:C,onChange:e=>s({fillStyle:e}),placeholder:"",children:Object.keys(F).map(e=>r(V,{value:e,label:e},e))})]})]}),r(te,{selectedValue:x,onChange:e=>s({strokeStyle:e})}),((k=l==null?void 0:l.mafs)==null?void 0:k["locked-ellipse-labels"])&&m(U,{children:[t==null?void 0:t.map((e,n)=>r(re,{...e,expanded:!0,onChangeProps:d=>{j(d,n)},onRemove:()=>{B(n)},containerStyle:i.labelContainer})),r(D,{kind:"tertiary",startIcon:H,onClick:()=>{const e={...oe("label"),coord:[o[0],o[1]-((t==null?void 0:t.length)??0)],color:h};s({labels:[...t??[],e]})},style:i.addButton,children:"Add visible label"})]}),r(Z,{figureType:c.type,onMove:O,onRemove:R})]})},i=w.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},spaceUnder:{marginBottom:a.xSmall_8},truncatedWidth:{minWidth:0},addButton:{alignSelf:"start"},labelContainer:{backgroundColor:b.white}}),Qe=q;q.__docgenInfo={description:"",methods:[],displayName:"LockedEllipseSettings",props:{flags:{required:!1,tsType:{name:'APIOptions["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" +import{a as m,j as r,F as U}from"./jsx-runtime-FVsy8kgq.js";import{l as v,h as F}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as W}from"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{B as D}from"./choice-E4eyMygy.js";import{V as u}from"./index-6h5t6F0w.js";import{S as M,O as V}from"./answer-choices-vbrLThK4.js";import{S as g}from"./index-qUyqkRvh.js";import{s as a,c as b}from"./index-deFLJwr4.js";import{a as P,L as G}from"./index-h_CiYGGb.js";import{p as H}from"./plus-circle-JCxQSzSv.js";import{l as w}from"./index-awljIyHI.js";import{r as J}from"./index-TT1qJ6UJ.js";import{S as K}from"./scrollless-number-text-field-U5Bx_xXb.js";import{r as Q,d as X}from"./util-qk2aeK8X.js";import{P as Y,C as L,L as Z}from"./locked-figure-settings-actions-WSW3YvFI.js";import{C as ee}from"./color-select-aXibMsPD.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import{L as te}from"./line-stroke-select-ZTaE76uS.js";import{L as re}from"./locked-label-settings-qoc_z_IC.js";import{g as oe}from"./util-7LGRm2EO.js";const I=c=>{const{angle:l,onChange:o}=c,[p,y]=J.useState(Q(l).toString());function h(t){y(t),!(isNaN(+t)||t==="")&&o(X(t))}return m(P,{tag:"label",style:T.row,children:["angle (degrees)",r(g,{size:a.xxSmall_6}),r(K,{value:p,onChange:h,style:T.textField}),r(g,{size:a.xxSmall_6})]})},T=w.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},textField:{width:a.xxxLarge_64}});I.__docgenInfo={description:"",methods:[],displayName:"AngleInput",props:{angle:{required:!0,tsType:{name:"number"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(angle: number) => void",signature:{arguments:[{type:{name:"number"},name:"angle"}],return:{name:"void"}}},description:""}}};const $=c=>{const{color:l,fillStyle:o,strokeStyle:p}=c;return r(u,{"aria-label":`${l}, stroke ${p}, fill ${o}`,style:[_.container,{border:`4px ${p} ${v[l]}`}],children:r(u,{style:[_.innerCircle,{backgroundColor:v[l],opacity:o==="white"?0:F[o]}]})})},_=w.StyleSheet.create({container:{outline:`2px solid ${b.offWhite}`,borderRadius:"50%",width:a.xLarge_32,height:a.large_24,backgroundColor:b.white,alignItems:"center",justifyContent:"center"},innerCircle:{width:28,height:20,borderRadius:"50%"}});$.__docgenInfo={description:"",methods:[],displayName:"EllipseSwatch",props:{color:{required:!0,tsType:{name:"LockedFigureColor"},description:""},fillStyle:{required:!0,tsType:{name:"LockedFigureFillType"},description:""},strokeStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""}}};const{InfoTip:ne}=W,q=c=>{var k;const{flags:l,center:o,radius:p,angle:y,color:h,labels:t,fillStyle:C,strokeStyle:x,expanded:E,onToggle:A,onChangeProps:s,onMove:O,onRemove:R}=c;function z(e){const n=e[0]-o[0],d=e[1]-o[1],f={center:e};f.labels=t==null?void 0:t.map(S=>({...S,coord:[S.coord[0]+n,S.coord[1]+d]})),s(f)}function N(e){const n={color:e};n.labels=t==null?void 0:t.map(d=>({...d,color:e})),s(n)}function j(e,n){if(!t)return;const d=[...t];d[n]={...t[n],...e},s({labels:d})}function B(e){if(!t)return;const n=t.filter((d,f)=>f!==e);s({labels:n})}return m(Y,{expanded:E,onToggle:A,header:m(u,{style:i.row,children:[r(G,{children:`Ellipse (${o[0]}, ${o[1]}), radius ${p[0]}, ${p[1]}`}),r(g,{size:a.xSmall_8}),r($,{color:c.color,fillStyle:C,strokeStyle:x})]}),children:[m(u,{style:i.row,children:[r(L,{coord:o,style:i.spaceUnder,onChange:z}),r(u,{style:i.spaceUnder,children:r(ne,{children:"The coordinates for the center of the ellipse."})})]}),r(L,{coord:p,labels:["x radius","y radius"],style:i.spaceUnder,onChange:e=>s({radius:e})}),r(I,{angle:y,onChange:e=>s({angle:e})}),r(g,{size:a.xSmall_8}),m(u,{style:[i.row,i.spaceUnder],children:[r(ee,{selectedValue:h,onChange:N}),r(g,{size:a.medium_16}),m(P,{tag:"label",style:[i.row,i.truncatedWidth],children:["fill",r(g,{size:a.xxSmall_6}),r(M,{selectedValue:C,onChange:e=>s({fillStyle:e}),placeholder:"",children:Object.keys(F).map(e=>r(V,{value:e,label:e},e))})]})]}),r(te,{selectedValue:x,onChange:e=>s({strokeStyle:e})}),((k=l==null?void 0:l.mafs)==null?void 0:k["locked-ellipse-labels"])&&m(U,{children:[t==null?void 0:t.map((e,n)=>r(re,{...e,expanded:!0,onChangeProps:d=>{j(d,n)},onRemove:()=>{B(n)},containerStyle:i.labelContainer})),r(D,{kind:"tertiary",startIcon:H,onClick:()=>{const e={...oe("label"),coord:[o[0],o[1]-((t==null?void 0:t.length)??0)],color:h};s({labels:[...t??[],e]})},style:i.addButton,children:"Add visible label"})]}),r(Z,{figureType:c.type,onMove:O,onRemove:R})]})},i=w.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},spaceUnder:{marginBottom:a.xSmall_8},truncatedWidth:{minWidth:0},addButton:{alignSelf:"start"},labelContainer:{backgroundColor:b.white}}),Qe=q;q.__docgenInfo={description:"",methods:[],displayName:"LockedEllipseSettings",props:{flags:{required:!1,tsType:{name:'APIOptions["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" | "backward" | "forward" | "front"`,elements:[{name:"literal",value:'"back"'},{name:"literal",value:'"backward"'},{name:"literal",value:'"forward"'},{name:"literal",value:'"front"'}]},name:"movement"}],return:{name:"void"}}},description:"Called when a movement button (top, up, down, bottom) is pressed."},onRemove:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"Called when the delete button is pressed."},expanded:{required:!1,tsType:{name:"boolean"},description:"Whether this accordion is expanded."},onToggle:{required:!1,tsType:{name:"signature",type:"function",raw:"(expanded: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"expanded"}],return:{name:"void"}}},description:"Called when the accordion is expanded or collapsed."},onChangeProps:{required:!0,tsType:{name:"signature",type:"function",raw:"(newProps: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"LockedEllipseType"}],raw:"Partial"},name:"newProps"}],return:{name:"void"}}},description:"Called when the props (coords, color, etc.) are updated."}}};export{Qe as L}; diff --git a/assets/locked-ellipse-settings.stories-vorDLiC2.js b/assets/locked-ellipse-settings.stories-vorDLiC2.js index dcfcea88ab..553da7138f 100644 --- a/assets/locked-ellipse-settings.stories-vorDLiC2.js +++ b/assets/locked-ellipse-settings.stories-vorDLiC2.js @@ -1,4 +1,4 @@ -import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{r as a}from"./index-TT1qJ6UJ.js";import{L as e}from"./locked-ellipse-settings-H2lz6Mnf.js";import{g as C}from"./util-7LGRm2EO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./plus-circle-JCxQSzSv.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./color-select-aXibMsPD.js";import"./line-stroke-select-ZTaE76uS.js";import"./locked-label-settings-qoc_z_IC.js";const Ro={title:"PerseusEditor/Components/Locked Ellipse Settings",component:e},r=i=>d(e,{...i}),c={...C("ellipse"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=c;const o={render:function(){const[t,m]=a.useState(c);return d(e,{...t,onChangeProps:n=>{m({...t,...n})}})}};o.parameters={chromatic:{disableSnapshot:!0}};const p={render:function(){const[t,m]=a.useState(!0),[s,n]=a.useState(c);return d(e,{...s,expanded:t,onToggle:m,onChangeProps:R=>{n({...s,...R})}})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var l,u,P;r.parameters={...r.parameters,docs:{...(l=r.parameters)==null?void 0:l.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{r as a}from"./index-TT1qJ6UJ.js";import{L as e}from"./locked-ellipse-settings-H2lz6Mnf.js";import{g as C}from"./util-7LGRm2EO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./plus-circle-JCxQSzSv.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./color-select-aXibMsPD.js";import"./line-stroke-select-ZTaE76uS.js";import"./locked-label-settings-qoc_z_IC.js";const Ro={title:"PerseusEditor/Components/Locked Ellipse Settings",component:e},r=i=>d(e,{...i}),c={...C("ellipse"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=c;const o={render:function(){const[t,m]=a.useState(c);return d(e,{...t,onChangeProps:n=>{m({...t,...n})}})}};o.parameters={chromatic:{disableSnapshot:!0}};const p={render:function(){const[t,m]=a.useState(!0),[s,n]=a.useState(c);return d(e,{...s,expanded:t,onToggle:m,onChangeProps:R=>{n({...s,...R})}})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var l,u,P;r.parameters={...r.parameters,docs:{...(l=r.parameters)==null?void 0:l.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(P=(u=r.parameters)==null?void 0:u.docs)==null?void 0:P.source}}};var g,f,h;o.parameters={...o.parameters,docs:{...(g=o.parameters)==null?void 0:g.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-figures-section.stories-0h1kV5Lj.js b/assets/locked-figures-section.stories-0h1kV5Lj.js index 798632d5de..f92992c06e 100644 --- a/assets/locked-figures-section.stories-0h1kV5Lj.js +++ b/assets/locked-figures-section.stories-0h1kV5Lj.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{V as y}from"./index-6h5t6F0w.js";import{s as c,c as R}from"./index-deFLJwr4.js";import{l as w}from"./index-awljIyHI.js";import{r as C}from"./index-TT1qJ6UJ.js";import{L as i}from"./locked-figures-section-nxp-trxv.js";import{g as d}from"./util-7LGRm2EO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./heading-8aCiuWUg.js";import"./index-tFzzSRL2.js";import"./toggleable-caret-lFiCktzo.js";import"./answer-choices-vbrLThK4.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./locked-ellipse-settings-H2lz6Mnf.js";import"./article-renderer-o95CuJpS.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./plus-circle-JCxQSzSv.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./color-select-aXibMsPD.js";import"./line-stroke-select-ZTaE76uS.js";import"./locked-label-settings-qoc_z_IC.js";import"./locked-function-settings-RE4yVDE6.js";import"./line-swatch-YWYea0Do.js";import"./locked-line-settings-h25vlmkK.js";import"./locked-point-settings-7pJS5tix.js";import"./labeled-switch-OVGss_VI.js";import"./locked-polygon-settings-pkXY4ncz.js";import"./locked-vector-settings-EnKejgQ9.js";const Io={title:"PerseusEditor/Components/Locked Figures Section",component:i},r=p=>e(i,{...p});r.args={};const o={render:function(){const[m,s]=C.useState([]);return e(i,{figures:m,onChange:n=>{s(n.lockedFigures)}})}},t={render:function(){const[m,s]=C.useState([d("point"),d("line")]),a=n=>{s(n.lockedFigures)};return e(y,{style:D.prodSizeContainer,children:e(i,{figures:m,onChange:a})})}},U=310,x=10,_=U+2*x,D=w.StyleSheet.create({prodSizeContainer:{width:_,padding:x,marginInlineStart:c.medium_16,border:`1px solid ${R.offBlack32}`,borderRadius:c.xxxSmall_4}});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var u,g,l;r.parameters={...r.parameters,docs:{...(u=r.parameters)==null?void 0:u.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{V as y}from"./index-6h5t6F0w.js";import{s as c,c as R}from"./index-deFLJwr4.js";import{l as w}from"./index-awljIyHI.js";import{r as C}from"./index-TT1qJ6UJ.js";import{L as i}from"./locked-figures-section-nxp-trxv.js";import{g as d}from"./util-7LGRm2EO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./heading-8aCiuWUg.js";import"./index-tFzzSRL2.js";import"./toggleable-caret-lFiCktzo.js";import"./answer-choices-vbrLThK4.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./locked-ellipse-settings-H2lz6Mnf.js";import"./article-renderer-o95CuJpS.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./plus-circle-JCxQSzSv.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./util-qk2aeK8X.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./color-select-aXibMsPD.js";import"./line-stroke-select-ZTaE76uS.js";import"./locked-label-settings-qoc_z_IC.js";import"./locked-function-settings-RE4yVDE6.js";import"./line-swatch-YWYea0Do.js";import"./locked-line-settings-h25vlmkK.js";import"./locked-point-settings-7pJS5tix.js";import"./labeled-switch-OVGss_VI.js";import"./locked-polygon-settings-pkXY4ncz.js";import"./locked-vector-settings-EnKejgQ9.js";const Io={title:"PerseusEditor/Components/Locked Figures Section",component:i},r=p=>e(i,{...p});r.args={};const o={render:function(){const[m,s]=C.useState([]);return e(i,{figures:m,onChange:n=>{s(n.lockedFigures)}})}},t={render:function(){const[m,s]=C.useState([d("point"),d("line")]),a=n=>{s(n.lockedFigures)};return e(y,{style:D.prodSizeContainer,children:e(i,{figures:m,onChange:a})})}},U=310,x=10,_=U+2*x,D=w.StyleSheet.create({prodSizeContainer:{width:_,padding:x,marginInlineStart:c.medium_16,border:`1px solid ${R.offBlack32}`,borderRadius:c.xxxSmall_4}});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var u,g,l;r.parameters={...r.parameters,docs:{...(u=r.parameters)==null?void 0:u.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(l=(g=r.parameters)==null?void 0:g.docs)==null?void 0:l.source}}};var f,F,S;o.parameters={...o.parameters,docs:{...(f=o.parameters)==null?void 0:f.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-function-settings.stories-_Ttn4wBr.js b/assets/locked-function-settings.stories-_Ttn4wBr.js index f8d5930a21..2fa5327f15 100644 --- a/assets/locked-function-settings.stories-_Ttn4wBr.js +++ b/assets/locked-function-settings.stories-_Ttn4wBr.js @@ -1,4 +1,4 @@ -import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{r as f}from"./index-TT1qJ6UJ.js";import{L as t}from"./locked-function-settings-RE4yVDE6.js";import{g as P}from"./util-7LGRm2EO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./answer-choices-vbrLThK4.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-QCAhLhLD.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./plus-circle-JCxQSzSv.js";import"./color-select-aXibMsPD.js";import"./article-renderer-o95CuJpS.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./line-stroke-select-ZTaE76uS.js";import"./line-swatch-YWYea0Do.js";import"./locked-label-settings-qoc_z_IC.js";const lr={title:"PerseusEditor/Components/Locked Function Settings",component:t},o=p=>d(t,{...p}),u={...P("function"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};o.args=u;const r={render:function(){const[i,g]=f.useState(u);return d(t,{...i,expanded:!0,onChangeProps:l=>{g({...i,...l})}})}};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var m,e,n;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{r as f}from"./index-TT1qJ6UJ.js";import{L as t}from"./locked-function-settings-RE4yVDE6.js";import{g as P}from"./util-7LGRm2EO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./answer-choices-vbrLThK4.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-QCAhLhLD.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./plus-circle-JCxQSzSv.js";import"./color-select-aXibMsPD.js";import"./article-renderer-o95CuJpS.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./line-stroke-select-ZTaE76uS.js";import"./line-swatch-YWYea0Do.js";import"./locked-label-settings-qoc_z_IC.js";const lr={title:"PerseusEditor/Components/Locked Function Settings",component:t},o=p=>d(t,{...p}),u={...P("function"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};o.args=u;const r={render:function(){const[i,g]=f.useState(u);return d(t,{...i,expanded:!0,onChangeProps:l=>{g({...i,...l})}})}};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var m,e,n;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(n=(e=o.parameters)==null?void 0:e.docs)==null?void 0:n.source}}};var s,a,c;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-functions.stories-HTj8ViPr.js b/assets/locked-functions.stories-HTj8ViPr.js index d57b4b2839..f97f45b6a2 100644 --- a/assets/locked-functions.stories-HTj8ViPr.js +++ b/assets/locked-functions.stories-HTj8ViPr.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{R as t}from"./renderer-with-debug-ui-o6OVhJgg.js";import{h as o}from"./interactive-graph.testdata-syb_sPmB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./interactive-graph-question-builder-kDutykZc.js";const Ht={title:"Perseus/Widgets/Interactive Graph/Locked Functions"},r={apiOptions:{flags:{mafs:{segment:!0}}}},i=s=>e(t,{...r,question:o()}),a=s=>e(t,{...r,question:o("x^2",{color:"green",strokeStyle:"dashed"})}),n=s=>e(t,{...r,question:o("y^2",{directionalAxis:"y"})}),m=s=>e(t,{...r,question:o("sin(x)",{domain:[-5,1/0]})}),c=s=>e(t,{...r,question:o("sin(x)",{domain:[-1/0,5]})}),p=s=>e(t,{...r,question:o("sin(x)",{domain:[-5,5]})}),d=s=>e(t,{...r,question:o("x^2 + 2x + 3")}),u=s=>e(t,{...r,question:o("(1/3)x^3 - 2x^2 + 3x - 4")}),g=s=>e(t,{...r,question:o("tan(x)")}),l=s=>e(t,{...r,question:o("arctan(x)")}),h=s=>e(t,{...r,question:o("log(x)")}),R=s=>e(t,{...r,question:o("e^x")}),f=s=>e(t,{...r,question:o("abs(x)")});i.__docgenInfo={description:"",methods:[],displayName:"DefaultSettings"};a.__docgenInfo={description:"",methods:[],displayName:"StyledSettings"};n.__docgenInfo={description:"",methods:[],displayName:"FunctionOfY"};m.__docgenInfo={description:"",methods:[],displayName:"DomainRestrictedMin"};c.__docgenInfo={description:"",methods:[],displayName:"DomainRestrictedMax"};p.__docgenInfo={description:"",methods:[],displayName:"DomainRestrictedBoth"};d.__docgenInfo={description:"",methods:[],displayName:"Quadratic"};u.__docgenInfo={description:"",methods:[],displayName:"QubicPolynomial"};g.__docgenInfo={description:"",methods:[],displayName:"Tangent"};l.__docgenInfo={description:"",methods:[],displayName:"ArcTangent"};h.__docgenInfo={description:"",methods:[],displayName:"Logarithmic"};R.__docgenInfo={description:"",methods:[],displayName:"Exponent"};f.__docgenInfo={description:"",methods:[],displayName:"AbsoluteValue"};var y,x,S;i.parameters={...i.parameters,docs:{...(y=i.parameters)==null?void 0:y.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(S=(x=i.parameters)==null?void 0:x.docs)==null?void 0:S.source}}};var I,W,_;a.parameters={...a.parameters,docs:{...(I=a.parameters)==null?void 0:I.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => e(t,{...r,question:o()}),a=s=>e(t,{...r,question:o("x^2",{color:"green",strokeStyle:"dashed"})}),n=s=>e(t,{...r,question:o("y^2",{directionalAxis:"y"})}),m=s=>e(t,{...r,question:o("sin(x)",{domain:[-5,1/0]})}),c=s=>e(t,{...r,question:o("sin(x)",{domain:[-1/0,5]})}),p=s=>e(t,{...r,question:o("sin(x)",{domain:[-5,5]})}),d=s=>e(t,{...r,question:o("x^2 + 2x + 3")}),u=s=>e(t,{...r,question:o("(1/3)x^3 - 2x^2 + 3x - 4")}),g=s=>e(t,{...r,question:o("tan(x)")}),l=s=>e(t,{...r,question:o("arctan(x)")}),h=s=>e(t,{...r,question:o("log(x)")}),R=s=>e(t,{...r,question:o("e^x")}),f=s=>e(t,{...r,question:o("abs(x)")});i.__docgenInfo={description:"",methods:[],displayName:"DefaultSettings"};a.__docgenInfo={description:"",methods:[],displayName:"StyledSettings"};n.__docgenInfo={description:"",methods:[],displayName:"FunctionOfY"};m.__docgenInfo={description:"",methods:[],displayName:"DomainRestrictedMin"};c.__docgenInfo={description:"",methods:[],displayName:"DomainRestrictedMax"};p.__docgenInfo={description:"",methods:[],displayName:"DomainRestrictedBoth"};d.__docgenInfo={description:"",methods:[],displayName:"Quadratic"};u.__docgenInfo={description:"",methods:[],displayName:"QubicPolynomial"};g.__docgenInfo={description:"",methods:[],displayName:"Tangent"};l.__docgenInfo={description:"",methods:[],displayName:"ArcTangent"};h.__docgenInfo={description:"",methods:[],displayName:"Logarithmic"};R.__docgenInfo={description:"",methods:[],displayName:"Exponent"};f.__docgenInfo={description:"",methods:[],displayName:"AbsoluteValue"};var y,x,S;i.parameters={...i.parameters,docs:{...(y=i.parameters)==null?void 0:y.docs,source:{originalSource:"(args: StoryArgs): React.ReactElement => ",...(S=(x=i.parameters)==null?void 0:x.docs)==null?void 0:S.source}}};var I,W,_;a.parameters={...a.parameters,docs:{...(I=a.parameters)==null?void 0:I.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => `,...(_=(W=a.parameters)==null?void 0:W.docs)==null?void 0:_.source}}};var q,D,b;n.parameters={...n.parameters,docs:{...(q=n.parameters)==null?void 0:q.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => {n({coord:t})},style:r.spaceUnder}),o(g,{tag:"label",style:[r.row,r.spaceUnder],children:["TeX",e(i,{size:a.xSmall_8}),e(k,{value:s,placeholder:"ex. x^2 or \\frac{1}{2}",onChange:t=>n({text:t})})]}),o(c,{style:r.row,children:[p&&o(S,{children:[e(q,{selectedValue:m,onChange:t=>{n({color:t})},style:r.spaceUnder}),e(i,{size:a.medium_16})]}),o(g,{tag:"label",style:r.row,children:["size",e(i,{size:a.xSmall_8}),o(L,{selectedValue:y,onChange:t=>n({size:t}),placeholder:"",children:[e(d,{value:"small",label:"small"}),e(d,{value:"medium",label:"medium"}),e(d,{value:"large",label:"large"})]})]})]}),e(z,{figureType:f,onMove:p,onRemove:x})]})}const r=P.StyleSheet.create({accordionHeaderContainer:{whiteSpace:"nowrap"},accordionHeader:{padding:a.xxxSmall_4,marginInlineEnd:a.xSmall_8,borderRadius:a.xxxSmall_4,textOverflow:"ellipsis",overflow:"hidden"},row:{display:"flex",flexDirection:"row",alignItems:"center",minWidth:0},spaceUnder:{marginBottom:a.xSmall_8}});I.__docgenInfo={description:"",methods:[],displayName:"LockedLabelSettings",props:{onChangeProps:{required:!0,tsType:{name:"signature",type:"function",raw:"(newProps: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"LockedFigure"}],raw:"Partial"},name:"newProps"}],return:{name:"void"}}},description:"Called when the props (coord, color, etc.) are updated."},onMove:{required:!1,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" +import{a as o,j as e,F as S}from"./jsx-runtime-FVsy8kgq.js";import{l as C}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{V as c}from"./index-6h5t6F0w.js";import{S as L,O as d}from"./answer-choices-vbrLThK4.js";import{T as k}from"./index-QCAhLhLD.js";import{S as i}from"./index-qUyqkRvh.js";import{s as a,c as T}from"./index-deFLJwr4.js";import{L as u,a as g}from"./index-h_CiYGGb.js";import{l as P}from"./index-awljIyHI.js";import{P as _,C as F,L as z}from"./locked-figure-settings-actions-WSW3YvFI.js";import{C as q}from"./color-select-aXibMsPD.js";function I(h){const{type:f,coord:l,color:m,size:y,text:s,expanded:w,onChangeProps:n,onMove:p,onRemove:x,onToggle:v,containerStyle:b}=h;return o(_,{expanded:w,onToggle:v,header:o(c,{style:[r.row,r.accordionHeaderContainer],children:[o(u,{children:["Label (",l[0],", ",l[1],")"]}),e(i,{size:a.xSmall_8}),s!==""&&e(u,{style:[{backgroundColor:T.white,color:C[m]},r.accordionHeader],children:s})]}),containerStyle:b,children:[e(F,{coord:l,onChange:t=>{n({coord:t})},style:r.spaceUnder}),o(g,{tag:"label",style:[r.row,r.spaceUnder],children:["TeX",e(i,{size:a.xSmall_8}),e(k,{value:s,placeholder:"ex. x^2 or \\frac{1}{2}",onChange:t=>n({text:t})})]}),o(c,{style:r.row,children:[p&&o(S,{children:[e(q,{selectedValue:m,onChange:t=>{n({color:t})},style:r.spaceUnder}),e(i,{size:a.medium_16})]}),o(g,{tag:"label",style:r.row,children:["size",e(i,{size:a.xSmall_8}),o(L,{selectedValue:y,onChange:t=>n({size:t}),placeholder:"",children:[e(d,{value:"small",label:"small"}),e(d,{value:"medium",label:"medium"}),e(d,{value:"large",label:"large"})]})]})]}),e(z,{figureType:f,onMove:p,onRemove:x})]})}const r=P.StyleSheet.create({accordionHeaderContainer:{whiteSpace:"nowrap"},accordionHeader:{padding:a.xxxSmall_4,marginInlineEnd:a.xSmall_8,borderRadius:a.xxxSmall_4,textOverflow:"ellipsis",overflow:"hidden"},row:{display:"flex",flexDirection:"row",alignItems:"center",minWidth:0},spaceUnder:{marginBottom:a.xSmall_8}});I.__docgenInfo={description:"",methods:[],displayName:"LockedLabelSettings",props:{onChangeProps:{required:!0,tsType:{name:"signature",type:"function",raw:"(newProps: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"LockedFigure"}],raw:"Partial"},name:"newProps"}],return:{name:"void"}}},description:"Called when the props (coord, color, etc.) are updated."},onMove:{required:!1,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" | "backward" | "forward" | "front"`,elements:[{name:"literal",value:'"back"'},{name:"literal",value:'"backward"'},{name:"literal",value:'"forward"'},{name:"literal",value:'"front"'}]},name:"movement"}],return:{name:"void"}}},description:`Called when a movement button (top, up, down, bottom) is pressed. diff --git a/assets/locked-label-settings.stories-tW6zKvNo.js b/assets/locked-label-settings.stories-tW6zKvNo.js index 0988bed709..7d0bcca2a7 100644 --- a/assets/locked-label-settings.stories-tW6zKvNo.js +++ b/assets/locked-label-settings.stories-tW6zKvNo.js @@ -1,4 +1,4 @@ -import{j as c}from"./jsx-runtime-FVsy8kgq.js";import{r as P}from"./index-TT1qJ6UJ.js";import{L as t}from"./locked-label-settings-qoc_z_IC.js";import{g as f}from"./util-7LGRm2EO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./color-select-aXibMsPD.js";const ao={title:"PerseusEditor/Components/Locked Label Settings",component:t},r=p=>c(t,{...p}),u={...f("label"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=u;const o={render:function(){const[m,l]=P.useState(u);return c(t,{...m,expanded:!0,onChangeProps:g=>{l({...m,...g})}})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,e,s;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as c}from"./jsx-runtime-FVsy8kgq.js";import{r as P}from"./index-TT1qJ6UJ.js";import{L as t}from"./locked-label-settings-qoc_z_IC.js";import{g as f}from"./util-7LGRm2EO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./color-select-aXibMsPD.js";const ao={title:"PerseusEditor/Components/Locked Label Settings",component:t},r=p=>c(t,{...p}),u={...f("label"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=u;const o={render:function(){const[m,l]=P.useState(u);return c(t,{...m,expanded:!0,onChangeProps:g=>{l({...m,...g})}})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var i,e,s;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(s=(e=r.parameters)==null?void 0:e.docs)==null?void 0:s.source}}};var n,a,d;o.parameters={...o.parameters,docs:{...(n=o.parameters)==null?void 0:n.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-line-settings.stories-AHKtxLnH.js b/assets/locked-line-settings.stories-AHKtxLnH.js index 7b4209b7b0..bccf364fe0 100644 --- a/assets/locked-line-settings.stories-AHKtxLnH.js +++ b/assets/locked-line-settings.stories-AHKtxLnH.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{r as n}from"./index-TT1qJ6UJ.js";import{L as s}from"./locked-line-settings-h25vlmkK.js";import{g}from"./util-7LGRm2EO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./svg-image-Rjw-_QTV.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./index-dnMhQZ-1.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./index-7vsPyIck.js";import"./index-J2t_5nK1.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./choice-E4eyMygy.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./media-queries-MaBBbpNq.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./answer-choices-vbrLThK4.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./plus-circle-JCxQSzSv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./index-QCAhLhLD.js";import"./color-select-aXibMsPD.js";import"./article-renderer-o95CuJpS.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./line-stroke-select-ZTaE76uS.js";import"./line-swatch-YWYea0Do.js";import"./locked-label-settings-qoc_z_IC.js";import"./locked-point-settings-7pJS5tix.js";import"./labeled-switch-OVGss_VI.js";const Ft={title:"PerseusEditor/Components/Locked Line Settings",component:s},p=i=>m(s,{...i}),c={...g("line"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};p.args=c;const d={render:function(){const[e,r]=n.useState(c);return m(s,{...e,onChangeProps:o=>{r({...e,...o})}})}};d.parameters={chromatic:{disableSnapshot:!0}};const a={render:function(){const[e,r]=n.useState(c),t=o=>{r({...e,...o})};return m(s,{...e,points:[g("point"),g("point")],expanded:!0,onChangeProps:t})}},u={render:function(){const[e,r]=n.useState(!0),[t,o]=n.useState(c);return m(s,{...t,expanded:e,onToggle:r,onChangeProps:P=>{o({...t,...P})}})}},l={render:function(){const[e,r]=n.useState(!0),[t,o]=n.useState({...c,kind:"segment",color:"green",lineStyle:"dashed"});return m(s,{...t,expanded:e,onToggle:r,onChangeProps:P=>{o({...t,...P})}})}};p.__docgenInfo={description:"",methods:[],displayName:"Default"};var h,f,S;p.parameters={...p.parameters,docs:{...(h=p.parameters)==null?void 0:h.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{r as n}from"./index-TT1qJ6UJ.js";import{L as s}from"./locked-line-settings-h25vlmkK.js";import{g}from"./util-7LGRm2EO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./svg-image-Rjw-_QTV.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./index-dnMhQZ-1.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./index-7vsPyIck.js";import"./index-J2t_5nK1.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./choice-E4eyMygy.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./media-queries-MaBBbpNq.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./answer-choices-vbrLThK4.js";import"./minus-bold-ONmDo3Ve.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./plus-circle-JCxQSzSv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./index-QCAhLhLD.js";import"./color-select-aXibMsPD.js";import"./article-renderer-o95CuJpS.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./line-stroke-select-ZTaE76uS.js";import"./line-swatch-YWYea0Do.js";import"./locked-label-settings-qoc_z_IC.js";import"./locked-point-settings-7pJS5tix.js";import"./labeled-switch-OVGss_VI.js";const Ft={title:"PerseusEditor/Components/Locked Line Settings",component:s},p=i=>m(s,{...i}),c={...g("line"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};p.args=c;const d={render:function(){const[e,r]=n.useState(c);return m(s,{...e,onChangeProps:o=>{r({...e,...o})}})}};d.parameters={chromatic:{disableSnapshot:!0}};const a={render:function(){const[e,r]=n.useState(c),t=o=>{r({...e,...o})};return m(s,{...e,points:[g("point"),g("point")],expanded:!0,onChangeProps:t})}},u={render:function(){const[e,r]=n.useState(!0),[t,o]=n.useState(c);return m(s,{...t,expanded:e,onToggle:r,onChangeProps:P=>{o({...t,...P})}})}},l={render:function(){const[e,r]=n.useState(!0),[t,o]=n.useState({...c,kind:"segment",color:"green",lineStyle:"dashed"});return m(s,{...t,expanded:e,onToggle:r,onChangeProps:P=>{o({...t,...P})}})}};p.__docgenInfo={description:"",methods:[],displayName:"Default"};var h,f,S;p.parameters={...p.parameters,docs:{...(h=p.parameters)==null?void 0:h.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(S=(f=p.parameters)==null?void 0:f.docs)==null?void 0:S.source}}};var x,R,L;d.parameters={...d.parameters,docs:{...(x=d.parameters)==null?void 0:x.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-point-settings.stories-UR8DHQGi.js b/assets/locked-point-settings.stories-UR8DHQGi.js index feda1c3866..e3712c0bcb 100644 --- a/assets/locked-point-settings.stories-UR8DHQGi.js +++ b/assets/locked-point-settings.stories-UR8DHQGi.js @@ -1,4 +1,4 @@ -import{j as c}from"./jsx-runtime-FVsy8kgq.js";import{r as s}from"./index-TT1qJ6UJ.js";import{L as i}from"./locked-point-settings-7pJS5tix.js";import{g as T}from"./util-7LGRm2EO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./plus-circle-JCxQSzSv.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./answer-choices-vbrLThK4.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./color-select-aXibMsPD.js";import"./article-renderer-o95CuJpS.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./labeled-switch-OVGss_VI.js";import"./locked-label-settings-qoc_z_IC.js";const Cr={title:"PerseusEditor/Components/Locked Point Settings",component:i},t=m=>c(i,{...m}),u={...T("point"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};t.args=u;const n={render:function(){const[o,e]=s.useState(u);return c(i,{...o,onChangeProps:p=>{e({...o,...p})}})}};n.parameters={chromatic:{disableSnapshot:!0}};const a={render:function(){const[o,e]=s.useState(!0),[r,p]=s.useState(u);return c(i,{...r,expanded:o,onToggle:e,onChangeProps:P=>{p({...r,...P})}})}},d={render:function(){const[o,e]=s.useState(!0),[r,p]=s.useState(u);return c(i,{...r,expanded:o,onToggle:e,onChangeProps:P=>{p({...r,...P})}})}};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var l,g,f;t.parameters={...t.parameters,docs:{...(l=t.parameters)==null?void 0:l.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as c}from"./jsx-runtime-FVsy8kgq.js";import{r as s}from"./index-TT1qJ6UJ.js";import{L as i}from"./locked-point-settings-7pJS5tix.js";import{g as T}from"./util-7LGRm2EO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./plus-circle-JCxQSzSv.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./answer-choices-vbrLThK4.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./color-select-aXibMsPD.js";import"./article-renderer-o95CuJpS.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./labeled-switch-OVGss_VI.js";import"./locked-label-settings-qoc_z_IC.js";const Cr={title:"PerseusEditor/Components/Locked Point Settings",component:i},t=m=>c(i,{...m}),u={...T("point"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};t.args=u;const n={render:function(){const[o,e]=s.useState(u);return c(i,{...o,onChangeProps:p=>{e({...o,...p})}})}};n.parameters={chromatic:{disableSnapshot:!0}};const a={render:function(){const[o,e]=s.useState(!0),[r,p]=s.useState(u);return c(i,{...r,expanded:o,onToggle:e,onChangeProps:P=>{p({...r,...P})}})}},d={render:function(){const[o,e]=s.useState(!0),[r,p]=s.useState(u);return c(i,{...r,expanded:o,onToggle:e,onChangeProps:P=>{p({...r,...P})}})}};t.__docgenInfo={description:"",methods:[],displayName:"Default"};var l,g,f;t.parameters={...t.parameters,docs:{...(l=t.parameters)==null?void 0:l.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(f=(g=t.parameters)==null?void 0:g.docs)==null?void 0:f.source}}};var h,x,S;n.parameters={...n.parameters,docs:{...(h=n.parameters)==null?void 0:h.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-polygon-settings-pkXY4ncz.js b/assets/locked-polygon-settings-pkXY4ncz.js index 412cc895ef..0ae4605d8f 100644 --- a/assets/locked-polygon-settings-pkXY4ncz.js +++ b/assets/locked-polygon-settings-pkXY4ncz.js @@ -1,4 +1,4 @@ -import{j as e,a}from"./jsx-runtime-FVsy8kgq.js";import{l as b,h as L}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{B}from"./choice-E4eyMygy.js";import{V as s}from"./index-6h5t6F0w.js";import{S as U,O as M}from"./answer-choices-vbrLThK4.js";import{P as v,C as R,I as m,L as z}from"./locked-figure-settings-actions-WSW3YvFI.js";import{S as y,a as V}from"./index-qUyqkRvh.js";import{c as w,s as c}from"./index-deFLJwr4.js";import{L as f,a as j}from"./index-h_CiYGGb.js";import{p as W}from"./plus-circle-JCxQSzSv.js";import{l as x}from"./index-awljIyHI.js";import{C as O}from"./color-select-aXibMsPD.js";import{L as D}from"./labeled-switch-OVGss_VI.js";import{L as E}from"./line-stroke-select-ZTaE76uS.js";const N=""+new URL("arrow-fat-down-X5ut-FGw.svg",import.meta.url).href,X=""+new URL("arrow-fat-left-LxuHjYfJ.svg",import.meta.url).href,G=""+new URL("arrow-fat-right-CxkbbISx.svg",import.meta.url).href,H=""+new URL("arrow-fat-up-ah2eaaIR.svg",import.meta.url).href,J=""+new URL("minus-circle-9EKbQa8X.svg",import.meta.url).href,T=p=>{const{color:n,fillStyle:d,strokeStyle:u}=p;return e(s,{"aria-label":`${n}, stroke ${u}, fill ${d}`,style:[P.container,{border:`4px ${u} ${b[n]}`}],children:e(s,{style:[P.innerSquare,{backgroundColor:b[n],opacity:d==="white"?0:L[d]}]})})},P=x.StyleSheet.create({container:{outline:`2px solid ${w.offWhite}`,width:c.large_24,height:c.large_24,backgroundColor:w.white,alignItems:"center",justifyContent:"center"},innerSquare:{width:20,height:20}});T.__docgenInfo={description:"",methods:[],displayName:"PolygonSwatch",props:{color:{required:!0,tsType:{name:"LockedFigureColor"},description:""},fillStyle:{required:!0,tsType:{name:"LockedFigureFillType"},description:""},strokeStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""}}};const I=p=>{const{points:n,color:d,showVertices:u,fillStyle:C,strokeStyle:S,expanded:F,onToggle:q,onChangeProps:l,onMove:_,onRemove:$}=p;function A(t){l({color:t})}function g(t){switch(t){case"up":l({points:n.map(([r,i])=>[r,i+1])});break;case"down":l({points:n.map(([r,i])=>[r,i-1])});break;case"left":l({points:n.map(([r,i])=>[r-1,i])});break;case"right":l({points:n.map(([r,i])=>[r+1,i])});break}}return a(v,{expanded:F,onToggle:q,header:a(s,{style:o.row,children:[e(f,{children:`Polygon, ${n.length} sides`}),e(y,{size:c.xSmall_8}),e(T,{color:d,fillStyle:C,strokeStyle:S})]}),children:[a(s,{style:[o.row,o.spaceUnder],children:[e(O,{selectedValue:d,onChange:A}),e(y,{size:c.medium_16}),a(j,{tag:"label",style:[o.row,o.truncatedWidth],children:["fill",e(y,{size:c.xxSmall_6}),e(U,{selectedValue:C,onChange:t=>l({fillStyle:t}),placeholder:"",children:Object.keys(L).map(t=>e(M,{value:t,label:t},t))})]})]}),e(E,{selectedValue:S,onChange:t=>l({strokeStyle:t})}),e(D,{label:"show vertices",checked:u,onChange:t=>l({showVertices:t}),style:o.spaceUnder}),a(v,{header:e(f,{children:"Points"}),expanded:!0,containerStyle:o.pointAccordionContainer,panelStyle:o.pointAccordionPanel,children:[n.map((t,r)=>{const i=String.fromCharCode(65+r);return a(s,{style:[o.row,o.spaceUnder],children:[e(f,{children:`${i}:`}),e(y,{size:c.medium_16}),e(R,{coord:t,labels:["x","y"],onChange:h=>{const k=[...n];k[r]=h,p.onChangeProps({points:k})}}),n.length>3&&e(m,{"aria-label":`Delete polygon point ${i}`,icon:J,color:"destructive",onClick:()=>{const h=[...n];h.splice(r,1),p.onChangeProps({points:h})},style:o.icon})]},`locked-polygon-point-index-${r}`)}),a(s,{style:[o.row,o.polygonActionsContainer],children:[e(B,{kind:"tertiary",startIcon:W,onClick:()=>{p.onChangeProps({points:[...n,[0,0]]})},children:"Add point"}),e(V,{}),a(s,{style:o.movementButtonsContainer,children:[e(m,{"aria-label":"Move polygon up",style:o.iconButton,size:"small",icon:H,onClick:()=>g("up")}),a(s,{style:o.row,children:[e(m,{"aria-label":"Move polygon left",style:o.iconButton,size:"small",icon:X,onClick:()=>g("left")}),e(m,{"aria-label":"Move polygon down",style:o.iconButton,size:"small",icon:N,onClick:()=>g("down")}),e(m,{"aria-label":"Move polygon right",style:o.iconButton,size:"small",icon:G,onClick:()=>g("right")})]})]})]})]}),e(z,{figureType:p.type,onMove:_,onRemove:$})]})},o=x.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},pointAccordionContainer:{backgroundColor:w.white},pointAccordionPanel:{alignItems:"start"},icon:{marginInlineStart:c.xxxSmall_4},polygonActionsContainer:{width:"100%"},iconButton:{margin:0},movementButtonsContainer:{display:"flex",flexDirection:"column",alignItems:"center",minWidth:"fit-content"},spaceUnder:{marginBottom:c.xSmall_8},truncatedWidth:{minWidth:0}}),Me=I;I.__docgenInfo={description:"",methods:[],displayName:"LockedPolygonSettings",props:{flags:{required:!1,tsType:{name:'APIOptions["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" +import{j as e,a}from"./jsx-runtime-FVsy8kgq.js";import{l as b,h as L}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{B}from"./choice-E4eyMygy.js";import{V as s}from"./index-6h5t6F0w.js";import{S as U,O as M}from"./answer-choices-vbrLThK4.js";import{P as v,C as R,I as m,L as z}from"./locked-figure-settings-actions-WSW3YvFI.js";import{S as y,a as V}from"./index-qUyqkRvh.js";import{c as w,s as c}from"./index-deFLJwr4.js";import{L as f,a as j}from"./index-h_CiYGGb.js";import{p as W}from"./plus-circle-JCxQSzSv.js";import{l as x}from"./index-awljIyHI.js";import{C as O}from"./color-select-aXibMsPD.js";import{L as D}from"./labeled-switch-OVGss_VI.js";import{L as E}from"./line-stroke-select-ZTaE76uS.js";const N=""+new URL("arrow-fat-down-X5ut-FGw.svg",import.meta.url).href,X=""+new URL("arrow-fat-left-LxuHjYfJ.svg",import.meta.url).href,G=""+new URL("arrow-fat-right-CxkbbISx.svg",import.meta.url).href,H=""+new URL("arrow-fat-up-ah2eaaIR.svg",import.meta.url).href,J=""+new URL("minus-circle-9EKbQa8X.svg",import.meta.url).href,T=p=>{const{color:n,fillStyle:d,strokeStyle:u}=p;return e(s,{"aria-label":`${n}, stroke ${u}, fill ${d}`,style:[P.container,{border:`4px ${u} ${b[n]}`}],children:e(s,{style:[P.innerSquare,{backgroundColor:b[n],opacity:d==="white"?0:L[d]}]})})},P=x.StyleSheet.create({container:{outline:`2px solid ${w.offWhite}`,width:c.large_24,height:c.large_24,backgroundColor:w.white,alignItems:"center",justifyContent:"center"},innerSquare:{width:20,height:20}});T.__docgenInfo={description:"",methods:[],displayName:"PolygonSwatch",props:{color:{required:!0,tsType:{name:"LockedFigureColor"},description:""},fillStyle:{required:!0,tsType:{name:"LockedFigureFillType"},description:""},strokeStyle:{required:!0,tsType:{name:"union",raw:'"solid" | "dashed"',elements:[{name:"literal",value:'"solid"'},{name:"literal",value:'"dashed"'}]},description:""}}};const I=p=>{const{points:n,color:d,showVertices:u,fillStyle:C,strokeStyle:S,expanded:F,onToggle:q,onChangeProps:l,onMove:_,onRemove:$}=p;function A(t){l({color:t})}function g(t){switch(t){case"up":l({points:n.map(([r,i])=>[r,i+1])});break;case"down":l({points:n.map(([r,i])=>[r,i-1])});break;case"left":l({points:n.map(([r,i])=>[r-1,i])});break;case"right":l({points:n.map(([r,i])=>[r+1,i])});break}}return a(v,{expanded:F,onToggle:q,header:a(s,{style:o.row,children:[e(f,{children:`Polygon, ${n.length} sides`}),e(y,{size:c.xSmall_8}),e(T,{color:d,fillStyle:C,strokeStyle:S})]}),children:[a(s,{style:[o.row,o.spaceUnder],children:[e(O,{selectedValue:d,onChange:A}),e(y,{size:c.medium_16}),a(j,{tag:"label",style:[o.row,o.truncatedWidth],children:["fill",e(y,{size:c.xxSmall_6}),e(U,{selectedValue:C,onChange:t=>l({fillStyle:t}),placeholder:"",children:Object.keys(L).map(t=>e(M,{value:t,label:t},t))})]})]}),e(E,{selectedValue:S,onChange:t=>l({strokeStyle:t})}),e(D,{label:"show vertices",checked:u,onChange:t=>l({showVertices:t}),style:o.spaceUnder}),a(v,{header:e(f,{children:"Points"}),expanded:!0,containerStyle:o.pointAccordionContainer,panelStyle:o.pointAccordionPanel,children:[n.map((t,r)=>{const i=String.fromCharCode(65+r);return a(s,{style:[o.row,o.spaceUnder],children:[e(f,{children:`${i}:`}),e(y,{size:c.medium_16}),e(R,{coord:t,labels:["x","y"],onChange:h=>{const k=[...n];k[r]=h,p.onChangeProps({points:k})}}),n.length>3&&e(m,{"aria-label":`Delete polygon point ${i}`,icon:J,color:"destructive",onClick:()=>{const h=[...n];h.splice(r,1),p.onChangeProps({points:h})},style:o.icon})]},`locked-polygon-point-index-${r}`)}),a(s,{style:[o.row,o.polygonActionsContainer],children:[e(B,{kind:"tertiary",startIcon:W,onClick:()=>{p.onChangeProps({points:[...n,[0,0]]})},children:"Add point"}),e(V,{}),a(s,{style:o.movementButtonsContainer,children:[e(m,{"aria-label":"Move polygon up",style:o.iconButton,size:"small",icon:H,onClick:()=>g("up")}),a(s,{style:o.row,children:[e(m,{"aria-label":"Move polygon left",style:o.iconButton,size:"small",icon:X,onClick:()=>g("left")}),e(m,{"aria-label":"Move polygon down",style:o.iconButton,size:"small",icon:N,onClick:()=>g("down")}),e(m,{"aria-label":"Move polygon right",style:o.iconButton,size:"small",icon:G,onClick:()=>g("right")})]})]})]})]}),e(z,{figureType:p.type,onMove:_,onRemove:$})]})},o=x.StyleSheet.create({row:{display:"flex",flexDirection:"row",alignItems:"center"},pointAccordionContainer:{backgroundColor:w.white},pointAccordionPanel:{alignItems:"start"},icon:{marginInlineStart:c.xxxSmall_4},polygonActionsContainer:{width:"100%"},iconButton:{margin:0},movementButtonsContainer:{display:"flex",flexDirection:"column",alignItems:"center",minWidth:"fit-content"},spaceUnder:{marginBottom:c.xSmall_8},truncatedWidth:{minWidth:0}}),Me=I;I.__docgenInfo={description:"",methods:[],displayName:"LockedPolygonSettings",props:{flags:{required:!1,tsType:{name:'APIOptions["flags"]',raw:'APIOptions["flags"]'},description:""},showLabelsFlag:{required:!1,tsType:{name:"boolean"},description:""},onMove:{required:!0,tsType:{name:"signature",type:"function",raw:"(movement: LockedFigureSettingsMovementType) => void",signature:{arguments:[{type:{name:"union",raw:`| "back" | "backward" | "forward" | "front"`,elements:[{name:"literal",value:'"back"'},{name:"literal",value:'"backward"'},{name:"literal",value:'"forward"'},{name:"literal",value:'"front"'}]},name:"movement"}],return:{name:"void"}}},description:"Called when a movement button (top, up, down, bottom) is pressed."},onRemove:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"Called when the delete button is pressed."},expanded:{required:!1,tsType:{name:"boolean"},description:"Whether this accordion is expanded."},onToggle:{required:!1,tsType:{name:"signature",type:"function",raw:"(expanded: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"expanded"}],return:{name:"void"}}},description:"Called when the accordion is expanded or collapsed."},onChangeProps:{required:!0,tsType:{name:"signature",type:"function",raw:"(newProps: Partial) => void",signature:{arguments:[{type:{name:"Partial",elements:[{name:"LockedPolygonType"}],raw:"Partial"},name:"newProps"}],return:{name:"void"}}},description:"Called when the props (coords, color, etc.) are updated."}}};export{Me as L}; diff --git a/assets/locked-polygon-settings.stories-mYwPM9vO.js b/assets/locked-polygon-settings.stories-mYwPM9vO.js index 95e25b541b..0f29b59312 100644 --- a/assets/locked-polygon-settings.stories-mYwPM9vO.js +++ b/assets/locked-polygon-settings.stories-mYwPM9vO.js @@ -1,4 +1,4 @@ -import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{r as a}from"./index-TT1qJ6UJ.js";import{L as e}from"./locked-polygon-settings-pkXY4ncz.js";import{g as E}from"./util-7LGRm2EO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./plus-circle-JCxQSzSv.js";import"./color-select-aXibMsPD.js";import"./labeled-switch-OVGss_VI.js";import"./line-stroke-select-ZTaE76uS.js";const xr={title:"PerseusEditor/Components/Locked Polygon Settings",component:e},o=i=>d(e,{...i}),c={...E("polygon"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};o.args=c;const r={render:function(){const[t,m]=a.useState(c);return d(e,{...t,onChangeProps:s=>{m({...t,...s})}})}};r.parameters={chromatic:{disableSnapshot:!0}};const p={render:function(){const[t,m]=a.useState(!0),[n,s]=a.useState(c);return d(e,{...n,expanded:t,onToggle:m,onChangeProps:y=>{s({...n,...y})}})}};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var u,l,P;o.parameters={...o.parameters,docs:{...(u=o.parameters)==null?void 0:u.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{r as a}from"./index-TT1qJ6UJ.js";import{L as e}from"./locked-polygon-settings-pkXY4ncz.js";import{g as E}from"./util-7LGRm2EO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./plus-circle-JCxQSzSv.js";import"./color-select-aXibMsPD.js";import"./labeled-switch-OVGss_VI.js";import"./line-stroke-select-ZTaE76uS.js";const xr={title:"PerseusEditor/Components/Locked Polygon Settings",component:e},o=i=>d(e,{...i}),c={...E("polygon"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};o.args=c;const r={render:function(){const[t,m]=a.useState(c);return d(e,{...t,onChangeProps:s=>{m({...t,...s})}})}};r.parameters={chromatic:{disableSnapshot:!0}};const p={render:function(){const[t,m]=a.useState(!0),[n,s]=a.useState(c);return d(e,{...n,expanded:t,onToggle:m,onChangeProps:y=>{s({...n,...y})}})}};o.__docgenInfo={description:"",methods:[],displayName:"Default"};var u,l,P;o.parameters={...o.parameters,docs:{...(u=o.parameters)==null?void 0:u.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(P=(l=o.parameters)==null?void 0:l.docs)==null?void 0:P.source}}};var g,f,h;r.parameters={...r.parameters,docs:{...(g=r.parameters)==null?void 0:g.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/locked-vector-settings.stories-gLUV6rz1.js b/assets/locked-vector-settings.stories-gLUV6rz1.js index 10ca36b13a..cbfe62ee32 100644 --- a/assets/locked-vector-settings.stories-gLUV6rz1.js +++ b/assets/locked-vector-settings.stories-gLUV6rz1.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-FVsy8kgq.js";import{r as R}from"./index-TT1qJ6UJ.js";import{L as e}from"./locked-vector-settings-EnKejgQ9.js";import{g as k}from"./util-7LGRm2EO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./svg-image-Rjw-_QTV.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./index-dnMhQZ-1.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./index-7vsPyIck.js";import"./index-J2t_5nK1.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./choice-E4eyMygy.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./media-queries-MaBBbpNq.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./plus-circle-JCxQSzSv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./answer-choices-vbrLThK4.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./color-select-aXibMsPD.js";import"./article-renderer-o95CuJpS.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./line-swatch-YWYea0Do.js";import"./locked-label-settings-qoc_z_IC.js";const St={title:"PerseusEditor/Components/Locked Vector Settings",component:e},r=i=>n(e,{...i}),a={...k("vector"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=a;const p={render:function(){const[t,s]=R.useState(a);return n(e,{...t,expanded:!0,onChangeProps:m=>{s({...t,...m})}})}},o={render:function(){const[t,s]=R.useState(a);return n(e,{...t,points:[[0,0],[0,0]],expanded:!0,onChangeProps:m=>{s({...t,...m})}})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var d,c,u;r.parameters={...r.parameters,docs:{...(d=r.parameters)==null?void 0:d.docs,source:{originalSource:`(args): React.ReactElement => { +import{j as n}from"./jsx-runtime-FVsy8kgq.js";import{r as R}from"./index-TT1qJ6UJ.js";import{L as e}from"./locked-vector-settings-EnKejgQ9.js";import{g as k}from"./util-7LGRm2EO.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./svg-image-Rjw-_QTV.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./index-dnMhQZ-1.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./index-7vsPyIck.js";import"./index-J2t_5nK1.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./choice-E4eyMygy.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./media-queries-MaBBbpNq.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./plus-circle-JCxQSzSv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./locked-figure-settings-actions-WSW3YvFI.js";import"./scrollless-number-text-field-U5Bx_xXb.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./answer-choices-vbrLThK4.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./color-select-aXibMsPD.js";import"./article-renderer-o95CuJpS.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./line-swatch-YWYea0Do.js";import"./locked-label-settings-qoc_z_IC.js";const St={title:"PerseusEditor/Components/Locked Vector Settings",component:e},r=i=>n(e,{...i}),a={...k("vector"),onChangeProps:()=>{},onMove:()=>{},onRemove:()=>{}};r.args=a;const p={render:function(){const[t,s]=R.useState(a);return n(e,{...t,expanded:!0,onChangeProps:m=>{s({...t,...m})}})}},o={render:function(){const[t,s]=R.useState(a);return n(e,{...t,points:[[0,0],[0,0]],expanded:!0,onChangeProps:m=>{s({...t,...m})}})}};r.__docgenInfo={description:"",methods:[],displayName:"Default"};var d,c,u;r.parameters={...r.parameters,docs:{...(d=r.parameters)==null?void 0:d.docs,source:{originalSource:`(args): React.ReactElement => { return ; }`,...(u=(c=r.parameters)==null?void 0:c.docs)==null?void 0:u.source}}};var l,P,g;p.parameters={...p.parameters,docs:{...(l=p.parameters)==null?void 0:l.docs,source:{originalSource:`{ render: function Render() { diff --git a/assets/marker-st5wrvmE.js b/assets/marker-st5wrvmE.js index 0c650e2a8a..053b850beb 100644 --- a/assets/marker-st5wrvmE.js +++ b/assets/marker-st5wrvmE.js @@ -1,4 +1,4 @@ -import{a as b,j as a,F as S}from"./jsx-runtime-FVsy8kgq.js";import{g as k}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import{z as D}from"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{l as s}from"./index-awljIyHI.js";import{r as u}from"./index-TT1qJ6UJ.js";import{c as x}from"./components-0kNWnYe6.js";import{R as E}from"./index-7vsPyIck.js";import{f as T}from"./util-qk2aeK8X.js";import{F as A}from"./form-wrapped-text-field-tsI8XMXi.js";const{Icon:M}=x,{colors:g}=k,N=h=>{const e=E.findDOMNode(h);e.focus&&T(e)},q=`M10,3.8C10,4,9.9,4.2,9.8,4.3L5.1,8.9L4.3,9.8C4.2,9.9,4,10,3.8,10 +import{a as b,j as a,F as S}from"./jsx-runtime-FVsy8kgq.js";import{g as k}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import{z as D}from"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{l as s}from"./index-awljIyHI.js";import{r as u}from"./index-TT1qJ6UJ.js";import{c as x}from"./components-0kNWnYe6.js";import{R as E}from"./index-7vsPyIck.js";import{f as T}from"./util-qk2aeK8X.js";import{F as A}from"./form-wrapped-text-field-tsI8XMXi.js";const{Icon:M}=x,{colors:g}=k,N=h=>{const e=E.findDOMNode(h);e.focus&&T(e)},q=`M10,3.8C10,4,9.9,4.2,9.8,4.3L5.1,8.9L4.3,9.8C4.2,9.9,4,10,3.8,10 S3.5,9.9,3.4,9.8L2.5,8.9L0.2,6.6C0.1,6.5,0,6.3,0,6.2s0.1-0.3,0.2-0.4 l0.9-0.9c0.1-0.1,0.3-0.2,0.4-0.2s0.3,0.1,0.4,0.2l1.9,1.9l4.2-4.2c0.1 -0.1,0.3-0.2,0.4-0.2c0.2,0,0.3,0.1,0.4,0.2l0.9,0.9C9.9,3.5,10,3.7, diff --git a/assets/marker.stories-0Ij7TTdM.js b/assets/marker.stories-0Ij7TTdM.js index 5b67ada09e..ea69b4aca4 100644 --- a/assets/marker.stories-0Ij7TTdM.js +++ b/assets/marker.stories-0Ij7TTdM.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as h}from"./index-awljIyHI.js";import{M as u}from"./marker-st5wrvmE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./util-qk2aeK8X.js";import"./form-wrapped-text-field-tsI8XMXi.js";const co={title:"PerseusEditor/Widgets/Label Image/Marker"},y=h.StyleSheet.create({wrapper:{marginTop:150,position:"relative",width:32,height:32}}),l=m=>i("div",{className:h.css(y.wrapper),children:i(u,{...m})}),o=m=>i(l,{...{answers:[],choices:[],label:"",onChange:(...r)=>{p("onChange")(...r)},onRemove:(...r)=>{p("onRemove")(...r)},x:50,y:50}}),t=m=>i(l,{...{answers:["BMW","Ferrari"],choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],label:"Automotive",onChange:(...r)=>{p("onChange")(...r)},onRemove:(...r)=>{p("onRemove")(...r)},x:50,y:50}});o.__docgenInfo={description:"",methods:[],displayName:"Empty"};t.__docgenInfo={description:"",methods:[],displayName:"WithAnswers"};var e,s,n;o.parameters={...o.parameters,docs:{...(e=o.parameters)==null?void 0:e.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{l as h}from"./index-awljIyHI.js";import{M as u}from"./marker-st5wrvmE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./util-qk2aeK8X.js";import"./form-wrapped-text-field-tsI8XMXi.js";const co={title:"PerseusEditor/Widgets/Label Image/Marker"},y=h.StyleSheet.create({wrapper:{marginTop:150,position:"relative",width:32,height:32}}),l=m=>i("div",{className:h.css(y.wrapper),children:i(u,{...m})}),o=m=>i(l,{...{answers:[],choices:[],label:"",onChange:(...r)=>{p("onChange")(...r)},onRemove:(...r)=>{p("onRemove")(...r)},x:50,y:50}}),t=m=>i(l,{...{answers:["BMW","Ferrari"],choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],label:"Automotive",onChange:(...r)=>{p("onChange")(...r)},onRemove:(...r)=>{p("onRemove")(...r)},x:50,y:50}});o.__docgenInfo={description:"",methods:[],displayName:"Empty"};t.__docgenInfo={description:"",methods:[],displayName:"WithAnswers"};var e,s,n;o.parameters={...o.parameters,docs:{...(e=o.parameters)==null?void 0:e.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = ({ answers: [], choices: [], diff --git a/assets/marker.stories-k1jjniKt.js b/assets/marker.stories-k1jjniKt.js index 764859b953..a9315502da 100644 --- a/assets/marker.stories-k1jjniKt.js +++ b/assets/marker.stories-k1jjniKt.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{l as L}from"./index-awljIyHI.js";import{M as O}from"./marker-vUQ60Bu-.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./icon-paths-AuJwhOz7.js";import"./answer-pill-uwg1DdPG.js";import"./index-o3wWn3Y5.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./index-7vsPyIck.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";const be={title:"Perseus/Widgets/Label Image/Marker"},q=L.StyleSheet.create({wrapper:{position:"relative",width:32,height:32}}),s=r=>e("div",{className:L.css(q.wrapper),children:e(O,{...r})}),t=r=>e(s,{...{answers:["BMW","Ferrari"],selected:[],label:"Automotive",x:50,y:50,showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),n=r=>e(s,{...{answers:["BMW","Ferrari"],selected:[],label:"Automotive",x:50,y:50,showSelected:!1,showPulsate:!0,onClick:()=>{},onKeyDown:()=>{}}}),a=r=>e(s,{...{answers:["BMW","Ferrari"],selected:[],label:"Automotive",x:50,y:50,showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),c=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),l=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),p=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showCorrectness:"incorrect",showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),i=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showCorrectness:"incorrect",showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),d=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["BMW","Ferrari"],label:"Automotive",x:50,y:50,showCorrectness:"correct",showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),m=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["BMW","Ferrari"],label:"Automotive",x:50,y:50,showCorrectness:"correct",showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}});t.__docgenInfo={description:"",methods:[],displayName:"Unfilled"};n.__docgenInfo={description:"",methods:[],displayName:"UnfilledPulsate"};a.__docgenInfo={description:"",methods:[],displayName:"UnfilledSelected"};c.__docgenInfo={description:"",methods:[],displayName:"Filled"};l.__docgenInfo={description:"",methods:[],displayName:"FilledSelected"};p.__docgenInfo={description:"",methods:[],displayName:"Incorrect"};i.__docgenInfo={description:"",methods:[],displayName:"IncorrectSelected"};d.__docgenInfo={description:"",methods:[],displayName:"Correct"};m.__docgenInfo={description:"",methods:[],displayName:"CorrectSelected"};var u,w,h;t.parameters={...t.parameters,docs:{...(u=t.parameters)==null?void 0:u.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{l as L}from"./index-awljIyHI.js";import{M as O}from"./marker-vUQ60Bu-.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./icon-paths-AuJwhOz7.js";import"./answer-pill-uwg1DdPG.js";import"./index-o3wWn3Y5.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./index-7vsPyIck.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";const be={title:"Perseus/Widgets/Label Image/Marker"},q=L.StyleSheet.create({wrapper:{position:"relative",width:32,height:32}}),s=r=>e("div",{className:L.css(q.wrapper),children:e(O,{...r})}),t=r=>e(s,{...{answers:["BMW","Ferrari"],selected:[],label:"Automotive",x:50,y:50,showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),n=r=>e(s,{...{answers:["BMW","Ferrari"],selected:[],label:"Automotive",x:50,y:50,showSelected:!1,showPulsate:!0,onClick:()=>{},onKeyDown:()=>{}}}),a=r=>e(s,{...{answers:["BMW","Ferrari"],selected:[],label:"Automotive",x:50,y:50,showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),c=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),l=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),p=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showCorrectness:"incorrect",showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),i=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["Fiat"],label:"Automotive",x:50,y:50,showCorrectness:"incorrect",showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),d=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["BMW","Ferrari"],label:"Automotive",x:50,y:50,showCorrectness:"correct",showSelected:!1,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}}),m=r=>e(s,{...{answers:["BMW","Ferrari"],selected:["BMW","Ferrari"],label:"Automotive",x:50,y:50,showCorrectness:"correct",showSelected:!0,showPulsate:!1,onClick:()=>{},onKeyDown:()=>{}}});t.__docgenInfo={description:"",methods:[],displayName:"Unfilled"};n.__docgenInfo={description:"",methods:[],displayName:"UnfilledPulsate"};a.__docgenInfo={description:"",methods:[],displayName:"UnfilledSelected"};c.__docgenInfo={description:"",methods:[],displayName:"Filled"};l.__docgenInfo={description:"",methods:[],displayName:"FilledSelected"};p.__docgenInfo={description:"",methods:[],displayName:"Incorrect"};i.__docgenInfo={description:"",methods:[],displayName:"IncorrectSelected"};d.__docgenInfo={description:"",methods:[],displayName:"Correct"};m.__docgenInfo={description:"",methods:[],displayName:"CorrectSelected"};var u,w,h;t.parameters={...t.parameters,docs:{...(u=t.parameters)==null?void 0:u.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = ({ answers: ["BMW", "Ferrari"], selected: [], diff --git a/assets/matcher-editor-hlzTMdtB.js b/assets/matcher-editor-hlzTMdtB.js index 77b33886c2..62eb739183 100644 --- a/assets/matcher-editor-hlzTMdtB.js +++ b/assets/matcher-editor-hlzTMdtB.js @@ -1 +1 @@ -import{a as t,j as e}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import{_ as p}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c}from"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{C as d}from"./index-QCAhLhLD.js";import{P as i}from"./index-0C4KXdeC.js";import{r as m}from"./index-TT1qJ6UJ.js";const{InfoTip:o,TextListEditor:h}=c,s=class s extends m.Component{constructor(){super(...arguments),this.onLabelChange=(r,a)=>{const l=p.clone(this.props.labels);l[r]=a.target.value,this.props.onChange({labels:l})},this.getSaveWarnings=()=>this.props.left.length!==this.props.right.length?["The two halves of the matcher have different numbers of cards."]:[],this.serialize=()=>p.pick(this.props,"left","right","labels","orderMatters","padding")}render(){return t("div",{className:"perseus-matcher-editor",children:[t("div",{children:[" ","Correct answer:"," ",e(o,{children:e("p",{children:"Enter the correct answers here. The preview on the right will show the cards in a randomized order, which is how the student will see them."})})]}),t("div",{className:"perseus-clearfix",children:[e(h,{options:this.props.left,onChange:(r,a)=>{this.props.onChange({left:r},a)},layout:"vertical"}),e(h,{options:this.props.right,onChange:(r,a)=>{this.props.onChange({right:r},a)},layout:"vertical"})]}),t("span",{children:[" ","Labels:"," ",e(o,{children:e("p",{children:"These are entirely optional."})})]}),t("div",{children:[e("input",{type:"text",defaultValue:this.props.labels[0],onChange:this.onLabelChange.bind(this,0)}),e("input",{type:"text",defaultValue:this.props.labels[1],onChange:this.onLabelChange.bind(this,1)})]}),t("div",{children:[e(d,{label:"Order of the matched pairs matters:",checked:this.props.orderMatters,onChange:r=>{this.props.onChange({orderMatters:r})}}),t(o,{children:[e("p",{children:"With this option enabled, only the order provided above will be treated as correct. This is useful when ordering is significant, such as in the context of a proof."}),e("p",{children:"If disabled, pairwise matching is sufficient. To make this clear, the left column becomes fixed in the provided order and only the cards in the right column can be moved."})]})]}),t("div",{children:[e(d,{label:"Padding:",checked:this.props.padding,onChange:r=>{this.props.onChange({padding:r})}}),e(o,{children:e("p",{children:"Padding is good for text, but not needed for images."})})]})]})}};s.propTypes={left:i.array,right:i.array,labels:i.array,orderMatters:i.bool,padding:i.bool},s.widgetName="matcher",s.defaultProps={left:["$x$","$y$","$z$"],right:["$1$","$2$","$3$"],labels:["test","label"],orderMatters:!1,padding:!0};let n=s;n.__docgenInfo={description:"",methods:[{name:"onLabelChange",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MatcherEditor",props:{left:{defaultValue:{value:'["$x$", "$y$", "$z$"]',computed:!1},description:"",type:{name:"array"},required:!1},right:{defaultValue:{value:'["$1$", "$2$", "$3$"]',computed:!1},description:"",type:{name:"array"},required:!1},labels:{defaultValue:{value:'["test", "label"]',computed:!1},description:"",type:{name:"array"},required:!1},orderMatters:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},padding:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1}}};export{n as M}; +import{a as t,j as e}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import{_ as p}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c}from"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{C as d}from"./index-QCAhLhLD.js";import{P as i}from"./index-k-0mNqHS.js";import{r as m}from"./index-TT1qJ6UJ.js";const{InfoTip:o,TextListEditor:h}=c,s=class s extends m.Component{constructor(){super(...arguments),this.onLabelChange=(r,a)=>{const l=p.clone(this.props.labels);l[r]=a.target.value,this.props.onChange({labels:l})},this.getSaveWarnings=()=>this.props.left.length!==this.props.right.length?["The two halves of the matcher have different numbers of cards."]:[],this.serialize=()=>p.pick(this.props,"left","right","labels","orderMatters","padding")}render(){return t("div",{className:"perseus-matcher-editor",children:[t("div",{children:[" ","Correct answer:"," ",e(o,{children:e("p",{children:"Enter the correct answers here. The preview on the right will show the cards in a randomized order, which is how the student will see them."})})]}),t("div",{className:"perseus-clearfix",children:[e(h,{options:this.props.left,onChange:(r,a)=>{this.props.onChange({left:r},a)},layout:"vertical"}),e(h,{options:this.props.right,onChange:(r,a)=>{this.props.onChange({right:r},a)},layout:"vertical"})]}),t("span",{children:[" ","Labels:"," ",e(o,{children:e("p",{children:"These are entirely optional."})})]}),t("div",{children:[e("input",{type:"text",defaultValue:this.props.labels[0],onChange:this.onLabelChange.bind(this,0)}),e("input",{type:"text",defaultValue:this.props.labels[1],onChange:this.onLabelChange.bind(this,1)})]}),t("div",{children:[e(d,{label:"Order of the matched pairs matters:",checked:this.props.orderMatters,onChange:r=>{this.props.onChange({orderMatters:r})}}),t(o,{children:[e("p",{children:"With this option enabled, only the order provided above will be treated as correct. This is useful when ordering is significant, such as in the context of a proof."}),e("p",{children:"If disabled, pairwise matching is sufficient. To make this clear, the left column becomes fixed in the provided order and only the cards in the right column can be moved."})]})]}),t("div",{children:[e(d,{label:"Padding:",checked:this.props.padding,onChange:r=>{this.props.onChange({padding:r})}}),e(o,{children:e("p",{children:"Padding is good for text, but not needed for images."})})]})]})}};s.propTypes={left:i.array,right:i.array,labels:i.array,orderMatters:i.bool,padding:i.bool},s.widgetName="matcher",s.defaultProps={left:["$x$","$y$","$z$"],right:["$1$","$2$","$3$"],labels:["test","label"],orderMatters:!1,padding:!0};let n=s;n.__docgenInfo={description:"",methods:[{name:"onLabelChange",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MatcherEditor",props:{left:{defaultValue:{value:'["$x$", "$y$", "$z$"]',computed:!1},description:"",type:{name:"array"},required:!1},right:{defaultValue:{value:'["$1$", "$2$", "$3$"]',computed:!1},description:"",type:{name:"array"},required:!1},labels:{defaultValue:{value:'["test", "label"]',computed:!1},description:"",type:{name:"array"},required:!1},orderMatters:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},padding:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1}}};export{n as M}; diff --git a/assets/matcher-editor.stories-VhSbgn8n.js b/assets/matcher-editor.stories-VhSbgn8n.js index 5a8bcc4613..978a3a637c 100644 --- a/assets/matcher-editor.stories-VhSbgn8n.js +++ b/assets/matcher-editor.stories-VhSbgn8n.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{M as e}from"./matcher-editor-hlzTMdtB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";const rt={title:"PerseusEditor/Widgets/Matcher Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{M as e}from"./matcher-editor-hlzTMdtB.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";const rt={title:"PerseusEditor/Widgets/Matcher Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(o=r.parameters)==null?void 0:o.docs)==null?void 0:i.source}}};const tt=["Default"];export{r as Default,tt as __namedExportsOrder,rt as default}; diff --git a/assets/matcher.stories-Wvqif8HG.js b/assets/matcher.stories-Wvqif8HG.js index c216efbf5c..b4985a3a17 100644 --- a/assets/matcher.stories-Wvqif8HG.js +++ b/assets/matcher.stories-Wvqif8HG.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{R as m}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const p={content:`**Match each claim with its supporting evidence.** +import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{R as m}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const p={content:`**Match each claim with its supporting evidence.** [[☃ matcher 1]]`,images:{},widgets:{"matcher 1":{version:{major:0,minor:0},type:"matcher",graded:!0,options:{labels:["**Claims**","**Evidence**"],padding:!0,orderMatters:!1,right:["Medium-sized stars typically exist for roughly 10 billion years","The current trajectory of the Earth’s tectonic plate movement","The life cycle of medium-sized stars includes a red giant stage and ends in a whimper as a white dwarf","Rapid escalation of greenhouse gas emissions","The current trajectory of the Milky Way galaxy and those in its immediate proximity"],left:["Our Sun will run out of fuel and die in around 5 billion years ","Plate tectonics will rearrange the continents: the Pacific will narrow, bringing Australia closer to the Americas, and the Atlantic will expand to form the largest of the oceans ","Our Sun will run out of hydrogen, swell into a red giant, gobble up the inner rocky planets, and then collapse and die ","Average global temperatures will rise ","In 3 to 4 billion years, our galaxy will begin a slow collision with its closest large neighbor, Andromeda "]}}}},Yt={title:"Perseus/Widgets/Matcher"},t=a=>e(m,{question:p});t.__docgenInfo={description:"",methods:[],displayName:"Question1"};var r,i,o;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/math-input-b6JdL4xR.js b/assets/math-input-b6JdL4xR.js index cbe4aa6302..5d91b3c727 100644 --- a/assets/math-input-b6JdL4xR.js +++ b/assets/math-input-b6JdL4xR.js @@ -1,4 +1,4 @@ -import{j as i,a as v,F as q}from"./jsx-runtime-FVsy8kgq.js";import"./prop-types-3bOVFRDQ.js";import{a as x,c as K,g as h,m as _}from"./key-translator-IA-2V2LV.js";import{C as B,K as A}from"./mobile-keypad-hKjeQGNp.js";import{M as V,c as D}from"./button-assets-txIojR3b.js";import{C as O}from"./index-2dmvOE3q.js";import{V as R}from"./index-6h5t6F0w.js";import{P as U,a as E}from"./index-BPSWBbj5.js";import{c as l,s as k}from"./index-deFLJwr4.js";import{e as W}from"./index-h_CiYGGb.js";import{l as S}from"./index-awljIyHI.js";import{c as I}from"./index-dnMhQZ-1.js";import{_ as L,$ as P}from"./jquery-yG1GhClm.js";import{r as b}from"./index-TT1qJ6UJ.js";import{P as H}from"./i18n-context-hxuRe8oU.js";var n=[];for(var y=0;y<256;++y)n.push((y+256).toString(16).slice(1));function N(a,e=0){return(n[a[e+0]]+n[a[e+1]]+n[a[e+2]]+n[a[e+3]]+"-"+n[a[e+4]]+n[a[e+5]]+"-"+n[a[e+6]]+n[a[e+7]]+"-"+n[a[e+8]]+n[a[e+9]]+"-"+n[a[e+10]]+n[a[e+11]]+n[a[e+12]]+n[a[e+13]]+n[a[e+14]]+n[a[e+15]]).toLowerCase()}var p,M=new Uint8Array(16);function j(){if(!p&&(p=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!p))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return p(M)}var Z=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const w={randomUUID:Z};function $(a,e,t){if(w.randomUUID&&!e&&!a)return w.randomUUID();a=a||{};var r=a.random||(a.rng||j)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){t=t||0;for(var s=0;s<16;++s)e[t+s]=r[s];return e}return N(r)}const z=S.StyleSheet.create({srOnly:{border:0,clip:"rect(0,0,0,0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}}),G=(a,e)=>{let t=null;return(...r)=>{t&&clearTimeout(t),t=window.setTimeout(()=>{a(...r)},e)}},u=class u extends b.Component{constructor(){super(...arguments),this.__mathFieldWrapperRef=null,this.__mathField=null,this.state={focused:!1,keypadOpen:this.props.buttonsVisible==="always",cursorContext:B.NONE},this.insert=e=>{const t=this.mathField(),{locale:r}=this.context,o={...x(r,this.context.strings),FRAC:c=>{const F=c.latex();c.typedText("/"),c.latex()===F&&c.cmd("\\frac")}}[e];if(o){o(t,e),t==null||t.focus();return}L(e).isFunction()?e(t):e[0]==="\\"?t==null||t.cmd(e).focus():t==null||t.write(e).focus(),t==null||t.focus()},this.mathField=()=>{var e;if(!this.__mathField&&this.__mathFieldWrapperRef){const{locale:t}=this.context;this.__mathField=K(this.__mathFieldWrapperRef,t,this.props.mathInputStrings,r=>({...r,handlers:{edit:G(s=>{let o=s.latex();if(o=o.replace(/<>/g,"\\ne"),D(t,this.props.convertDotToTimes)){o=o.replace(/\\cdot/g,"\\times");const c=s.cursor()[_.L];c&&c.ctrlSeq==="\\cdot "&&(s.controller().backspace(),s.cmd("\\times"))}else o=o.replace(/\\times/g,"\\cdot");this.props.value!==o&&this.props.onChange(o),this.setState({cursorContext:h(s)})},100),enter:()=>{this.__mathFieldWrapperRef&&P(this.__mathFieldWrapperRef).submit()},upOutOf:s=>{s.typedText("^")}}}))}return(e=this.__mathField)==null||e.setAriaLabel(this.props.ariaLabel),this.__mathField},this.focus=()=>{var e;(e=this.mathField())==null||e.focus(),this.setState({focused:!0})},this.blur=()=>this.setState({focused:!1}),this.handleKeypadPress=(e,t)=>{const{locale:r}=this.context,s=x(r,this.context.strings)[e],o=this.mathField();o&&(s&&s(o,e),this.setState({cursorContext:h(o)})),t.type==="click"&&this.focus()}}componentDidMount(){var e;(e=this.mathField())==null||e.latex(this.props.value)}openKeypad(){this.props.buttonsVisible!=="never"&&this.setState({keypadOpen:!0})}closeKeypad(){this.setState({keypadOpen:!1})}render(){let e=I({"perseus-math-input":!0,"mq-editable-field":!0,"mq-math-mode":!0});const t=$().slice(0,8);return this.props.className&&(e=e+" "+this.props.className),i(R,{style:[d.outerWrapper,this.state.focused&&d.wrapperFocused,this.props.hasError&&d.wrapperError],children:v("div",{style:{display:"flex",padding:1},onClick:r=>{r.stopPropagation();const s=this.mathField();s&&this.setState({cursorContext:h(s)})},children:[i("span",{className:e,ref:r=>this.__mathFieldWrapperRef=r,onFocus:()=>this.focus(),onBlur:()=>this.blur()}),i(U,{rootBoundary:"document",opened:this.state.keypadOpen,onClose:()=>this.closeKeypad(),dismissEnabled:!0,"aria-label":this.context.strings.mathInputTitle,"aria-describedby":`popover-content-${t}`,content:()=>{var r;return v(q,{children:[i(W,{id:`popover-content-${t}`,style:z.srOnly,children:this.context.strings.mathInputDescription}),i(E,{closeButtonVisible:!0,style:d.popoverContent,children:i(A,{onAnalyticsEvent:this.props.analytics.onAnalyticsEvent,extraKeys:this.props.extraKeys,onClickKey:this.handleKeypadPress,cursorContext:this.state.cursorContext,convertDotToTimes:this.props.convertDotToTimes,...this.props.keypadButtonSets??J((r=this.props)==null?void 0:r.buttonSets)})})]})},children:this.props.buttonsVisible==="never"?i(C,{hovered:!1,focused:!1,active:!1}):i(O,{"aria-label":this.state.keypadOpen?this.context.strings.closeKeypad:this.context.strings.openKeypad,role:"button",onClick:()=>this.state.keypadOpen?this.closeKeypad():this.openKeypad(),children:r=>i(C,{active:this.state.keypadOpen,...r})})})]})})}};u.contextType=H,u.defaultProps={value:"",convertDotToTimes:!1};let f=u;const m=class m extends b.Component{constructor(){super(...arguments),this.inputRef=b.createRef()}blur(){var e;(e=this.inputRef.current)==null||e.blur()}focus(){var e;(e=this.inputRef.current)==null||e.focus()}insert(e){var t;(t=this.inputRef.current)==null||t.insert(e)}render(){return i(f,{...this.props,ref:this.inputRef,mathInputStrings:this.context.strings})}};m.contextType=V,m.defaultProps={ariaLabel:"Math input"};let g=m;const C=({hovered:a,focused:e,active:t})=>{let r;switch(!0){case(e||t):r=l.white;break;case a:r=l.blue;break;default:r=l.offBlack;break}const s=t||e?d.iconActive:d.iconInactive;return i(R,{style:[d.iconContainer,s],children:i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:r,viewBox:"0 0 256 256",children:i("path",{d:"M112,72a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16h64A8,8,0,0,1,112,72Zm-8,104H80V152a8,8,0,0,0-16,0v24H40a8,8,0,0,0,0,16H64v24a8,8,0,0,0,16,0V192h24a8,8,0,0,0,0-16Zm48,0h64a8,8,0,0,0,0-16H152a8,8,0,0,0,0,16Zm64,16H152a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Zm-61.66-90.34a8,8,0,0,0,11.32,0L184,83.31l18.34,18.35a8,8,0,0,0,11.32-11.32L195.31,72l18.35-18.34a8,8,0,0,0-11.32-11.32L184,60.69,165.66,42.34a8,8,0,0,0-11.32,11.32L172.69,72,154.34,90.34A8,8,0,0,0,154.34,101.66Z"})})})},J=a=>{const e={};return a&&a.forEach(t=>{switch(t){case"advanced relations":e.advancedRelations=!0;break;case"basic relations":e.basicRelations=!0;break;case"basic+div":e.divisionKey=!0;break;case"logarithms":e.logarithms=!0;break;case"prealgebra":e.preAlgebra=!0;break;case"trig":e.trigonometry=!0;break}}),e},T={borderWidth:2,borderColor:l.blue,margin:-1},d=S.StyleSheet.create({iconContainer:{display:"flex",justifyContent:"center",height:"100%",padding:k.xxxSmall_4,borderRadius:1},iconInactive:{border:"2px solid transparent",backgroundColor:l.offBlack8},iconActive:{border:`2px solid ${l.white}`,backgroundColor:l.offBlack64},outerWrapper:{display:"inline-block",borderStyle:"solid",borderWidth:1,borderColor:l.offBlack50,borderRadius:3,background:l.white,":hover":T},wrapperFocused:T,wrapperError:{borderColor:l.red,background:l.fadedRed8,":hover":{borderColor:l.red}},popoverContent:{padding:0,paddingBottom:k.xxSmall_6,maxWidth:"initial"}});g.__docgenInfo={description:"",methods:[{name:"blur",docblock:null,modifiers:[],params:[],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"insert",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:{name:"any"}}],returns:null}],displayName:"MathInput",props:{className:{required:!1,tsType:{name:"string"},description:""},value:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"any"},description:""},convertDotToTimes:{required:!0,tsType:{name:"boolean"},description:""},buttonSets:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"union",raw:`| "basic" +import{j as i,a as v,F as q}from"./jsx-runtime-FVsy8kgq.js";import"./prop-types-3bOVFRDQ.js";import{a as x,c as K,g as h,m as _}from"./key-translator-IA-2V2LV.js";import{C as B,K as A}from"./mobile-keypad-hKjeQGNp.js";import{M as V,c as D}from"./button-assets-txIojR3b.js";import{C as O}from"./index-WNT3sUKf.js";import{V as R}from"./index-6h5t6F0w.js";import{P as U,a as E}from"./index-BPSWBbj5.js";import{c as l,s as k}from"./index-deFLJwr4.js";import{e as W}from"./index-h_CiYGGb.js";import{l as S}from"./index-awljIyHI.js";import{c as I}from"./index-dnMhQZ-1.js";import{_ as L,$ as P}from"./jquery-yG1GhClm.js";import{r as b}from"./index-TT1qJ6UJ.js";import{P as H}from"./i18n-context-hxuRe8oU.js";var n=[];for(var y=0;y<256;++y)n.push((y+256).toString(16).slice(1));function N(a,e=0){return(n[a[e+0]]+n[a[e+1]]+n[a[e+2]]+n[a[e+3]]+"-"+n[a[e+4]]+n[a[e+5]]+"-"+n[a[e+6]]+n[a[e+7]]+"-"+n[a[e+8]]+n[a[e+9]]+"-"+n[a[e+10]]+n[a[e+11]]+n[a[e+12]]+n[a[e+13]]+n[a[e+14]]+n[a[e+15]]).toLowerCase()}var p,M=new Uint8Array(16);function j(){if(!p&&(p=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!p))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return p(M)}var Z=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const w={randomUUID:Z};function $(a,e,t){if(w.randomUUID&&!e&&!a)return w.randomUUID();a=a||{};var r=a.random||(a.rng||j)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){t=t||0;for(var s=0;s<16;++s)e[t+s]=r[s];return e}return N(r)}const z=S.StyleSheet.create({srOnly:{border:0,clip:"rect(0,0,0,0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}}),G=(a,e)=>{let t=null;return(...r)=>{t&&clearTimeout(t),t=window.setTimeout(()=>{a(...r)},e)}},u=class u extends b.Component{constructor(){super(...arguments),this.__mathFieldWrapperRef=null,this.__mathField=null,this.state={focused:!1,keypadOpen:this.props.buttonsVisible==="always",cursorContext:B.NONE},this.insert=e=>{const t=this.mathField(),{locale:r}=this.context,o={...x(r,this.context.strings),FRAC:c=>{const F=c.latex();c.typedText("/"),c.latex()===F&&c.cmd("\\frac")}}[e];if(o){o(t,e),t==null||t.focus();return}L(e).isFunction()?e(t):e[0]==="\\"?t==null||t.cmd(e).focus():t==null||t.write(e).focus(),t==null||t.focus()},this.mathField=()=>{var e;if(!this.__mathField&&this.__mathFieldWrapperRef){const{locale:t}=this.context;this.__mathField=K(this.__mathFieldWrapperRef,t,this.props.mathInputStrings,r=>({...r,handlers:{edit:G(s=>{let o=s.latex();if(o=o.replace(/<>/g,"\\ne"),D(t,this.props.convertDotToTimes)){o=o.replace(/\\cdot/g,"\\times");const c=s.cursor()[_.L];c&&c.ctrlSeq==="\\cdot "&&(s.controller().backspace(),s.cmd("\\times"))}else o=o.replace(/\\times/g,"\\cdot");this.props.value!==o&&this.props.onChange(o),this.setState({cursorContext:h(s)})},100),enter:()=>{this.__mathFieldWrapperRef&&P(this.__mathFieldWrapperRef).submit()},upOutOf:s=>{s.typedText("^")}}}))}return(e=this.__mathField)==null||e.setAriaLabel(this.props.ariaLabel),this.__mathField},this.focus=()=>{var e;(e=this.mathField())==null||e.focus(),this.setState({focused:!0})},this.blur=()=>this.setState({focused:!1}),this.handleKeypadPress=(e,t)=>{const{locale:r}=this.context,s=x(r,this.context.strings)[e],o=this.mathField();o&&(s&&s(o,e),this.setState({cursorContext:h(o)})),t.type==="click"&&this.focus()}}componentDidMount(){var e;(e=this.mathField())==null||e.latex(this.props.value)}openKeypad(){this.props.buttonsVisible!=="never"&&this.setState({keypadOpen:!0})}closeKeypad(){this.setState({keypadOpen:!1})}render(){let e=I({"perseus-math-input":!0,"mq-editable-field":!0,"mq-math-mode":!0});const t=$().slice(0,8);return this.props.className&&(e=e+" "+this.props.className),i(R,{style:[d.outerWrapper,this.state.focused&&d.wrapperFocused,this.props.hasError&&d.wrapperError],children:v("div",{style:{display:"flex",padding:1},onClick:r=>{r.stopPropagation();const s=this.mathField();s&&this.setState({cursorContext:h(s)})},children:[i("span",{className:e,ref:r=>this.__mathFieldWrapperRef=r,onFocus:()=>this.focus(),onBlur:()=>this.blur()}),i(U,{rootBoundary:"document",opened:this.state.keypadOpen,onClose:()=>this.closeKeypad(),dismissEnabled:!0,"aria-label":this.context.strings.mathInputTitle,"aria-describedby":`popover-content-${t}`,content:()=>{var r;return v(q,{children:[i(W,{id:`popover-content-${t}`,style:z.srOnly,children:this.context.strings.mathInputDescription}),i(E,{closeButtonVisible:!0,style:d.popoverContent,children:i(A,{onAnalyticsEvent:this.props.analytics.onAnalyticsEvent,extraKeys:this.props.extraKeys,onClickKey:this.handleKeypadPress,cursorContext:this.state.cursorContext,convertDotToTimes:this.props.convertDotToTimes,...this.props.keypadButtonSets??J((r=this.props)==null?void 0:r.buttonSets)})})]})},children:this.props.buttonsVisible==="never"?i(C,{hovered:!1,focused:!1,active:!1}):i(O,{"aria-label":this.state.keypadOpen?this.context.strings.closeKeypad:this.context.strings.openKeypad,role:"button",onClick:()=>this.state.keypadOpen?this.closeKeypad():this.openKeypad(),children:r=>i(C,{active:this.state.keypadOpen,...r})})})]})})}};u.contextType=H,u.defaultProps={value:"",convertDotToTimes:!1};let f=u;const m=class m extends b.Component{constructor(){super(...arguments),this.inputRef=b.createRef()}blur(){var e;(e=this.inputRef.current)==null||e.blur()}focus(){var e;(e=this.inputRef.current)==null||e.focus()}insert(e){var t;(t=this.inputRef.current)==null||t.insert(e)}render(){return i(f,{...this.props,ref:this.inputRef,mathInputStrings:this.context.strings})}};m.contextType=V,m.defaultProps={ariaLabel:"Math input"};let g=m;const C=({hovered:a,focused:e,active:t})=>{let r;switch(!0){case(e||t):r=l.white;break;case a:r=l.blue;break;default:r=l.offBlack;break}const s=t||e?d.iconActive:d.iconInactive;return i(R,{style:[d.iconContainer,s],children:i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:r,viewBox:"0 0 256 256",children:i("path",{d:"M112,72a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16h64A8,8,0,0,1,112,72Zm-8,104H80V152a8,8,0,0,0-16,0v24H40a8,8,0,0,0,0,16H64v24a8,8,0,0,0,16,0V192h24a8,8,0,0,0,0-16Zm48,0h64a8,8,0,0,0,0-16H152a8,8,0,0,0,0,16Zm64,16H152a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Zm-61.66-90.34a8,8,0,0,0,11.32,0L184,83.31l18.34,18.35a8,8,0,0,0,11.32-11.32L195.31,72l18.35-18.34a8,8,0,0,0-11.32-11.32L184,60.69,165.66,42.34a8,8,0,0,0-11.32,11.32L172.69,72,154.34,90.34A8,8,0,0,0,154.34,101.66Z"})})})},J=a=>{const e={};return a&&a.forEach(t=>{switch(t){case"advanced relations":e.advancedRelations=!0;break;case"basic relations":e.basicRelations=!0;break;case"basic+div":e.divisionKey=!0;break;case"logarithms":e.logarithms=!0;break;case"prealgebra":e.preAlgebra=!0;break;case"trig":e.trigonometry=!0;break}}),e},T={borderWidth:2,borderColor:l.blue,margin:-1},d=S.StyleSheet.create({iconContainer:{display:"flex",justifyContent:"center",height:"100%",padding:k.xxxSmall_4,borderRadius:1},iconInactive:{border:"2px solid transparent",backgroundColor:l.offBlack8},iconActive:{border:`2px solid ${l.white}`,backgroundColor:l.offBlack64},outerWrapper:{display:"inline-block",borderStyle:"solid",borderWidth:1,borderColor:l.offBlack50,borderRadius:3,background:l.white,":hover":T},wrapperFocused:T,wrapperError:{borderColor:l.red,background:l.fadedRed8,":hover":{borderColor:l.red}},popoverContent:{padding:0,paddingBottom:k.xxSmall_6,maxWidth:"initial"}});g.__docgenInfo={description:"",methods:[{name:"blur",docblock:null,modifiers:[],params:[],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"insert",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:{name:"any"}}],returns:null}],displayName:"MathInput",props:{className:{required:!1,tsType:{name:"string"},description:""},value:{required:!0,tsType:{name:"string"},description:""},onChange:{required:!0,tsType:{name:"any"},description:""},convertDotToTimes:{required:!0,tsType:{name:"boolean"},description:""},buttonSets:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"union",raw:`| "basic" | "basic+div" | "trig" | "prealgebra" diff --git a/assets/math-input.stories-6v1Hp3Uf.js b/assets/math-input.stories-6v1Hp3Uf.js index f3b79213e7..e000571b75 100644 --- a/assets/math-input.stories-6v1Hp3Uf.js +++ b/assets/math-input.stories-6v1Hp3Uf.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{M as s}from"./math-input-b6JdL4xR.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./prop-types-3bOVFRDQ.js";import"./version-akiLXZts.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";const re={title:"Perseus/Components/Math Input"},i={keypadButtonSets:{advancedRelations:!0,basicRelations:!0,divisionKey:!0,logarithms:!0,preAlgebra:!0,trigonometry:!0},convertDotToTimes:!1,value:"",onChange:()=>{},analytics:{onAnalyticsEvent:()=>Promise.resolve()},labelText:"Math input"},e=p=>o(s,{...i}),t=p=>o(s,{...i,ariaLabel:"Sample label"}),r=p=>o(s,{...i,buttonsVisible:"always"}),a=p=>o(s,{...i,buttonsVisible:"never"});e.__docgenInfo={description:"",methods:[],displayName:"DefaultWithBasicButtonSet"};t.__docgenInfo={description:"",methods:[],displayName:"DefaultWithAriaLabel"};r.__docgenInfo={description:"",methods:[],displayName:"KeypadOpenByDefault"};a.__docgenInfo={description:"",methods:[],displayName:"KeypadNeverVisible"};var n,m,c;e.parameters={...e.parameters,docs:{...(n=e.parameters)==null?void 0:n.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{M as s}from"./math-input-b6JdL4xR.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./prop-types-3bOVFRDQ.js";import"./version-akiLXZts.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./jquery-yG1GhClm.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";const re={title:"Perseus/Components/Math Input"},i={keypadButtonSets:{advancedRelations:!0,basicRelations:!0,divisionKey:!0,logarithms:!0,preAlgebra:!0,trigonometry:!0},convertDotToTimes:!1,value:"",onChange:()=>{},analytics:{onAnalyticsEvent:()=>Promise.resolve()},labelText:"Math input"},e=p=>o(s,{...i}),t=p=>o(s,{...i,ariaLabel:"Sample label"}),r=p=>o(s,{...i,buttonsVisible:"always"}),a=p=>o(s,{...i,buttonsVisible:"never"});e.__docgenInfo={description:"",methods:[],displayName:"DefaultWithBasicButtonSet"};t.__docgenInfo={description:"",methods:[],displayName:"DefaultWithAriaLabel"};r.__docgenInfo={description:"",methods:[],displayName:"KeypadOpenByDefault"};a.__docgenInfo={description:"",methods:[],displayName:"KeypadNeverVisible"};var n,m,c;e.parameters={...e.parameters,docs:{...(n=e.parameters)==null?void 0:n.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(c=(m=e.parameters)==null?void 0:m.docs)==null?void 0:c.source}}};var l,u,d;t.parameters={...t.parameters,docs:{...(l=t.parameters)==null?void 0:l.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/matrix.stories-mor64b5d.js b/assets/matrix.stories-mor64b5d.js index 1ef06cb6cb..feed815efe 100644 --- a/assets/matrix.stories-mor64b5d.js +++ b/assets/matrix.stories-mor64b5d.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const e={content:`**Perform the row operation, $R_3 \\leftrightarrow R_2$, on the following matrix.** +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const e={content:`**Perform the row operation, $R_3 \\leftrightarrow R_2$, on the following matrix.** $\\left[\\begin{array} {ccc} 5 & -2 & 1 & 1 \\\\ diff --git a/assets/multi-items-MzI04jIx.js b/assets/multi-items-MzI04jIx.js index c542b54cb7..3c4db59eed 100644 --- a/assets/multi-items-MzI04jIx.js +++ b/assets/multi-items-MzI04jIx.js @@ -1 +1 @@ -import{M as s,s as p,b as a,f,a as u,i as y}from"./multi-renderer-Nglq5SzN.js";import"./version-akiLXZts.js";import{P as c,E as m}from"./util-XcxTwqb0.js";import{P as e}from"./index-k-0mNqHS.js";function d(t){return e.oneOfType([e.shape({_multi:n(t)}),e.oneOf([null,void 0])])}function n(t){if(t.type==="content")return e.shape({__type:e.oneOf(["content","item"]).isRequired,content:e.string,images:e.objectOf(e.any),widgets:e.objectOf(e.any)});if(t.type==="hint")return e.shape({__type:e.oneOf(["hint"]).isRequired,content:e.string,images:e.objectOf(e.any),widgets:e.objectOf(e.any),replace:e.bool});if(t.type==="tags")return e.arrayOf(e.string.isRequired);if(t.type==="array"){const r=n(t.elementShape);return e.arrayOf(r.isRequired)}if(t.type==="object"){const r=t.shape,o={};return Object.keys(r).forEach(i=>{o[i]=n(r[i]).isRequired}),e.shape(o)}throw new c(`unexpected shape type ${t.type}`,m.InvalidInput)}const I={MultiRenderer:s,shapes:p,buildPropTypeForShape:d,buildEmptyItemForShape:a,findContentNodesInItem:f,findHintNodesInItem:u,inferItemShape:y};export{I as M}; +import{M as s,s as p,b as a,f,a as u,i as y}from"./multi-renderer-Nglq5SzN.js";import"./version-akiLXZts.js";import{P as c,E as m}from"./util-XcxTwqb0.js";import{P as e}from"./index-0C4KXdeC.js";function d(t){return e.oneOfType([e.shape({_multi:n(t)}),e.oneOf([null,void 0])])}function n(t){if(t.type==="content")return e.shape({__type:e.oneOf(["content","item"]).isRequired,content:e.string,images:e.objectOf(e.any),widgets:e.objectOf(e.any)});if(t.type==="hint")return e.shape({__type:e.oneOf(["hint"]).isRequired,content:e.string,images:e.objectOf(e.any),widgets:e.objectOf(e.any),replace:e.bool});if(t.type==="tags")return e.arrayOf(e.string.isRequired);if(t.type==="array"){const r=n(t.elementShape);return e.arrayOf(r.isRequired)}if(t.type==="object"){const r=t.shape,o={};return Object.keys(r).forEach(i=>{o[i]=n(r[i]).isRequired}),e.shape(o)}throw new c(`unexpected shape type ${t.type}`,m.InvalidInput)}const I={MultiRenderer:s,shapes:p,buildPropTypeForShape:d,buildEmptyItemForShape:a,findContentNodesInItem:f,findHintNodesInItem:u,inferItemShape:y};export{I as M}; diff --git a/assets/multi-renderer.stories-vZvfsxg9.js b/assets/multi-renderer.stories-vZvfsxg9.js index 8d9ac92954..a64f9da36b 100644 --- a/assets/multi-renderer.stories-vZvfsxg9.js +++ b/assets/multi-renderer.stories-vZvfsxg9.js @@ -1,4 +1,4 @@ -import{j as e,a as i,F as f}from"./jsx-runtime-FVsy8kgq.js";import{V as r}from"./index-6h5t6F0w.js";import{H as d}from"./index-h_CiYGGb.js";import{l as k}from"./index-awljIyHI.js";import{B as q}from"./choice-E4eyMygy.js";import{r as g}from"./index-TT1qJ6UJ.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import{s as l}from"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import{M as T}from"./multi-items-MzI04jIx.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{K as R}from"./ke-score-ui-xy7p6xf5.js";import{S as A}from"./side-by-side-kpK-8vW0.js";import{s as O}from"./test-dependencies-3HLxfOjs.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-k-0mNqHS.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./shared-3pf9YZIg.js";import"./answer-choices-vbrLThK4.js";import"./minus-bold-ONmDo3Ve.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./video-transcript-link-WVgIZGhp.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-Hmby24Jq.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./choice-none-above-o4v4BTO3.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./index-QCAhLhLD.js";import"./strings-OAjNfY6D.js";import"./bundle.esm-7jAAHVxW.js";import"./register-all-widgets-for-testing-fawnePoa.js";const x=l.shape({blurb:l.content,question:l.content,hints:l.hints}),h={_multi:{blurb:{__type:"content",content:"",images:{},widgets:{}},hints:[{__type:"hint",content:"If two triangles are congruent, then they have the same side lengths and angle measures.",images:{},replace:!1,widgets:{}},{__type:"hint",content:"A triangle congruent to triangle $ABC$ must also have side lengths of $12$, $14$ and $20$.",images:{},replace:!1,widgets:{}},{__type:"hint",content:`The following triangle is congruent to triangle $ABC$: +import{j as e,a as i,F as f}from"./jsx-runtime-FVsy8kgq.js";import{V as r}from"./index-6h5t6F0w.js";import{H as d}from"./index-h_CiYGGb.js";import{l as k}from"./index-awljIyHI.js";import{B as q}from"./choice-E4eyMygy.js";import{r as g}from"./index-TT1qJ6UJ.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import{s as l}from"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import{M as T}from"./multi-items-MzI04jIx.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{K as R}from"./ke-score-ui-xy7p6xf5.js";import{S as A}from"./side-by-side-kpK-8vW0.js";import{s as O}from"./test-dependencies-3HLxfOjs.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-0C4KXdeC.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./shared-3pf9YZIg.js";import"./answer-choices-vbrLThK4.js";import"./minus-bold-ONmDo3Ve.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./video-transcript-link-WVgIZGhp.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-Hmby24Jq.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./choice-none-above-o4v4BTO3.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./index-QCAhLhLD.js";import"./strings-OAjNfY6D.js";import"./bundle.esm-7jAAHVxW.js";import"./register-all-widgets-for-testing-fawnePoa.js";const x=l.shape({blurb:l.content,question:l.content,hints:l.hints}),h={_multi:{blurb:{__type:"content",content:"",images:{},widgets:{}},hints:[{__type:"hint",content:"If two triangles are congruent, then they have the same side lengths and angle measures.",images:{},replace:!1,widgets:{}},{__type:"hint",content:"A triangle congruent to triangle $ABC$ must also have side lengths of $12$, $14$ and $20$.",images:{},replace:!1,widgets:{}},{__type:"hint",content:`The following triangle is congruent to triangle $ABC$: * A triangle with side lengths of $12$, $14$, and $20$`,images:{},replace:!1,widgets:{}}],question:{__type:"content",content:`Triangle $ABC$ has side lengths of $12$, $14$, and $20$. Which of the following triangles is congruent to triangle $ABC$ ? diff --git a/assets/navigation-pad-ss7r0FKW.js b/assets/navigation-pad-ss7r0FKW.js index d4d475983f..ccbe24eae6 100644 --- a/assets/navigation-pad-ss7r0FKW.js +++ b/assets/navigation-pad-ss7r0FKW.js @@ -1,4 +1,4 @@ -import{j as e,a as b}from"./jsx-runtime-FVsy8kgq.js";import{V as s}from"./index-6h5t6F0w.js";import{c as i}from"./index-deFLJwr4.js";import{l}from"./index-awljIyHI.js";import{B as h,u as f,K as w}from"./button-assets-txIojR3b.js";import{C as k}from"./index-WNT3sUKf.js";function v(o){switch(o){case"UP":return t.up;case"RIGHT":return t.right;case"DOWN":return t.down;case"LEFT":return t.left;default:throw new Error(`Invalid key: ${o}`)}}function d({coord:o,keyConfig:r,onClickKey:u}){const a=r.id,p=v(a);return e(s,{style:{gridColumn:o[0]+1,gridRow:o[1]+1},children:e(k,{onClick:c=>u(r.id,c),style:t.clickable,"aria-label":r.ariaLabel,children:({hovered:c,focused:m,pressed:g})=>e(s,{style:t.outerBoxBase,children:e(s,{style:[t.base,p,c&&t.hovered,m&&t.focused,g&&t.pressed],children:e(h,{id:r.id})})})})})}const n=4,t=l.StyleSheet.create({clickable:{width:"100%",height:"100%",":focus":{outline:"none"}},outerBoxBase:{height:"100%",width:"100%"},base:{boxShadow:`0px 1px 0px ${i.offBlack32}`,display:"flex",justifyContent:"center",alignItems:"center",background:i.white,borderWidth:2,borderColor:i.white},up:{borderTopLeftRadius:n,borderTopRightRadius:n},right:{borderTopRightRadius:n,borderBottomRightRadius:n},down:{borderBottomLeftRadius:n,borderBottomRightRadius:n},left:{borderTopLeftRadius:n,borderBottomLeftRadius:n},hovered:{borderColor:i.blue,boxShadow:"none"},focused:{borderColor:i.blue,boxShadow:"none"},pressed:{border:"2px solid #1B50B3",background:`linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${i.white}`,boxShadow:"none"}});d.__docgenInfo={description:"",methods:[],displayName:"NavigationButton",props:{coord:{required:!0,tsType:{name:"unknown"},description:""},keyConfig:{required:!0,tsType:{name:"signature",type:"object",raw:`{ +import{j as e,a as b}from"./jsx-runtime-FVsy8kgq.js";import{V as s}from"./index-6h5t6F0w.js";import{c as i}from"./index-deFLJwr4.js";import{l}from"./index-awljIyHI.js";import{B as h,u as f,K as w}from"./button-assets-txIojR3b.js";import{C as k}from"./index-2dmvOE3q.js";function v(o){switch(o){case"UP":return t.up;case"RIGHT":return t.right;case"DOWN":return t.down;case"LEFT":return t.left;default:throw new Error(`Invalid key: ${o}`)}}function d({coord:o,keyConfig:r,onClickKey:u}){const a=r.id,p=v(a);return e(s,{style:{gridColumn:o[0]+1,gridRow:o[1]+1},children:e(k,{onClick:c=>u(r.id,c),style:t.clickable,"aria-label":r.ariaLabel,children:({hovered:c,focused:m,pressed:g})=>e(s,{style:t.outerBoxBase,children:e(s,{style:[t.base,p,c&&t.hovered,m&&t.focused,g&&t.pressed],children:e(h,{id:r.id})})})})})}const n=4,t=l.StyleSheet.create({clickable:{width:"100%",height:"100%",":focus":{outline:"none"}},outerBoxBase:{height:"100%",width:"100%"},base:{boxShadow:`0px 1px 0px ${i.offBlack32}`,display:"flex",justifyContent:"center",alignItems:"center",background:i.white,borderWidth:2,borderColor:i.white},up:{borderTopLeftRadius:n,borderTopRightRadius:n},right:{borderTopRightRadius:n,borderBottomRightRadius:n},down:{borderBottomLeftRadius:n,borderBottomRightRadius:n},left:{borderTopLeftRadius:n,borderBottomLeftRadius:n},hovered:{borderColor:i.blue,boxShadow:"none"},focused:{borderColor:i.blue,boxShadow:"none"},pressed:{border:"2px solid #1B50B3",background:`linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${i.white}`,boxShadow:"none"}});d.__docgenInfo={description:"",methods:[],displayName:"NavigationButton",props:{coord:{required:!0,tsType:{name:"unknown"},description:""},keyConfig:{required:!0,tsType:{name:"signature",type:"object",raw:`{ id: Key; type: KeyType; icon: IconConfig; diff --git a/assets/navigation-pad.stories-qTnieBG4.js b/assets/navigation-pad.stories-qTnieBG4.js index 8e83457c7c..ce908f3c6d 100644 --- a/assets/navigation-pad.stories-qTnieBG4.js +++ b/assets/navigation-pad.stories-qTnieBG4.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{a as n}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{N as e}from"./navigation-pad-ss7r0FKW.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./index-deFLJwr4.js";import"./button-assets-txIojR3b.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";const N={title:"math-input/components/MathInput v2 Navigation Pad",parameters:{backgrounds:{default:"light background",values:[{name:"light background",value:"lightgrey",default:!0}]}}};function t(){return i("div",{style:{padding:50},children:i(e,{onClickKey:n("onClickKey")})})}t.__docgenInfo={description:"",methods:[],displayName:"basic"};var a,o,r;t.parameters={...t.parameters,docs:{...(a=t.parameters)==null?void 0:a.docs,source:{originalSource:`function basic() { +import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{a as n}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{N as e}from"./navigation-pad-ss7r0FKW.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./index-deFLJwr4.js";import"./button-assets-txIojR3b.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";const N={title:"math-input/components/MathInput v2 Navigation Pad",parameters:{backgrounds:{default:"light background",values:[{name:"light background",value:"lightgrey",default:!0}]}}};function t(){return i("div",{style:{padding:50},children:i(e,{onClickKey:n("onClickKey")})})}t.__docgenInfo={description:"",methods:[],displayName:"basic"};var a,o,r;t.parameters={...t.parameters,docs:{...(a=t.parameters)==null?void 0:a.docs,source:{originalSource:`function basic() { return
diff --git a/assets/number-input-dpusjjfa.js b/assets/number-input-dpusjjfa.js index 2e51a1e61d..22276214e1 100644 --- a/assets/number-input-dpusjjfa.js +++ b/assets/number-input-dpusjjfa.js @@ -1 +1 @@ -import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{e as h,U as f,K as c}from"./util-XcxTwqb0.js";import{c as y}from"./index-dnMhQZ-1.js";import{_ as o,$ as g}from"./jquery-yG1GhClm.js";import{P as s}from"./index-k-0mNqHS.js";import{r as V}from"./index-TT1qJ6UJ.js";import{R as n}from"./index-7vsPyIck.js";import{P as v}from"./i18n-context-hxuRe8oU.js";const{firstNumericalParse:u,captureScratchpadTouchStart:k}=f,p=c.toNumericString,_=c.getNumericFormat,a=class a extends V.Component{constructor(){super(...arguments),this.state={format:this.props.format},this.getValue=()=>this.parseInputValue(n.findDOMNode(this.refs.input).value),this.getStringValue=()=>n.findDOMNode(this.refs.input).value.toString(),this.parseInputValue=e=>{if(e===""){const l=this.props.placeholder;return o.isFinite(l)?+l:null}const t=u(e,this.context.strings);return o.isFinite(t)?t:this.props.value},this.focus=()=>{n.findDOMNode(this.refs.input).focus(),this._handleFocus()},this.blur=()=>{n.findDOMNode(this.refs.input).blur(),this._handleBlur()},this.setSelectionRange=(e,t)=>{n.findDOMNode(this).setSelectionRange(e,t)},this.getSelectionStart=()=>n.findDOMNode(this).selectionStart,this.getSelectionEnd=()=>n.findDOMNode(this).selectionEnd,this._checkValidity=e=>{if(e==null)return!0;const t=u(e,this.context.strings),l=this.props.checkValidity;return o.isFinite(t)&&l(t)},this._handleChange=e=>{const t=e.target.value,l=this.parseInputValue(t),r=_(t);this.props.onChange(l),r&&(this.props.onFormatChange(l,r),this.setState({format:r}))},this._handleFocus=()=>{this.props.onFocus&&this.props.onFocus()},this._handleBlur=e=>{e&&e.type==="keypress"&&e.keyCode!==13||(this._setValue(this.props.value,this.state.format),this.props.onBlur&&this.props.onBlur())},this._onKeyDown=e=>{if(this.props.onKeyDown&&this.props.onKeyDown(e),!this.props.useArrowKeys||!o.contains(["ArrowUp","ArrowDown"],e.key))return;let t=this.getValue();t===Math.floor(t)&&(e.key==="ArrowUp"?t=t+1:e.key==="ArrowDown"&&(t=t-1),this._checkValidity(t)&&this.props.onChange(t))},this._setValue=(e,t)=>{g(n.findDOMNode(this.refs.input)).val(p(e,t))}}componentDidUpdate(e){h(this.getValue(),this.props.value)||this._setValue(this.props.value,this.state.format)}render(){let e=y({"number-input":!0,"invalid-input":!this._checkValidity(this.props.value),mini:this.props.size==="mini",small:this.props.size==="small",normal:this.props.size==="normal"});this.props.className!=null&&(e=e+" "+this.props.className);const{onFormatChange:t,checkValidity:l,useArrowKeys:r,...m}=this.props;return d("input",{...m,className:e,type:"text",ref:"input",onChange:this._handleChange,onFocus:this._handleFocus,onBlur:this._handleBlur,onKeyPress:this._handleBlur,onKeyDown:this._onKeyDown,onTouchStart:k,defaultValue:p(this.props.value,this.state.format),value:void 0})}};a.contextType=v,a.propTypes={value:s.number,format:s.string,placeholder:s.oneOfType([s.string,s.number]),onChange:s.func.isRequired,onFormatChange:s.func,checkValidity:s.func,size:s.string,label:s.oneOf(["put your labels outside your inputs!"])},a.defaultProps={value:null,placeholder:null,format:null,onFormatChange:()=>null,checkValidity:()=>!0,useArrowKeys:!1};let i=a;i.__docgenInfo={description:"",methods:[{name:"getValue",docblock:null,modifiers:[],params:[],returns:null},{name:"getStringValue",docblock:null,modifiers:[],params:[],returns:null},{name:"parseInputValue",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"blur",docblock:null,modifiers:[],params:[],returns:null},{name:"setSelectionRange",docblock:null,modifiers:[],params:[{name:"selectionStart",optional:!1,type:null},{name:"selectionEnd",optional:!1,type:null}],returns:null},{name:"getSelectionStart",docblock:null,modifiers:[],params:[],returns:null},{name:"getSelectionEnd",docblock:null,modifiers:[],params:[],returns:null},{name:"_checkValidity",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"_handleChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_handleFocus",docblock:null,modifiers:[],params:[],returns:null},{name:"_handleBlur",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_onKeyDown",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_setValue",docblock:null,modifiers:[],params:[{name:"val",optional:!1,type:null},{name:"format",optional:!1,type:null}],returns:null}],displayName:"NumberInput",props:{value:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},placeholder:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"union",value:[{name:"string"},{name:"number"}]},required:!1},format:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},onFormatChange:{defaultValue:{value:"() => null",computed:!1},description:"",type:{name:"func"},required:!1},checkValidity:{defaultValue:{value:"() => true",computed:!1},description:"",type:{name:"func"},required:!1},useArrowKeys:{defaultValue:{value:"false",computed:!1},required:!1},onChange:{description:"",type:{name:"func"},required:!0},size:{description:"",type:{name:"string"},required:!1},label:{description:"",type:{name:"enum",value:[{value:'"put your labels outside your inputs!"',computed:!1}]},required:!1}}};export{i as N}; +import{j as d}from"./jsx-runtime-FVsy8kgq.js";import{e as h,U as f,K as c}from"./util-XcxTwqb0.js";import{c as y}from"./index-dnMhQZ-1.js";import{_ as o,$ as g}from"./jquery-yG1GhClm.js";import{P as s}from"./index-0C4KXdeC.js";import{r as V}from"./index-TT1qJ6UJ.js";import{R as n}from"./index-7vsPyIck.js";import{P as v}from"./i18n-context-hxuRe8oU.js";const{firstNumericalParse:u,captureScratchpadTouchStart:k}=f,p=c.toNumericString,_=c.getNumericFormat,a=class a extends V.Component{constructor(){super(...arguments),this.state={format:this.props.format},this.getValue=()=>this.parseInputValue(n.findDOMNode(this.refs.input).value),this.getStringValue=()=>n.findDOMNode(this.refs.input).value.toString(),this.parseInputValue=e=>{if(e===""){const l=this.props.placeholder;return o.isFinite(l)?+l:null}const t=u(e,this.context.strings);return o.isFinite(t)?t:this.props.value},this.focus=()=>{n.findDOMNode(this.refs.input).focus(),this._handleFocus()},this.blur=()=>{n.findDOMNode(this.refs.input).blur(),this._handleBlur()},this.setSelectionRange=(e,t)=>{n.findDOMNode(this).setSelectionRange(e,t)},this.getSelectionStart=()=>n.findDOMNode(this).selectionStart,this.getSelectionEnd=()=>n.findDOMNode(this).selectionEnd,this._checkValidity=e=>{if(e==null)return!0;const t=u(e,this.context.strings),l=this.props.checkValidity;return o.isFinite(t)&&l(t)},this._handleChange=e=>{const t=e.target.value,l=this.parseInputValue(t),r=_(t);this.props.onChange(l),r&&(this.props.onFormatChange(l,r),this.setState({format:r}))},this._handleFocus=()=>{this.props.onFocus&&this.props.onFocus()},this._handleBlur=e=>{e&&e.type==="keypress"&&e.keyCode!==13||(this._setValue(this.props.value,this.state.format),this.props.onBlur&&this.props.onBlur())},this._onKeyDown=e=>{if(this.props.onKeyDown&&this.props.onKeyDown(e),!this.props.useArrowKeys||!o.contains(["ArrowUp","ArrowDown"],e.key))return;let t=this.getValue();t===Math.floor(t)&&(e.key==="ArrowUp"?t=t+1:e.key==="ArrowDown"&&(t=t-1),this._checkValidity(t)&&this.props.onChange(t))},this._setValue=(e,t)=>{g(n.findDOMNode(this.refs.input)).val(p(e,t))}}componentDidUpdate(e){h(this.getValue(),this.props.value)||this._setValue(this.props.value,this.state.format)}render(){let e=y({"number-input":!0,"invalid-input":!this._checkValidity(this.props.value),mini:this.props.size==="mini",small:this.props.size==="small",normal:this.props.size==="normal"});this.props.className!=null&&(e=e+" "+this.props.className);const{onFormatChange:t,checkValidity:l,useArrowKeys:r,...m}=this.props;return d("input",{...m,className:e,type:"text",ref:"input",onChange:this._handleChange,onFocus:this._handleFocus,onBlur:this._handleBlur,onKeyPress:this._handleBlur,onKeyDown:this._onKeyDown,onTouchStart:k,defaultValue:p(this.props.value,this.state.format),value:void 0})}};a.contextType=v,a.propTypes={value:s.number,format:s.string,placeholder:s.oneOfType([s.string,s.number]),onChange:s.func.isRequired,onFormatChange:s.func,checkValidity:s.func,size:s.string,label:s.oneOf(["put your labels outside your inputs!"])},a.defaultProps={value:null,placeholder:null,format:null,onFormatChange:()=>null,checkValidity:()=>!0,useArrowKeys:!1};let i=a;i.__docgenInfo={description:"",methods:[{name:"getValue",docblock:null,modifiers:[],params:[],returns:null},{name:"getStringValue",docblock:null,modifiers:[],params:[],returns:null},{name:"parseInputValue",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"blur",docblock:null,modifiers:[],params:[],returns:null},{name:"setSelectionRange",docblock:null,modifiers:[],params:[{name:"selectionStart",optional:!1,type:null},{name:"selectionEnd",optional:!1,type:null}],returns:null},{name:"getSelectionStart",docblock:null,modifiers:[],params:[],returns:null},{name:"getSelectionEnd",docblock:null,modifiers:[],params:[],returns:null},{name:"_checkValidity",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"_handleChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_handleFocus",docblock:null,modifiers:[],params:[],returns:null},{name:"_handleBlur",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_onKeyDown",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_setValue",docblock:null,modifiers:[],params:[{name:"val",optional:!1,type:null},{name:"format",optional:!1,type:null}],returns:null}],displayName:"NumberInput",props:{value:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},placeholder:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"union",value:[{name:"string"},{name:"number"}]},required:!1},format:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},onFormatChange:{defaultValue:{value:"() => null",computed:!1},description:"",type:{name:"func"},required:!1},checkValidity:{defaultValue:{value:"() => true",computed:!1},description:"",type:{name:"func"},required:!1},useArrowKeys:{defaultValue:{value:"false",computed:!1},required:!1},onChange:{description:"",type:{name:"func"},required:!0},size:{description:"",type:{name:"string"},required:!1},label:{description:"",type:{name:"enum",value:[{value:'"put your labels outside your inputs!"',computed:!1}]},required:!1}}};export{i as N}; diff --git a/assets/number-input.stories-upCNzoBF.js b/assets/number-input.stories-upCNzoBF.js index d058591fb9..6e48f2f2b6 100644 --- a/assets/number-input.stories-upCNzoBF.js +++ b/assets/number-input.stories-upCNzoBF.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{N as r}from"./number-input-dpusjjfa.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./index-dnMhQZ-1.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./index-7vsPyIck.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";const a={onChange:()=>{}},G={title:"Perseus/Components/Number Input"},o=t=>e(r,{...a}),s=t=>e(r,{...a,value:1234567890}),c=t=>e(r,{...a,placeholder:"Sample placeholder"}),m=t=>e(r,{...a,placeholder:"Sample placeholder"}),n=t=>e(r,{...a,size:"small"}),p=t=>e(r,{...a,size:"normal"});o.__docgenInfo={description:"",methods:[],displayName:"EmptyPropsObject"};s.__docgenInfo={description:"",methods:[],displayName:"SampleValue"};c.__docgenInfo={description:"",methods:[],displayName:"Placeholder"};m.__docgenInfo={description:"",methods:[],displayName:"SizeMini"};n.__docgenInfo={description:"",methods:[],displayName:"SizeSmall"};p.__docgenInfo={description:"",methods:[],displayName:"SizeNormal"};var l,i,d;o.parameters={...o.parameters,docs:{...(l=o.parameters)==null?void 0:l.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{N as r}from"./number-input-dpusjjfa.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./index-dnMhQZ-1.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./index-7vsPyIck.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";const a={onChange:()=>{}},G={title:"Perseus/Components/Number Input"},o=t=>e(r,{...a}),s=t=>e(r,{...a,value:1234567890}),c=t=>e(r,{...a,placeholder:"Sample placeholder"}),m=t=>e(r,{...a,placeholder:"Sample placeholder"}),n=t=>e(r,{...a,size:"small"}),p=t=>e(r,{...a,size:"normal"});o.__docgenInfo={description:"",methods:[],displayName:"EmptyPropsObject"};s.__docgenInfo={description:"",methods:[],displayName:"SampleValue"};c.__docgenInfo={description:"",methods:[],displayName:"Placeholder"};m.__docgenInfo={description:"",methods:[],displayName:"SizeMini"};n.__docgenInfo={description:"",methods:[],displayName:"SizeSmall"};p.__docgenInfo={description:"",methods:[],displayName:"SizeNormal"};var l,i,d;o.parameters={...o.parameters,docs:{...(l=o.parameters)==null?void 0:l.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(d=(i=o.parameters)==null?void 0:i.docs)==null?void 0:d.source}}};var u,g,S;s.parameters={...s.parameters,docs:{...(u=s.parameters)==null?void 0:u.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/number-line-editor-t3bGT3LG.js b/assets/number-line-editor-t3bGT3LG.js index a529660fc6..14c4df6ae2 100644 --- a/assets/number-line-editor-t3bGT3LG.js +++ b/assets/number-line-editor-t3bGT3LG.js @@ -1 +1 @@ -import{a as l,j as i}from"./jsx-runtime-FVsy8kgq.js";import{i as k}from"./util-XcxTwqb0.js";import"./article-renderer-o95CuJpS.js";import{_ as C}from"./jquery-yG1GhClm.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as w}from"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{E as R}from"./editor-jsonify-yP45H1ib.js";import{C as m}from"./index-QCAhLhLD.js";import{P as a}from"./index-0C4KXdeC.js";import{r as S}from"./index-TT1qJ6UJ.js";const{ButtonGroup:q,InfoTip:p,NumberInput:r,RangeInput:T}=w,N=(b,e,n)=>Math.min(Math.max(b,e),n),V="–",c=class c extends S.Component{constructor(){super(...arguments),this.onRangeChange=e=>{this.props.onChange({range:e})},this.onLabelRangeChange=(e,n)=>{let s=this.props.labelRange.slice();const o=s[1-e];n==null||o==null?s[e]=n:s=[Math.min(n,o),Math.max(n,o)],this.props.onChange({labelRange:s})},this.onDivisionRangeChange=e=>{let n=this.props.numDivisions;n=N(n,e[0],e[1]),this.props.onChange({divisionRange:e,numDivisions:n})},this.onNumChange=(e,n)=>{const s={};s[e]=n,this.props.onChange(s)},this.onNumDivisionsChange=e=>{const n=this.props.divisionRange.slice();e=C.isFinite(e)?Math.round(e):0,e=e<0?e*-1:e,e&&(e=Math.min(n[1],Math.max(n[0],e)),this.props.onChange({tickStep:null,divisionRange:n,numDivisions:e}))},this.onTickStepChange=e=>{this.props.onChange({numDivisions:null,tickStep:e})},this.onChangeRelation=e=>{const n=e.target.value;this.props.onChange({correctRel:n,isInequality:n!=="eq"})},this.onLabelStyleChange=e=>{this.props.onChange({labelStyle:e})},this.serialize=()=>R.serialize.call(this)}render(){const e=this.props.range,n=this.props.labelRange,s=this.props.divisionRange;e[0]=+e[0],e[1]=+e[1];const o=e[1]-e[0],y=this.props.numDivisions,u=this.props.snapDivisions,g=this.props.tickStep,d=this.props.isTickCtrl;let h;d?h=null:h=g?g/u:o/y/u;const v=[{value:"decimal",content:"0.75",title:"Decimals"},{value:"improper",content:"⁷⁄₄",title:"Improper fractions"},{value:"mixed",content:"1¾",title:"Mixed numbers"},{value:"non-reduced",content:"⁸⁄₄",title:"Non-reduced"}];return l("div",{className:"perseus-widget-number-line-editor",children:[l("div",{className:"perseus-widget-row",children:["Correct x"," ",l("select",{value:this.props.correctRel,onChange:this.onChangeRelation,"aria-label":"Select relationship",children:[i("option",{value:"eq","aria-label":"Equal",children:"="}),i("option",{value:"lt","aria-label":"Less than",children:"<"}),i("option",{value:"gt","aria-label":"Greater than",children:">"}),i("option",{value:"le","aria-label":"Less than or equal",children:"≤"}),i("option",{value:"ge","aria-label":"Greater than or equal",children:"≥"})]})," ",i(r,{value:this.props.correctX,format:this.props.labelStyle,onChange:this.onNumChange.bind(this,"correctX"),checkValidity:t=>t>=e[0]&&t<=e[1]&&(!h||k((t-e[0])/h)),placeholder:"answer",size:"normal",useArrowKeys:!0}),i(p,{children:i("p",{children:"This is the correct answer. The answer is validated (as right or wrong) by using only the end position of the point and the relation (=, <, >, ≤, ≥)."})})]}),l("div",{className:"perseus-widget-row",children:[this.props.static?i("label",{children:"Range:"}):l("label",{children:["Position:"," ",i(r,{value:this.props.initialX,format:this.props.labelStyle,onChange:this.onNumChange.bind(this,"initialX"),placeholder:e[0],checkValidity:t=>t>=e[0]&&t<=e[1],useArrowKeys:!0})," ∈ "]}),i(T,{value:e,onChange:this.onRangeChange,format:this.props.labelStyle,useArrowKeys:!0}),l(p,{children:[l("p",{children:["This controls the initial position of the point along the number line and the",i("strong",{children:"range"}),", the position of the endpoints of the number line. Setting the range constrains the position of the answer and the labels."]}),i("p",{children:"In static mode, the initial position of the point is determined by Correct x instead of position."})]})]}),i("div",{className:"perseus-widget-row",children:l("div",{className:"perseus-widget-left-col",children:["Labels:"," ",i(r,{value:n[0],placeholder:e[0],format:this.props.labelStyle,checkValidity:t=>t>=e[0]&&t<=e[1],onChange:this.onLabelRangeChange.bind(this,0),useArrowKeys:!0}),i("span",{children:" & "}),i(r,{value:n[1],placeholder:e[1],format:this.props.labelStyle,checkValidity:t=>t>=e[0]&&t<=e[1],onChange:this.onLabelRangeChange.bind(this,1),useArrowKeys:!0}),i(p,{children:l("p",{children:["This controls the position of the left / right labels. By default, the labels are set by the range ",i("br",{}),i("strong",{children:"Note:"})," Ensure that the labels line up with the tick marks, or it may be confusing for users."]})})]})}),l("div",{className:"perseus-widget-row",children:["Style:"," ",i(q,{allowEmpty:!1,value:this.props.labelStyle,buttons:v,onChange:this.onLabelStyleChange}),i(p,{children:i("p",{children:"This controls the styling of the labels for the two main labels as well as all the tick mark labels, if applicable. Your choices are decimal, improper fractions, mixed fractions, and non-reduced fractions."})})]}),l("div",{className:"perseus-widget-row",children:[!this.props.static&&i("div",{className:"perseus-widget-left-col",children:i(m,{label:"Show tick controller",checked:this.props.isTickCtrl,onChange:t=>{this.props.onChange({isTickCtrl:t})}})}),i("div",{className:"perseus-widget-right-col",children:i(m,{label:"Show label ticks",checked:this.props.labelTicks,onChange:t=>{this.props.onChange({labelTicks:t})}})})]}),i("div",{className:"perseus-widget-row",children:!this.props.static&&i(m,{label:"Show tooltips",checked:this.props.showTooltips,onChange:t=>{this.props.onChange({showTooltips:t})}})}),l("div",{className:"perseus-widget-row",children:[d&&l("span",{children:[l("label",{children:["Start num divisions at"," ",i(r,{value:this.props.numDivisions||null,format:"decimal",onChange:this.onNumDivisionsChange,checkValidity:t=>t>=s[0]&&t<=s[1],placeholder:o/this.props.tickStep,useArrowKeys:!0})]}),i(p,{children:l("p",{children:["This controls the number (and position) of the tick marks. The number of divisions is constrained to"," "+s[0]+V+s[1],".",i("br",{}),i("strong",{children:"Note:"})," The user will be able to specify the number of divisions in a number input."]})})]}),!d&&l("span",{children:[l("label",{children:["Num divisions:"," ",i(r,{value:this.props.numDivisions||null,format:"decimal",onChange:this.onNumDivisionsChange,checkValidity:t=>t>=s[0]&&t<=s[1],placeholder:o/this.props.tickStep,useArrowKeys:!0})]})," ",l("label",{children:["or tick step:"," ",i(r,{value:this.props.tickStep||null,format:this.props.labelStyle,onChange:this.onTickStepChange,checkValidity:t=>t>0&&t<=o,placeholder:o/this.props.numDivisions,useArrowKeys:!0})]}),i(p,{children:l("p",{children:["This controls the number (and position) of the tick marks; you can either set the number of divisions (2 divisions would split the entire range in two halves), or the tick step (the distance between ticks) and the other value will be updated accordingly."," ",i("br",{}),i("strong",{children:"Note:"})," There is no check to see if labels coordinate with the tick marks, which may be confusing for users if the blue labels and black ticks are off-step."]})})]})]}),l("div",{className:"perseus-widget-row",children:[l("label",{children:["Snap increments per tick:"," ",i(r,{value:u,checkValidity:t=>t>0,format:this.props.labelStyle,onChange:this.onNumChange.bind(this,"snapDivisions"),useArrowKeys:!0})]}),i(p,{children:l("p",{children:["This determines the number of different places the point will snap between two adjacent tick marks."," ",i("br",{}),i("strong",{children:"Note:"}),"Ensure the required number of snap increments is provided to answer the question."]})})]})]})}};c.propTypes={range:a.arrayOf(a.number).isRequired,labelRange:a.arrayOf(a.number).isRequired,labelStyle:a.string.isRequired,labelTicks:a.bool,divisionRange:a.arrayOf(a.number).isRequired,numDivisions:a.number.isRequired,snapDivisions:a.number,tickStep:a.number,correctRel:a.oneOf(["lt","gt","le","ge","eq"]),correctX:a.number,initialX:a.number,isTickCtrl:a.bool,onChange:a.func.isRequired,static:a.bool,showTooltips:a.bool},c.widgetName="number-line",c.defaultProps={range:[0,10],labelRange:[null,null],labelStyle:"decimal",labelTicks:!0,divisionRange:[1,12],numDivisions:5,snapDivisions:2,tickStep:null,correctRel:"eq",correctX:null,initialX:null,showTooltips:!1};let f=c;f.__docgenInfo={description:"",methods:[{name:"onRangeChange",docblock:null,modifiers:[],params:[{name:"range",optional:!1,type:null}],returns:null},{name:"onLabelRangeChange",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null},{name:"num",optional:!1,type:null}],returns:null},{name:"onDivisionRangeChange",docblock:null,modifiers:[],params:[{name:"divisionRange",optional:!1,type:null}],returns:null},{name:"onNumChange",docblock:null,modifiers:[],params:[{name:"key",optional:!1,type:null},{name:"value",optional:!1,type:null}],returns:null},{name:"onNumDivisionsChange",docblock:null,modifiers:[],params:[{name:"numDivisions",optional:!1,type:null}],returns:null},{name:"onTickStepChange",docblock:null,modifiers:[],params:[{name:"tickStep",optional:!1,type:null}],returns:null},{name:"onChangeRelation",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"onLabelStyleChange",docblock:null,modifiers:[],params:[{name:"labelStyle",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"NumberLineEditor",props:{range:{defaultValue:{value:"[0, 10]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},labelRange:{defaultValue:{value:"[null, null]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},labelStyle:{defaultValue:{value:'"decimal"',computed:!1},description:"",type:{name:"string"},required:!1},labelTicks:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},divisionRange:{defaultValue:{value:"[1, 12]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},numDivisions:{defaultValue:{value:"5",computed:!1},description:"",type:{name:"number"},required:!1},snapDivisions:{defaultValue:{value:"2",computed:!1},description:"",type:{name:"number"},required:!1},tickStep:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},correctRel:{defaultValue:{value:'"eq"',computed:!1},description:"",type:{name:"enum",value:[{value:'"lt"',computed:!1},{value:'"gt"',computed:!1},{value:'"le"',computed:!1},{value:'"ge"',computed:!1},{value:'"eq"',computed:!1}]},required:!1},correctX:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},initialX:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},showTooltips:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},isTickCtrl:{description:"",type:{name:"bool"},required:!1},onChange:{description:"",type:{name:"func"},required:!0},static:{description:"",type:{name:"bool"},required:!1}}};export{f as N}; +import{a as l,j as i}from"./jsx-runtime-FVsy8kgq.js";import{i as k}from"./util-XcxTwqb0.js";import"./article-renderer-o95CuJpS.js";import{_ as C}from"./jquery-yG1GhClm.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as w}from"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{E as R}from"./editor-jsonify-yP45H1ib.js";import{C as m}from"./index-QCAhLhLD.js";import{P as a}from"./index-k-0mNqHS.js";import{r as S}from"./index-TT1qJ6UJ.js";const{ButtonGroup:q,InfoTip:p,NumberInput:r,RangeInput:T}=w,N=(b,e,n)=>Math.min(Math.max(b,e),n),V="–",c=class c extends S.Component{constructor(){super(...arguments),this.onRangeChange=e=>{this.props.onChange({range:e})},this.onLabelRangeChange=(e,n)=>{let s=this.props.labelRange.slice();const o=s[1-e];n==null||o==null?s[e]=n:s=[Math.min(n,o),Math.max(n,o)],this.props.onChange({labelRange:s})},this.onDivisionRangeChange=e=>{let n=this.props.numDivisions;n=N(n,e[0],e[1]),this.props.onChange({divisionRange:e,numDivisions:n})},this.onNumChange=(e,n)=>{const s={};s[e]=n,this.props.onChange(s)},this.onNumDivisionsChange=e=>{const n=this.props.divisionRange.slice();e=C.isFinite(e)?Math.round(e):0,e=e<0?e*-1:e,e&&(e=Math.min(n[1],Math.max(n[0],e)),this.props.onChange({tickStep:null,divisionRange:n,numDivisions:e}))},this.onTickStepChange=e=>{this.props.onChange({numDivisions:null,tickStep:e})},this.onChangeRelation=e=>{const n=e.target.value;this.props.onChange({correctRel:n,isInequality:n!=="eq"})},this.onLabelStyleChange=e=>{this.props.onChange({labelStyle:e})},this.serialize=()=>R.serialize.call(this)}render(){const e=this.props.range,n=this.props.labelRange,s=this.props.divisionRange;e[0]=+e[0],e[1]=+e[1];const o=e[1]-e[0],y=this.props.numDivisions,u=this.props.snapDivisions,g=this.props.tickStep,d=this.props.isTickCtrl;let h;d?h=null:h=g?g/u:o/y/u;const v=[{value:"decimal",content:"0.75",title:"Decimals"},{value:"improper",content:"⁷⁄₄",title:"Improper fractions"},{value:"mixed",content:"1¾",title:"Mixed numbers"},{value:"non-reduced",content:"⁸⁄₄",title:"Non-reduced"}];return l("div",{className:"perseus-widget-number-line-editor",children:[l("div",{className:"perseus-widget-row",children:["Correct x"," ",l("select",{value:this.props.correctRel,onChange:this.onChangeRelation,"aria-label":"Select relationship",children:[i("option",{value:"eq","aria-label":"Equal",children:"="}),i("option",{value:"lt","aria-label":"Less than",children:"<"}),i("option",{value:"gt","aria-label":"Greater than",children:">"}),i("option",{value:"le","aria-label":"Less than or equal",children:"≤"}),i("option",{value:"ge","aria-label":"Greater than or equal",children:"≥"})]})," ",i(r,{value:this.props.correctX,format:this.props.labelStyle,onChange:this.onNumChange.bind(this,"correctX"),checkValidity:t=>t>=e[0]&&t<=e[1]&&(!h||k((t-e[0])/h)),placeholder:"answer",size:"normal",useArrowKeys:!0}),i(p,{children:i("p",{children:"This is the correct answer. The answer is validated (as right or wrong) by using only the end position of the point and the relation (=, <, >, ≤, ≥)."})})]}),l("div",{className:"perseus-widget-row",children:[this.props.static?i("label",{children:"Range:"}):l("label",{children:["Position:"," ",i(r,{value:this.props.initialX,format:this.props.labelStyle,onChange:this.onNumChange.bind(this,"initialX"),placeholder:e[0],checkValidity:t=>t>=e[0]&&t<=e[1],useArrowKeys:!0})," ∈ "]}),i(T,{value:e,onChange:this.onRangeChange,format:this.props.labelStyle,useArrowKeys:!0}),l(p,{children:[l("p",{children:["This controls the initial position of the point along the number line and the",i("strong",{children:"range"}),", the position of the endpoints of the number line. Setting the range constrains the position of the answer and the labels."]}),i("p",{children:"In static mode, the initial position of the point is determined by Correct x instead of position."})]})]}),i("div",{className:"perseus-widget-row",children:l("div",{className:"perseus-widget-left-col",children:["Labels:"," ",i(r,{value:n[0],placeholder:e[0],format:this.props.labelStyle,checkValidity:t=>t>=e[0]&&t<=e[1],onChange:this.onLabelRangeChange.bind(this,0),useArrowKeys:!0}),i("span",{children:" & "}),i(r,{value:n[1],placeholder:e[1],format:this.props.labelStyle,checkValidity:t=>t>=e[0]&&t<=e[1],onChange:this.onLabelRangeChange.bind(this,1),useArrowKeys:!0}),i(p,{children:l("p",{children:["This controls the position of the left / right labels. By default, the labels are set by the range ",i("br",{}),i("strong",{children:"Note:"})," Ensure that the labels line up with the tick marks, or it may be confusing for users."]})})]})}),l("div",{className:"perseus-widget-row",children:["Style:"," ",i(q,{allowEmpty:!1,value:this.props.labelStyle,buttons:v,onChange:this.onLabelStyleChange}),i(p,{children:i("p",{children:"This controls the styling of the labels for the two main labels as well as all the tick mark labels, if applicable. Your choices are decimal, improper fractions, mixed fractions, and non-reduced fractions."})})]}),l("div",{className:"perseus-widget-row",children:[!this.props.static&&i("div",{className:"perseus-widget-left-col",children:i(m,{label:"Show tick controller",checked:this.props.isTickCtrl,onChange:t=>{this.props.onChange({isTickCtrl:t})}})}),i("div",{className:"perseus-widget-right-col",children:i(m,{label:"Show label ticks",checked:this.props.labelTicks,onChange:t=>{this.props.onChange({labelTicks:t})}})})]}),i("div",{className:"perseus-widget-row",children:!this.props.static&&i(m,{label:"Show tooltips",checked:this.props.showTooltips,onChange:t=>{this.props.onChange({showTooltips:t})}})}),l("div",{className:"perseus-widget-row",children:[d&&l("span",{children:[l("label",{children:["Start num divisions at"," ",i(r,{value:this.props.numDivisions||null,format:"decimal",onChange:this.onNumDivisionsChange,checkValidity:t=>t>=s[0]&&t<=s[1],placeholder:o/this.props.tickStep,useArrowKeys:!0})]}),i(p,{children:l("p",{children:["This controls the number (and position) of the tick marks. The number of divisions is constrained to"," "+s[0]+V+s[1],".",i("br",{}),i("strong",{children:"Note:"})," The user will be able to specify the number of divisions in a number input."]})})]}),!d&&l("span",{children:[l("label",{children:["Num divisions:"," ",i(r,{value:this.props.numDivisions||null,format:"decimal",onChange:this.onNumDivisionsChange,checkValidity:t=>t>=s[0]&&t<=s[1],placeholder:o/this.props.tickStep,useArrowKeys:!0})]})," ",l("label",{children:["or tick step:"," ",i(r,{value:this.props.tickStep||null,format:this.props.labelStyle,onChange:this.onTickStepChange,checkValidity:t=>t>0&&t<=o,placeholder:o/this.props.numDivisions,useArrowKeys:!0})]}),i(p,{children:l("p",{children:["This controls the number (and position) of the tick marks; you can either set the number of divisions (2 divisions would split the entire range in two halves), or the tick step (the distance between ticks) and the other value will be updated accordingly."," ",i("br",{}),i("strong",{children:"Note:"})," There is no check to see if labels coordinate with the tick marks, which may be confusing for users if the blue labels and black ticks are off-step."]})})]})]}),l("div",{className:"perseus-widget-row",children:[l("label",{children:["Snap increments per tick:"," ",i(r,{value:u,checkValidity:t=>t>0,format:this.props.labelStyle,onChange:this.onNumChange.bind(this,"snapDivisions"),useArrowKeys:!0})]}),i(p,{children:l("p",{children:["This determines the number of different places the point will snap between two adjacent tick marks."," ",i("br",{}),i("strong",{children:"Note:"}),"Ensure the required number of snap increments is provided to answer the question."]})})]})]})}};c.propTypes={range:a.arrayOf(a.number).isRequired,labelRange:a.arrayOf(a.number).isRequired,labelStyle:a.string.isRequired,labelTicks:a.bool,divisionRange:a.arrayOf(a.number).isRequired,numDivisions:a.number.isRequired,snapDivisions:a.number,tickStep:a.number,correctRel:a.oneOf(["lt","gt","le","ge","eq"]),correctX:a.number,initialX:a.number,isTickCtrl:a.bool,onChange:a.func.isRequired,static:a.bool,showTooltips:a.bool},c.widgetName="number-line",c.defaultProps={range:[0,10],labelRange:[null,null],labelStyle:"decimal",labelTicks:!0,divisionRange:[1,12],numDivisions:5,snapDivisions:2,tickStep:null,correctRel:"eq",correctX:null,initialX:null,showTooltips:!1};let f=c;f.__docgenInfo={description:"",methods:[{name:"onRangeChange",docblock:null,modifiers:[],params:[{name:"range",optional:!1,type:null}],returns:null},{name:"onLabelRangeChange",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null},{name:"num",optional:!1,type:null}],returns:null},{name:"onDivisionRangeChange",docblock:null,modifiers:[],params:[{name:"divisionRange",optional:!1,type:null}],returns:null},{name:"onNumChange",docblock:null,modifiers:[],params:[{name:"key",optional:!1,type:null},{name:"value",optional:!1,type:null}],returns:null},{name:"onNumDivisionsChange",docblock:null,modifiers:[],params:[{name:"numDivisions",optional:!1,type:null}],returns:null},{name:"onTickStepChange",docblock:null,modifiers:[],params:[{name:"tickStep",optional:!1,type:null}],returns:null},{name:"onChangeRelation",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"onLabelStyleChange",docblock:null,modifiers:[],params:[{name:"labelStyle",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"NumberLineEditor",props:{range:{defaultValue:{value:"[0, 10]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},labelRange:{defaultValue:{value:"[null, null]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},labelStyle:{defaultValue:{value:'"decimal"',computed:!1},description:"",type:{name:"string"},required:!1},labelTicks:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},divisionRange:{defaultValue:{value:"[1, 12]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},numDivisions:{defaultValue:{value:"5",computed:!1},description:"",type:{name:"number"},required:!1},snapDivisions:{defaultValue:{value:"2",computed:!1},description:"",type:{name:"number"},required:!1},tickStep:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},correctRel:{defaultValue:{value:'"eq"',computed:!1},description:"",type:{name:"enum",value:[{value:'"lt"',computed:!1},{value:'"gt"',computed:!1},{value:'"le"',computed:!1},{value:'"ge"',computed:!1},{value:'"eq"',computed:!1}]},required:!1},correctX:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},initialX:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},showTooltips:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},isTickCtrl:{description:"",type:{name:"bool"},required:!1},onChange:{description:"",type:{name:"func"},required:!0},static:{description:"",type:{name:"bool"},required:!1}}};export{f as N}; diff --git a/assets/number-line-editor.stories-hRWWl3QQ.js b/assets/number-line-editor.stories-hRWWl3QQ.js index e5f0d188df..afbdd4b962 100644 --- a/assets/number-line-editor.stories-hRWWl3QQ.js +++ b/assets/number-line-editor.stories-hRWWl3QQ.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{N as e}from"./number-line-editor-t3bGT3LG.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./article-renderer-o95CuJpS.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./editor-jsonify-yP45H1ib.js";import"./index-0C4KXdeC.js";const oo={title:"PerseusEditor/Widgets/Number Line Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{N as e}from"./number-line-editor-t3bGT3LG.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./article-renderer-o95CuJpS.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./editor-jsonify-yP45H1ib.js";import"./index-k-0mNqHS.js";const oo={title:"PerseusEditor/Widgets/Number Line Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(t=r.parameters)==null?void 0:t.docs)==null?void 0:i.source}}};const to=["Default"];export{r as Default,to as __namedExportsOrder,oo as default}; diff --git a/assets/number-line.stories-iMYV5V1B.js b/assets/number-line.stories-iMYV5V1B.js index 0e8f9615be..4193057ce5 100644 --- a/assets/number-line.stories-iMYV5V1B.js +++ b/assets/number-line.stories-iMYV5V1B.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{a as q}from"./mobile-keypad-hKjeQGNp.js";import{R as m}from"./renderer-with-debug-ui-o6OVhJgg.js";import{S as C}from"./server-item-renderer-with-debug-ui-G785FGTt.js";import{T as k}from"./test-keypad-context-wrapper-UieRILfg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./choice-E4eyMygy.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./ke-score-ui-xy7p6xf5.js";import"./test-dependencies-3HLxfOjs.js";import"./chunk-WFFRPTHA-zlNDxfrq.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";const T={content:`$E=2.5$ +import{j as e}from"./jsx-runtime-FVsy8kgq.js";import{a as q}from"./mobile-keypad-hKjeQGNp.js";import{R as m}from"./renderer-with-debug-ui-o6OVhJgg.js";import{S as C}from"./server-item-renderer-with-debug-ui-G785FGTt.js";import{T as k}from"./test-keypad-context-wrapper-UieRILfg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./choice-E4eyMygy.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./ke-score-ui-xy7p6xf5.js";import"./test-dependencies-3HLxfOjs.js";import"./chunk-WFFRPTHA-zlNDxfrq.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";const T={content:`$E=2.5$ **Move the dot to $-E$ on the number line.** diff --git a/assets/numeric-input-editor-QUZ56KMx.js b/assets/numeric-input-editor-QUZ56KMx.js index ec0abe25d3..1e81277423 100644 --- a/assets/numeric-input-editor-QUZ56KMx.js +++ b/assets/numeric-input-editor-QUZ56KMx.js @@ -1,4 +1,4 @@ -import{a,j as e}from"./jsx-runtime-FVsy8kgq.js";import{c as E}from"./article-renderer-o95CuJpS.js";import{_ as o}from"./jquery-yG1GhClm.js";import{U as F}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as O}from"./components-0kNWnYe6.js";import{I as D}from"./icon-paths-AuJwhOz7.js";import"./index-k-0mNqHS.js";import{P as I}from"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{E as z}from"./editor-jsonify-yP45H1ib.js";import{C as y}from"./index-QCAhLhLD.js";import{r as P}from"./index-TT1qJ6UJ.js";import{E as R}from"./editor-SZLWA5DH.js";const{ButtonGroup:A,InfoTip:d,InlineIcon:N,MultiButtonGroup:M,NumberInput:v,TextInput:j}=O,{iconGear:U,iconTrash:V}=D,{firstNumericalParse:k}=F,W=[{title:"Integers",value:"integer",content:"6"},{title:"Decimals",value:"decimal",content:"0.75"},{title:"Proper fractions",value:"proper",content:"⅗"},{title:"Improper fractions",value:"improper",content:"⁷⁄₄"},{title:"Mixed numbers",value:"mixed",content:"1¾"},{title:"Numbers with π",value:"pi",content:"π"}],b=T=>({value:null,status:T,message:"",simplify:"required",answerForms:[],strict:!1,maxError:null}),m=class m extends P.Component{constructor(p){super(p),this.change=(...t)=>E.apply(this,t),this.onToggleOptions=t=>{const r=this.state.showOptions.slice();r[t]=!r[t],this.setState({showOptions:r})},this.onTrashAnswer=t=>{if(t>=0&&t{t.key===" "&&(t.preventDefault(),r.apply(this,l))},this.onStatusChange=t=>{const r=["wrong","ungraded","correct"],l=this.props.answers,c=o.indexOf(r,l[t].status),u=r[(c+1)%r.length];this.updateAnswer(t,{status:u,simplify:u==="correct"?"required":"accepted"})},this.updateAnswer=(t,r)=>{if(!o.isObject(r))return o.partial((c,u,w)=>{const h={};h[u]=w,this.updateAnswer(c,h)},t,r);let l=[...this.props.answers];if(t===l.length){const c=b(this.state.lastStatus);l=l.concat(c)}l[t]=o.extend({},l[t],r),this.props.onChange({answers:l})},this.addAnswer=()=>{const t=b(this.state.lastStatus),r=this.props.answers.concat(t);this.props.onChange({answers:r})},this.getSaveWarnings=()=>{const t=[];return o.contains(o.pluck(this.props.answers,"value"),"")&&t.push("One or more answers is empty"),this.props.answers.forEach((r,l)=>{r.strict&&(!r.answerForms||r.answerForms.length===0)&&t.push(`Answer ${l+1} is set to string format matching, but no format was selected`)}),t},this.serialize=()=>z.serialize.call(this),this.state={lastStatus:"wrong",showOptions:o.map(this.props.answers,()=>!1)}}render(){const p=this.props.answers,t=n=>a("div",{className:"perseus-widget-row",children:[e("label",{children:"Unsimplified answers are"}),e(A,{value:p[n].simplify,allowEmpty:!1,buttons:[{value:"required",content:"ungraded"},{value:"optional",content:"accepted"},{value:"enforced",content:"wrong"}],onChange:this.updateAnswer(n,"simplify")||(()=>{})}),a(d,{children:[e("p",{children:'Normally select "ungraded". This will give the user a message saying the answer is correct but not simplified. The user will then have to simplify it and re-enter, but will not be penalized. (5th grade and after)'}),e("p",{children:'Select "accepted" only if the user is not expected to know how to simplify fractions yet. (Anything prior to 5th grade)'}),a("p",{children:['Select "wrong" ',e("em",{children:"only"})," if we are specifically assessing the ability to simplify."]})]})]}),r=n=>a("div",{children:[a("div",{className:"perseus-widget-row",children:[e("label",{children:"Choose the suggested answer formats"}),e(M,{buttons:W,values:p[n].answerForms,onChange:this.updateAnswer(n,"answerForms")||(()=>{})}),a(d,{children:[e("p",{children:'Formats will be autoselected for you based on the given answer; to show no suggested formats and accept all types, simply have a decimal/integer be the answer. Values with π will have format "pi", and values that are fractions will have some subset (mixed will be "mixed" and "proper"; improper/proper will both be "improper" and "proper"). If you would like to specify that it is only a proper fraction (or only a mixed/improper fraction), deselect the other format. Except for specific cases, you should not need to change the autoselected formats.'}),a("p",{children:["To restrict the answer to ",e("em",{children:"only"}),' an improper fraction (i.e. 7/4), select the improper fraction and toggle "strict" to true. This ',e("b",{children:"will not"})," ","accept 1.75 as an answer."," "]}),e("p",{children:"Unless you are testing that specific skill, please do not restrict the answer format."})]})]}),e("div",{className:"perseus-widget-row",children:e(y,{label:"Strictly match only these formats",checked:p[n].strict,onChange:i=>{this.updateAnswer.bind(this,n)({strict:i})}})})]}),l=n=>e("div",{className:"perseus-widget-row",children:a("label",{children:["Max error"," ",e(v,{className:"max-error",value:p[n].maxError,onChange:this.updateAnswer(n,"maxError"),placeholder:"0"})]})}),c=a("div",{className:"perseus-widget-row",children:[e("label",{children:"Width: "}),e(A,{value:this.props.size,allowEmpty:!1,buttons:[{value:"normal",content:"Normal (80px)"},{value:"small",content:"Small (40px)"}],onChange:this.change("size")}),e(d,{children:e("p",{children:'Use size "Normal" for all text boxes, unless there are multiple text boxes in one line and the answer area is too narrow to fit them.'})})]}),u=e("div",{className:"perseus-widget-row",children:e(y,{label:"Right alignment",checked:this.props.rightAlign,onChange:n=>{this.props.onChange({rightAlign:n})}})}),w=a("div",{className:"perseus-widget-row",children:[a("label",{children:["Aria label",e(j,{value:this.props.labelText,onChange:this.change("labelText")})]}),e(d,{children:e("p",{children:"Text to describe this input. This will be shown to users using screenreaders."})})]}),h=e("div",{children:a("div",{className:"perseus-widget-row",children:[e(y,{label:"Coefficient",checked:this.props.coefficient,onChange:n=>{this.props.onChange({coefficient:n})}}),e(d,{children:e("p",{children:"A coefficient style number allows the student to use - for -1 and an empty string to mean 1."})})]})}),C=e("div",{children:e("a",{href:"#",className:"simple-button orange",onClick:n=>{n.preventDefault(),this.addAnswer()},onKeyDown:n=>this.onSpace(n,this.addAnswer),children:e("span",{children:"Add new answer"})})}),q={wrong:"(address the mistake/misconception)",ungraded:"(explain in detail to avoid confusion)",correct:"(reinforce the user's understanding)"};return a("div",{className:"perseus-input-number-editor",children:[e("div",{className:"ui-title",children:"User input"}),e("div",{className:"msg-title",children:"Message shown to user on attempt"}),p.map((n,i)=>{const S=e(R,{apiOptions:this.props.apiOptions,content:n.message||"",placeholder:"Why is this answer "+n.status+"? "+q[n.status],widgetEnabled:!1,onChange:s=>{"content"in s&&this.updateAnswer(i,{message:s.content})}});return a("div",{className:"perseus-widget-row",children:[a("div",{className:"input-answer-editor-value-container"+(n.maxError?" with-max-error":""),children:[e(v,{value:n.value,className:"numeric-input-value",placeholder:"answer",format:o.last(n.answerForms||[]),onFormatChange:(s,f)=>{let g;f==="pi"?g=["pi"]:f==="mixed"?g=["proper","mixed"]:(f==="proper"||f==="improper")&&(g=["proper","improper"]),this.updateAnswer(i,{value:k(s,this.context.strings),answerForms:g})},onChange:s=>{this.updateAnswer(i,{value:k(s,this.context.strings)})}}),n.strict&&e("div",{className:"is-strict-indicator",title:"strictly equivalent to",children:"≡"}),n.simplify!=="required"&&n.status==="correct"&&e("div",{className:"simplify-indicator "+n.simplify,title:"accepts unsimplified answers",children:"‰"}),n.maxError?a("div",{className:"max-error-container",children:[e("div",{className:"max-error-plusmn",children:"±"}),e(v,{placeholder:0,value:p[i].maxError,format:o.last(n.answerForms||[]),onChange:this.updateAnswer(i,"maxError")})]}):null,e("div",{className:"value-divider"}),e("a",{href:"#",className:"answer-status "+n.status,onClick:s=>{s.preventDefault(),this.onStatusChange(i)},onKeyDown:s=>this.onSpace(s,this.onStatusChange),children:n.status}),e("a",{href:"#",className:"answer-trash","aria-label":"Delete answer",onClick:s=>{s.preventDefault(),this.onTrashAnswer(i)},onKeyDown:s=>this.onSpace(s,this.onTrashAnswer),children:e(N,{...V})}),e("a",{href:"#",className:"options-toggle","aria-label":"Toggle options",onClick:s=>{s.preventDefault(),this.onToggleOptions(i)},onKeyDown:s=>this.onSpace(s,this.onToggleOptions),children:e(N,{...U})})]}),e("div",{className:"input-answer-editor-message",children:S}),this.state.showOptions[i]&&a("div",{className:"options-container",children:[l(i),n.status==="correct"&&t(i),r(i)]})]},i)}),C,c,u,h,w]})}};m.contextType=I,m.widgetName="numeric-input",m.displayName="NumericInputEditor",m.defaultProps={answers:[b("correct")],size:"normal",coefficient:!1,labelText:"",rightAlign:!1};let x=m;x.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"onToggleOptions",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"onTrashAnswer",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"onSpace",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null},{name:"callback",optional:!1,type:null},{name:"...args",optional:!1,type:null}],returns:null},{name:"onStatusChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"updateAnswer",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"update",optional:!1,type:null}],returns:null},{name:"addAnswer",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"NumericInputEditor",props:{answers:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ +import{a,j as e}from"./jsx-runtime-FVsy8kgq.js";import{c as E}from"./article-renderer-o95CuJpS.js";import{_ as o}from"./jquery-yG1GhClm.js";import{U as F}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as O}from"./components-0kNWnYe6.js";import{I as D}from"./icon-paths-AuJwhOz7.js";import"./index-0C4KXdeC.js";import{P as I}from"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{E as z}from"./editor-jsonify-yP45H1ib.js";import{C as y}from"./index-QCAhLhLD.js";import{r as P}from"./index-TT1qJ6UJ.js";import{E as R}from"./editor-SZLWA5DH.js";const{ButtonGroup:A,InfoTip:d,InlineIcon:N,MultiButtonGroup:M,NumberInput:v,TextInput:j}=O,{iconGear:U,iconTrash:V}=D,{firstNumericalParse:k}=F,W=[{title:"Integers",value:"integer",content:"6"},{title:"Decimals",value:"decimal",content:"0.75"},{title:"Proper fractions",value:"proper",content:"⅗"},{title:"Improper fractions",value:"improper",content:"⁷⁄₄"},{title:"Mixed numbers",value:"mixed",content:"1¾"},{title:"Numbers with π",value:"pi",content:"π"}],b=T=>({value:null,status:T,message:"",simplify:"required",answerForms:[],strict:!1,maxError:null}),m=class m extends P.Component{constructor(p){super(p),this.change=(...t)=>E.apply(this,t),this.onToggleOptions=t=>{const r=this.state.showOptions.slice();r[t]=!r[t],this.setState({showOptions:r})},this.onTrashAnswer=t=>{if(t>=0&&t{t.key===" "&&(t.preventDefault(),r.apply(this,l))},this.onStatusChange=t=>{const r=["wrong","ungraded","correct"],l=this.props.answers,c=o.indexOf(r,l[t].status),u=r[(c+1)%r.length];this.updateAnswer(t,{status:u,simplify:u==="correct"?"required":"accepted"})},this.updateAnswer=(t,r)=>{if(!o.isObject(r))return o.partial((c,u,w)=>{const h={};h[u]=w,this.updateAnswer(c,h)},t,r);let l=[...this.props.answers];if(t===l.length){const c=b(this.state.lastStatus);l=l.concat(c)}l[t]=o.extend({},l[t],r),this.props.onChange({answers:l})},this.addAnswer=()=>{const t=b(this.state.lastStatus),r=this.props.answers.concat(t);this.props.onChange({answers:r})},this.getSaveWarnings=()=>{const t=[];return o.contains(o.pluck(this.props.answers,"value"),"")&&t.push("One or more answers is empty"),this.props.answers.forEach((r,l)=>{r.strict&&(!r.answerForms||r.answerForms.length===0)&&t.push(`Answer ${l+1} is set to string format matching, but no format was selected`)}),t},this.serialize=()=>z.serialize.call(this),this.state={lastStatus:"wrong",showOptions:o.map(this.props.answers,()=>!1)}}render(){const p=this.props.answers,t=n=>a("div",{className:"perseus-widget-row",children:[e("label",{children:"Unsimplified answers are"}),e(A,{value:p[n].simplify,allowEmpty:!1,buttons:[{value:"required",content:"ungraded"},{value:"optional",content:"accepted"},{value:"enforced",content:"wrong"}],onChange:this.updateAnswer(n,"simplify")||(()=>{})}),a(d,{children:[e("p",{children:'Normally select "ungraded". This will give the user a message saying the answer is correct but not simplified. The user will then have to simplify it and re-enter, but will not be penalized. (5th grade and after)'}),e("p",{children:'Select "accepted" only if the user is not expected to know how to simplify fractions yet. (Anything prior to 5th grade)'}),a("p",{children:['Select "wrong" ',e("em",{children:"only"})," if we are specifically assessing the ability to simplify."]})]})]}),r=n=>a("div",{children:[a("div",{className:"perseus-widget-row",children:[e("label",{children:"Choose the suggested answer formats"}),e(M,{buttons:W,values:p[n].answerForms,onChange:this.updateAnswer(n,"answerForms")||(()=>{})}),a(d,{children:[e("p",{children:'Formats will be autoselected for you based on the given answer; to show no suggested formats and accept all types, simply have a decimal/integer be the answer. Values with π will have format "pi", and values that are fractions will have some subset (mixed will be "mixed" and "proper"; improper/proper will both be "improper" and "proper"). If you would like to specify that it is only a proper fraction (or only a mixed/improper fraction), deselect the other format. Except for specific cases, you should not need to change the autoselected formats.'}),a("p",{children:["To restrict the answer to ",e("em",{children:"only"}),' an improper fraction (i.e. 7/4), select the improper fraction and toggle "strict" to true. This ',e("b",{children:"will not"})," ","accept 1.75 as an answer."," "]}),e("p",{children:"Unless you are testing that specific skill, please do not restrict the answer format."})]})]}),e("div",{className:"perseus-widget-row",children:e(y,{label:"Strictly match only these formats",checked:p[n].strict,onChange:i=>{this.updateAnswer.bind(this,n)({strict:i})}})})]}),l=n=>e("div",{className:"perseus-widget-row",children:a("label",{children:["Max error"," ",e(v,{className:"max-error",value:p[n].maxError,onChange:this.updateAnswer(n,"maxError"),placeholder:"0"})]})}),c=a("div",{className:"perseus-widget-row",children:[e("label",{children:"Width: "}),e(A,{value:this.props.size,allowEmpty:!1,buttons:[{value:"normal",content:"Normal (80px)"},{value:"small",content:"Small (40px)"}],onChange:this.change("size")}),e(d,{children:e("p",{children:'Use size "Normal" for all text boxes, unless there are multiple text boxes in one line and the answer area is too narrow to fit them.'})})]}),u=e("div",{className:"perseus-widget-row",children:e(y,{label:"Right alignment",checked:this.props.rightAlign,onChange:n=>{this.props.onChange({rightAlign:n})}})}),w=a("div",{className:"perseus-widget-row",children:[a("label",{children:["Aria label",e(j,{value:this.props.labelText,onChange:this.change("labelText")})]}),e(d,{children:e("p",{children:"Text to describe this input. This will be shown to users using screenreaders."})})]}),h=e("div",{children:a("div",{className:"perseus-widget-row",children:[e(y,{label:"Coefficient",checked:this.props.coefficient,onChange:n=>{this.props.onChange({coefficient:n})}}),e(d,{children:e("p",{children:"A coefficient style number allows the student to use - for -1 and an empty string to mean 1."})})]})}),C=e("div",{children:e("a",{href:"#",className:"simple-button orange",onClick:n=>{n.preventDefault(),this.addAnswer()},onKeyDown:n=>this.onSpace(n,this.addAnswer),children:e("span",{children:"Add new answer"})})}),q={wrong:"(address the mistake/misconception)",ungraded:"(explain in detail to avoid confusion)",correct:"(reinforce the user's understanding)"};return a("div",{className:"perseus-input-number-editor",children:[e("div",{className:"ui-title",children:"User input"}),e("div",{className:"msg-title",children:"Message shown to user on attempt"}),p.map((n,i)=>{const S=e(R,{apiOptions:this.props.apiOptions,content:n.message||"",placeholder:"Why is this answer "+n.status+"? "+q[n.status],widgetEnabled:!1,onChange:s=>{"content"in s&&this.updateAnswer(i,{message:s.content})}});return a("div",{className:"perseus-widget-row",children:[a("div",{className:"input-answer-editor-value-container"+(n.maxError?" with-max-error":""),children:[e(v,{value:n.value,className:"numeric-input-value",placeholder:"answer",format:o.last(n.answerForms||[]),onFormatChange:(s,f)=>{let g;f==="pi"?g=["pi"]:f==="mixed"?g=["proper","mixed"]:(f==="proper"||f==="improper")&&(g=["proper","improper"]),this.updateAnswer(i,{value:k(s,this.context.strings),answerForms:g})},onChange:s=>{this.updateAnswer(i,{value:k(s,this.context.strings)})}}),n.strict&&e("div",{className:"is-strict-indicator",title:"strictly equivalent to",children:"≡"}),n.simplify!=="required"&&n.status==="correct"&&e("div",{className:"simplify-indicator "+n.simplify,title:"accepts unsimplified answers",children:"‰"}),n.maxError?a("div",{className:"max-error-container",children:[e("div",{className:"max-error-plusmn",children:"±"}),e(v,{placeholder:0,value:p[i].maxError,format:o.last(n.answerForms||[]),onChange:this.updateAnswer(i,"maxError")})]}):null,e("div",{className:"value-divider"}),e("a",{href:"#",className:"answer-status "+n.status,onClick:s=>{s.preventDefault(),this.onStatusChange(i)},onKeyDown:s=>this.onSpace(s,this.onStatusChange),children:n.status}),e("a",{href:"#",className:"answer-trash","aria-label":"Delete answer",onClick:s=>{s.preventDefault(),this.onTrashAnswer(i)},onKeyDown:s=>this.onSpace(s,this.onTrashAnswer),children:e(N,{...V})}),e("a",{href:"#",className:"options-toggle","aria-label":"Toggle options",onClick:s=>{s.preventDefault(),this.onToggleOptions(i)},onKeyDown:s=>this.onSpace(s,this.onToggleOptions),children:e(N,{...U})})]}),e("div",{className:"input-answer-editor-message",children:S}),this.state.showOptions[i]&&a("div",{className:"options-container",children:[l(i),n.status==="correct"&&t(i),r(i)]})]},i)}),C,c,u,h,w]})}};m.contextType=I,m.widgetName="numeric-input",m.displayName="NumericInputEditor",m.defaultProps={answers:[b("correct")],size:"normal",coefficient:!1,labelText:"",rightAlign:!1};let x=m;x.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"onToggleOptions",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"onTrashAnswer",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"onSpace",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null},{name:"callback",optional:!1,type:null},{name:"...args",optional:!1,type:null}],returns:null},{name:"onStatusChange",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null}],returns:null},{name:"updateAnswer",docblock:null,modifiers:[],params:[{name:"choiceIndex",optional:!1,type:null},{name:"update",optional:!1,type:null}],returns:null},{name:"addAnswer",docblock:null,modifiers:[],params:[],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"NumericInputEditor",props:{answers:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"signature",type:"object",raw:`{ message: string; value: number; status: string; diff --git a/assets/numeric-input-editor.stories-fY_IpzQi.js b/assets/numeric-input-editor.stories-fY_IpzQi.js index 12ddd1fdc8..3ae46569a2 100644 --- a/assets/numeric-input-editor.stories-fY_IpzQi.js +++ b/assets/numeric-input-editor.stories-fY_IpzQi.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{N as e}from"./numeric-input-editor-QUZ56KMx.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./editor-jsonify-yP45H1ib.js";import"./editor-SZLWA5DH.js";import"./index-0C4KXdeC.js";import"./index-SM3muJE2.js";import"./section-control-button-VtgjGcq5.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const at={title:"PerseusEditor/Widgets/NumericInput Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{N as e}from"./numeric-input-editor-QUZ56KMx.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./editor-jsonify-yP45H1ib.js";import"./editor-SZLWA5DH.js";import"./index-k-0mNqHS.js";import"./index-SM3muJE2.js";import"./section-control-button-VtgjGcq5.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const at={title:"PerseusEditor/Widgets/NumericInput Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(o=r.parameters)==null?void 0:o.docs)==null?void 0:i.source}}};const st=["Default"];export{r as Default,st as __namedExportsOrder,at as default}; diff --git a/assets/numeric-input.stories-SJ7CeI_S.js b/assets/numeric-input.stories-SJ7CeI_S.js index 59053dae19..f79c5ed291 100644 --- a/assets/numeric-input.stories-SJ7CeI_S.js +++ b/assets/numeric-input.stories-SJ7CeI_S.js @@ -1,4 +1,4 @@ -import{j as i,a as t}from"./jsx-runtime-FVsy8kgq.js";import{a as o}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{R as z}from"./renderer-with-debug-ui-o6OVhJgg.js";import{N as p}from"./article-renderer-o95CuJpS.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./side-by-side-kpK-8vW0.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-8XILypbq.js";import"./multi-renderer-Nglq5SzN.js";import"./renderer-4_U4OAry.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./hints-renderer-GjKFBH8K.js";import"./shared-3pf9YZIg.js";import"./base-radio-sE9E2UC2.js";import"./choice-none-above-o4v4BTO3.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./enums-x5qaTru7.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./answer-choices-vbrLThK4.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";const A={content:"$5008 \\div 4 =$ [[☃ numeric-input 1]] ",images:{},widgets:{"numeric-input 1":{graded:!0,version:{major:0,minor:0},static:!1,type:"numeric-input",options:{coefficient:!1,static:!1,answers:[{status:"correct",maxError:null,strict:!1,value:1252,simplify:"required",message:""}],labelText:"",size:"normal"},alignment:"default"}}};function l(e){return{...{alignment:"",answers:[],containerSizeClass:"medium",isLastUsedWidget:!0,coefficient:!1,currentValue:"",problemNum:0,reviewModeRubric:{answers:[],labelText:"",size:"medium",coefficient:!1,static:!1},rightAlign:!1,size:"normal",static:!1,widgetId:"widgetId",findWidgets:o("findWidgets"),onBlur:o("onBlur"),onChange:o("onChange"),onFocus:o("onFocus"),trackInteraction:o("trackInteraction")},...e}}const yr={title:"Perseus/Widgets/NumericInput",args:{coefficient:!1,currentValue:"8675309",rightAlign:!1},argTypes:{size:{options:["normal","small"],control:{type:"radio"},defaultValue:"normal"}}},n=()=>i(z,{question:A}),s=e=>{const r=l(e);return i(p,{...r})},a=e=>{const r=l({...e,size:"small"}),c=l({...e,size:"normal"});return t("div",{children:[t("label",{children:["Small:",i(p,{...r})]}),t("label",{children:["Normal:",i(p,{...c})]})]})},m=e=>{const r=l({...e,rightAlign:!1}),c=l({...e,rightAlign:!0});return t("div",{children:[t("label",{children:["Left:",i(p,{...r})]}),t("label",{children:["Right:",i(p,{...c})]})]})};n.__docgenInfo={description:"",methods:[],displayName:"Question1"};s.__docgenInfo={description:"",methods:[],displayName:"Interactive",props:{coefficient:{required:!0,tsType:{name:"boolean"},description:""},currentValue:{required:!0,tsType:{name:"string"},description:""},rightAlign:{required:!0,tsType:{name:"boolean"},description:""},size:{required:!0,tsType:{name:"union",raw:'"normal" | "small"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"small"'}]},description:""}}};a.__docgenInfo={description:"",methods:[],displayName:"Sizes",props:{coefficient:{required:!0,tsType:{name:"boolean"},description:""},currentValue:{required:!0,tsType:{name:"string"},description:""},rightAlign:{required:!0,tsType:{name:"boolean"},description:""},size:{required:!0,tsType:{name:"union",raw:'"normal" | "small"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"small"'}]},description:""}}};m.__docgenInfo={description:"",methods:[],displayName:"TextAlignment",props:{coefficient:{required:!0,tsType:{name:"boolean"},description:""},currentValue:{required:!0,tsType:{name:"string"},description:""},rightAlign:{required:!0,tsType:{name:"boolean"},description:""},size:{required:!0,tsType:{name:"union",raw:'"normal" | "small"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"small"'}]},description:""}}};var u,d,g;n.parameters={...n.parameters,docs:{...(u=n.parameters)==null?void 0:u.docs,source:{originalSource:`(): React.ReactElement => { +import{j as i,a as t}from"./jsx-runtime-FVsy8kgq.js";import{a as o}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{R as z}from"./renderer-with-debug-ui-o6OVhJgg.js";import{N as p}from"./article-renderer-o95CuJpS.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./side-by-side-kpK-8vW0.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-8XILypbq.js";import"./multi-renderer-Nglq5SzN.js";import"./renderer-4_U4OAry.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./hints-renderer-GjKFBH8K.js";import"./shared-3pf9YZIg.js";import"./base-radio-sE9E2UC2.js";import"./choice-none-above-o4v4BTO3.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./enums-x5qaTru7.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./answer-choices-vbrLThK4.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";const A={content:"$5008 \\div 4 =$ [[☃ numeric-input 1]] ",images:{},widgets:{"numeric-input 1":{graded:!0,version:{major:0,minor:0},static:!1,type:"numeric-input",options:{coefficient:!1,static:!1,answers:[{status:"correct",maxError:null,strict:!1,value:1252,simplify:"required",message:""}],labelText:"",size:"normal"},alignment:"default"}}};function l(e){return{...{alignment:"",answers:[],containerSizeClass:"medium",isLastUsedWidget:!0,coefficient:!1,currentValue:"",problemNum:0,reviewModeRubric:{answers:[],labelText:"",size:"medium",coefficient:!1,static:!1},rightAlign:!1,size:"normal",static:!1,widgetId:"widgetId",findWidgets:o("findWidgets"),onBlur:o("onBlur"),onChange:o("onChange"),onFocus:o("onFocus"),trackInteraction:o("trackInteraction")},...e}}const yr={title:"Perseus/Widgets/NumericInput",args:{coefficient:!1,currentValue:"8675309",rightAlign:!1},argTypes:{size:{options:["normal","small"],control:{type:"radio"},defaultValue:"normal"}}},n=()=>i(z,{question:A}),s=e=>{const r=l(e);return i(p,{...r})},a=e=>{const r=l({...e,size:"small"}),c=l({...e,size:"normal"});return t("div",{children:[t("label",{children:["Small:",i(p,{...r})]}),t("label",{children:["Normal:",i(p,{...c})]})]})},m=e=>{const r=l({...e,rightAlign:!1}),c=l({...e,rightAlign:!0});return t("div",{children:[t("label",{children:["Left:",i(p,{...r})]}),t("label",{children:["Right:",i(p,{...c})]})]})};n.__docgenInfo={description:"",methods:[],displayName:"Question1"};s.__docgenInfo={description:"",methods:[],displayName:"Interactive",props:{coefficient:{required:!0,tsType:{name:"boolean"},description:""},currentValue:{required:!0,tsType:{name:"string"},description:""},rightAlign:{required:!0,tsType:{name:"boolean"},description:""},size:{required:!0,tsType:{name:"union",raw:'"normal" | "small"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"small"'}]},description:""}}};a.__docgenInfo={description:"",methods:[],displayName:"Sizes",props:{coefficient:{required:!0,tsType:{name:"boolean"},description:""},currentValue:{required:!0,tsType:{name:"string"},description:""},rightAlign:{required:!0,tsType:{name:"boolean"},description:""},size:{required:!0,tsType:{name:"union",raw:'"normal" | "small"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"small"'}]},description:""}}};m.__docgenInfo={description:"",methods:[],displayName:"TextAlignment",props:{coefficient:{required:!0,tsType:{name:"boolean"},description:""},currentValue:{required:!0,tsType:{name:"string"},description:""},rightAlign:{required:!0,tsType:{name:"boolean"},description:""},size:{required:!0,tsType:{name:"union",raw:'"normal" | "small"',elements:[{name:"literal",value:'"normal"'},{name:"literal",value:'"small"'}]},description:""}}};var u,d,g;n.parameters={...n.parameters,docs:{...(u=n.parameters)==null?void 0:u.docs,source:{originalSource:`(): React.ReactElement => { return ; }`,...(g=(d=n.parameters)==null?void 0:d.docs)==null?void 0:g.source}}};var f,h,b;s.parameters={...s.parameters,docs:{...(f=s.parameters)==null?void 0:f.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = generateProps(args); diff --git a/assets/orderer.stories-WehRfD_H.js b/assets/orderer.stories-WehRfD_H.js index 478457d78d..d008ecef94 100644 --- a/assets/orderer.stories-WehRfD_H.js +++ b/assets/orderer.stories-WehRfD_H.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{R as n}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const g={content:`**Without using a calculator, put the numbers in order from least to greatest.** +import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{R as n}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const g={content:`**Without using a calculator, put the numbers in order from least to greatest.** [[☃ orderer 1]]`,images:{},widgets:{"orderer 1":{version:{major:0,minor:0},type:"orderer",graded:!0,options:{otherOptions:[],layout:"horizontal",options:[{content:"$10.9$",images:{},widgets:{}},{content:"$11$",images:{},widgets:{}},{content:"$\\sqrt{120}$",images:{},widgets:{}}],correctOptions:[{content:"$10.9$",images:{},widgets:{}},{content:"$\\sqrt{120}$",images:{},widgets:{}},{content:"$11$",images:{},widgets:{}}],height:"normal"}}}},c={content:`**Put $6$ flowers in the box.** diff --git a/assets/passage-ref.stories-RS8yZLtd.js b/assets/passage-ref.stories-RS8yZLtd.js index 412b7dafcf..65f75ee9b7 100644 --- a/assets/passage-ref.stories-RS8yZLtd.js +++ b/assets/passage-ref.stories-RS8yZLtd.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{V as d}from"./index-6h5t6F0w.js";import{R as l}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./choice-E4eyMygy.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const u={content:`[[☃ passage 1]] +import{j as o}from"./jsx-runtime-FVsy8kgq.js";import{V as d}from"./index-6h5t6F0w.js";import{R as l}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./choice-E4eyMygy.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const u={content:`[[☃ passage 1]] We can see the word “promotes” is used in [[☃ passage-ref 1]] diff --git a/assets/passage.stories-QLEPP2cB.js b/assets/passage.stories-QLEPP2cB.js index 4c0be01171..2b74eb031b 100644 --- a/assets/passage.stories-QLEPP2cB.js +++ b/assets/passage.stories-QLEPP2cB.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{V as g}from"./index-6h5t6F0w.js";import{R as f}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./choice-E4eyMygy.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const y={content:`[[☃ passage 1]] +import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{V as g}from"./index-6h5t6F0w.js";import{R as f}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./choice-E4eyMygy.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const y={content:`[[☃ passage 1]] `,images:{},widgets:{"passage 1":{alignment:"default",graded:!0,options:{footnotes:"",passageText:`Sociologists study folktales because they provide a means of understanding the distinctive values of a culture. However, the folktales in almost all cultures are adaptations of the same ancient narratives to the local milieu. `,passageTitle:"",showLineNumbers:!1,static:!1},static:!1,type:"passage",version:{major:0,minor:0}}}},v={content:`>Select text to highlight it. *(Laptop/desktop only)* diff --git a/assets/perseus-api-mOiZT07d.js b/assets/perseus-api-mOiZT07d.js index 4aaa7e411f..756daeb389 100644 --- a/assets/perseus-api-mOiZT07d.js +++ b/assets/perseus-api-mOiZT07d.js @@ -1 +1 @@ -import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{P as e}from"./index-k-0mNqHS.js";import{S as o}from"./stub-tag-editor-Hmby24Jq.js";const t={propTypes:e.shape({isArticle:e.bool.isRequired,onFocusChange:e.func.isRequired,GroupMetadataEditor:e.func.isRequired,showAlignmentOptions:e.bool.isRequired,readOnly:e.bool.isRequired,answerableCallback:e.func,getAnotherHint:e.func,interactionCallback:e.func,groupAnnotator:e.func.isRequired,imagePlaceholder:e.node,widgetPlaceholder:e.node,baseElements:e.shape({Link:e.func}),imagePreloader:e.func,trackInteraction:e.func,customKeypad:e.bool,nativeKeypadProxy:e.func,isMobile:e.bool,setDrawingAreaAvailable:e.func,hintProgressColor:e.string,canScrollPage:e.bool,crossOutEnabled:e.bool,editorChangeDelay:e.number}).isRequired,defaults:{isArticle:!1,isMobile:!1,onFocusChange:function(){},GroupMetadataEditor:o,showAlignmentOptions:!1,readOnly:!1,groupAnnotator:function(){return null},baseElements:{Link:r=>s("a",{...r})},setDrawingAreaAvailable:function(){},canScrollPage:!1,crossOutEnabled:!1,editorChangeDelay:0}},l={RENDERER:"perseus-renderer",TWO_COLUMN_RENDERER:"perseus-renderer-two-columns",RESPONSIVE_RENDERER:"perseus-renderer-responsive",INPUT:"perseus-input",FOCUSED:"perseus-focused",RADIO:{OPTION:"perseus-radio-option",SELECTED:"perseus-radio-selected",OPTION_CONTENT:"perseus-radio-option-content"},INTERACTIVE:"perseus-interactive",CORRECT:"perseus-correct",INCORRECT:"perseus-incorrect",UNANSWERED:"perseus-unanswered",MOBILE:"perseus-mobile"};export{t as A,l as C}; +import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{P as e}from"./index-0C4KXdeC.js";import{S as o}from"./stub-tag-editor-Hmby24Jq.js";const t={propTypes:e.shape({isArticle:e.bool.isRequired,onFocusChange:e.func.isRequired,GroupMetadataEditor:e.func.isRequired,showAlignmentOptions:e.bool.isRequired,readOnly:e.bool.isRequired,answerableCallback:e.func,getAnotherHint:e.func,interactionCallback:e.func,groupAnnotator:e.func.isRequired,imagePlaceholder:e.node,widgetPlaceholder:e.node,baseElements:e.shape({Link:e.func}),imagePreloader:e.func,trackInteraction:e.func,customKeypad:e.bool,nativeKeypadProxy:e.func,isMobile:e.bool,setDrawingAreaAvailable:e.func,hintProgressColor:e.string,canScrollPage:e.bool,crossOutEnabled:e.bool,editorChangeDelay:e.number}).isRequired,defaults:{isArticle:!1,isMobile:!1,onFocusChange:function(){},GroupMetadataEditor:o,showAlignmentOptions:!1,readOnly:!1,groupAnnotator:function(){return null},baseElements:{Link:r=>s("a",{...r})},setDrawingAreaAvailable:function(){},canScrollPage:!1,crossOutEnabled:!1,editorChangeDelay:0}},l={RENDERER:"perseus-renderer",TWO_COLUMN_RENDERER:"perseus-renderer-two-columns",RESPONSIVE_RENDERER:"perseus-renderer-responsive",INPUT:"perseus-input",FOCUSED:"perseus-focused",RADIO:{OPTION:"perseus-radio-option",SELECTED:"perseus-radio-selected",OPTION_CONTENT:"perseus-radio-option-content"},INTERACTIVE:"perseus-interactive",CORRECT:"perseus-correct",INCORRECT:"perseus-incorrect",UNANSWERED:"perseus-unanswered",MOBILE:"perseus-mobile"};export{t as A,l as C}; diff --git a/assets/phet-simulation-editor-0655QF05.js b/assets/phet-simulation-editor-0655QF05.js index 0bfda236e6..db47ab4cb5 100644 --- a/assets/phet-simulation-editor-0655QF05.js +++ b/assets/phet-simulation-editor-0655QF05.js @@ -1,4 +1,4 @@ -import{a as o,j as t}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import{m as p}from"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{l as s}from"./index-QCAhLhLD.js";import{s as n}from"./index-deFLJwr4.js";import{r as a}from"./index-TT1qJ6UJ.js";const r=class r extends a.Component{constructor(){super(...arguments),this.getSaveWarnings=()=>p(this.props.url,"en")===null?["Please enter a URL from the PhET domain."]:[]}serialize(){return{url:this.props.url,description:this.props.description}}render(){return o("div",{children:[t(s,{label:"URL",value:this.props.url,onChange:e=>this.props.onChange({url:e}),style:{marginBottom:n.large_24}}),t(s,{label:"Description",value:this.props.description,onChange:e=>this.props.onChange({description:e})})]})}};r.defaultProps={url:"",description:""},r.widgetName="phet-simulation";let i=r;i.__docgenInfo={description:"",methods:[{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"PerseusPhetSimulationWidgetOptions"}}},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PhetSimulationEditor",props:{url:{required:!1,tsType:{name:'PerseusPhetSimulationWidgetOptions["url"]',raw:'PerseusPhetSimulationWidgetOptions["url"]'},description:"",defaultValue:{value:'""',computed:!1}},description:{required:!1,tsType:{name:'PerseusPhetSimulationWidgetOptions["description"]',raw:'PerseusPhetSimulationWidgetOptions["description"]'},description:"",defaultValue:{value:'""',computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:`(arg1: { +import{a as o,j as t}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import{m as p}from"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{l as s}from"./index-QCAhLhLD.js";import{s as n}from"./index-deFLJwr4.js";import{r as a}from"./index-TT1qJ6UJ.js";const r=class r extends a.Component{constructor(){super(...arguments),this.getSaveWarnings=()=>p(this.props.url,"en")===null?["Please enter a URL from the PhET domain."]:[]}serialize(){return{url:this.props.url,description:this.props.description}}render(){return o("div",{children:[t(s,{label:"URL",value:this.props.url,onChange:e=>this.props.onChange({url:e}),style:{marginBottom:n.large_24}}),t(s,{label:"Description",value:this.props.description,onChange:e=>this.props.onChange({description:e})})]})}};r.defaultProps={url:"",description:""},r.widgetName="phet-simulation";let i=r;i.__docgenInfo={description:"",methods:[{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"PerseusPhetSimulationWidgetOptions"}}},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PhetSimulationEditor",props:{url:{required:!1,tsType:{name:'PerseusPhetSimulationWidgetOptions["url"]',raw:'PerseusPhetSimulationWidgetOptions["url"]'},description:"",defaultValue:{value:'""',computed:!1}},description:{required:!1,tsType:{name:'PerseusPhetSimulationWidgetOptions["description"]',raw:'PerseusPhetSimulationWidgetOptions["description"]'},description:"",defaultValue:{value:'""',computed:!1}},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:`(arg1: { url?: Props["url"]; description?: Props["description"]; }) => void`,signature:{arguments:[{type:{name:"signature",type:"object",raw:`{ diff --git a/assets/phet-simulation-editor.stories-J1pcmI4p.js b/assets/phet-simulation-editor.stories-J1pcmI4p.js index 0deeaa14a8..bea33cb4d4 100644 --- a/assets/phet-simulation-editor.stories-J1pcmI4p.js +++ b/assets/phet-simulation-editor.stories-J1pcmI4p.js @@ -1,4 +1,4 @@ -import{a as m}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{P as p}from"./phet-simulation-editor-0655QF05.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";const Xr={component:p,title:"PerseusEditor/Widgets/PhET Simulation Editor"},r={args:{onChange:m("onChange")}};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`{ +import{a as m}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{P as p}from"./phet-simulation-editor-0655QF05.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";const Xr={component:p,title:"PerseusEditor/Widgets/PhET Simulation Editor"},r={args:{onChange:m("onChange")}};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`{ args: { onChange: action("onChange") } diff --git a/assets/plotter.stories-eCNg_xQ1.js b/assets/plotter.stories-eCNg_xQ1.js index 31255aa3b8..669415a30d 100644 --- a/assets/plotter.stories-eCNg_xQ1.js +++ b/assets/plotter.stories-eCNg_xQ1.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{V as m}from"./index-6h5t6F0w.js";import{R as s}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./choice-E4eyMygy.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const a={content:`The elementary school principal asked teachers to report the number of students absent in each grade during the past week. +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{V as m}from"./index-6h5t6F0w.js";import{R as s}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./choice-E4eyMygy.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const a={content:`The elementary school principal asked teachers to report the number of students absent in each grade during the past week. **Create a bar graph to show how many students were absent in each grade.** diff --git a/assets/preview-AMYt9N5q.js b/assets/preview-AMYt9N5q.js index c692ad8682..86bbe942f4 100644 --- a/assets/preview-AMYt9N5q.js +++ b/assets/preview-AMYt9N5q.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{c as i}from"./index-deFLJwr4.js";import{R as p}from"./index-6h5t6F0w.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import{D as m,s as e}from"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{s,a}from"./test-dependencies-3HLxfOjs.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./icon-paths-AuJwhOz7.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./shared-3pf9YZIg.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-vbrLThK4.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./video-transcript-link-WVgIZGhp.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-Hmby24Jq.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./choice-none-above-o4v4BTO3.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./index-QCAhLhLD.js";import"./strings-OAjNfY6D.js";import"./bundle.esm-7jAAHVxW.js";import"./register-all-widgets-for-testing-fawnePoa.js";e(a);const Yo={decorators:[o=>r(p,{children:r(m.Provider,{value:s,children:r(o,{})})})],parameters:{options:{storySort:{order:["Perseus","PerseusEditor","Math-Input","*"],includeNames:!0}},actions:{argTypesRegex:"^on[A-Z].*"},controls:{matchers:{color:/(background|color)$/i,date:/Date$/}},backgrounds:{values:Object.entries(i).map(([o,t])=>({name:o,value:t}))}}};export{Yo as default}; +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{c as i}from"./index-deFLJwr4.js";import{R as p}from"./index-6h5t6F0w.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import{D as m,s as e}from"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{s,a}from"./test-dependencies-3HLxfOjs.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-awljIyHI.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./icon-paths-AuJwhOz7.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./shared-3pf9YZIg.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-vbrLThK4.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./video-transcript-link-WVgIZGhp.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-Hmby24Jq.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./choice-none-above-o4v4BTO3.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./index-QCAhLhLD.js";import"./strings-OAjNfY6D.js";import"./bundle.esm-7jAAHVxW.js";import"./register-all-widgets-for-testing-fawnePoa.js";e(a);const Yo={decorators:[o=>r(p,{children:r(m.Provider,{value:s,children:r(o,{})})})],parameters:{options:{storySort:{order:["Perseus","PerseusEditor","Math-Input","*"],includeNames:!0}},actions:{argTypesRegex:"^on[A-Z].*"},controls:{matchers:{color:/(background|color)$/i,date:/Date$/}},backgrounds:{values:Object.entries(i).map(([o,t])=>({name:o,value:t}))}}};export{Yo as default}; diff --git a/assets/python-program-editor-SPqpWu4A.js b/assets/python-program-editor-SPqpWu4A.js index 7d4c9fadbc..726cd6198d 100644 --- a/assets/python-program-editor-SPqpWu4A.js +++ b/assets/python-program-editor-SPqpWu4A.js @@ -1 +1 @@ -import{a as i,j as s}from"./jsx-runtime-FVsy8kgq.js";import{c as p}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as n}from"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{r as m}from"./index-TT1qJ6UJ.js";const{NumberInput:h,TextInput:l}=n;function u(a,r){const t=[];return r===""&&t.push("The program ID is required."),(!Number.isInteger(a)||a<1)&&t.push("The height must be a positive integer."),t}const e=class e extends m.Component{constructor(){super(...arguments),this.change=(...r)=>p.apply(this,r),this.getSaveWarnings=()=>u(this.props.height,this.props.programID)}serialize(){return{programID:this.props.programID,height:this.props.height}}render(){return i("div",{children:[i("label",{children:["User Program ID:"," ",s(l,{value:this.props.programID,onChange:this.change("programID"),placeholder:"123"})]}),s("br",{}),i("label",{children:["Height:"," ",s(h,{value:this.props.height,onChange:this.change("height"),placeholder:"400"})]})]})}};e.widgetName="python-program",e.defaultProps={programID:"",height:400};let o=e;o.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"PerseusPythonProgramWidgetOptions"}}},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PythonProgramEditor",props:{programID:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},height:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"400",computed:!1}}}};export{o as P}; +import{a as i,j as s}from"./jsx-runtime-FVsy8kgq.js";import{c as p}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as n}from"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{r as m}from"./index-TT1qJ6UJ.js";const{NumberInput:h,TextInput:l}=n;function u(a,r){const t=[];return r===""&&t.push("The program ID is required."),(!Number.isInteger(a)||a<1)&&t.push("The height must be a positive integer."),t}const e=class e extends m.Component{constructor(){super(...arguments),this.change=(...r)=>p.apply(this,r),this.getSaveWarnings=()=>u(this.props.height,this.props.programID)}serialize(){return{programID:this.props.programID,height:this.props.height}}render(){return i("div",{children:[i("label",{children:["User Program ID:"," ",s(l,{value:this.props.programID,onChange:this.change("programID"),placeholder:"123"})]}),s("br",{}),i("label",{children:["Height:"," ",s(h,{value:this.props.height,onChange:this.change("height"),placeholder:"400"})]})]})}};e.widgetName="python-program",e.defaultProps={programID:"",height:400};let o=e;o.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"PerseusPythonProgramWidgetOptions"}}},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PythonProgramEditor",props:{programID:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'""',computed:!1}},height:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"400",computed:!1}}}};export{o as P}; diff --git a/assets/python-program-editor.stories-98ezWXxc.js b/assets/python-program-editor.stories-98ezWXxc.js index 086b09e125..db5671bdff 100644 --- a/assets/python-program-editor.stories-98ezWXxc.js +++ b/assets/python-program-editor.stories-98ezWXxc.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{P as e}from"./python-program-editor-SPqpWu4A.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";const $r={title:"PerseusEditor/Widgets/Python Program Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{P as e}from"./python-program-editor-SPqpWu4A.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";const $r={title:"PerseusEditor/Widgets/Python Program Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(t=r.parameters)==null?void 0:t.docs)==null?void 0:i.source}}};const ro=["Default"];export{r as Default,ro as __namedExportsOrder,$r as default}; diff --git a/assets/python-program.stories-xl40LxxK.js b/assets/python-program.stories-xl40LxxK.js index b06d846686..a74532dda0 100644 --- a/assets/python-program.stories-xl40LxxK.js +++ b/assets/python-program.stories-xl40LxxK.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const e={content:`[[☃ python-program 1]] +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const e={content:`[[☃ python-program 1]] `,images:{},widgets:{"python-program 1":{version:{major:0,minor:0},static:!1,type:"python-program",options:{height:400,programID:"5207287069147136"},alignment:"block"}}},Yr={title:"Perseus/Widgets/Python Program"},r=s=>m(p,{question:e});r.__docgenInfo={description:"",methods:[],displayName:"Question1"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/question-markers-KN3OrYEl.js b/assets/question-markers-KN3OrYEl.js index 3fc9a41d41..976eccca7c 100644 --- a/assets/question-markers-KN3OrYEl.js +++ b/assets/question-markers-KN3OrYEl.js @@ -1 +1 @@ -import{a as d,j as s}from"./jsx-runtime-FVsy8kgq.js";import{r as y}from"./index-TT1qJ6UJ.js";import{g as k}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import{U as b}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import{g as f}from"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{l as i}from"./index-awljIyHI.js";import{M}from"./marker-st5wrvmE.js";const{colors:u,typography:g}=k;class R extends y.Component{constructor(){super(...arguments),this._markers=[],this.handleImageDoubleClick=r=>{r.preventDefault();const e=r.currentTarget.getBoundingClientRect(),t=Math.round((r.clientX-e.left)/e.width*1e3)/10,l=Math.round((r.clientY-e.top)/e.height*1e3)/10,{markers:a,onChange:n}=this.props;n([...a,{answers:[],label:"",x:t,y:l}])}}openDropdownForMarkerIndices(r){r.forEach(e=>{var t;this._markers[e]&&((t=this._markers[e])==null||t.openDropdown())})}render(){const{choices:r,imageUrl:e,imageWidth:t,imageHeight:l,markers:a,onChange:n}=this.props,h=f().staticUrl;return d("div",{children:[s("div",{className:i.css(m.title),children:"Markers"}),s("div",{className:i.css(m.subtitle),children:e?d("span",{children:["Double-click on the image to add a marker.",s("br",{}),s("br",{}),"Markers are read by screen readers in the order that you add them here, so add in a logical order for the learner (e.g. sequentially, clockwise). You can test order by using keyboard tabbing."]}):"Upload an image to place markers."}),e&&d("div",{className:i.css(m.markersCanvas),style:{maxWidth:t,maxHeight:l},children:[s("img",{alt:"",className:i.css(m.image),src:h(b.getRealImageUrl(e)),onDoubleClick:this.handleImageDoubleClick}),a.map((p,o)=>y.createElement(M,{...p,choices:r,key:`${p.x}.${p.y}`,onChange:c=>n([...a.slice(0,o),c,...a.slice(o+1)]),onRemove:()=>n([...a.slice(0,o),...a.slice(o+1)]),ref:c=>this._markers[o]=c}))]})]})}}const m=i.StyleSheet.create({title:{...g.bodyXsmallBold,marginBottom:6,color:u.gray17},subtitle:{...g.labelSmall,marginBottom:12,color:u.gray68},markersCanvas:{position:"relative",border:"solid 1px rgba(33, 36, 44, 0.16)"},image:{display:"block",maxWidth:"100%"}});R.__docgenInfo={description:"",methods:[{name:"openDropdownForMarkerIndices",docblock:null,modifiers:[],params:[{name:"indices",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:null},{name:"handleImageDoubleClick",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactMouseEvent",raw:"React.MouseEvent",alias:"React.MouseEvent"}}],returns:null}],displayName:"QuestionMarkers",props:{choices:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},imageUrl:{required:!0,tsType:{name:"string"},description:""},imageWidth:{required:!0,tsType:{name:"number"},description:""},imageHeight:{required:!0,tsType:{name:"number"},description:""},markers:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"MarkerType"}],raw:"ReadonlyArray"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(markers: ReadonlyArray) => void",signature:{arguments:[{type:{name:"ReadonlyArray",elements:[{name:"MarkerType"}],raw:"ReadonlyArray"},name:"markers"}],return:{name:"void"}}},description:""}}};export{R as Q}; +import{a as d,j as s}from"./jsx-runtime-FVsy8kgq.js";import{r as y}from"./index-TT1qJ6UJ.js";import{g as k}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import{U as b}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import{g as f}from"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{l as i}from"./index-awljIyHI.js";import{M}from"./marker-st5wrvmE.js";const{colors:u,typography:g}=k;class R extends y.Component{constructor(){super(...arguments),this._markers=[],this.handleImageDoubleClick=r=>{r.preventDefault();const e=r.currentTarget.getBoundingClientRect(),t=Math.round((r.clientX-e.left)/e.width*1e3)/10,l=Math.round((r.clientY-e.top)/e.height*1e3)/10,{markers:a,onChange:n}=this.props;n([...a,{answers:[],label:"",x:t,y:l}])}}openDropdownForMarkerIndices(r){r.forEach(e=>{var t;this._markers[e]&&((t=this._markers[e])==null||t.openDropdown())})}render(){const{choices:r,imageUrl:e,imageWidth:t,imageHeight:l,markers:a,onChange:n}=this.props,h=f().staticUrl;return d("div",{children:[s("div",{className:i.css(m.title),children:"Markers"}),s("div",{className:i.css(m.subtitle),children:e?d("span",{children:["Double-click on the image to add a marker.",s("br",{}),s("br",{}),"Markers are read by screen readers in the order that you add them here, so add in a logical order for the learner (e.g. sequentially, clockwise). You can test order by using keyboard tabbing."]}):"Upload an image to place markers."}),e&&d("div",{className:i.css(m.markersCanvas),style:{maxWidth:t,maxHeight:l},children:[s("img",{alt:"",className:i.css(m.image),src:h(b.getRealImageUrl(e)),onDoubleClick:this.handleImageDoubleClick}),a.map((p,o)=>y.createElement(M,{...p,choices:r,key:`${p.x}.${p.y}`,onChange:c=>n([...a.slice(0,o),c,...a.slice(o+1)]),onRemove:()=>n([...a.slice(0,o),...a.slice(o+1)]),ref:c=>this._markers[o]=c}))]})]})}}const m=i.StyleSheet.create({title:{...g.bodyXsmallBold,marginBottom:6,color:u.gray17},subtitle:{...g.labelSmall,marginBottom:12,color:u.gray68},markersCanvas:{position:"relative",border:"solid 1px rgba(33, 36, 44, 0.16)"},image:{display:"block",maxWidth:"100%"}});R.__docgenInfo={description:"",methods:[{name:"openDropdownForMarkerIndices",docblock:null,modifiers:[],params:[{name:"indices",optional:!1,type:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray",alias:"ReadonlyArray"}}],returns:null},{name:"handleImageDoubleClick",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:{name:"ReactMouseEvent",raw:"React.MouseEvent",alias:"React.MouseEvent"}}],returns:null}],displayName:"QuestionMarkers",props:{choices:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"string"}],raw:"ReadonlyArray"},description:""},imageUrl:{required:!0,tsType:{name:"string"},description:""},imageWidth:{required:!0,tsType:{name:"number"},description:""},imageHeight:{required:!0,tsType:{name:"number"},description:""},markers:{required:!0,tsType:{name:"ReadonlyArray",elements:[{name:"MarkerType"}],raw:"ReadonlyArray"},description:""},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(markers: ReadonlyArray) => void",signature:{arguments:[{type:{name:"ReadonlyArray",elements:[{name:"MarkerType"}],raw:"ReadonlyArray"},name:"markers"}],return:{name:"void"}}},description:""}}};export{R as Q}; diff --git a/assets/question-markers.stories-Z5AMeqyc.js b/assets/question-markers.stories-Z5AMeqyc.js index e5fa06b911..437d9c7163 100644 --- a/assets/question-markers.stories-Z5AMeqyc.js +++ b/assets/question-markers.stories-Z5AMeqyc.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{l as p}from"./index-awljIyHI.js";import{r as W}from"./index-TT1qJ6UJ.js";import{Q as b}from"./question-markers-KN3OrYEl.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./marker-st5wrvmE.js";import"./components-0kNWnYe6.js";import"./util-qk2aeK8X.js";import"./form-wrapped-text-field-tsI8XMXi.js";const lt={title:"PerseusEditor/Widgets/Label Image/Question Markers"},f=p.StyleSheet.create({wrapper:{width:338}}),k=t=>r("div",{className:p.css(f.wrapper),children:r(b,{...t})});class w extends W.Component{constructor(){super(...arguments),this.state={markers:[{answers:[],label:"",x:50,y:50}]}}render(){const{markers:m}=this.state;return r("div",{className:p.css(f.wrapper),children:r(b,{choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],imageUrl:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",imageWidth:1280,imageHeight:1024,markers:m,onChange:y=>this.setState({markers:y})})})}}const o=t=>r(k,{...{choices:[],imageUrl:"",imageWidth:0,imageHeight:0,markers:[],onChange:()=>{}}}),e=t=>r(k,{...{choices:[],imageUrl:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",imageWidth:1280,imageHeight:1024,markers:[{answers:[],label:"",x:50,y:50}],onChange:()=>{}}}),i=t=>r(w,{});o.__docgenInfo={description:"",methods:[],displayName:"Empty"};e.__docgenInfo={description:"",methods:[],displayName:"Filled"};i.__docgenInfo={description:"",methods:[],displayName:"Interactive"};var s,a,n;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{l as p}from"./index-awljIyHI.js";import{r as W}from"./index-TT1qJ6UJ.js";import{Q as b}from"./question-markers-KN3OrYEl.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./marker-st5wrvmE.js";import"./components-0kNWnYe6.js";import"./util-qk2aeK8X.js";import"./form-wrapped-text-field-tsI8XMXi.js";const lt={title:"PerseusEditor/Widgets/Label Image/Question Markers"},f=p.StyleSheet.create({wrapper:{width:338}}),k=t=>r("div",{className:p.css(f.wrapper),children:r(b,{...t})});class w extends W.Component{constructor(){super(...arguments),this.state={markers:[{answers:[],label:"",x:50,y:50}]}}render(){const{markers:m}=this.state;return r("div",{className:p.css(f.wrapper),children:r(b,{choices:["Lamborghini","BMW","Volkswagen","Fiat","Porsche","Ferrari"],imageUrl:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",imageWidth:1280,imageHeight:1024,markers:m,onChange:y=>this.setState({markers:y})})})}}const o=t=>r(k,{...{choices:[],imageUrl:"",imageWidth:0,imageHeight:0,markers:[],onChange:()=>{}}}),e=t=>r(k,{...{choices:[],imageUrl:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",imageWidth:1280,imageHeight:1024,markers:[{answers:[],label:"",x:50,y:50}],onChange:()=>{}}}),i=t=>r(w,{});o.__docgenInfo={description:"",methods:[],displayName:"Empty"};e.__docgenInfo={description:"",methods:[],displayName:"Filled"};i.__docgenInfo={description:"",methods:[],displayName:"Interactive"};var s,a,n;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = ({ choices: [], imageUrl: "", diff --git a/assets/radio-editor.stories-rwjrRVKp.js b/assets/radio-editor.stories-rwjrRVKp.js index b3e1650ac6..bc6afd5048 100644 --- a/assets/radio-editor.stories-rwjrRVKp.js +++ b/assets/radio-editor.stories-rwjrRVKp.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{l as m}from"./index-awljIyHI.js";import{r as a}from"./index-TT1qJ6UJ.js";import{R as n}from"./editor-8WwPqQi6.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";import"./editor-SZLWA5DH.js";import"./index-SM3muJE2.js";import"./section-control-button-VtgjGcq5.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const ao={title:"PerseusEditor/Widgets/Radio Editor"},l=m.StyleSheet.create({wrapper:{width:338}}),c={content:`Which of the following values of $x$ satisfies the equation $\\sqrt{64}=x$ ? +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{l as m}from"./index-awljIyHI.js";import{r as a}from"./index-TT1qJ6UJ.js";import{R as n}from"./editor-8WwPqQi6.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";import"./editor-SZLWA5DH.js";import"./index-SM3muJE2.js";import"./section-control-button-VtgjGcq5.js";import"./index-tFzzSRL2.js";import"./tex-error-view-Y2BSLjwB.js";import"./toggleable-caret-lFiCktzo.js";const ao={title:"PerseusEditor/Widgets/Radio Editor"},l=m.StyleSheet.create({wrapper:{width:338}}),c={content:`Which of the following values of $x$ satisfies the equation $\\sqrt{64}=x$ ? [[☃ radio 1]] diff --git a/assets/radio.stories-28ncjrw-.js b/assets/radio.stories-28ncjrw-.js index d76baa4a7d..eed64c5a60 100644 --- a/assets/radio.stories-28ncjrw-.js +++ b/assets/radio.stories-28ncjrw-.js @@ -1,4 +1,4 @@ -import{j as M}from"./jsx-runtime-FVsy8kgq.js";import{R as O}from"./renderer-with-debug-ui-o6OVhJgg.js";import{q as w,c as b,m as I,a as y}from"./radio.testdata-sITJ8lxE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const fo={title:"Perseus/Widgets/Radio",args:{static:!1,crossOutEnabled:!1,reviewMode:!1,showSolutions:"none",question:w},argTypes:{showSolutions:{options:["none","all","selected"],control:{type:"select"}}},render:t=>M(O,{question:C(t),apiOptions:E(t),reviewMode:t.reviewMode,showSolutions:t.showSolutions})},C=t=>{const m={...t.question,widgets:{}};for(const[f,W]of Object.entries(t.question.widgets))m.widgets[f]={...W,static:t.static};return m},E=t=>({crossOutEnabled:t.crossOutEnabled}),o={args:{question:w}},i={args:{question:b}},r={args:{question:I}},e={args:{question:y}};var p,s,a;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`{ +import{j as M}from"./jsx-runtime-FVsy8kgq.js";import{R as O}from"./renderer-with-debug-ui-o6OVhJgg.js";import{q as w,c as b,m as I,a as y}from"./radio.testdata-sITJ8lxE.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const fo={title:"Perseus/Widgets/Radio",args:{static:!1,crossOutEnabled:!1,reviewMode:!1,showSolutions:"none",question:w},argTypes:{showSolutions:{options:["none","all","selected"],control:{type:"select"}}},render:t=>M(O,{question:C(t),apiOptions:E(t),reviewMode:t.reviewMode,showSolutions:t.showSolutions})},C=t=>{const m={...t.question,widgets:{}};for(const[f,W]of Object.entries(t.question.widgets))m.widgets[f]={...W,static:t.static};return m},E=t=>({crossOutEnabled:t.crossOutEnabled}),o={args:{question:w}},i={args:{question:b}},r={args:{question:I}},e={args:{question:y}};var p,s,a;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`{ args: { question: questionWithPassage } diff --git a/assets/range-input-R0Q6JH86.js b/assets/range-input-R0Q6JH86.js index c0421cb90e..2efd62f8d0 100644 --- a/assets/range-input-R0Q6JH86.js +++ b/assets/range-input-R0Q6JH86.js @@ -1 +1 @@ -import{a as l,j as o}from"./jsx-runtime-FVsy8kgq.js";import{P as s}from"./index-k-0mNqHS.js";import{r as p}from"./index-TT1qJ6UJ.js";import{N as n}from"./number-input-dpusjjfa.js";const c=()=>!0,t=class t extends p.Component{constructor(){super(...arguments),this.onChange=(e,r)=>{const a=this.props.value;e===0?this.props.onChange([r,a[1]]):this.props.onChange([a[0],r])}}render(){const e=this.props.value,r=this.props.checkValidity||c;return l("div",{className:"range-input",children:[o(n,{...this.props,value:e[0],checkValidity:a=>r([a,e[1]]),onChange:this.onChange.bind(this,0),placeholder:this.props.placeholder[0]}),o(n,{...this.props,value:e[1],checkValidity:a=>r([e[0],a]),onChange:this.onChange.bind(this,1),placeholder:this.props.placeholder[1]})]})}};t.propTypes={value:s.array.isRequired,onChange:s.func.isRequired,placeholder:s.array,checkValidity:s.func},t.defaultProps={placeholder:[null,null]};let i=t;i.__docgenInfo={description:"",methods:[{name:"onChange",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null},{name:"newVal",optional:!1,type:null}],returns:null}],displayName:"RangeInput",props:{placeholder:{defaultValue:{value:"[null, null]",computed:!1},description:"",type:{name:"array"},required:!1},value:{description:"",type:{name:"array"},required:!0},onChange:{description:"",type:{name:"func"},required:!0},checkValidity:{description:"",type:{name:"func"},required:!1}}};export{i as R}; +import{a as l,j as o}from"./jsx-runtime-FVsy8kgq.js";import{P as s}from"./index-0C4KXdeC.js";import{r as p}from"./index-TT1qJ6UJ.js";import{N as n}from"./number-input-dpusjjfa.js";const c=()=>!0,t=class t extends p.Component{constructor(){super(...arguments),this.onChange=(e,r)=>{const a=this.props.value;e===0?this.props.onChange([r,a[1]]):this.props.onChange([a[0],r])}}render(){const e=this.props.value,r=this.props.checkValidity||c;return l("div",{className:"range-input",children:[o(n,{...this.props,value:e[0],checkValidity:a=>r([a,e[1]]),onChange:this.onChange.bind(this,0),placeholder:this.props.placeholder[0]}),o(n,{...this.props,value:e[1],checkValidity:a=>r([e[0],a]),onChange:this.onChange.bind(this,1),placeholder:this.props.placeholder[1]})]})}};t.propTypes={value:s.array.isRequired,onChange:s.func.isRequired,placeholder:s.array,checkValidity:s.func},t.defaultProps={placeholder:[null,null]};let i=t;i.__docgenInfo={description:"",methods:[{name:"onChange",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null},{name:"newVal",optional:!1,type:null}],returns:null}],displayName:"RangeInput",props:{placeholder:{defaultValue:{value:"[null, null]",computed:!1},description:"",type:{name:"array"},required:!1},value:{description:"",type:{name:"array"},required:!0},onChange:{description:"",type:{name:"func"},required:!0},checkValidity:{description:"",type:{name:"func"},required:!1}}};export{i as R}; diff --git a/assets/range-input.stories-LiUT95hU.js b/assets/range-input.stories-LiUT95hU.js index ee5f712edd..993c1c9dbd 100644 --- a/assets/range-input.stories-LiUT95hU.js +++ b/assets/range-input.stories-LiUT95hU.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-FVsy8kgq.js";import{R as o}from"./range-input-R0Q6JH86.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./number-input-dpusjjfa.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";const N={title:"Perseus/Components/Range Input"},e=s=>t(o,{onChange:()=>{},value:[]}),r=s=>t(o,{onChange:()=>{},value:[-10,10]}),a=s=>t(o,{onChange:()=>{},placeholder:["?","!"],value:[]});e.__docgenInfo={description:"",methods:[],displayName:"EmptyValueArray"};r.__docgenInfo={description:"",methods:[],displayName:"SimpleWithSmallValueRanges"};a.__docgenInfo={description:"",methods:[],displayName:"Placeholders"};var n,p,m;e.parameters={...e.parameters,docs:{...(n=e.parameters)==null?void 0:n.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as t}from"./jsx-runtime-FVsy8kgq.js";import{R as o}from"./range-input-R0Q6JH86.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./number-input-dpusjjfa.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";const N={title:"Perseus/Components/Range Input"},e=s=>t(o,{onChange:()=>{},value:[]}),r=s=>t(o,{onChange:()=>{},value:[-10,10]}),a=s=>t(o,{onChange:()=>{},placeholder:["?","!"],value:[]});e.__docgenInfo={description:"",methods:[],displayName:"EmptyValueArray"};r.__docgenInfo={description:"",methods:[],displayName:"SimpleWithSmallValueRanges"};a.__docgenInfo={description:"",methods:[],displayName:"Placeholders"};var n,p,m;e.parameters={...e.parameters,docs:{...(n=e.parameters)==null?void 0:n.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return {}} value={[]} />; }`,...(m=(p=e.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};var l,c,i;r.parameters={...r.parameters,docs:{...(l=r.parameters)==null?void 0:l.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return {}} value={[-10, 10]} />; diff --git a/assets/register-all-widgets-and-editors-for-testing-Ftx4wZEN.js b/assets/register-all-widgets-and-editors-for-testing-Ftx4wZEN.js index 28e2212dab..e470cf6e5d 100644 --- a/assets/register-all-widgets-and-editors-for-testing-Ftx4wZEN.js +++ b/assets/register-all-widgets-and-editors-for-testing-Ftx4wZEN.js @@ -1 +1 @@ -import{j as t,a}from"./jsx-runtime-FVsy8kgq.js";import{a as $e,c as h,p as c,G as Fe,v as Be,M as He,x as je,y as Ke,T as Ye,w as Ge}from"./article-renderer-o95CuJpS.js";import{_ as l,$ as Je}from"./jquery-yG1GhClm.js";import{E as Xe,U as de,r as Ze}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import{L as Ee}from"./svg-image-Rjw-_QTV.js";import{A as we}from"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import{S as Qe,r as et,b as tt,a as st,c as at}from"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import{g as We}from"./dependencies-8XILypbq.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{r as u}from"./index-TT1qJ6UJ.js";import{C as rt}from"./categorizer-editor-aJj5kcPa.js";import{c as f}from"./components-0kNWnYe6.js";import{E as g}from"./editor-jsonify-yP45H1ib.js";import{C as w}from"./index-QCAhLhLD.js";import{P as n}from"./index-0C4KXdeC.js";import{B as y}from"./blur-input-hjJsfoK9.js";import{D as nt}from"./definition-editor-koC6zgjU.js";import{D as it}from"./dropdown-editor-vzCR7Y_E.js";import{E as lt}from"./explanation-editor-QNDSiyWl.js";import{E as ot}from"./expression-editor-gbMGfXvL.js";import{I as pt}from"./icon-paths-AuJwhOz7.js";import{l as $}from"./index-awljIyHI.js";import{E as b}from"./editor-SZLWA5DH.js";import{G as ut}from"./graph-settings-LBBYDOUY.js";import{I as ht}from"./image-editor-ifkVG3z1.js";import{I as ct}from"./input-number-editor-ncl_GOvQ.js";import{I as dt}from"./index-uK3b_Y1s.js";import{I as mt}from"./interactive-graph-editor-PeMztHwk.js";import{L as gt}from"./label-image-editor-Z5_dot8_.js";import{M as ft}from"./matcher-editor-hlzTMdtB.js";import{N as yt}from"./number-line-editor-t3bGT3LG.js";import{N as bt}from"./numeric-input-editor-QUZ56KMx.js";import{P as vt}from"./phet-simulation-editor-0655QF05.js";import{R as oe}from"./index-7vsPyIck.js";import{P as wt}from"./python-program-editor-SPqpWu4A.js";import{R as Ct}from"./editor-8WwPqQi6.js";import{S as Tt}from"./sorter-editor-Kj6XqnPI.js";const ua=$e({displayName:"JsonEditor",getInitialState:function(){return{currentValue:JSON.stringify(this.props.value,null,4),valid:!0}},UNSAFE_componentWillReceiveProps:function(o){(!this.state.valid||!l.isEqual(o.value,JSON.parse(this.state.currentValue)))&&this.setState(this.getInitialState())},handleKeyDown:function(o){if(o.key==="Tab"){const e=o.target.selectionStart,s=o.target.value,r=s.substring(0,e),i=s.substring(e,s.length);o.target.value=r+" "+i,o.target.selectionStart=r.length+4,o.target.selectionEnd=r.length+4,o.preventDefault(),this.handleChange(o)}},handleChange:function(o){const e=o.target.value;try{let s=JSON.parse(e);l.isString(s)&&(s=JSON.parse(s)),this.setState({currentValue:e,valid:!0},function(){this.props.onChange(s)})}catch{this.setState({currentValue:e,valid:!1})}},handleBlur:function(o){const e=o.target.value;try{let s=JSON.parse(e);l.isString(s)&&(s=JSON.parse(s)),this.setState({currentValue:JSON.stringify(s,null,4),valid:!0},function(){this.props.onChange(s)})}catch{this.setState({currentValue:JSON.stringify(this.props.value,null,4),valid:!0})}},render:function(){const o="perseus-json-editor "+(this.state.valid?"valid":"invalid");return t("textarea",{className:o,value:this.state.currentValue,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleBlur})}});let Ne=0;const me={},ge={};window.iframeDataStore={};window.addEventListener("message",o=>{if(typeof o.data=="string"){const e=me[o.data];e&&e()}else o.data.id&&(o.data.height!==void 0?ge[o.data.id](o.data.height):o.data.lintWarnings&&Ee.log("LINTER REPORT",{lintWarnings:JSON.stringify(o.data.lintWarnings)}))});class xt extends u.Component{constructor(){super(...arguments),this.container=u.createRef()}componentDidMount(){this._isMounted=!0,this.iframeID=Ne,Ne++,this._prepareFrame(),me[this.iframeID]=()=>{this.sendNewData(this._lastData)},ge[this.iframeID]=e=>{this._lastHeight=e,this._isMounted&&this.props.seamless&&this.container.current&&(this.container.current.style.height=e+"px")}}shouldComponentUpdate(e){return e.datasetValue!==this.props.datasetValue||e.seamless!==this.props.seamless}componentDidUpdate(e){this.container.current&&(this.props.seamless?this.container.current.style.height=this._lastHeight+"px":this.container.current.style.height="100%"),e.datasetValue!==this.props.datasetValue&&this._prepareFrame()}componentWillUnmount(){me[this.iframeID]=null,ge[this.iframeID]=null,this._isMounted=!1}_prepareFrame(){var s,r;this._frame&&((s=this.container.current)==null||s.removeChild(this._frame));const e=document.createElement("iframe");e.style.width="100%",e.style.height="100%",e.src=this.props.url,this.props.datasetKey&&(e.dataset[this.props.datasetKey]=this.props.datasetValue),e.dataset.id=String(this.iframeID),this.props.seamless&&(e.dataset.lintGutter="true"),(r=this.container.current)==null||r.appendChild(e),this._frame=e}sendNewData(e){const s=this._frame;this._isMounted&&e&&(s!=null&&s.contentWindow)&&(this._lastData=e,window.iframeDataStore[this.iframeID]=e,s.contentWindow.postMessage(this.iframeID,"*"))}render(){return t("div",{ref:this.container,style:{width:"100%",height:"100%"}})}}xt.__docgenInfo={description:"",methods:[{name:"_prepareFrame",docblock:null,modifiers:[],params:[],returns:null},{name:"sendNewData",docblock:null,modifiers:[],params:[{name:"data",optional:!1,type:{name:"any"}}],returns:null}],displayName:"IframeContentRenderer",props:{url:{required:!0,tsType:{name:"string"},description:""},datasetKey:{required:!0,tsType:{name:"string"},description:""},datasetValue:{required:!0,tsType:{name:"any"},description:""},seamless:{required:!0,tsType:{name:"boolean"},description:""}}};const{InfoTip:Se}=f,Ie=400,Oe=400;var T;let kt=(T=class extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){return a("fieldset",{className:"pair-editor",children:[a("label",{children:["Name:"," ",t(y,{value:this.props.name,onChange:this.change("name")})]}),a("label",{children:[" ","Value:"," ",t(y,{value:this.props.value,onChange:this.change("value")})]})]})}},T.propTypes={...c,name:n.string,value:n.string},T.defaultProps={name:"",value:""},T);var M;let Nt=(M=class extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handlePairChange=(e,s)=>{const r=this.props.pairs.slice();r[e]=s;const i=r[r.length-1];i.name&&i.value&&r.push({name:"",value:""}),this.change("pairs",r)},this.serialize=()=>g.serialize.call(this)}render(){const e=l.map(this.props.pairs,(s,r)=>t(kt,{name:s.name,value:s.value,onChange:this.handlePairChange.bind(this,r)},r));return t("div",{children:e})}},M.propTypes={...c,pairs:n.arrayOf(n.shape({name:n.string,value:n.string})).isRequired},M);const St=/khanacademy\.org\/computer-programming\/[^\/]+\/(\d+)/;function It(o){const e=St.exec(o);return e&&(o=e[1]),o}const k=class k extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this._handleSettingsChange=e=>{this.change({settings:e.pairs})},this._handleProgramIDChange=e=>{e=It(e);const{isDevServer:s,InitialRequestUrl:r}=We(),p=`${s?r.origin:"https://www.khanacademy.org"}/api/internal/scratchpads/${e}`;Je.getJSON(p).done(m=>{const d=m.userAuthoredContentType;this.change({width:m.width,height:m.height,programID:e,programType:d})}).fail((m,d,v)=>{Ee.error("Error retrieving scratchpad info for program ID ",Xe.TransientService,{cause:v,loggedMetadata:{textStatus:d,programID:e}}),this.change({width:Ie,height:Oe,programID:e,programType:null})})},this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:[a("label",{children:["Url or Program ID:"," ",t(y,{value:this.props.programID,onChange:this._handleProgramIDChange})]}),t("br",{}),t(w,{label:"Show Editor",checked:this.props.showEditor,onChange:e=>{this.props.onChange({showEditor:e})}}),t(Se,{children:'If you show the editor, you should use the "full-width" alignment to make room for the width of the editor.'}),t("br",{}),t(w,{label:"Show Buttons",checked:this.props.showButtons,onChange:e=>{this.props.onChange({showButtons:e})}}),t("br",{}),a("label",{children:["Settings:",t(Nt,{name:"settings",pairs:this.props.settings,onChange:this._handleSettingsChange}),a(Se,{children:["Settings that you add here are available to the program as an object returned by ",t("code",{children:"Program.settings()"})]})]})]})}};k.propTypes={...c},k.widgetName="cs-program",k.defaultProps={programID:"",programType:null,settings:[{name:"",value:""}],showEditor:!1,showButtons:!1,width:Ie,height:Oe};let F=k;F.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"_handleSettingsChange",docblock:null,modifiers:[],params:[{name:"settings",optional:!1,type:null}],returns:null},{name:"_handleProgramIDChange",docblock:null,modifiers:[],params:[{name:"programID",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"CSProgramEditor",props:{programID:{defaultValue:{value:'""',computed:!1},required:!1},programType:{defaultValue:{value:"null",computed:!1},required:!1},settings:{defaultValue:{value:'[{name: "", value: ""}]',computed:!1},required:!1},showEditor:{defaultValue:{value:"false",computed:!1},required:!1},showButtons:{defaultValue:{value:"false",computed:!1},required:!1},width:{defaultValue:{value:"400",computed:!1},required:!1},height:{defaultValue:{value:"400",computed:!1},required:!1}},composes:["@khanacademy/perseus"]};const Ce=class Ce extends u.Component{serialize(){return g.serialize.call(this)}render(){return a("div",{children:[t("p",{children:"This widget has been deprecated and removed"}),t("p",{children:"Learners will see a message and they will not be graded on this part. Please replace this widget with a supported one."})]})}};Ce.widgetName="deprecated-standin";let B=Ce;B.__docgenInfo={description:"",methods:[{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"any"}}}],displayName:"DeprecatedStandinEditor",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(options: any) => void",signature:{arguments:[{type:{name:"any"},name:"options"}],return:{name:"void"}}},description:""}}};const{InlineIcon:qe,TextInput:Ot}=f,{iconPlus:qt,iconTrash:zt}=pt,N=class N extends u.Component{constructor(){super(...arguments),this.editor=u.createRef(),this.hintEditor=u.createRef(),this.change=(...e)=>h.apply(this,e),this.handleAddHint=()=>{const e={content:""};this.props.onChange({hint:e},()=>{var s;(s=this.hintEditor.current)==null||s.focus()})},this.handleRemoveHint=e=>{this.props.onChange({hint:null})},this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=()=>{var e,s;return{title:this.props.title,...(e=this.editor.current)==null?void 0:e.serialize(),hint:(s=this.hintEditor.current)==null?void 0:s.serialize()}}}render(){return a("div",{className:"perseus-group-editor",children:[t("div",{className:"perseus-widget-row",children:a("label",{className:$.css(pe.title),children:["Title:"," ",t(Ot,{value:this.props.title,className:$.css(pe.input),onChange:this.change("title")})]})}),t(b,{ref:this.editor,content:this.props.content,widgets:this.props.widgets,apiOptions:this.props.apiOptions,images:this.props.images,widgetEnabled:!0,immutableWidgets:!1,onChange:this.props.onChange,warnNoPrompt:!0,warnNoWidgets:!0}),!this.props.hint&&a("button",{type:"button",style:{marginTop:10},className:"add-hint simple-button orange",onClick:this.handleAddHint,children:[t(qe,{...qt})," Add a hint"]}),this.props.hint&&a("div",{className:"perseus-hint-editor",children:[t("div",{className:$.css(pe.hintsTitle),children:"Hint"}),t(b,{ref:this.hintEditor,content:this.props.hint?this.props.hint.content:"",widgets:this.props.hint?this.props.hint.widgets:{},apiOptions:this.props.apiOptions,images:this.props.hint&&this.props.hint.images,widgetEnabled:!0,immutableWidgets:!1,onChange:e=>{this.change("hint",Object.assign({},this.props.hint,e))}}),a("button",{type:"button",className:"remove-hint simple-button orange",onClick:this.handleRemoveHint,children:[t(qe,{...zt})," Remove this hint"]})]})]})}};N.propTypes={...c,title:n.string,content:n.string,widgets:n.object,images:n.object,apiOptions:we.propTypes},N.widgetName="graded-group",N.defaultProps={title:"",content:"",widgets:{},images:{},hint:null};let C=N;const pe=$.StyleSheet.create({title:{fontSize:18,fontWeight:"bold"},input:{fontSize:18},hintsTitle:{marginTop:10,fontSize:"110%",fontWeight:"bold"}});C.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleAddHint",docblock:null,modifiers:[],params:[],returns:null},{name:"handleRemoveHint",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GradedGroupEditor",props:{title:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},content:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},widgets:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},images:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},hint:{defaultValue:{value:"null",computed:!1},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1}},composes:["@khanacademy/perseus"]};const S=class S extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.getSaveWarnings=()=>[].concat(...this._editors.map(e=>e?e.getSaveWarnings():[])),this.serialize=()=>({gradedGroups:this.props.gradedGroups}),this.renderGroups=()=>this.props.gradedGroups?this.props.gradedGroups.map((e,s)=>t(C,{ref:r=>this._editors[s]=r,...e,apiOptions:this.props.apiOptions,widgetEnabled:!0,immutableWidgets:!1,onChange:r=>this.change("gradedGroups",Rt(this.props.gradedGroups,s,{...this.props.gradedGroups[s],...r}))},s)):null,this.addGroup=()=>{const e=this.props.gradedGroups||[];this.change("gradedGroups",e.concat([C.defaultProps]))}}UNSAFE_componentWillMount(){this._editors=[]}render(){return a("div",{className:"perseus-group-editor",children:[this.renderGroups(),t("button",{onClick:this.addGroup,children:"Add group"})]})}};S.propTypes={...c,apiOptions:we.propTypes,gradedGroups:n.array,onChange:n.func.isRequired},S.widgetName="graded-group-set",S.defaultProps={gradedGroups:[]};let H=S;const Rt=(o,e,s)=>[...o.slice(0,e),s,...o.slice(e+1)];H.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null},{name:"renderGroups",docblock:null,modifiers:[],params:[],returns:null},{name:"addGroup",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GradedGroupSetEditor",props:{gradedGroups:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"array"},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1},onChange:{description:"",type:{name:"func"},required:!0}},composes:["@khanacademy/perseus"]};const{InfoTip:Vt,MultiButtonGroup:At}=f,{containerSizeClass:Pt,getInteractiveBoxFromSizeClass:Lt}=Qe,Ut=Fe.widget,{DEFAULT_GRAPHER_PROPS:ue,allTypes:Dt,chooseType:Mt,defaultPlotProps:_t,getEquationString:Et,typeToButton:Wt}=Be,I=class I extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handleAvailableTypesChange=e=>{let s=this.props.correct;if(!l.contains(e,this.props.correct.type)){const r=this.props.graph,i=Mt(e);s=_t(i,r)}this.props.onChange({availableTypes:e,correct:s})},this.serialize=()=>l.chain(this.props).pick("correct","availableTypes").extend({graph:l.omit(this.props.graph,"box")}).value()}render(){const e=Pt.SMALL;let s,r;if(this.props.graph.valid===!0){const i={graph:this.props.graph,plot:this.props.correct,availableTypes:this.props.availableTypes,onChange:(p,m)=>{var v;let d=this.props.correct;d.type===((v=p.plot)==null?void 0:v.type)?d=l.extend({},d,p.plot):d=p.plot,this.props.onChange({correct:d},m)},trackInteraction:function(){}};r=t(Ut,{...i,apiOptions:this.props.apiOptions,containerSizeClass:e}),s=Et(i)}else r=t("div",{className:"perseus-error",children:this.props.graph.valid});return a("div",{children:[a("div",{children:["Correct answer"," ",t(Vt,{children:t("p",{children:"Graph the correct answer in the graph below and ensure the equation or point coordinates displayed represent the correct answer."})})," ",": ",s]}),t(ut,{editableSettings:["graph","snap","image"],box:Lt(e),range:this.props.graph.range,labels:this.props.graph.labels,step:this.props.graph.step,gridStep:this.props.graph.gridStep,snapStep:this.props.graph.snapStep,valid:this.props.graph.valid,backgroundImage:this.props.graph.backgroundImage,markings:this.props.graph.markings,rulerLabel:this.props.graph.rulerLabel,rulerTicks:this.props.graph.rulerTicks,showTooltips:this.props.graph.showTooltips,onChange:this.change("graph")}),a("div",{className:"perseus-widget-row",children:[t("label",{children:"Available functions: "}),t(At,{allowEmpty:!1,values:this.props.availableTypes,buttons:l.map(Dt,Wt),onChange:this.handleAvailableTypesChange})]}),r]})}};I.propTypes={...c},I.widgetName="grapher",I.defaultProps={correct:ue.plot,graph:ue.graph,availableTypes:ue.availableTypes};let j=I;j.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleAvailableTypesChange",docblock:null,modifiers:[],params:[{name:"newAvailableTypes",optional:!1,type:{name:"Array",elements:[{name:"any"}],raw:"Array",alias:"Array"}}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GrapherEditor",props:{correct:{defaultValue:{value:"DEFAULT_GRAPHER_PROPS.plot",computed:!0},required:!1},graph:{defaultValue:{value:"DEFAULT_GRAPHER_PROPS.graph",computed:!0},required:!1},availableTypes:{defaultValue:{value:"DEFAULT_GRAPHER_PROPS.availableTypes",computed:!0},required:!1}},composes:["@khanacademy/perseus"]};const O=class O extends u.Component{constructor(){super(...arguments),this.editor=u.createRef(),this._renderMetadataEditor=()=>{const e=this.props.apiOptions.GroupMetadataEditor;return t(e,{value:this.props.metadata,onChange:this.change("metadata")})},this.change=(...e)=>h.apply(this,e),this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=()=>{var e;return l.extend({},(e=this.editor.current)==null?void 0:e.serialize(),{metadata:this.props.metadata})}}render(){return a("div",{className:"perseus-group-editor",children:[t("div",{children:this._renderMetadataEditor()}),t(b,{ref:this.editor,content:this.props.content,widgets:this.props.widgets,apiOptions:this.props.apiOptions,images:this.props.images,widgetEnabled:!0,immutableWidgets:!1,onChange:this.props.onChange})]})}};O.propTypes={...c,content:n.string,widgets:n.object,images:n.object,metadata:n.any,apiOptions:we.propTypes},O.widgetName="group",O.defaultProps={content:"",widgets:{},images:{},metadata:void 0};let K=O;K.__docgenInfo={description:"",methods:[{name:"_renderMetadataEditor",docblock:null,modifiers:[],params:[],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GroupEditor",props:{content:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},widgets:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},images:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},metadata:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"any"},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1}},composes:["@khanacademy/perseus"]};const ne=class ne extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){return a("fieldset",{children:[a("label",{children:["Name:",t(y,{value:this.props.name,onChange:this.change("name")})]}),a("label",{children:["Value:",t(y,{value:this.props.value,onChange:this.change("value")})]})]})}};ne.propTypes={...c,name:n.string,value:n.string},ne.defaultProps={name:"",value:""};let fe=ne;const Te=class Te extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handlePairChange=(e,s)=>{const r=this.props.pairs.slice();r[e]=s;const i=r[r.length-1];i.name&&i.value&&r.push({name:"",value:""}),this.change("pairs",r)},this.serialize=()=>g.serialize.call(this)}render(){const e=l.map(this.props.pairs,(s,r)=>t(fe,{name:s.name,value:s.value,onChange:this.handlePairChange.bind(this,r)},r));return t("div",{children:e})}};Te.propTypes={...c,pairs:n.arrayOf(n.shape({name:n.string,value:n.string})).isRequired};let ye=Te;const q=class q extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handleSettingsChange=e=>{this.change({settings:e.pairs})},this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:[a("div",{style:{fontWeight:"bold",textAlign:"center"},children:["This widget is deprecated! ",t("br",{}),"Try using the Video or CS Program widgets instead."]}),a("label",{children:["Url or Program ID:",t(y,{value:this.props.url,onChange:this.change("url")})]}),t("br",{}),a("label",{children:["Settings:",t(ye,{name:"settings",pairs:this.props.settings,onChange:this.handleSettingsChange})]}),t("br",{}),a("label",{children:["Width:",t(y,{value:this.props.width,onChange:this.change("width")})]}),a("label",{children:["Height:",t(y,{value:this.props.height,onChange:this.change("height")})]}),t(w,{label:"Allow full screen",checked:this.props.allowFullScreen,onChange:e=>{this.props.onChange({allowFullScreen:e})}}),t("br",{}),t(w,{label:"Allow iframe content to redirect the page",checked:this.props.allowTopNavigation,onChange:e=>{this.props.onChange({allowTopNavigation:e})}})]})}};q.propTypes={...c},q.widgetName="iframe",q.defaultProps={url:"",settings:[{name:"",value:""}],width:"400",height:"400",allowFullScreen:!1,allowTopNavigation:!1};let Y=q;Y.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleSettingsChange",docblock:null,modifiers:[],params:[{name:"settings",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"IframeEditor",props:{url:{defaultValue:{value:'""',computed:!1},required:!1},settings:{defaultValue:{value:'[{name: "", value: ""}]',computed:!1},required:!1},width:{defaultValue:{value:'"400"',computed:!1},required:!1},height:{defaultValue:{value:'"400"',computed:!1},required:!1},allowFullScreen:{defaultValue:{value:"false",computed:!1},required:!1},allowTopNavigation:{defaultValue:{value:"false",computed:!1},required:!1}},composes:["@khanacademy/perseus"]};const{RangeInput:$t}=f,Ft=He.widget,ze=6,Bt=function(o){const e=[1,1];return l(o).each((s,r)=>{let i=0;l(s).each((p,m)=>{p!=null&&p.toString().length&&(i=m+1)}),e[1]=Math.max(e[1],i),i>0&&(e[0]=Math.max(e[0],r+1))}),e},z=class z extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.onMatrixBoardSizeChange=e=>{const s=Bt(this.props.answers);if(e[0]!==null&&e[1]!==null){e=[Math.round(Math.min(Math.max(e[0],1),ze)),Math.round(Math.min(Math.max(e[1],1),ze))];const r=l(Math.min(e[0],s[0])).times(i=>l(Math.min(e[1],s[1])).times(p=>this.props.answers[i][p]));this.props.onChange({matrixBoardSize:e,answers:r})}},this.serialize=()=>g.serialize.call(this)}render(){const e=l.extend({numericInput:!0,onBlur:()=>{},onFocus:()=>{},trackInteraction:()=>{}},this.props);return a("div",{className:"perseus-matrix-editor",children:[a("div",{className:"perseus-widget-row",children:[" ","Max matrix size:"," ",t($t,{value:this.props.matrixBoardSize,onChange:this.onMatrixBoardSizeChange,format:this.props.labelStyle,useArrowKeys:!0})]}),t("div",{className:"perseus-widget-row",children:t(Ft,{...e})}),a("div",{className:"perseus-widget-row",children:[" ","Matrix prefix:"," ",t(b,{ref:"prefix",apiOptions:this.props.apiOptions,content:this.props.prefix,widgetEnabled:!1,onChange:s=>{this.change({prefix:s.content})}})]}),a("div",{className:"perseus-widget-row",children:[" ","Matrix suffix:"," ",t(b,{ref:"suffix",apiOptions:this.props.apiOptions,content:this.props.suffix,widgetEnabled:!1,onChange:s=>{this.change({suffix:s.content})}})]})]})}};z.propTypes={...c,matrixBoardSize:n.arrayOf(n.number).isRequired,answers:n.arrayOf(n.arrayOf(n.number)),prefix:n.string,suffix:n.string,cursorPosition:n.arrayOf(n.number)},z.widgetName="matrix",z.defaultProps={matrixBoardSize:[3,3],answers:[[]],prefix:"",suffix:"",cursorPosition:[0,0]};let G=z;G.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"onMatrixBoardSizeChange",docblock:null,modifiers:[],params:[{name:"range",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MatrixEditor",props:{matrixBoardSize:{defaultValue:{value:"[3, 3]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},answers:{defaultValue:{value:"[[]]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"arrayOf",value:{name:"number"}}},required:!1},prefix:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},suffix:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},cursorPosition:{defaultValue:{value:"[0, 0]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:Ht,NumberInput:_,RangeInput:jt}=f,Kt={url:null,top:0,left:0},R=class R extends u.Component{constructor(){super(...arguments),this.className="perseus-widget-measurer",this.change=(...e)=>h.apply(this,e),this._changeUrl=e=>{this._changeImage("url",e.target.value)},this._changeTop=e=>{this._changeImage("top",e)},this._changeLeft=e=>{this._changeImage("left",e)},this._changeImage=(e,s)=>{const r=l.clone(this.props.image);r[e]=s,this.change("image",r)},this.renderLabelChoices=e=>l.map(e,function(s){const[r,i]=s;return t("option",{value:i,children:r},i)}),this.serialize=()=>g.serialize.call(this)}render(){const e=l.extend({},Kt,this.props.image);return a("div",{className:"perseus-widget-measurer",children:[t("div",{children:"Image displayed under protractor and/or ruler:"}),a("div",{children:["URL:"," ",t("input",{type:"text",className:"perseus-widget-measurer-url",ref:"image-url",defaultValue:e.url,onChange:this._changeUrl}),t(Ht,{children:t("p",{children:'Create an image in graphie, or use the "Add image" function to create a background.'})})]}),e.url&&a("div",{className:"perseus-widget-row",children:[a("label",{className:"perseus-widget-left-col",children:["Pixels from top:"," ",t(_,{placeholder:0,onChange:this._changeTop,value:e.top,useArrowKeys:!0})]}),a("label",{className:"perseus-widget-right-col",children:["Pixels from left:"," ",t(_,{placeholder:0,onChange:this._changeLeft,value:e.left,useArrowKeys:!0})]})]}),a("div",{children:["Containing area [width, height]:"," ",t(jt,{onChange:this.change("box"),value:this.props.box,useArrowKeys:!0})]}),a("div",{className:"perseus-widget-row",children:[t("div",{className:"perseus-widget-left-col",children:t(w,{label:"Show ruler",checked:this.props.showRuler,onChange:s=>{this.props.onChange({showRuler:s})}})}),t("div",{className:"perseus-widget-right-col",children:t(w,{label:"Show protractor",checked:this.props.showProtractor,onChange:s=>{this.props.onChange({showProtractor:s})}})})]}),this.props.showRuler&&a("div",{children:[t("div",{children:a("label",{children:[" ","Ruler label:"," ",a("select",{onChange:s=>this.change("rulerLabel",s.target.value),value:this.props.rulerLabel,children:[t("option",{value:"",children:"None"}),t("optgroup",{label:"Metric",children:this.renderLabelChoices([["milimeters","mm"],["centimeters","cm"],["meters","m"],["kilometers","km"]])}),t("optgroup",{label:"Imperial",children:this.renderLabelChoices([["inches","in"],["feet","ft"],["yards","yd"],["miles","mi"]])})]})]})}),t("div",{children:a("label",{children:[" ","Ruler ticks:"," ",t("select",{onChange:s=>this.change("rulerTicks",+s.target.value),value:this.props.rulerTicks,children:l.map([1,2,4,8,10,16],function(s){return t("option",{value:s,children:s},s)})})]})}),t("div",{children:a("label",{children:["Ruler pixels per unit:"," ",t(_,{placeholder:40,onChange:this.change("rulerPixels"),value:this.props.rulerPixels,useArrowKeys:!0})]})}),t("div",{children:a("label",{children:["Ruler length in units:"," ",t(_,{placeholder:10,onChange:this.change("rulerLength"),value:this.props.rulerLength,useArrowKeys:!0})]})})]})]})}};R.widgetName="measurer",R.propTypes={...c,box:n.arrayOf(n.number),image:n.shape({url:n.string,top:n.number,left:n.number}),showProtractor:n.bool,showRuler:n.bool,rulerLabel:n.string,rulerTicks:n.number,rulerPixels:n.number,rulerLength:n.number},R.defaultProps={box:[480,480],image:{},showProtractor:!0,showRuler:!1,rulerLabel:"",rulerTicks:10,rulerPixels:40,rulerLength:10};let J=R;J.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"_changeUrl",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_changeTop",docblock:null,modifiers:[],params:[{name:"newTop",optional:!1,type:null}],returns:null},{name:"_changeLeft",docblock:null,modifiers:[],params:[{name:"newLeft",optional:!1,type:null}],returns:null},{name:"_changeImage",docblock:null,modifiers:[],params:[{name:"subProp",optional:!1,type:null},{name:"newValue",optional:!1,type:null}],returns:null},{name:"renderLabelChoices",docblock:null,modifiers:[],params:[{name:"choices",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MeasurerEditor",props:{box:{defaultValue:{value:"[480, 480]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},image:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"shape",value:{url:{name:"string",required:!1},top:{name:"number",required:!1},left:{name:"number",required:!1}}},required:!1},showProtractor:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},showRuler:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},rulerLabel:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},rulerTicks:{defaultValue:{value:"10",computed:!1},description:"",type:{name:"number"},required:!1},rulerPixels:{defaultValue:{value:"40",computed:!1},description:"",type:{name:"number"},required:!1},rulerLength:{defaultValue:{value:"10",computed:!1},description:"",type:{name:"number"},required:!1}},composes:["@khanacademy/perseus"]};const{NumberInput:Yt,TextInput:Gt}=f,ie=class ie extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.updateMolecule=e=>{this.change({smiles:e})},this.updateRotation=e=>{this.change({rotationAngle:e})},this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:[t("div",{children:a("label",{children:["SMILES: ",t(Gt,{onChange:this.updateMolecule,value:this.props.smiles})]})}),t("div",{children:a("label",{children:["Rotation (deg): ",t(Yt,{onChange:this.updateRotation,value:this.props.rotationAngle})]})})]})}};ie.propTypes={...c,rotationAngle:n.number,smiles:n.string},ie.widgetName="molecule-renderer";let X=ie;X.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"updateMolecule",docblock:null,modifiers:[],params:[{name:"newValue",optional:!1,type:null}],returns:null},{name:"updateRotation",docblock:null,modifiers:[],params:[{name:"newValue",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MoleculeWidgetEditor",props:{rotationAngle:{description:"",type:{name:"number"},required:!1},smiles:{description:"",type:{name:"string"},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:E,TextListEditor:Re}=f,he="normal",Ve="auto",ce="horizontal",Ae="vertical",V=class V extends u.Component{constructor(){super(...arguments),this.onOptionsChange=(e,s,r)=>{const i={};i[e]=l.map(s,function(p){return{content:p}}),this.props.onChange(i,r)},this.onLayoutChange=e=>{this.props.onChange({layout:e.target.value})},this.onHeightChange=e=>{this.props.onChange({height:e.target.value})},this.serialize=()=>({options:l.chain(l.pluck(this.props.correctOptions,"content")).union(l.pluck(this.props.otherOptions,"content")).uniq().reject(function(s){return s===""}).sort().sortBy(function(s){return/\d/.test(s)?0:/^\$?[a-zA-Z]+\$?$/.test(s)?2:1}).map(function(s){return{content:s}}).value(),correctOptions:this.props.correctOptions,otherOptions:this.props.otherOptions,height:this.props.height,layout:this.props.layout})}render(){return a("div",{className:"perseus-widget-orderer",children:[a("div",{children:[" ","Correct answer:"," ",t(E,{children:t("p",{children:"Place the cards in the correct order. The same card can be used more than once in the answer but will only be displayed once at the top of a stack of identical cards."})})]}),t(Re,{options:l.pluck(this.props.correctOptions,"content"),onChange:this.onOptionsChange.bind(this,"correctOptions"),layout:this.props.layout}),a("div",{children:[" ","Other cards:"," ",t(E,{children:t("p",{children:"Create cards that are not part of the answer."})})]}),t(Re,{options:l.pluck(this.props.otherOptions,"content"),onChange:this.onOptionsChange.bind(this,"otherOptions"),layout:this.props.layout}),a("div",{children:[a("label",{children:[" ","Layout:"," ",a("select",{value:this.props.layout,onChange:this.onLayoutChange,children:[t("option",{value:ce,children:"Horizontal"}),t("option",{value:Ae,children:"Vertical"})]})]}),t(E,{children:t("p",{children:"Use the horizontal layout for short text and small images. The vertical layout is best for longer text (e.g. proofs)."})})]}),a("div",{children:[a("label",{children:[" ","Height:"," ",a("select",{value:this.props.height,onChange:this.onHeightChange,children:[t("option",{value:he,children:"Normal"}),t("option",{value:Ve,children:"Automatic"})]})]}),t(E,{children:t("p",{children:'Use "Normal" for text, "Automatic" for images.'})})]})]})}};V.propTypes={correctOptions:n.array,otherOptions:n.array,height:n.oneOf([he,Ve]),layout:n.oneOf([ce,Ae]),onChange:n.func.isRequired},V.widgetName="orderer",V.defaultProps={correctOptions:[{content:"$x$"}],otherOptions:[{content:"$y$"}],height:he,layout:ce};let Z=V;Z.__docgenInfo={description:"",methods:[{name:"onOptionsChange",docblock:null,modifiers:[],params:[{name:"whichOptions",optional:!1,type:null},{name:"options",optional:!1,type:null},{name:"cb",optional:!1,type:null}],returns:null},{name:"onLayoutChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"onHeightChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"OrdererEditor",props:{correctOptions:{defaultValue:{value:'[{content: "$x$"}]',computed:!1},description:"",type:{name:"array"},required:!1},otherOptions:{defaultValue:{value:'[{content: "$y$"}]',computed:!1},description:"",type:{name:"array"},required:!1},height:{defaultValue:{value:'"normal"',computed:!1},description:"",type:{name:"enum",value:[{value:'"normal"',computed:!1},{value:'"auto"',computed:!1}]},required:!1},layout:{defaultValue:{value:'"horizontal"',computed:!1},description:"",type:{name:"enum",value:[{value:'"horizontal"',computed:!1},{value:'"vertical"',computed:!1}]},required:!1},onChange:{description:"",type:{name:"func"},required:!0}}};const{InfoTip:Pe}=f,A=class A extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){const e=t(b,{ref:"passage-editor",apiOptions:this.props.apiOptions,content:this.props.passageText,widgetEnabled:!1,placeholder:"Type passage here...",onChange:r=>{this.change({passageText:r.content})},showWordCount:!0}),s=t(b,{ref:"passage-footnotes-editor",apiOptions:this.props.apiOptions,content:this.props.footnotes,widgetEnabled:!1,placeholder:"Type footnotes here...",onChange:r=>{this.change({footnotes:r.content})}});return a("div",{className:"perseus-widget-passage-editor",children:[t("div",{className:"perseus-widget-row",children:t(w,{label:"Show line numbers",checked:this.props.showLineNumbers,onChange:r=>{this.props.onChange({showLineNumbers:r})}})}),a("div",{children:["Passage title:",t(Pe,{children:t("p",{children:"An optional title that will appear directly above the passage in the same font style. (E.g. Passage 1)"})}),t("div",{children:t("input",{type:"text",defaultValue:this.props.passageTitle,onChange:r=>{this.change({passageTitle:r.target.value})}})})]}),a("div",{children:["Passage Text:",e]}),a("div",{children:["Footnotes:",t(Pe,{children:t("p",{children:"To add footnotes, add ^ characters where they belong in the passage. Then, add ^ in the footnotes area to reference the footnotes in the passage."})}),s]})]})}};A.propTypes={...c,passageTitle:n.string,passageText:n.string,footnotes:n.string,showLineNumbers:n.bool},A.widgetName="passage",A.defaultProps={passageTitle:"",passageText:"",footnotes:"",showLineNumbers:!0};let Q=A;Q.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PassageEditor",props:{passageTitle:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},passageText:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},footnotes:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},showLineNumbers:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:Jt,NumberInput:Le,TextInput:Xt}=f,P=class P extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:[t("div",{children:a("label",{children:["Passage Number: ",t(Le,{value:this.props.passageNumber,onChange:this.change("passageNumber")})]})}),t("div",{children:a("label",{children:["Reference Number: ",t(Le,{value:this.props.referenceNumber,onChange:this.change("referenceNumber")})]})}),t("div",{children:a("label",{children:["Summary Text: ",t(Xt,{value:this.props.summaryText,onChange:this.change("summaryText")}),a(Jt,{children:[t("p",{children:"Short summary of the referenced section. This will be included in parentheses and quotes automatically."}),t("p",{children:"Ex: The start ... the end"})]})]})})]})}};P.propTypes={...c,passageNumber:n.number,referenceNumber:n.number,summaryText:n.string},P.widgetName="passage-ref",P.defaultProps={passageNumber:1,referenceNumber:1,summaryText:""};let ee=P;ee.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PassageRefEditor",props:{passageNumber:{defaultValue:{value:"1",computed:!1},description:"",type:{name:"number"},required:!1},referenceNumber:{defaultValue:{value:"1",computed:!1},description:"",type:{name:"number"},required:!1},summaryText:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1}},composes:["@khanacademy/perseus"]};const L=class L extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handleContentChange=e=>{this.change({content:e.target.value})},this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:["Content:",t("input",{type:"text",value:this.props.content,onChange:this.handleContentChange})]})}};L.propTypes={...c,content:n.string},L.widgetName="passage-ref-target",L.defaultProps={content:""};let te=L;te.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleContentChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PassageRefTargetEditor",props:{content:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:x,NumberInput:Ue,RangeInput:Zt,TextListEditor:Qt}=f,es=je.widget,be="starting",ve="correct",ts=[be,ve];function De(o,e,s){const r=l.clone(o);r.length=e;for(let i=o.length;i"$"+Ze(o,2)+"$",le=class le extends u.Component{constructor(){super(...arguments),this.state={editing:this.props.static?be:ve,pic:null,loadedUrl:null,minX:null,maxX:null,tickStep:null},this.fetchPic=e=>{if(this.state.loadedUrl!==e){const s=new Image;s.src=e,s.onload=()=>{this.setState({pic:s,loadedUrl:e})}}},this.handleChangeTickStep=e=>{this.setState({tickStep:e})},this.handleChangeRange=e=>{this.setState({minX:e[0],maxX:e[1]})},this.changeLabelInterval=e=>{this.props.onChange({labelInterval:e})},this.handlePlotterChange=e=>{const s={};s[this.state.editing]=e.values,this.props.onChange(s)},this.changeType=e=>{let s;if(e==="histogram"?(s=[Me(0)].concat(this.props.categories),this.props.onChange({type:e,categories:s})):this.props.type==="histogram"?(s=this.props.categories.slice(1),this.props.onChange({type:e,categories:s})):this.props.onChange({type:e}),s){const r=oe.findDOMNode(this.refs.categories);r.value=s.join(", ")}},this.changeLabel=(e,s)=>{const r=l.clone(this.props.labels);r[e]=s.target.value,this.props.onChange({labels:r})},this.changePicUrl=e=>{const s=de.getRealImageUrl(e);this.props.onChange({picUrl:s})},this.changeCategories=e=>{let s=e.length;this.props.type==="histogram"&&s--;const r=this.props.scaleY;this.props.onChange({categories:e,correct:De(this.props.correct,s,r),starting:De(this.props.starting,s,r)})},this.changeScale=e=>{const s=this.props.scaleY,r=+e.target.value||W.scaleY,i=function(m){return m*r/s},p=i(this.props.maxY);this.props.onChange({scaleY:r,maxY:p,correct:l.map(this.props.correct,i),starting:l.map(this.props.starting,i)}),oe.findDOMNode(this.refs.maxY).value=p},this.changeMax=e=>{this.props.onChange({maxY:+e.target.value||W.maxY})},this.changeSnaps=e=>{this.props.onChange({snapsPerLine:+e.target.value||W.snapsPerLine})},this.changeEditing=e=>{this.setState({editing:e})},this.setCategoriesFromScale=()=>{const e=this.state.tickStep||1,s=this.state.minX||0,r=this.state.maxX||0,i=Math.floor((r-s)/e)*e;let p;this.props.type==="histogram"||this.props.type==="dotplot"?p=l.range(0,i+e,e):p=l.range(e,i+e,e),p=l.map(p,d=>d+s),p=l.map(p,Me),this.changeCategories(p);const m=oe.findDOMNode(this.refs.categories);m.value=p.join(", ")},this.serialize=()=>{const e=l.pick(this.props,"correct","starting","type","labels","categories","scaleY","maxY","snapsPerLine","labelInterval");return this.props.type==="pic"&&(e.picUrl=this.props.picUrl),e}}UNSAFE_componentWillMount(){this.fetchPic(this.props.picUrl)}UNSAFE_componentWillReceiveProps(e){this.fetchPic(e.picUrl),e.static&&this.setState({editing:"starting"})}render(){const e=l.contains(["line","histogram","dotplot"],this.props.type),s=!l.contains(["pic","dotplot"],this.props.type),r={trackInteraction:()=>{},...this.props};return a("div",{className:"perseus-widget-plotter-editor",children:[a("div",{children:["Chart type:"," ",Ke.map(i=>a("label",{children:[t("input",{type:"radio",name:"chart-type",checked:this.props.type===i,onChange:l.partial(this.changeType,i)}),i]},i),this)]}),a("div",{children:["Labels:"," ",["x","y"].map((i,p)=>a("label",{children:[i+":",t("input",{type:"text",onChange:l.partial(this.changeLabel,p),defaultValue:this.props.labels[p]})]},i),this)]}),e&&a("div",{className:"set-from-scale-box",children:[t("span",{className:"categories-title",children:"Set Categories From Scale"}),a("div",{children:[a("label",{children:["Tick Step:"," ",t(Ue,{placeholder:1,useArrowKeys:!0,value:this.state.tickStep,onChange:this.handleChangeTickStep})]}),t(x,{children:t("p",{children:"The difference between adjacent ticks."})})]}),t("div",{children:a("label",{children:["Range:"," ",t(Zt,{placeholder:[0,10],useArrowKeys:!0,value:[this.state.minX,this.state.maxX],onChange:this.handleChangeRange})]})}),t("div",{children:a("button",{onClick:this.setCategoriesFromScale,children:["Set Categories"," "]})})]}),a("div",{children:[a("label",{children:["Label Interval:"," ",t(Ue,{useArrowKeys:!0,value:this.props.labelInterval,onChange:this.changeLabelInterval})]}),t(x,{children:t("p",{children:'Which ticks to display the labels for. For instance, setting this to "4" will only show every 4th label (plus the last one)'})})]}),this.props.type==="pic"&&a("div",{children:[a("label",{children:["Picture:"," ",t(y,{className:"pic-url",value:this.props.picUrl,onChange:this.changePicUrl}),t(x,{children:t("p",{children:'Use the default picture of Earth, or insert the URL for a different picture using the "Add image" function.'})})]}),this.state.pic&&this.state.pic.width!==this.state.pic.height&&a("p",{className:"warning",children:[t("b",{children:"Warning"}),": You are using a picture which is not square. This means the image will get distorted. You should probably crop it to be square."]})]}),t("div",{children:a("label",{children:["Categories:"," ",t(Qt,{ref:"categories",layout:"horizontal",options:this.props.categories,onChange:this.changeCategories})]})}),t("div",{children:a("label",{children:["Scale (y):"," ",t("input",{type:"text",onChange:this.changeScale,defaultValue:this.props.scaleY})]})}),t("div",{children:a("label",{children:["Max y:"," ",t("input",{type:"text",ref:"maxY",onChange:this.changeMax,defaultValue:this.props.maxY})]})}),s&&a("div",{children:[a("label",{children:["Snaps per line:"," ",t("input",{type:"text",onChange:this.changeSnaps,defaultValue:this.props.snapsPerLine})]}),t(x,{children:t("p",{children:"Creates the specified number of divisions between the horizontal lines. Fewer snaps between lines makes the graph easier for the student to create correctly."})})]}),a("div",{children:["Editing values:"," ",ts.map(i=>a("label",{children:[t("input",{type:"radio",disabled:i===ve&&this.props.static,checked:this.props.static?i===be:this.state.editing===i,onChange:p=>this.changeEditing(i)}),i]},i)),a(x,{children:[t("p",{children:"Use this toggle to switch between editing the correct answer (what the student will be graded on) and the starting values (what the student will see plotted when they start the problem). Note: These cannot be the same."}),t("p",{children:"In static mode, the starting values are rendered out to the displayed widget."})]})]}),t(es,{...r,starting:this.props[this.state.editing],onChange:this.handlePlotterChange})]})}};le.widgetName="plotter",le.defaultProps={...W,correct:[1],starting:[1],type:"bar",labels:["",""],categories:[""],picSize:30,picBoxHeight:36,plotDimensions:[275,200],labelInterval:1,get picUrl(){const e=We().staticUrl;return e?e("/images/badges/earth-small.png"):null}};let se=le;se.__docgenInfo={description:"",methods:[{name:"fetchPic",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:null}],returns:null},{name:"handleChangeTickStep",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"handleChangeRange",docblock:null,modifiers:[],params:[{name:"newValue",optional:!1,type:null}],returns:null},{name:"changeLabelInterval",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"handlePlotterChange",docblock:null,modifiers:[],params:[{name:"newProps",optional:!1,type:null}],returns:null},{name:"changeType",docblock:null,modifiers:[],params:[{name:"type",optional:!1,type:null}],returns:null},{name:"changeLabel",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"changePicUrl",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"changeCategories",docblock:null,modifiers:[],params:[{name:"categories",optional:!1,type:null}],returns:null},{name:"changeScale",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"changeMax",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"changeSnaps",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"changeEditing",docblock:null,modifiers:[],params:[{name:"editing",optional:!1,type:null}],returns:null},{name:"setCategoriesFromScale",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PlotterEditor",props:{type:{required:!1,tsType:{name:'PerseusPlotterWidgetOptions["type"]',raw:'PerseusPlotterWidgetOptions["type"]'},description:"",defaultValue:{value:'"bar"',computed:!1}},labels:{required:!1,tsType:{name:"Array",elements:[{name:"string"}],raw:"Array"},description:"",defaultValue:{value:'["", ""]',computed:!1}},categories:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]}],raw:"ReadonlyArray"},description:"",defaultValue:{value:'[""]',computed:!1}},scaleY:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},maxY:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"10",computed:!1}},snapsPerLine:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"2",computed:!1}},picSize:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"30",computed:!1}},picBoxHeight:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"36",computed:!1}},picUrl:{required:!0,tsType:{name:"string"},description:""},plotDimensions:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[275, 200]",computed:!1}},labelInterval:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},starting:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[1]",computed:!1}},correct:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[1]",computed:!1}},static:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"any"},description:""}}};const{InfoTip:ss,NumberInput:_e}=f,as=Ye.widget,U=class U extends u.Component{constructor(){super(...arguments),this.numberOfColumns=u.createRef(),this.focus=()=>{var e;(e=this.numberOfColumns.current)==null||e.focus()},this.onSizeInput=(e,s)=>{let r=+e||0,i=+s||0;r=Math.min(Math.max(1,r),30),i=Math.min(Math.max(1,i),6);const p=this.props.columns,m=this.props.rows,d=this.props.answers;r<=m?d.length=r:l(r-m).times(function(){d.push(de.stringArrayOfSize(p))});function v(ke){i<=p?ke.length=i:l(i-p).times(function(){ke.push("")})}const xe=this.props.headers;v(xe),l.each(d,v),this.props.onChange({rows:r,columns:i,answers:d,headers:xe})},this.serialize=()=>{const e=l.pick(this.props,"headers","rows","columns");return l.extend({},e,{answers:l.map(this.props.answers,l.clone)})}}render(){return a("div",{children:[t("div",{className:"perseus-widget-row",children:a("label",{children:["Number of columns:"," ",t(_e,{ref:this.numberOfColumns,value:this.props.columns,onChange:e=>{e&&this.onSizeInput(this.props.rows,e)},useArrowKeys:!0})]})}),t("div",{className:"perseus-widget-row",children:a("label",{children:["Number of rows:"," ",t(_e,{ref:"numberOfRows",value:this.props.rows,onChange:e=>{e&&this.onSizeInput(e,this.props.columns)},useArrowKeys:!0})]})}),a("div",{children:[" ","Table of answers:"," ",t(ss,{children:t("p",{children:"The student has to fill out all cells in the table. For partially filled tables create a table using the template, and insert text input boxes as desired."})})]}),t("div",{children:t(as,{headers:this.props.headers,answers:this.props.answers,onChange:this.props.onChange,apiOptions:this.props.apiOptions,editableHeaders:!0,onFocus:()=>{},onBlur:()=>{},trackInteraction:()=>{},Editor:b})})]})}};U.propTypes={rows:n.number,columns:n.number,headers:n.arrayOf(n.string),answers:n.arrayOf(n.arrayOf(n.string))},U.widgetName="table",U.defaultProps=function(){const r=l(4).times(function(){return de.stringArrayOfSize(1)});return{headers:[""],rows:4,columns:1,answers:r}}();let ae=U;ae.__docgenInfo={description:"",methods:[{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"onSizeInput",docblock:null,modifiers:[],params:[{name:"numRawRows",optional:!1,type:null},{name:"numRawColumns",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"TableEditor",props:{rows:{description:"",type:{name:"number"},required:!1},columns:{description:"",type:{name:"number"},required:!1},headers:{description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},answers:{description:"",type:{name:"arrayOf",value:{name:"arrayOf",value:{name:"string"}}},required:!1}}};const{InfoTip:rs}=f,ns=/khanacademy\.org\/.*\/v\/(.*)$/;function is(o){const e=ns.exec(o);return e?e[1]:o}const D=class D extends u.Component{constructor(){super(...arguments),this._handleUrlChange=e=>{this.props.onChange({location:is(e)})},this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){return t("div",{children:a("label",{children:["KA Video Slug:"," ",t(y,{value:this.props.location,style:{width:290},onChange:this._handleUrlChange}),t(rs,{children:"KA video URLs will be converted to just the slug."})]})})}};D.propTypes={...c,location:n.string,onChange:n.func},D.widgetName="video",D.defaultProps={location:""};let re=D;re.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"_handleUrlChange",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:null}],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"VideoEditor",props:{location:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},onChange:{description:"",type:{name:"func"},required:!1}},composes:["@khanacademy/perseus"]};const ls=[rt,F,nt,it,lt,ot,C,H,j,K,Y,ht,ct,dt,mt,gt,ft,G,J,X,yt,bt,Z,Q,ee,te,vt,se,wt,Tt,ae,re,Ct,B],ha=()=>{et(Ge),tt(ls),st(),at()};export{ls as A,xt as I,ua as J,ha as r}; +import{j as t,a}from"./jsx-runtime-FVsy8kgq.js";import{a as $e,c as h,p as c,G as Fe,v as Be,M as He,x as je,y as Ke,T as Ye,w as Ge}from"./article-renderer-o95CuJpS.js";import{_ as l,$ as Je}from"./jquery-yG1GhClm.js";import{E as Xe,U as de,r as Ze}from"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import{L as Ee}from"./svg-image-Rjw-_QTV.js";import{A as we}from"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import{S as Qe,r as et,b as tt,a as st,c as at}from"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import{g as We}from"./dependencies-8XILypbq.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{r as u}from"./index-TT1qJ6UJ.js";import{C as rt}from"./categorizer-editor-aJj5kcPa.js";import{c as f}from"./components-0kNWnYe6.js";import{E as g}from"./editor-jsonify-yP45H1ib.js";import{C as w}from"./index-QCAhLhLD.js";import{P as n}from"./index-k-0mNqHS.js";import{B as y}from"./blur-input-hjJsfoK9.js";import{D as nt}from"./definition-editor-koC6zgjU.js";import{D as it}from"./dropdown-editor-vzCR7Y_E.js";import{E as lt}from"./explanation-editor-QNDSiyWl.js";import{E as ot}from"./expression-editor-gbMGfXvL.js";import{I as pt}from"./icon-paths-AuJwhOz7.js";import{l as $}from"./index-awljIyHI.js";import{E as b}from"./editor-SZLWA5DH.js";import{G as ut}from"./graph-settings-LBBYDOUY.js";import{I as ht}from"./image-editor-ifkVG3z1.js";import{I as ct}from"./input-number-editor-ncl_GOvQ.js";import{I as dt}from"./index-uK3b_Y1s.js";import{I as mt}from"./interactive-graph-editor-PeMztHwk.js";import{L as gt}from"./label-image-editor-Z5_dot8_.js";import{M as ft}from"./matcher-editor-hlzTMdtB.js";import{N as yt}from"./number-line-editor-t3bGT3LG.js";import{N as bt}from"./numeric-input-editor-QUZ56KMx.js";import{P as vt}from"./phet-simulation-editor-0655QF05.js";import{R as oe}from"./index-7vsPyIck.js";import{P as wt}from"./python-program-editor-SPqpWu4A.js";import{R as Ct}from"./editor-8WwPqQi6.js";import{S as Tt}from"./sorter-editor-Kj6XqnPI.js";const ua=$e({displayName:"JsonEditor",getInitialState:function(){return{currentValue:JSON.stringify(this.props.value,null,4),valid:!0}},UNSAFE_componentWillReceiveProps:function(o){(!this.state.valid||!l.isEqual(o.value,JSON.parse(this.state.currentValue)))&&this.setState(this.getInitialState())},handleKeyDown:function(o){if(o.key==="Tab"){const e=o.target.selectionStart,s=o.target.value,r=s.substring(0,e),i=s.substring(e,s.length);o.target.value=r+" "+i,o.target.selectionStart=r.length+4,o.target.selectionEnd=r.length+4,o.preventDefault(),this.handleChange(o)}},handleChange:function(o){const e=o.target.value;try{let s=JSON.parse(e);l.isString(s)&&(s=JSON.parse(s)),this.setState({currentValue:e,valid:!0},function(){this.props.onChange(s)})}catch{this.setState({currentValue:e,valid:!1})}},handleBlur:function(o){const e=o.target.value;try{let s=JSON.parse(e);l.isString(s)&&(s=JSON.parse(s)),this.setState({currentValue:JSON.stringify(s,null,4),valid:!0},function(){this.props.onChange(s)})}catch{this.setState({currentValue:JSON.stringify(this.props.value,null,4),valid:!0})}},render:function(){const o="perseus-json-editor "+(this.state.valid?"valid":"invalid");return t("textarea",{className:o,value:this.state.currentValue,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleBlur})}});let Ne=0;const me={},ge={};window.iframeDataStore={};window.addEventListener("message",o=>{if(typeof o.data=="string"){const e=me[o.data];e&&e()}else o.data.id&&(o.data.height!==void 0?ge[o.data.id](o.data.height):o.data.lintWarnings&&Ee.log("LINTER REPORT",{lintWarnings:JSON.stringify(o.data.lintWarnings)}))});class xt extends u.Component{constructor(){super(...arguments),this.container=u.createRef()}componentDidMount(){this._isMounted=!0,this.iframeID=Ne,Ne++,this._prepareFrame(),me[this.iframeID]=()=>{this.sendNewData(this._lastData)},ge[this.iframeID]=e=>{this._lastHeight=e,this._isMounted&&this.props.seamless&&this.container.current&&(this.container.current.style.height=e+"px")}}shouldComponentUpdate(e){return e.datasetValue!==this.props.datasetValue||e.seamless!==this.props.seamless}componentDidUpdate(e){this.container.current&&(this.props.seamless?this.container.current.style.height=this._lastHeight+"px":this.container.current.style.height="100%"),e.datasetValue!==this.props.datasetValue&&this._prepareFrame()}componentWillUnmount(){me[this.iframeID]=null,ge[this.iframeID]=null,this._isMounted=!1}_prepareFrame(){var s,r;this._frame&&((s=this.container.current)==null||s.removeChild(this._frame));const e=document.createElement("iframe");e.style.width="100%",e.style.height="100%",e.src=this.props.url,this.props.datasetKey&&(e.dataset[this.props.datasetKey]=this.props.datasetValue),e.dataset.id=String(this.iframeID),this.props.seamless&&(e.dataset.lintGutter="true"),(r=this.container.current)==null||r.appendChild(e),this._frame=e}sendNewData(e){const s=this._frame;this._isMounted&&e&&(s!=null&&s.contentWindow)&&(this._lastData=e,window.iframeDataStore[this.iframeID]=e,s.contentWindow.postMessage(this.iframeID,"*"))}render(){return t("div",{ref:this.container,style:{width:"100%",height:"100%"}})}}xt.__docgenInfo={description:"",methods:[{name:"_prepareFrame",docblock:null,modifiers:[],params:[],returns:null},{name:"sendNewData",docblock:null,modifiers:[],params:[{name:"data",optional:!1,type:{name:"any"}}],returns:null}],displayName:"IframeContentRenderer",props:{url:{required:!0,tsType:{name:"string"},description:""},datasetKey:{required:!0,tsType:{name:"string"},description:""},datasetValue:{required:!0,tsType:{name:"any"},description:""},seamless:{required:!0,tsType:{name:"boolean"},description:""}}};const{InfoTip:Se}=f,Ie=400,Oe=400;var T;let kt=(T=class extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){return a("fieldset",{className:"pair-editor",children:[a("label",{children:["Name:"," ",t(y,{value:this.props.name,onChange:this.change("name")})]}),a("label",{children:[" ","Value:"," ",t(y,{value:this.props.value,onChange:this.change("value")})]})]})}},T.propTypes={...c,name:n.string,value:n.string},T.defaultProps={name:"",value:""},T);var M;let Nt=(M=class extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handlePairChange=(e,s)=>{const r=this.props.pairs.slice();r[e]=s;const i=r[r.length-1];i.name&&i.value&&r.push({name:"",value:""}),this.change("pairs",r)},this.serialize=()=>g.serialize.call(this)}render(){const e=l.map(this.props.pairs,(s,r)=>t(kt,{name:s.name,value:s.value,onChange:this.handlePairChange.bind(this,r)},r));return t("div",{children:e})}},M.propTypes={...c,pairs:n.arrayOf(n.shape({name:n.string,value:n.string})).isRequired},M);const St=/khanacademy\.org\/computer-programming\/[^\/]+\/(\d+)/;function It(o){const e=St.exec(o);return e&&(o=e[1]),o}const k=class k extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this._handleSettingsChange=e=>{this.change({settings:e.pairs})},this._handleProgramIDChange=e=>{e=It(e);const{isDevServer:s,InitialRequestUrl:r}=We(),p=`${s?r.origin:"https://www.khanacademy.org"}/api/internal/scratchpads/${e}`;Je.getJSON(p).done(m=>{const d=m.userAuthoredContentType;this.change({width:m.width,height:m.height,programID:e,programType:d})}).fail((m,d,v)=>{Ee.error("Error retrieving scratchpad info for program ID ",Xe.TransientService,{cause:v,loggedMetadata:{textStatus:d,programID:e}}),this.change({width:Ie,height:Oe,programID:e,programType:null})})},this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:[a("label",{children:["Url or Program ID:"," ",t(y,{value:this.props.programID,onChange:this._handleProgramIDChange})]}),t("br",{}),t(w,{label:"Show Editor",checked:this.props.showEditor,onChange:e=>{this.props.onChange({showEditor:e})}}),t(Se,{children:'If you show the editor, you should use the "full-width" alignment to make room for the width of the editor.'}),t("br",{}),t(w,{label:"Show Buttons",checked:this.props.showButtons,onChange:e=>{this.props.onChange({showButtons:e})}}),t("br",{}),a("label",{children:["Settings:",t(Nt,{name:"settings",pairs:this.props.settings,onChange:this._handleSettingsChange}),a(Se,{children:["Settings that you add here are available to the program as an object returned by ",t("code",{children:"Program.settings()"})]})]})]})}};k.propTypes={...c},k.widgetName="cs-program",k.defaultProps={programID:"",programType:null,settings:[{name:"",value:""}],showEditor:!1,showButtons:!1,width:Ie,height:Oe};let F=k;F.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"_handleSettingsChange",docblock:null,modifiers:[],params:[{name:"settings",optional:!1,type:null}],returns:null},{name:"_handleProgramIDChange",docblock:null,modifiers:[],params:[{name:"programID",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"CSProgramEditor",props:{programID:{defaultValue:{value:'""',computed:!1},required:!1},programType:{defaultValue:{value:"null",computed:!1},required:!1},settings:{defaultValue:{value:'[{name: "", value: ""}]',computed:!1},required:!1},showEditor:{defaultValue:{value:"false",computed:!1},required:!1},showButtons:{defaultValue:{value:"false",computed:!1},required:!1},width:{defaultValue:{value:"400",computed:!1},required:!1},height:{defaultValue:{value:"400",computed:!1},required:!1}},composes:["@khanacademy/perseus"]};const Ce=class Ce extends u.Component{serialize(){return g.serialize.call(this)}render(){return a("div",{children:[t("p",{children:"This widget has been deprecated and removed"}),t("p",{children:"Learners will see a message and they will not be graded on this part. Please replace this widget with a supported one."})]})}};Ce.widgetName="deprecated-standin";let B=Ce;B.__docgenInfo={description:"",methods:[{name:"serialize",docblock:null,modifiers:[],params:[],returns:{type:{name:"any"}}}],displayName:"DeprecatedStandinEditor",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(options: any) => void",signature:{arguments:[{type:{name:"any"},name:"options"}],return:{name:"void"}}},description:""}}};const{InlineIcon:qe,TextInput:Ot}=f,{iconPlus:qt,iconTrash:zt}=pt,N=class N extends u.Component{constructor(){super(...arguments),this.editor=u.createRef(),this.hintEditor=u.createRef(),this.change=(...e)=>h.apply(this,e),this.handleAddHint=()=>{const e={content:""};this.props.onChange({hint:e},()=>{var s;(s=this.hintEditor.current)==null||s.focus()})},this.handleRemoveHint=e=>{this.props.onChange({hint:null})},this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=()=>{var e,s;return{title:this.props.title,...(e=this.editor.current)==null?void 0:e.serialize(),hint:(s=this.hintEditor.current)==null?void 0:s.serialize()}}}render(){return a("div",{className:"perseus-group-editor",children:[t("div",{className:"perseus-widget-row",children:a("label",{className:$.css(pe.title),children:["Title:"," ",t(Ot,{value:this.props.title,className:$.css(pe.input),onChange:this.change("title")})]})}),t(b,{ref:this.editor,content:this.props.content,widgets:this.props.widgets,apiOptions:this.props.apiOptions,images:this.props.images,widgetEnabled:!0,immutableWidgets:!1,onChange:this.props.onChange,warnNoPrompt:!0,warnNoWidgets:!0}),!this.props.hint&&a("button",{type:"button",style:{marginTop:10},className:"add-hint simple-button orange",onClick:this.handleAddHint,children:[t(qe,{...qt})," Add a hint"]}),this.props.hint&&a("div",{className:"perseus-hint-editor",children:[t("div",{className:$.css(pe.hintsTitle),children:"Hint"}),t(b,{ref:this.hintEditor,content:this.props.hint?this.props.hint.content:"",widgets:this.props.hint?this.props.hint.widgets:{},apiOptions:this.props.apiOptions,images:this.props.hint&&this.props.hint.images,widgetEnabled:!0,immutableWidgets:!1,onChange:e=>{this.change("hint",Object.assign({},this.props.hint,e))}}),a("button",{type:"button",className:"remove-hint simple-button orange",onClick:this.handleRemoveHint,children:[t(qe,{...zt})," Remove this hint"]})]})]})}};N.propTypes={...c,title:n.string,content:n.string,widgets:n.object,images:n.object,apiOptions:we.propTypes},N.widgetName="graded-group",N.defaultProps={title:"",content:"",widgets:{},images:{},hint:null};let C=N;const pe=$.StyleSheet.create({title:{fontSize:18,fontWeight:"bold"},input:{fontSize:18},hintsTitle:{marginTop:10,fontSize:"110%",fontWeight:"bold"}});C.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleAddHint",docblock:null,modifiers:[],params:[],returns:null},{name:"handleRemoveHint",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GradedGroupEditor",props:{title:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},content:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},widgets:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},images:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},hint:{defaultValue:{value:"null",computed:!1},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1}},composes:["@khanacademy/perseus"]};const S=class S extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.getSaveWarnings=()=>[].concat(...this._editors.map(e=>e?e.getSaveWarnings():[])),this.serialize=()=>({gradedGroups:this.props.gradedGroups}),this.renderGroups=()=>this.props.gradedGroups?this.props.gradedGroups.map((e,s)=>t(C,{ref:r=>this._editors[s]=r,...e,apiOptions:this.props.apiOptions,widgetEnabled:!0,immutableWidgets:!1,onChange:r=>this.change("gradedGroups",Rt(this.props.gradedGroups,s,{...this.props.gradedGroups[s],...r}))},s)):null,this.addGroup=()=>{const e=this.props.gradedGroups||[];this.change("gradedGroups",e.concat([C.defaultProps]))}}UNSAFE_componentWillMount(){this._editors=[]}render(){return a("div",{className:"perseus-group-editor",children:[this.renderGroups(),t("button",{onClick:this.addGroup,children:"Add group"})]})}};S.propTypes={...c,apiOptions:we.propTypes,gradedGroups:n.array,onChange:n.func.isRequired},S.widgetName="graded-group-set",S.defaultProps={gradedGroups:[]};let H=S;const Rt=(o,e,s)=>[...o.slice(0,e),s,...o.slice(e+1)];H.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null},{name:"renderGroups",docblock:null,modifiers:[],params:[],returns:null},{name:"addGroup",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GradedGroupSetEditor",props:{gradedGroups:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"array"},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1},onChange:{description:"",type:{name:"func"},required:!0}},composes:["@khanacademy/perseus"]};const{InfoTip:Vt,MultiButtonGroup:At}=f,{containerSizeClass:Pt,getInteractiveBoxFromSizeClass:Lt}=Qe,Ut=Fe.widget,{DEFAULT_GRAPHER_PROPS:ue,allTypes:Dt,chooseType:Mt,defaultPlotProps:_t,getEquationString:Et,typeToButton:Wt}=Be,I=class I extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handleAvailableTypesChange=e=>{let s=this.props.correct;if(!l.contains(e,this.props.correct.type)){const r=this.props.graph,i=Mt(e);s=_t(i,r)}this.props.onChange({availableTypes:e,correct:s})},this.serialize=()=>l.chain(this.props).pick("correct","availableTypes").extend({graph:l.omit(this.props.graph,"box")}).value()}render(){const e=Pt.SMALL;let s,r;if(this.props.graph.valid===!0){const i={graph:this.props.graph,plot:this.props.correct,availableTypes:this.props.availableTypes,onChange:(p,m)=>{var v;let d=this.props.correct;d.type===((v=p.plot)==null?void 0:v.type)?d=l.extend({},d,p.plot):d=p.plot,this.props.onChange({correct:d},m)},trackInteraction:function(){}};r=t(Ut,{...i,apiOptions:this.props.apiOptions,containerSizeClass:e}),s=Et(i)}else r=t("div",{className:"perseus-error",children:this.props.graph.valid});return a("div",{children:[a("div",{children:["Correct answer"," ",t(Vt,{children:t("p",{children:"Graph the correct answer in the graph below and ensure the equation or point coordinates displayed represent the correct answer."})})," ",": ",s]}),t(ut,{editableSettings:["graph","snap","image"],box:Lt(e),range:this.props.graph.range,labels:this.props.graph.labels,step:this.props.graph.step,gridStep:this.props.graph.gridStep,snapStep:this.props.graph.snapStep,valid:this.props.graph.valid,backgroundImage:this.props.graph.backgroundImage,markings:this.props.graph.markings,rulerLabel:this.props.graph.rulerLabel,rulerTicks:this.props.graph.rulerTicks,showTooltips:this.props.graph.showTooltips,onChange:this.change("graph")}),a("div",{className:"perseus-widget-row",children:[t("label",{children:"Available functions: "}),t(At,{allowEmpty:!1,values:this.props.availableTypes,buttons:l.map(Dt,Wt),onChange:this.handleAvailableTypesChange})]}),r]})}};I.propTypes={...c},I.widgetName="grapher",I.defaultProps={correct:ue.plot,graph:ue.graph,availableTypes:ue.availableTypes};let j=I;j.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleAvailableTypesChange",docblock:null,modifiers:[],params:[{name:"newAvailableTypes",optional:!1,type:{name:"Array",elements:[{name:"any"}],raw:"Array",alias:"Array"}}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GrapherEditor",props:{correct:{defaultValue:{value:"DEFAULT_GRAPHER_PROPS.plot",computed:!0},required:!1},graph:{defaultValue:{value:"DEFAULT_GRAPHER_PROPS.graph",computed:!0},required:!1},availableTypes:{defaultValue:{value:"DEFAULT_GRAPHER_PROPS.availableTypes",computed:!0},required:!1}},composes:["@khanacademy/perseus"]};const O=class O extends u.Component{constructor(){super(...arguments),this.editor=u.createRef(),this._renderMetadataEditor=()=>{const e=this.props.apiOptions.GroupMetadataEditor;return t(e,{value:this.props.metadata,onChange:this.change("metadata")})},this.change=(...e)=>h.apply(this,e),this.getSaveWarnings=()=>{var e;return(e=this.editor.current)==null?void 0:e.getSaveWarnings()},this.serialize=()=>{var e;return l.extend({},(e=this.editor.current)==null?void 0:e.serialize(),{metadata:this.props.metadata})}}render(){return a("div",{className:"perseus-group-editor",children:[t("div",{children:this._renderMetadataEditor()}),t(b,{ref:this.editor,content:this.props.content,widgets:this.props.widgets,apiOptions:this.props.apiOptions,images:this.props.images,widgetEnabled:!0,immutableWidgets:!1,onChange:this.props.onChange})]})}};O.propTypes={...c,content:n.string,widgets:n.object,images:n.object,metadata:n.any,apiOptions:we.propTypes},O.widgetName="group",O.defaultProps={content:"",widgets:{},images:{},metadata:void 0};let K=O;K.__docgenInfo={description:"",methods:[{name:"_renderMetadataEditor",docblock:null,modifiers:[],params:[],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"getSaveWarnings",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"GroupEditor",props:{content:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},widgets:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},images:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"object"},required:!1},metadata:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"any"},required:!1},apiOptions:{description:"",type:{name:"custom",raw:"ApiOptions.propTypes"},required:!1}},composes:["@khanacademy/perseus"]};const ne=class ne extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){return a("fieldset",{children:[a("label",{children:["Name:",t(y,{value:this.props.name,onChange:this.change("name")})]}),a("label",{children:["Value:",t(y,{value:this.props.value,onChange:this.change("value")})]})]})}};ne.propTypes={...c,name:n.string,value:n.string},ne.defaultProps={name:"",value:""};let fe=ne;const Te=class Te extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handlePairChange=(e,s)=>{const r=this.props.pairs.slice();r[e]=s;const i=r[r.length-1];i.name&&i.value&&r.push({name:"",value:""}),this.change("pairs",r)},this.serialize=()=>g.serialize.call(this)}render(){const e=l.map(this.props.pairs,(s,r)=>t(fe,{name:s.name,value:s.value,onChange:this.handlePairChange.bind(this,r)},r));return t("div",{children:e})}};Te.propTypes={...c,pairs:n.arrayOf(n.shape({name:n.string,value:n.string})).isRequired};let ye=Te;const q=class q extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handleSettingsChange=e=>{this.change({settings:e.pairs})},this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:[a("div",{style:{fontWeight:"bold",textAlign:"center"},children:["This widget is deprecated! ",t("br",{}),"Try using the Video or CS Program widgets instead."]}),a("label",{children:["Url or Program ID:",t(y,{value:this.props.url,onChange:this.change("url")})]}),t("br",{}),a("label",{children:["Settings:",t(ye,{name:"settings",pairs:this.props.settings,onChange:this.handleSettingsChange})]}),t("br",{}),a("label",{children:["Width:",t(y,{value:this.props.width,onChange:this.change("width")})]}),a("label",{children:["Height:",t(y,{value:this.props.height,onChange:this.change("height")})]}),t(w,{label:"Allow full screen",checked:this.props.allowFullScreen,onChange:e=>{this.props.onChange({allowFullScreen:e})}}),t("br",{}),t(w,{label:"Allow iframe content to redirect the page",checked:this.props.allowTopNavigation,onChange:e=>{this.props.onChange({allowTopNavigation:e})}})]})}};q.propTypes={...c},q.widgetName="iframe",q.defaultProps={url:"",settings:[{name:"",value:""}],width:"400",height:"400",allowFullScreen:!1,allowTopNavigation:!1};let Y=q;Y.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleSettingsChange",docblock:null,modifiers:[],params:[{name:"settings",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"IframeEditor",props:{url:{defaultValue:{value:'""',computed:!1},required:!1},settings:{defaultValue:{value:'[{name: "", value: ""}]',computed:!1},required:!1},width:{defaultValue:{value:'"400"',computed:!1},required:!1},height:{defaultValue:{value:'"400"',computed:!1},required:!1},allowFullScreen:{defaultValue:{value:"false",computed:!1},required:!1},allowTopNavigation:{defaultValue:{value:"false",computed:!1},required:!1}},composes:["@khanacademy/perseus"]};const{RangeInput:$t}=f,Ft=He.widget,ze=6,Bt=function(o){const e=[1,1];return l(o).each((s,r)=>{let i=0;l(s).each((p,m)=>{p!=null&&p.toString().length&&(i=m+1)}),e[1]=Math.max(e[1],i),i>0&&(e[0]=Math.max(e[0],r+1))}),e},z=class z extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.onMatrixBoardSizeChange=e=>{const s=Bt(this.props.answers);if(e[0]!==null&&e[1]!==null){e=[Math.round(Math.min(Math.max(e[0],1),ze)),Math.round(Math.min(Math.max(e[1],1),ze))];const r=l(Math.min(e[0],s[0])).times(i=>l(Math.min(e[1],s[1])).times(p=>this.props.answers[i][p]));this.props.onChange({matrixBoardSize:e,answers:r})}},this.serialize=()=>g.serialize.call(this)}render(){const e=l.extend({numericInput:!0,onBlur:()=>{},onFocus:()=>{},trackInteraction:()=>{}},this.props);return a("div",{className:"perseus-matrix-editor",children:[a("div",{className:"perseus-widget-row",children:[" ","Max matrix size:"," ",t($t,{value:this.props.matrixBoardSize,onChange:this.onMatrixBoardSizeChange,format:this.props.labelStyle,useArrowKeys:!0})]}),t("div",{className:"perseus-widget-row",children:t(Ft,{...e})}),a("div",{className:"perseus-widget-row",children:[" ","Matrix prefix:"," ",t(b,{ref:"prefix",apiOptions:this.props.apiOptions,content:this.props.prefix,widgetEnabled:!1,onChange:s=>{this.change({prefix:s.content})}})]}),a("div",{className:"perseus-widget-row",children:[" ","Matrix suffix:"," ",t(b,{ref:"suffix",apiOptions:this.props.apiOptions,content:this.props.suffix,widgetEnabled:!1,onChange:s=>{this.change({suffix:s.content})}})]})]})}};z.propTypes={...c,matrixBoardSize:n.arrayOf(n.number).isRequired,answers:n.arrayOf(n.arrayOf(n.number)),prefix:n.string,suffix:n.string,cursorPosition:n.arrayOf(n.number)},z.widgetName="matrix",z.defaultProps={matrixBoardSize:[3,3],answers:[[]],prefix:"",suffix:"",cursorPosition:[0,0]};let G=z;G.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"onMatrixBoardSizeChange",docblock:null,modifiers:[],params:[{name:"range",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MatrixEditor",props:{matrixBoardSize:{defaultValue:{value:"[3, 3]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},answers:{defaultValue:{value:"[[]]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"arrayOf",value:{name:"number"}}},required:!1},prefix:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},suffix:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},cursorPosition:{defaultValue:{value:"[0, 0]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:Ht,NumberInput:_,RangeInput:jt}=f,Kt={url:null,top:0,left:0},R=class R extends u.Component{constructor(){super(...arguments),this.className="perseus-widget-measurer",this.change=(...e)=>h.apply(this,e),this._changeUrl=e=>{this._changeImage("url",e.target.value)},this._changeTop=e=>{this._changeImage("top",e)},this._changeLeft=e=>{this._changeImage("left",e)},this._changeImage=(e,s)=>{const r=l.clone(this.props.image);r[e]=s,this.change("image",r)},this.renderLabelChoices=e=>l.map(e,function(s){const[r,i]=s;return t("option",{value:i,children:r},i)}),this.serialize=()=>g.serialize.call(this)}render(){const e=l.extend({},Kt,this.props.image);return a("div",{className:"perseus-widget-measurer",children:[t("div",{children:"Image displayed under protractor and/or ruler:"}),a("div",{children:["URL:"," ",t("input",{type:"text",className:"perseus-widget-measurer-url",ref:"image-url",defaultValue:e.url,onChange:this._changeUrl}),t(Ht,{children:t("p",{children:'Create an image in graphie, or use the "Add image" function to create a background.'})})]}),e.url&&a("div",{className:"perseus-widget-row",children:[a("label",{className:"perseus-widget-left-col",children:["Pixels from top:"," ",t(_,{placeholder:0,onChange:this._changeTop,value:e.top,useArrowKeys:!0})]}),a("label",{className:"perseus-widget-right-col",children:["Pixels from left:"," ",t(_,{placeholder:0,onChange:this._changeLeft,value:e.left,useArrowKeys:!0})]})]}),a("div",{children:["Containing area [width, height]:"," ",t(jt,{onChange:this.change("box"),value:this.props.box,useArrowKeys:!0})]}),a("div",{className:"perseus-widget-row",children:[t("div",{className:"perseus-widget-left-col",children:t(w,{label:"Show ruler",checked:this.props.showRuler,onChange:s=>{this.props.onChange({showRuler:s})}})}),t("div",{className:"perseus-widget-right-col",children:t(w,{label:"Show protractor",checked:this.props.showProtractor,onChange:s=>{this.props.onChange({showProtractor:s})}})})]}),this.props.showRuler&&a("div",{children:[t("div",{children:a("label",{children:[" ","Ruler label:"," ",a("select",{onChange:s=>this.change("rulerLabel",s.target.value),value:this.props.rulerLabel,children:[t("option",{value:"",children:"None"}),t("optgroup",{label:"Metric",children:this.renderLabelChoices([["milimeters","mm"],["centimeters","cm"],["meters","m"],["kilometers","km"]])}),t("optgroup",{label:"Imperial",children:this.renderLabelChoices([["inches","in"],["feet","ft"],["yards","yd"],["miles","mi"]])})]})]})}),t("div",{children:a("label",{children:[" ","Ruler ticks:"," ",t("select",{onChange:s=>this.change("rulerTicks",+s.target.value),value:this.props.rulerTicks,children:l.map([1,2,4,8,10,16],function(s){return t("option",{value:s,children:s},s)})})]})}),t("div",{children:a("label",{children:["Ruler pixels per unit:"," ",t(_,{placeholder:40,onChange:this.change("rulerPixels"),value:this.props.rulerPixels,useArrowKeys:!0})]})}),t("div",{children:a("label",{children:["Ruler length in units:"," ",t(_,{placeholder:10,onChange:this.change("rulerLength"),value:this.props.rulerLength,useArrowKeys:!0})]})})]})]})}};R.widgetName="measurer",R.propTypes={...c,box:n.arrayOf(n.number),image:n.shape({url:n.string,top:n.number,left:n.number}),showProtractor:n.bool,showRuler:n.bool,rulerLabel:n.string,rulerTicks:n.number,rulerPixels:n.number,rulerLength:n.number},R.defaultProps={box:[480,480],image:{},showProtractor:!0,showRuler:!1,rulerLabel:"",rulerTicks:10,rulerPixels:40,rulerLength:10};let J=R;J.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"_changeUrl",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"_changeTop",docblock:null,modifiers:[],params:[{name:"newTop",optional:!1,type:null}],returns:null},{name:"_changeLeft",docblock:null,modifiers:[],params:[{name:"newLeft",optional:!1,type:null}],returns:null},{name:"_changeImage",docblock:null,modifiers:[],params:[{name:"subProp",optional:!1,type:null},{name:"newValue",optional:!1,type:null}],returns:null},{name:"renderLabelChoices",docblock:null,modifiers:[],params:[{name:"choices",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MeasurerEditor",props:{box:{defaultValue:{value:"[480, 480]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"number"}},required:!1},image:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"shape",value:{url:{name:"string",required:!1},top:{name:"number",required:!1},left:{name:"number",required:!1}}},required:!1},showProtractor:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},showRuler:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},rulerLabel:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},rulerTicks:{defaultValue:{value:"10",computed:!1},description:"",type:{name:"number"},required:!1},rulerPixels:{defaultValue:{value:"40",computed:!1},description:"",type:{name:"number"},required:!1},rulerLength:{defaultValue:{value:"10",computed:!1},description:"",type:{name:"number"},required:!1}},composes:["@khanacademy/perseus"]};const{NumberInput:Yt,TextInput:Gt}=f,ie=class ie extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.updateMolecule=e=>{this.change({smiles:e})},this.updateRotation=e=>{this.change({rotationAngle:e})},this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:[t("div",{children:a("label",{children:["SMILES: ",t(Gt,{onChange:this.updateMolecule,value:this.props.smiles})]})}),t("div",{children:a("label",{children:["Rotation (deg): ",t(Yt,{onChange:this.updateRotation,value:this.props.rotationAngle})]})})]})}};ie.propTypes={...c,rotationAngle:n.number,smiles:n.string},ie.widgetName="molecule-renderer";let X=ie;X.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"updateMolecule",docblock:null,modifiers:[],params:[{name:"newValue",optional:!1,type:null}],returns:null},{name:"updateRotation",docblock:null,modifiers:[],params:[{name:"newValue",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"MoleculeWidgetEditor",props:{rotationAngle:{description:"",type:{name:"number"},required:!1},smiles:{description:"",type:{name:"string"},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:E,TextListEditor:Re}=f,he="normal",Ve="auto",ce="horizontal",Ae="vertical",V=class V extends u.Component{constructor(){super(...arguments),this.onOptionsChange=(e,s,r)=>{const i={};i[e]=l.map(s,function(p){return{content:p}}),this.props.onChange(i,r)},this.onLayoutChange=e=>{this.props.onChange({layout:e.target.value})},this.onHeightChange=e=>{this.props.onChange({height:e.target.value})},this.serialize=()=>({options:l.chain(l.pluck(this.props.correctOptions,"content")).union(l.pluck(this.props.otherOptions,"content")).uniq().reject(function(s){return s===""}).sort().sortBy(function(s){return/\d/.test(s)?0:/^\$?[a-zA-Z]+\$?$/.test(s)?2:1}).map(function(s){return{content:s}}).value(),correctOptions:this.props.correctOptions,otherOptions:this.props.otherOptions,height:this.props.height,layout:this.props.layout})}render(){return a("div",{className:"perseus-widget-orderer",children:[a("div",{children:[" ","Correct answer:"," ",t(E,{children:t("p",{children:"Place the cards in the correct order. The same card can be used more than once in the answer but will only be displayed once at the top of a stack of identical cards."})})]}),t(Re,{options:l.pluck(this.props.correctOptions,"content"),onChange:this.onOptionsChange.bind(this,"correctOptions"),layout:this.props.layout}),a("div",{children:[" ","Other cards:"," ",t(E,{children:t("p",{children:"Create cards that are not part of the answer."})})]}),t(Re,{options:l.pluck(this.props.otherOptions,"content"),onChange:this.onOptionsChange.bind(this,"otherOptions"),layout:this.props.layout}),a("div",{children:[a("label",{children:[" ","Layout:"," ",a("select",{value:this.props.layout,onChange:this.onLayoutChange,children:[t("option",{value:ce,children:"Horizontal"}),t("option",{value:Ae,children:"Vertical"})]})]}),t(E,{children:t("p",{children:"Use the horizontal layout for short text and small images. The vertical layout is best for longer text (e.g. proofs)."})})]}),a("div",{children:[a("label",{children:[" ","Height:"," ",a("select",{value:this.props.height,onChange:this.onHeightChange,children:[t("option",{value:he,children:"Normal"}),t("option",{value:Ve,children:"Automatic"})]})]}),t(E,{children:t("p",{children:'Use "Normal" for text, "Automatic" for images.'})})]})]})}};V.propTypes={correctOptions:n.array,otherOptions:n.array,height:n.oneOf([he,Ve]),layout:n.oneOf([ce,Ae]),onChange:n.func.isRequired},V.widgetName="orderer",V.defaultProps={correctOptions:[{content:"$x$"}],otherOptions:[{content:"$y$"}],height:he,layout:ce};let Z=V;Z.__docgenInfo={description:"",methods:[{name:"onOptionsChange",docblock:null,modifiers:[],params:[{name:"whichOptions",optional:!1,type:null},{name:"options",optional:!1,type:null},{name:"cb",optional:!1,type:null}],returns:null},{name:"onLayoutChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"onHeightChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"OrdererEditor",props:{correctOptions:{defaultValue:{value:'[{content: "$x$"}]',computed:!1},description:"",type:{name:"array"},required:!1},otherOptions:{defaultValue:{value:'[{content: "$y$"}]',computed:!1},description:"",type:{name:"array"},required:!1},height:{defaultValue:{value:'"normal"',computed:!1},description:"",type:{name:"enum",value:[{value:'"normal"',computed:!1},{value:'"auto"',computed:!1}]},required:!1},layout:{defaultValue:{value:'"horizontal"',computed:!1},description:"",type:{name:"enum",value:[{value:'"horizontal"',computed:!1},{value:'"vertical"',computed:!1}]},required:!1},onChange:{description:"",type:{name:"func"},required:!0}}};const{InfoTip:Pe}=f,A=class A extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){const e=t(b,{ref:"passage-editor",apiOptions:this.props.apiOptions,content:this.props.passageText,widgetEnabled:!1,placeholder:"Type passage here...",onChange:r=>{this.change({passageText:r.content})},showWordCount:!0}),s=t(b,{ref:"passage-footnotes-editor",apiOptions:this.props.apiOptions,content:this.props.footnotes,widgetEnabled:!1,placeholder:"Type footnotes here...",onChange:r=>{this.change({footnotes:r.content})}});return a("div",{className:"perseus-widget-passage-editor",children:[t("div",{className:"perseus-widget-row",children:t(w,{label:"Show line numbers",checked:this.props.showLineNumbers,onChange:r=>{this.props.onChange({showLineNumbers:r})}})}),a("div",{children:["Passage title:",t(Pe,{children:t("p",{children:"An optional title that will appear directly above the passage in the same font style. (E.g. Passage 1)"})}),t("div",{children:t("input",{type:"text",defaultValue:this.props.passageTitle,onChange:r=>{this.change({passageTitle:r.target.value})}})})]}),a("div",{children:["Passage Text:",e]}),a("div",{children:["Footnotes:",t(Pe,{children:t("p",{children:"To add footnotes, add ^ characters where they belong in the passage. Then, add ^ in the footnotes area to reference the footnotes in the passage."})}),s]})]})}};A.propTypes={...c,passageTitle:n.string,passageText:n.string,footnotes:n.string,showLineNumbers:n.bool},A.widgetName="passage",A.defaultProps={passageTitle:"",passageText:"",footnotes:"",showLineNumbers:!0};let Q=A;Q.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PassageEditor",props:{passageTitle:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},passageText:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},footnotes:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},showLineNumbers:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:Jt,NumberInput:Le,TextInput:Xt}=f,P=class P extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:[t("div",{children:a("label",{children:["Passage Number: ",t(Le,{value:this.props.passageNumber,onChange:this.change("passageNumber")})]})}),t("div",{children:a("label",{children:["Reference Number: ",t(Le,{value:this.props.referenceNumber,onChange:this.change("referenceNumber")})]})}),t("div",{children:a("label",{children:["Summary Text: ",t(Xt,{value:this.props.summaryText,onChange:this.change("summaryText")}),a(Jt,{children:[t("p",{children:"Short summary of the referenced section. This will be included in parentheses and quotes automatically."}),t("p",{children:"Ex: The start ... the end"})]})]})})]})}};P.propTypes={...c,passageNumber:n.number,referenceNumber:n.number,summaryText:n.string},P.widgetName="passage-ref",P.defaultProps={passageNumber:1,referenceNumber:1,summaryText:""};let ee=P;ee.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PassageRefEditor",props:{passageNumber:{defaultValue:{value:"1",computed:!1},description:"",type:{name:"number"},required:!1},referenceNumber:{defaultValue:{value:"1",computed:!1},description:"",type:{name:"number"},required:!1},summaryText:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1}},composes:["@khanacademy/perseus"]};const L=class L extends u.Component{constructor(){super(...arguments),this.change=(...e)=>h.apply(this,e),this.handleContentChange=e=>{this.change({content:e.target.value})},this.serialize=()=>g.serialize.call(this)}render(){return a("div",{children:["Content:",t("input",{type:"text",value:this.props.content,onChange:this.handleContentChange})]})}};L.propTypes={...c,content:n.string},L.widgetName="passage-ref-target",L.defaultProps={content:""};let te=L;te.__docgenInfo={description:"",methods:[{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"handleContentChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PassageRefTargetEditor",props:{content:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1}},composes:["@khanacademy/perseus"]};const{InfoTip:x,NumberInput:Ue,RangeInput:Zt,TextListEditor:Qt}=f,es=je.widget,be="starting",ve="correct",ts=[be,ve];function De(o,e,s){const r=l.clone(o);r.length=e;for(let i=o.length;i"$"+Ze(o,2)+"$",le=class le extends u.Component{constructor(){super(...arguments),this.state={editing:this.props.static?be:ve,pic:null,loadedUrl:null,minX:null,maxX:null,tickStep:null},this.fetchPic=e=>{if(this.state.loadedUrl!==e){const s=new Image;s.src=e,s.onload=()=>{this.setState({pic:s,loadedUrl:e})}}},this.handleChangeTickStep=e=>{this.setState({tickStep:e})},this.handleChangeRange=e=>{this.setState({minX:e[0],maxX:e[1]})},this.changeLabelInterval=e=>{this.props.onChange({labelInterval:e})},this.handlePlotterChange=e=>{const s={};s[this.state.editing]=e.values,this.props.onChange(s)},this.changeType=e=>{let s;if(e==="histogram"?(s=[Me(0)].concat(this.props.categories),this.props.onChange({type:e,categories:s})):this.props.type==="histogram"?(s=this.props.categories.slice(1),this.props.onChange({type:e,categories:s})):this.props.onChange({type:e}),s){const r=oe.findDOMNode(this.refs.categories);r.value=s.join(", ")}},this.changeLabel=(e,s)=>{const r=l.clone(this.props.labels);r[e]=s.target.value,this.props.onChange({labels:r})},this.changePicUrl=e=>{const s=de.getRealImageUrl(e);this.props.onChange({picUrl:s})},this.changeCategories=e=>{let s=e.length;this.props.type==="histogram"&&s--;const r=this.props.scaleY;this.props.onChange({categories:e,correct:De(this.props.correct,s,r),starting:De(this.props.starting,s,r)})},this.changeScale=e=>{const s=this.props.scaleY,r=+e.target.value||W.scaleY,i=function(m){return m*r/s},p=i(this.props.maxY);this.props.onChange({scaleY:r,maxY:p,correct:l.map(this.props.correct,i),starting:l.map(this.props.starting,i)}),oe.findDOMNode(this.refs.maxY).value=p},this.changeMax=e=>{this.props.onChange({maxY:+e.target.value||W.maxY})},this.changeSnaps=e=>{this.props.onChange({snapsPerLine:+e.target.value||W.snapsPerLine})},this.changeEditing=e=>{this.setState({editing:e})},this.setCategoriesFromScale=()=>{const e=this.state.tickStep||1,s=this.state.minX||0,r=this.state.maxX||0,i=Math.floor((r-s)/e)*e;let p;this.props.type==="histogram"||this.props.type==="dotplot"?p=l.range(0,i+e,e):p=l.range(e,i+e,e),p=l.map(p,d=>d+s),p=l.map(p,Me),this.changeCategories(p);const m=oe.findDOMNode(this.refs.categories);m.value=p.join(", ")},this.serialize=()=>{const e=l.pick(this.props,"correct","starting","type","labels","categories","scaleY","maxY","snapsPerLine","labelInterval");return this.props.type==="pic"&&(e.picUrl=this.props.picUrl),e}}UNSAFE_componentWillMount(){this.fetchPic(this.props.picUrl)}UNSAFE_componentWillReceiveProps(e){this.fetchPic(e.picUrl),e.static&&this.setState({editing:"starting"})}render(){const e=l.contains(["line","histogram","dotplot"],this.props.type),s=!l.contains(["pic","dotplot"],this.props.type),r={trackInteraction:()=>{},...this.props};return a("div",{className:"perseus-widget-plotter-editor",children:[a("div",{children:["Chart type:"," ",Ke.map(i=>a("label",{children:[t("input",{type:"radio",name:"chart-type",checked:this.props.type===i,onChange:l.partial(this.changeType,i)}),i]},i),this)]}),a("div",{children:["Labels:"," ",["x","y"].map((i,p)=>a("label",{children:[i+":",t("input",{type:"text",onChange:l.partial(this.changeLabel,p),defaultValue:this.props.labels[p]})]},i),this)]}),e&&a("div",{className:"set-from-scale-box",children:[t("span",{className:"categories-title",children:"Set Categories From Scale"}),a("div",{children:[a("label",{children:["Tick Step:"," ",t(Ue,{placeholder:1,useArrowKeys:!0,value:this.state.tickStep,onChange:this.handleChangeTickStep})]}),t(x,{children:t("p",{children:"The difference between adjacent ticks."})})]}),t("div",{children:a("label",{children:["Range:"," ",t(Zt,{placeholder:[0,10],useArrowKeys:!0,value:[this.state.minX,this.state.maxX],onChange:this.handleChangeRange})]})}),t("div",{children:a("button",{onClick:this.setCategoriesFromScale,children:["Set Categories"," "]})})]}),a("div",{children:[a("label",{children:["Label Interval:"," ",t(Ue,{useArrowKeys:!0,value:this.props.labelInterval,onChange:this.changeLabelInterval})]}),t(x,{children:t("p",{children:'Which ticks to display the labels for. For instance, setting this to "4" will only show every 4th label (plus the last one)'})})]}),this.props.type==="pic"&&a("div",{children:[a("label",{children:["Picture:"," ",t(y,{className:"pic-url",value:this.props.picUrl,onChange:this.changePicUrl}),t(x,{children:t("p",{children:'Use the default picture of Earth, or insert the URL for a different picture using the "Add image" function.'})})]}),this.state.pic&&this.state.pic.width!==this.state.pic.height&&a("p",{className:"warning",children:[t("b",{children:"Warning"}),": You are using a picture which is not square. This means the image will get distorted. You should probably crop it to be square."]})]}),t("div",{children:a("label",{children:["Categories:"," ",t(Qt,{ref:"categories",layout:"horizontal",options:this.props.categories,onChange:this.changeCategories})]})}),t("div",{children:a("label",{children:["Scale (y):"," ",t("input",{type:"text",onChange:this.changeScale,defaultValue:this.props.scaleY})]})}),t("div",{children:a("label",{children:["Max y:"," ",t("input",{type:"text",ref:"maxY",onChange:this.changeMax,defaultValue:this.props.maxY})]})}),s&&a("div",{children:[a("label",{children:["Snaps per line:"," ",t("input",{type:"text",onChange:this.changeSnaps,defaultValue:this.props.snapsPerLine})]}),t(x,{children:t("p",{children:"Creates the specified number of divisions between the horizontal lines. Fewer snaps between lines makes the graph easier for the student to create correctly."})})]}),a("div",{children:["Editing values:"," ",ts.map(i=>a("label",{children:[t("input",{type:"radio",disabled:i===ve&&this.props.static,checked:this.props.static?i===be:this.state.editing===i,onChange:p=>this.changeEditing(i)}),i]},i)),a(x,{children:[t("p",{children:"Use this toggle to switch between editing the correct answer (what the student will be graded on) and the starting values (what the student will see plotted when they start the problem). Note: These cannot be the same."}),t("p",{children:"In static mode, the starting values are rendered out to the displayed widget."})]})]}),t(es,{...r,starting:this.props[this.state.editing],onChange:this.handlePlotterChange})]})}};le.widgetName="plotter",le.defaultProps={...W,correct:[1],starting:[1],type:"bar",labels:["",""],categories:[""],picSize:30,picBoxHeight:36,plotDimensions:[275,200],labelInterval:1,get picUrl(){const e=We().staticUrl;return e?e("/images/badges/earth-small.png"):null}};let se=le;se.__docgenInfo={description:"",methods:[{name:"fetchPic",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:null}],returns:null},{name:"handleChangeTickStep",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"handleChangeRange",docblock:null,modifiers:[],params:[{name:"newValue",optional:!1,type:null}],returns:null},{name:"changeLabelInterval",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"handlePlotterChange",docblock:null,modifiers:[],params:[{name:"newProps",optional:!1,type:null}],returns:null},{name:"changeType",docblock:null,modifiers:[],params:[{name:"type",optional:!1,type:null}],returns:null},{name:"changeLabel",docblock:null,modifiers:[],params:[{name:"i",optional:!1,type:null},{name:"e",optional:!1,type:null}],returns:null},{name:"changePicUrl",docblock:null,modifiers:[],params:[{name:"value",optional:!1,type:null}],returns:null},{name:"changeCategories",docblock:null,modifiers:[],params:[{name:"categories",optional:!1,type:null}],returns:null},{name:"changeScale",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"changeMax",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"changeSnaps",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"changeEditing",docblock:null,modifiers:[],params:[{name:"editing",optional:!1,type:null}],returns:null},{name:"setCategoriesFromScale",docblock:null,modifiers:[],params:[],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PlotterEditor",props:{type:{required:!1,tsType:{name:'PerseusPlotterWidgetOptions["type"]',raw:'PerseusPlotterWidgetOptions["type"]'},description:"",defaultValue:{value:'"bar"',computed:!1}},labels:{required:!1,tsType:{name:"Array",elements:[{name:"string"}],raw:"Array"},description:"",defaultValue:{value:'["", ""]',computed:!1}},categories:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]}],raw:"ReadonlyArray"},description:"",defaultValue:{value:'[""]',computed:!1}},scaleY:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},maxY:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"10",computed:!1}},snapsPerLine:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"2",computed:!1}},picSize:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"30",computed:!1}},picBoxHeight:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"36",computed:!1}},picUrl:{required:!0,tsType:{name:"string"},description:""},plotDimensions:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[275, 200]",computed:!1}},labelInterval:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},starting:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[1]",computed:!1}},correct:{required:!1,tsType:{name:"ReadonlyArray",elements:[{name:"number"}],raw:"ReadonlyArray"},description:"",defaultValue:{value:"[1]",computed:!1}},static:{required:!0,tsType:{name:"boolean"},description:""},onChange:{required:!0,tsType:{name:"any"},description:""}}};const{InfoTip:ss,NumberInput:_e}=f,as=Ye.widget,U=class U extends u.Component{constructor(){super(...arguments),this.numberOfColumns=u.createRef(),this.focus=()=>{var e;(e=this.numberOfColumns.current)==null||e.focus()},this.onSizeInput=(e,s)=>{let r=+e||0,i=+s||0;r=Math.min(Math.max(1,r),30),i=Math.min(Math.max(1,i),6);const p=this.props.columns,m=this.props.rows,d=this.props.answers;r<=m?d.length=r:l(r-m).times(function(){d.push(de.stringArrayOfSize(p))});function v(ke){i<=p?ke.length=i:l(i-p).times(function(){ke.push("")})}const xe=this.props.headers;v(xe),l.each(d,v),this.props.onChange({rows:r,columns:i,answers:d,headers:xe})},this.serialize=()=>{const e=l.pick(this.props,"headers","rows","columns");return l.extend({},e,{answers:l.map(this.props.answers,l.clone)})}}render(){return a("div",{children:[t("div",{className:"perseus-widget-row",children:a("label",{children:["Number of columns:"," ",t(_e,{ref:this.numberOfColumns,value:this.props.columns,onChange:e=>{e&&this.onSizeInput(this.props.rows,e)},useArrowKeys:!0})]})}),t("div",{className:"perseus-widget-row",children:a("label",{children:["Number of rows:"," ",t(_e,{ref:"numberOfRows",value:this.props.rows,onChange:e=>{e&&this.onSizeInput(e,this.props.columns)},useArrowKeys:!0})]})}),a("div",{children:[" ","Table of answers:"," ",t(ss,{children:t("p",{children:"The student has to fill out all cells in the table. For partially filled tables create a table using the template, and insert text input boxes as desired."})})]}),t("div",{children:t(as,{headers:this.props.headers,answers:this.props.answers,onChange:this.props.onChange,apiOptions:this.props.apiOptions,editableHeaders:!0,onFocus:()=>{},onBlur:()=>{},trackInteraction:()=>{},Editor:b})})]})}};U.propTypes={rows:n.number,columns:n.number,headers:n.arrayOf(n.string),answers:n.arrayOf(n.arrayOf(n.string))},U.widgetName="table",U.defaultProps=function(){const r=l(4).times(function(){return de.stringArrayOfSize(1)});return{headers:[""],rows:4,columns:1,answers:r}}();let ae=U;ae.__docgenInfo={description:"",methods:[{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"onSizeInput",docblock:null,modifiers:[],params:[{name:"numRawRows",optional:!1,type:null},{name:"numRawColumns",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"TableEditor",props:{rows:{description:"",type:{name:"number"},required:!1},columns:{description:"",type:{name:"number"},required:!1},headers:{description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},answers:{description:"",type:{name:"arrayOf",value:{name:"arrayOf",value:{name:"string"}}},required:!1}}};const{InfoTip:rs}=f,ns=/khanacademy\.org\/.*\/v\/(.*)$/;function is(o){const e=ns.exec(o);return e?e[1]:o}const D=class D extends u.Component{constructor(){super(...arguments),this._handleUrlChange=e=>{this.props.onChange({location:is(e)})},this.change=(...e)=>h.apply(this,e),this.serialize=()=>g.serialize.call(this)}render(){return t("div",{children:a("label",{children:["KA Video Slug:"," ",t(y,{value:this.props.location,style:{width:290},onChange:this._handleUrlChange}),t(rs,{children:"KA video URLs will be converted to just the slug."})]})})}};D.propTypes={...c,location:n.string,onChange:n.func},D.widgetName="video",D.defaultProps={location:""};let re=D;re.__docgenInfo={description:"This is the main editor for this widget, to specify all the options.",methods:[{name:"_handleUrlChange",docblock:null,modifiers:[],params:[{name:"url",optional:!1,type:null}],returns:null},{name:"change",docblock:null,modifiers:[],params:[{name:"...args",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"VideoEditor",props:{location:{defaultValue:{value:'""',computed:!1},description:"",type:{name:"string"},required:!1},onChange:{description:"",type:{name:"func"},required:!1}},composes:["@khanacademy/perseus"]};const ls=[rt,F,nt,it,lt,ot,C,H,j,K,Y,ht,ct,dt,mt,gt,ft,G,J,X,yt,bt,Z,Q,ee,te,vt,se,wt,Tt,ae,re,Ct,B],ha=()=>{et(Ge),tt(ls),st(),at()};export{ls as A,xt as I,ua as J,ha as r}; diff --git a/assets/renderer-with-debug-ui-o6OVhJgg.js b/assets/renderer-with-debug-ui-o6OVhJgg.js index 62caef8da2..0406a1aa5c 100644 --- a/assets/renderer-with-debug-ui-o6OVhJgg.js +++ b/assets/renderer-with-debug-ui-o6OVhJgg.js @@ -1,4 +1,4 @@ -import{j as e,a,F as v}from"./jsx-runtime-FVsy8kgq.js";import{B as u}from"./choice-E4eyMygy.js";import{V as r}from"./index-6h5t6F0w.js";import{P as w}from"./index-xuPsLuPk.js";import{S as f}from"./index-qUyqkRvh.js";import{S as k}from"./article-renderer-o95CuJpS.js";import{H as d}from"./index-h_CiYGGb.js";import{r as o}from"./index-TT1qJ6UJ.js";import{S as q,R as y}from"./side-by-side-kpK-8vW0.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import{R as T}from"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import{u as R}from"./i18n-context-hxuRe8oU.js";import{r as A}from"./register-all-widgets-for-testing-fawnePoa.js";import"./index-IIMKO4_x.js";const O=""+new URL("device-mobile-o16X2EYh.svg",import.meta.url).href,j=({question:t,apiOptions:m,reviewMode:g=!1,...h})=>{A();const n=o.useRef(null),[i,p]=o.useState(null),[s,c]=o.useState(!1),{strings:b}=R();return e(q,{leftTitle:a(r,{style:{flexDirection:"row",alignItems:"center",width:"100%"},children:["Widget",e(r,{style:{marginLeft:"auto"},children:e(k,{icon:e(w,{icon:O}),checked:s,onChange:c})})]}),left:a(r,{children:[e(r,{className:s?"perseus-mobile":"",children:e(T,{ref:n,content:t.content,images:t.images,widgets:t.widgets,problemNum:0,apiOptions:{...m,isMobile:s},reviewMode:g,strings:b,...h})}),a(r,{style:{flexDirection:"row",alignItems:"center"},children:[e(u,{onClick:()=>{n.current&&p(n.current.guessAndScore())},children:"Check"}),e(f,{size:8}),e(u,{onClick:()=>{var l;(l=n.current)==null||l.showRationalesForCurrentlySelectedChoices()},children:"Show Rationales"})]}),i!=null&&a(v,{children:[e(d,{style:{marginTop:"10px"},children:"Guess"}),e(y,{quotesOnKeys:!1,enableClipboard:!1,src:i[0]}),e(d,{style:{marginTop:"10px"},children:"Score"}),e(y,{quotesOnKeys:!1,enableClipboard:!1,src:i[1]})]})]}),jsonObject:t})};j.__docgenInfo={description:"",methods:[],displayName:"RendererWithDebugUI",props:{question:{required:!0,tsType:{name:"signature",type:"object",raw:`{ +import{j as e,a,F as v}from"./jsx-runtime-FVsy8kgq.js";import{B as u}from"./choice-E4eyMygy.js";import{V as r}from"./index-6h5t6F0w.js";import{P as w}from"./index-xuPsLuPk.js";import{S as f}from"./index-qUyqkRvh.js";import{S as k}from"./article-renderer-o95CuJpS.js";import{H as d}from"./index-h_CiYGGb.js";import{r as o}from"./index-TT1qJ6UJ.js";import{S as q,R as y}from"./side-by-side-kpK-8vW0.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import{R as T}from"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import{u as R}from"./i18n-context-hxuRe8oU.js";import{r as A}from"./register-all-widgets-for-testing-fawnePoa.js";import"./index-IIMKO4_x.js";const O=""+new URL("device-mobile-o16X2EYh.svg",import.meta.url).href,j=({question:t,apiOptions:m,reviewMode:g=!1,...h})=>{A();const n=o.useRef(null),[i,p]=o.useState(null),[s,c]=o.useState(!1),{strings:b}=R();return e(q,{leftTitle:a(r,{style:{flexDirection:"row",alignItems:"center",width:"100%"},children:["Widget",e(r,{style:{marginLeft:"auto"},children:e(k,{icon:e(w,{icon:O}),checked:s,onChange:c})})]}),left:a(r,{children:[e(r,{className:s?"perseus-mobile":"",children:e(T,{ref:n,content:t.content,images:t.images,widgets:t.widgets,problemNum:0,apiOptions:{...m,isMobile:s},reviewMode:g,strings:b,...h})}),a(r,{style:{flexDirection:"row",alignItems:"center"},children:[e(u,{onClick:()=>{n.current&&p(n.current.guessAndScore())},children:"Check"}),e(f,{size:8}),e(u,{onClick:()=>{var l;(l=n.current)==null||l.showRationalesForCurrentlySelectedChoices()},children:"Show Rationales"})]}),i!=null&&a(v,{children:[e(d,{style:{marginTop:"10px"},children:"Guess"}),e(y,{quotesOnKeys:!1,enableClipboard:!1,src:i[0]}),e(d,{style:{marginTop:"10px"},children:"Score"}),e(y,{quotesOnKeys:!1,enableClipboard:!1,src:i[1]})]})]}),jsonObject:t})};j.__docgenInfo={description:"",methods:[],displayName:"RendererWithDebugUI",props:{question:{required:!0,tsType:{name:"signature",type:"object",raw:`{ // Translatable Markdown content to be rendered. May include references to // widgets (as [[☃ widgetName]]) or images (as ![image text](imageUrl)). // For each image found in this content, there can be an entry in the diff --git a/assets/section-control-button-VtgjGcq5.js b/assets/section-control-button-VtgjGcq5.js index 965e89273d..b77f5da05a 100644 --- a/assets/section-control-button-VtgjGcq5.js +++ b/assets/section-control-button-VtgjGcq5.js @@ -1 +1 @@ -import{j as o}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as i}from"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{C as p}from"./index-tFzzSRL2.js";import{c as s}from"./index-deFLJwr4.js";import{l as m}from"./index-awljIyHI.js";import{r as a}from"./index-TT1qJ6UJ.js";const{InlineIcon:l}=i;class c extends a.Component{render(){const{icon:r,onClick:e,title:n}=this.props;return o(p,{className:"section-control-button simple-button simple-button--small ",onClick:t=>{t.preventDefault(),e()},role:"button",hideDefaultFocusRing:!0,"aria-label":n,style:u.button,children:({hovered:t,focused:f,pressed:g})=>o(l,{...r})})}}const u=m.StyleSheet.create({button:{backgroundColor:s.gold,margin:2,paddingRight:10,paddingLeft:10,paddingBottom:2}});c.__docgenInfo={description:"",methods:[],displayName:"SectionControlButton",props:{icon:{required:!0,tsType:{name:"PropsFor",elements:[{name:"InlineIcon"}],raw:"PropsFor"},description:""},onClick:{required:!0,tsType:{name:"signature",type:"function",raw:"() => unknown",signature:{arguments:[],return:{name:"unknown"}}},description:""},title:{required:!0,tsType:{name:"string"},description:""}}};export{c as S}; +import{j as o}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as i}from"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{C as p}from"./index-tFzzSRL2.js";import{c as s}from"./index-deFLJwr4.js";import{l as m}from"./index-awljIyHI.js";import{r as a}from"./index-TT1qJ6UJ.js";const{InlineIcon:l}=i;class c extends a.Component{render(){const{icon:r,onClick:e,title:n}=this.props;return o(p,{className:"section-control-button simple-button simple-button--small ",onClick:t=>{t.preventDefault(),e()},role:"button",hideDefaultFocusRing:!0,"aria-label":n,style:u.button,children:({hovered:t,focused:f,pressed:g})=>o(l,{...r})})}}const u=m.StyleSheet.create({button:{backgroundColor:s.gold,margin:2,paddingRight:10,paddingLeft:10,paddingBottom:2}});c.__docgenInfo={description:"",methods:[],displayName:"SectionControlButton",props:{icon:{required:!0,tsType:{name:"PropsFor",elements:[{name:"InlineIcon"}],raw:"PropsFor"},description:""},onClick:{required:!0,tsType:{name:"signature",type:"function",raw:"() => unknown",signature:{arguments:[],return:{name:"unknown"}}},description:""},title:{required:!0,tsType:{name:"string"},description:""}}};export{c as S}; diff --git a/assets/section-control-button.stories-8aUUAp2J.js b/assets/section-control-button.stories-8aUUAp2J.js index 7e13b777f6..9aaac7ecdc 100644 --- a/assets/section-control-button.stories-8aUUAp2J.js +++ b/assets/section-control-button.stories-8aUUAp2J.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import{c as p}from"./icon-paths-AuJwhOz7.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{S as e}from"./section-control-button-VtgjGcq5.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./shared-3pf9YZIg.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-vbrLThK4.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./video-transcript-link-WVgIZGhp.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-Hmby24Jq.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./choice-none-above-o4v4BTO3.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./index-QCAhLhLD.js";import"./strings-OAjNfY6D.js";import"./bundle.esm-7jAAHVxW.js";import"./components-0kNWnYe6.js";import"./index-tFzzSRL2.js";const Yt={title:"PerseusEditor/Components/Section Control Button"},t=n=>m(e,{icon:p,onClick:()=>{},title:"Remove image widget"});t.__docgenInfo={description:"",methods:[],displayName:"ButtonForEditingSectionsOfContentWithInArticleEditor"};var o,r,i;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import{c as p}from"./icon-paths-AuJwhOz7.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{S as e}from"./section-control-button-VtgjGcq5.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-h_CiYGGb.js";import"./index-dnMhQZ-1.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./shared-3pf9YZIg.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./Popper-kGnKOid7.js";import"./answer-choices-vbrLThK4.js";import"./index-xuPsLuPk.js";import"./minus-bold-ONmDo3Ve.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./asset-context-I7yIqWki.js";import"./tiny-invariant-bHgPayXn.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./video-transcript-link-WVgIZGhp.js";import"./arrow-square-out-bold-090vdhrx.js";import"./stub-tag-editor-Hmby24Jq.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./choice-none-above-o4v4BTO3.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./index-QCAhLhLD.js";import"./strings-OAjNfY6D.js";import"./bundle.esm-7jAAHVxW.js";import"./components-0kNWnYe6.js";import"./index-tFzzSRL2.js";const Yt={title:"PerseusEditor/Components/Section Control Button"},t=n=>m(e,{icon:p,onClick:()=>{},title:"Remove image widget"});t.__docgenInfo={description:"",methods:[],displayName:"ButtonForEditingSectionsOfContentWithInArticleEditor"};var o,r,i;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return {}} title="Remove image widget" />; }`,...(i=(r=t.parameters)==null?void 0:r.docs)==null?void 0:i.source}}};const Zt=["ButtonForEditingSectionsOfContentWithInArticleEditor"];export{t as ButtonForEditingSectionsOfContentWithInArticleEditor,Zt as __namedExportsOrder,Yt as default}; diff --git a/assets/select-image-_eHoVMfM.js b/assets/select-image-_eHoVMfM.js index 892d35b2cb..6be35c029f 100644 --- a/assets/select-image-_eHoVMfM.js +++ b/assets/select-image-_eHoVMfM.js @@ -1 +1 @@ -import{a as m,j as e}from"./jsx-runtime-FVsy8kgq.js";import{g as s}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{B as a}from"./choice-E4eyMygy.js";import{l as r}from"./index-awljIyHI.js";import{F as n}from"./form-wrapped-text-field-tsI8XMXi.js";const{colors:l,typography:d}=s,c=({onChange:i,url:t})=>m("div",{children:[e("div",{className:r.css(o.title),children:"Image"}),m("div",{className:r.css(o.components),children:[e(n,{placeholder:"URL",grow:1,onChange:p=>i(p.target.value),value:t}),e("div",{className:r.css(o.spacer)}),e(a,{disabled:!t,"aria-label":t?"":"Not implemented. Use the 'Add Image' button in the editor to upload image, then copy the URL here.",onClick:()=>i(""),style:o.btn,children:t?"Remove":"Upload"})]})]}),o=r.StyleSheet.create({title:{...d.bodyXsmallBold,marginBottom:6,color:l.gray17},components:{display:"flex"},spacer:{width:16},btn:{minWidth:90}});c.__docgenInfo={description:"",methods:[],displayName:"SelectImage",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(url: string) => void",signature:{arguments:[{type:{name:"string"},name:"url"}],return:{name:"void"}}},description:""},url:{required:!0,tsType:{name:"string"},description:""}}};export{c as S}; +import{a as m,j as e}from"./jsx-runtime-FVsy8kgq.js";import{g as s}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{B as a}from"./choice-E4eyMygy.js";import{l as r}from"./index-awljIyHI.js";import{F as n}from"./form-wrapped-text-field-tsI8XMXi.js";const{colors:l,typography:d}=s,c=({onChange:i,url:t})=>m("div",{children:[e("div",{className:r.css(o.title),children:"Image"}),m("div",{className:r.css(o.components),children:[e(n,{placeholder:"URL",grow:1,onChange:p=>i(p.target.value),value:t}),e("div",{className:r.css(o.spacer)}),e(a,{disabled:!t,"aria-label":t?"":"Not implemented. Use the 'Add Image' button in the editor to upload image, then copy the URL here.",onClick:()=>i(""),style:o.btn,children:t?"Remove":"Upload"})]})]}),o=r.StyleSheet.create({title:{...d.bodyXsmallBold,marginBottom:6,color:l.gray17},components:{display:"flex"},spacer:{width:16},btn:{minWidth:90}});c.__docgenInfo={description:"",methods:[],displayName:"SelectImage",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(url: string) => void",signature:{arguments:[{type:{name:"string"},name:"url"}],return:{name:"void"}}},description:""},url:{required:!0,tsType:{name:"string"},description:""}}};export{c as S}; diff --git a/assets/select-image.stories-QhCZaGhR.js b/assets/select-image.stories-QhCZaGhR.js index 64ef85e08e..8161c2f0d8 100644 --- a/assets/select-image.stories-QhCZaGhR.js +++ b/assets/select-image.stories-QhCZaGhR.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{l as i}from"./index-awljIyHI.js";import{r as I}from"./index-TT1qJ6UJ.js";import{S}from"./select-image-_eHoVMfM.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./form-wrapped-text-field-tsI8XMXi.js";const ct={title:"PerseusEditor/Widgets/Label Image/Select Image"},f=i.StyleSheet.create({wrapper:{width:338}}),y=t=>r("div",{className:i.css(f.wrapper),children:r(S,{...t})}),_=()=>{const[t,e]=I.useState("");return r("div",{className:i.css(f.wrapper),children:r(S,{onChange:E=>e(E),url:t})})},o=t=>r(y,{...{url:"",onChange:()=>{}}}),p=t=>r(y,{...{url:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",onChange:()=>{}}}),m=t=>r(_,{});o.__docgenInfo={description:"",methods:[],displayName:"Empty"};p.__docgenInfo={description:"",methods:[],displayName:"Filled"};m.__docgenInfo={description:"",methods:[],displayName:"Interactive"};var s,a,n;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as r}from"./jsx-runtime-FVsy8kgq.js";import{l as i}from"./index-awljIyHI.js";import{r as I}from"./index-TT1qJ6UJ.js";import{S}from"./select-image-_eHoVMfM.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./form-wrapped-text-field-tsI8XMXi.js";const ct={title:"PerseusEditor/Widgets/Label Image/Select Image"},f=i.StyleSheet.create({wrapper:{width:338}}),y=t=>r("div",{className:i.css(f.wrapper),children:r(S,{...t})}),_=()=>{const[t,e]=I.useState("");return r("div",{className:i.css(f.wrapper),children:r(S,{onChange:E=>e(E),url:t})})},o=t=>r(y,{...{url:"",onChange:()=>{}}}),p=t=>r(y,{...{url:"https://ka-perseus-images.s3.amazonaws.com/2ee5fc32e35c5178373b39fd304b325b2994c913.png",onChange:()=>{}}}),m=t=>r(_,{});o.__docgenInfo={description:"",methods:[],displayName:"Empty"};p.__docgenInfo={description:"",methods:[],displayName:"Filled"};m.__docgenInfo={description:"",methods:[],displayName:"Interactive"};var s,a,n;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = ({ url: "", onChange: () => {} diff --git a/assets/server-item-renderer-with-debug-ui-G785FGTt.js b/assets/server-item-renderer-with-debug-ui-G785FGTt.js index 3f397f6292..47d3103245 100644 --- a/assets/server-item-renderer-with-debug-ui-G785FGTt.js +++ b/assets/server-item-renderer-with-debug-ui-G785FGTt.js @@ -1,4 +1,4 @@ -import{j as e,a,F as m}from"./jsx-runtime-FVsy8kgq.js";import{B as i}from"./choice-E4eyMygy.js";import{V as g}from"./index-6h5t6F0w.js";import{S as h}from"./index-qUyqkRvh.js";import{r as s}from"./index-TT1qJ6UJ.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import{r as p}from"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{K as c}from"./ke-score-ui-xy7p6xf5.js";import{S as b}from"./side-by-side-kpK-8vW0.js";import{s as v}from"./test-dependencies-3HLxfOjs.js";const w=({item:t,apiOptions:o,keypadElement:l})=>{const r=s.useRef(null),[u,d]=s.useState(null),y=o||Object.freeze({});return e(b,{leftTitle:"Renderer",left:a(m,{children:[e(p,{ref:r,problemNum:0,apiOptions:y,item:t,dependencies:v,keypadElement:l}),a(g,{style:{flexDirection:"row",alignItems:"center"},children:[e(i,{onClick:()=>{r.current&&d(r.current.scoreInput())},children:"Check"}),e(h,{size:8}),e(i,{onClick:()=>{var n;(n=r.current)==null||n.showRationalesForCurrentlySelectedChoices()},children:"Show Rationales"})]}),e(c,{score:u})]}),jsonObject:t})};w.__docgenInfo={description:"",methods:[],displayName:"ServerItemRendererWithDebugUI",props:{item:{required:!0,tsType:{name:"signature",type:"object",raw:`{ +import{j as e,a,F as m}from"./jsx-runtime-FVsy8kgq.js";import{B as i}from"./choice-E4eyMygy.js";import{V as g}from"./index-6h5t6F0w.js";import{S as h}from"./index-qUyqkRvh.js";import{r as s}from"./index-TT1qJ6UJ.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import{r as p}from"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{K as c}from"./ke-score-ui-xy7p6xf5.js";import{S as b}from"./side-by-side-kpK-8vW0.js";import{s as v}from"./test-dependencies-3HLxfOjs.js";const w=({item:t,apiOptions:o,keypadElement:l})=>{const r=s.useRef(null),[u,d]=s.useState(null),y=o||Object.freeze({});return e(b,{leftTitle:"Renderer",left:a(m,{children:[e(p,{ref:r,problemNum:0,apiOptions:y,item:t,dependencies:v,keypadElement:l}),a(g,{style:{flexDirection:"row",alignItems:"center"},children:[e(i,{onClick:()=>{r.current&&d(r.current.scoreInput())},children:"Check"}),e(h,{size:8}),e(i,{onClick:()=>{var n;(n=r.current)==null||n.showRationalesForCurrentlySelectedChoices()},children:"Show Rationales"})]}),e(c,{score:u})]}),jsonObject:t})};w.__docgenInfo={description:"",methods:[],displayName:"ServerItemRendererWithDebugUI",props:{item:{required:!0,tsType:{name:"signature",type:"object",raw:`{ // The details of the question being asked to the user. question: PerseusRenderer; // A collection of hints to be offered to the user that support answering the question. diff --git a/assets/server-item-renderer.stories-kpjb0s8f.js b/assets/server-item-renderer.stories-kpjb0s8f.js index f981f935fc..b79c5e3236 100644 --- a/assets/server-item-renderer.stories-kpjb0s8f.js +++ b/assets/server-item-renderer.stories-kpjb0s8f.js @@ -1,4 +1,4 @@ -import{j as t,a as s,F as K}from"./jsx-runtime-FVsy8kgq.js";import{r as x}from"./index-TT1qJ6UJ.js";import{S as i}from"./server-item-renderer-with-debug-ui-G785FGTt.js";import{s as G}from"./test-dependencies-3HLxfOjs.js";import{I as Q}from"./article-renderer-o95CuJpS.js";import{S as Y}from"./multi-renderer-Nglq5SzN.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-8XILypbq.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./shared-3pf9YZIg.js";import"./base-radio-sE9E2UC2.js";import"./choice-none-above-o4v4BTO3.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./ke-score-ui-xy7p6xf5.js";import"./side-by-side-kpK-8vW0.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./enums-x5qaTru7.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./answer-choices-vbrLThK4.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";const X={question:{content:"Enter the number $$-42$$ in the box: [[☃ input-number 1]]",images:{},widgets:{"input-number 1":{type:"input-number",graded:!0,options:{answerType:"number",value:"-42",simplify:"required",size:"normal",inexact:!1,maxError:.1}}}},hints:[{content:"Hint #1",images:{},widgets:{}},{content:"Hint #2",images:{},widgets:{}},{content:"Hint #3",images:{},widgets:{}}],answerArea:null,itemDataVersion:{major:0,minor:0},answer:null},ee={question:{content:`Enter the number $$1$$ in box one: [[☃ input-number 1]] +import{j as t,a as s,F as K}from"./jsx-runtime-FVsy8kgq.js";import{r as x}from"./index-TT1qJ6UJ.js";import{S as i}from"./server-item-renderer-with-debug-ui-G785FGTt.js";import{s as G}from"./test-dependencies-3HLxfOjs.js";import{I as Q}from"./article-renderer-o95CuJpS.js";import{S as Y}from"./multi-renderer-Nglq5SzN.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./dependencies-8XILypbq.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./index-J2t_5nK1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./shared-3pf9YZIg.js";import"./base-radio-sE9E2UC2.js";import"./choice-none-above-o4v4BTO3.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./hud-FI3E3dT_.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./ke-score-ui-xy7p6xf5.js";import"./side-by-side-kpK-8vW0.js";import"./register-all-widgets-for-testing-fawnePoa.js";import"./enums-x5qaTru7.js";import"./input-with-examples-1e8gjW5y.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./answer-choices-vbrLThK4.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";const X={question:{content:"Enter the number $$-42$$ in the box: [[☃ input-number 1]]",images:{},widgets:{"input-number 1":{type:"input-number",graded:!0,options:{answerType:"number",value:"-42",simplify:"required",size:"normal",inexact:!1,maxError:.1}}}},hints:[{content:"Hint #1",images:{},widgets:{}},{content:"Hint #2",images:{},widgets:{}},{content:"Hint #3",images:{},widgets:{}}],answerArea:null,itemDataVersion:{major:0,minor:0},answer:null},ee={question:{content:`Enter the number $$1$$ in box one: [[☃ input-number 1]] Enter the number $$2$$ in box two: [[☃ input-number 2]]`,images:{},widgets:{"input-number 1":{type:"input-number",graded:!0,options:{answerType:"number",value:"1",simplify:"required",size:"normal",inexact:!1,maxError:.1}},"input-number 2":{type:"input-number",graded:!0,options:{answerType:"number",value:"2",simplify:"required",size:"normal",inexact:!1,maxError:.1}}}},hints:[{content:"Hint #1",images:{},widgets:{}},{content:"Hint #2",images:{},widgets:{}},{content:"Hint #3",images:{},widgets:{}}],answerArea:null,itemDataVersion:{major:0,minor:0},answer:null},te={question:{content:`Here's a radio widget: [[☃ radio 1]] diff --git a/assets/simple-keypad-input-zNNuoI83.js b/assets/simple-keypad-input-zNNuoI83.js index fe41a8fc4c..cfe53d5cbd 100644 --- a/assets/simple-keypad-input-zNNuoI83.js +++ b/assets/simple-keypad-input-zNNuoI83.js @@ -1 +1 @@ -import{j as u}from"./jsx-runtime-FVsy8kgq.js";import{k as i,M as a}from"./prop-types-3bOVFRDQ.js";import"./key-translator-IA-2V2LV.js";import"./mobile-keypad-hKjeQGNp.js";import"./button-assets-txIojR3b.js";import{K as m}from"./enums-x5qaTru7.js";import{P as t}from"./index-k-0mNqHS.js";import{r as l}from"./index-TT1qJ6UJ.js";class o extends l.Component{constructor(){super(...arguments),this._isMounted=!1}componentDidMount(){this._isMounted=!0}componentWillUnmount(){this._isMounted=!1}focus(){this.refs.input.focus()}blur(){var n,e;typeof((n=this.refs.input)==null?void 0:n.blur)=="function"&&((e=this.refs.input)==null||e.blur())}getValue(){return this.props.value}render(){const n=this,{keypadElement:e,onFocus:r,value:s,...p}=n.props;return u(a,{ref:"input",keypadElement:e,onFocus:()=>{e?e.configure({keypadType:m.FRACTION},()=>{n._isMounted&&r&&r()}):r&&r()},value:s==null?"":""+s,...p})}}o.propTypes={keypadElement:i,onFocus:t.func,value:t.oneOfType([t.string,t.number])};o.__docgenInfo={description:"",methods:[{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"blur",docblock:null,modifiers:[],params:[],returns:null},{name:"getValue",docblock:null,modifiers:[],params:[],returns:{type:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]}}}],displayName:"SimpleKeypadInput",props:{keypadElement:{description:"",type:{name:"custom",raw:"keypadElementPropType"},required:!1},onFocus:{description:"",type:{name:"func"},required:!1},value:{description:"",type:{name:"union",value:[{name:"string"},{name:"number"}]},required:!1}}};export{o as S}; +import{j as u}from"./jsx-runtime-FVsy8kgq.js";import{k as i,M as a}from"./prop-types-3bOVFRDQ.js";import"./key-translator-IA-2V2LV.js";import"./mobile-keypad-hKjeQGNp.js";import"./button-assets-txIojR3b.js";import{K as m}from"./enums-x5qaTru7.js";import{P as t}from"./index-0C4KXdeC.js";import{r as l}from"./index-TT1qJ6UJ.js";class o extends l.Component{constructor(){super(...arguments),this._isMounted=!1}componentDidMount(){this._isMounted=!0}componentWillUnmount(){this._isMounted=!1}focus(){this.refs.input.focus()}blur(){var n,e;typeof((n=this.refs.input)==null?void 0:n.blur)=="function"&&((e=this.refs.input)==null||e.blur())}getValue(){return this.props.value}render(){const n=this,{keypadElement:e,onFocus:r,value:s,...p}=n.props;return u(a,{ref:"input",keypadElement:e,onFocus:()=>{e?e.configure({keypadType:m.FRACTION},()=>{n._isMounted&&r&&r()}):r&&r()},value:s==null?"":""+s,...p})}}o.propTypes={keypadElement:i,onFocus:t.func,value:t.oneOfType([t.string,t.number])};o.__docgenInfo={description:"",methods:[{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"blur",docblock:null,modifiers:[],params:[],returns:null},{name:"getValue",docblock:null,modifiers:[],params:[],returns:{type:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]}}}],displayName:"SimpleKeypadInput",props:{keypadElement:{description:"",type:{name:"custom",raw:"keypadElementPropType"},required:!1},onFocus:{description:"",type:{name:"func"},required:!1},value:{description:"",type:{name:"union",value:[{name:"string"},{name:"number"}]},required:!1}}};export{o as S}; diff --git a/assets/simple-keypad-input.stories-tZsmCiIG.js b/assets/simple-keypad-input.stories-tZsmCiIG.js index 1dd1a80ba7..24e8c347d4 100644 --- a/assets/simple-keypad-input.stories-tZsmCiIG.js +++ b/assets/simple-keypad-input.stories-tZsmCiIG.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{S as n}from"./simple-keypad-input-zNNuoI83.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./prop-types-3bOVFRDQ.js";import"./version-akiLXZts.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-k-0mNqHS.js";const c={onChange:()=>{},onFocus:()=>{},onBlur:()=>{}},w={title:"Perseus/Components/Simple Keypad Input"},t=u=>i(n,{...c}),r=u=>i(n,{...c,value:"Test value"});t.__docgenInfo={description:"",methods:[],displayName:"EmptyPropsObject"};r.__docgenInfo={description:"",methods:[],displayName:"CustomValue"};var e,o,p;t.parameters={...t.parameters,docs:{...(e=t.parameters)==null?void 0:e.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{S as n}from"./simple-keypad-input-zNNuoI83.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./prop-types-3bOVFRDQ.js";import"./version-akiLXZts.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./index-0C4KXdeC.js";const c={onChange:()=>{},onFocus:()=>{},onBlur:()=>{}},w={title:"Perseus/Components/Simple Keypad Input"},t=u=>i(n,{...c}),r=u=>i(n,{...c,value:"Test value"});t.__docgenInfo={description:"",methods:[],displayName:"EmptyPropsObject"};r.__docgenInfo={description:"",methods:[],displayName:"CustomValue"};var e,o,p;t.parameters={...t.parameters,docs:{...(e=t.parameters)==null?void 0:e.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(p=(o=t.parameters)==null?void 0:o.docs)==null?void 0:p.source}}};var m,s,a;r.parameters={...r.parameters,docs:{...(m=r.parameters)==null?void 0:m.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/sortable.stories-2X9kmvIN.js b/assets/sortable.stories-2X9kmvIN.js index a989526eec..2ff324a448 100644 --- a/assets/sortable.stories-2X9kmvIN.js +++ b/assets/sortable.stories-2X9kmvIN.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-FVsy8kgq.js";import{S as r}from"./sortable-w6DA86Qg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";const m=["Option 1","Option 2","Option 3"],lt={title:"Perseus/Components/Sortable"},o=e=>t(r,{layout:"horizontal",options:["a","b","c"],waitForTexRendererToLoad:!1}),a=e=>t(r,{layout:"vertical",options:["a","b","c"],waitForTexRendererToLoad:!1}),s=e=>t(r,{options:m}),i=e=>t(r,{options:m,padding:!1}),n=e=>t(r,{options:m,margin:64}),p=e=>t(r,{options:m,disabled:!0}),c=e=>t(r,{options:m,constraints:{height:128,width:256}});o.__docgenInfo={description:"",methods:[],displayName:"SortableHorizontalExample"};a.__docgenInfo={description:"",methods:[],displayName:"SortableVerticalExample"};s.__docgenInfo={description:"",methods:[],displayName:"BasicSortableOptionsTest"};i.__docgenInfo={description:"",methods:[],displayName:"BasicSortableOptionsTestWithNoPadding"};n.__docgenInfo={description:"",methods:[],displayName:"BasicSortableOptionsTestWithLargeMargin"};p.__docgenInfo={description:"",methods:[],displayName:"BasicSortableOptionsTestDisabled"};c.__docgenInfo={description:"",methods:[],displayName:"BasicSortableOptionsTestWithWidthAndHeightConstraints"};var d,l,g;o.parameters={...o.parameters,docs:{...(d=o.parameters)==null?void 0:d.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as t}from"./jsx-runtime-FVsy8kgq.js";import{S as r}from"./sortable-w6DA86Qg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./renderer-4_U4OAry.js";import"./version-akiLXZts.js";import"./util-XcxTwqb0.js";import"./jquery-yG1GhClm.js";import"./invariant-bu5zBsRS.js";import"./index-J2t_5nK1.js";import"./index-dnMhQZ-1.js";import"./index-7vsPyIck.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./index-awljIyHI.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";const m=["Option 1","Option 2","Option 3"],lt={title:"Perseus/Components/Sortable"},o=e=>t(r,{layout:"horizontal",options:["a","b","c"],waitForTexRendererToLoad:!1}),a=e=>t(r,{layout:"vertical",options:["a","b","c"],waitForTexRendererToLoad:!1}),s=e=>t(r,{options:m}),i=e=>t(r,{options:m,padding:!1}),n=e=>t(r,{options:m,margin:64}),p=e=>t(r,{options:m,disabled:!0}),c=e=>t(r,{options:m,constraints:{height:128,width:256}});o.__docgenInfo={description:"",methods:[],displayName:"SortableHorizontalExample"};a.__docgenInfo={description:"",methods:[],displayName:"SortableVerticalExample"};s.__docgenInfo={description:"",methods:[],displayName:"BasicSortableOptionsTest"};i.__docgenInfo={description:"",methods:[],displayName:"BasicSortableOptionsTestWithNoPadding"};n.__docgenInfo={description:"",methods:[],displayName:"BasicSortableOptionsTestWithLargeMargin"};p.__docgenInfo={description:"",methods:[],displayName:"BasicSortableOptionsTestDisabled"};c.__docgenInfo={description:"",methods:[],displayName:"BasicSortableOptionsTestWithWidthAndHeightConstraints"};var d,l,g;o.parameters={...o.parameters,docs:{...(d=o.parameters)==null?void 0:d.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(g=(l=o.parameters)==null?void 0:l.docs)==null?void 0:g.source}}};var u,S,b;a.parameters={...a.parameters,docs:{...(u=a.parameters)==null?void 0:u.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/sorter-editor-Kj6XqnPI.js b/assets/sorter-editor-Kj6XqnPI.js index 9c336110d0..0791c8722b 100644 --- a/assets/sorter-editor-Kj6XqnPI.js +++ b/assets/sorter-editor-Kj6XqnPI.js @@ -1 +1 @@ -import{a as t,j as e}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import{_ as c}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as h}from"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{C as u}from"./index-QCAhLhLD.js";import{P as i}from"./index-0C4KXdeC.js";import{r as m}from"./index-TT1qJ6UJ.js";const{InfoTip:n,TextListEditor:f}=h,s="horizontal",p="vertical",o=class o extends m.Component{constructor(){super(...arguments),this.onLayoutChange=r=>{this.props.onChange({layout:r.target.value})},this.serialize=()=>c.pick(this.props,"correct","layout","padding")}render(){const r=this;return t("div",{children:[t("div",{children:[" ","Correct answer:"," ",e(n,{children:e("p",{children:"Enter the correct answer (in the correct order) here. The preview on the right will have the cards in a randomized order, which is how the student will see them."})})]}),e(f,{options:this.props.correct,onChange:function(a,d){r.props.onChange({correct:a},d)},layout:this.props.layout}),t("div",{children:[t("label",{children:[" ","Layout:"," ",t("select",{value:this.props.layout,onChange:this.onLayoutChange,children:[e("option",{value:s,children:"Horizontal"}),e("option",{value:p,children:"Vertical"})]})]}),e(n,{children:e("p",{children:"Use the horizontal layout for short text and small images. The vertical layout is best for longer text and larger images."})})]}),t("div",{children:[e(u,{label:"Padding:",checked:this.props.padding,onChange:a=>{this.props.onChange({padding:a})}}),e(n,{children:e("p",{children:"Padding is good for text, but not needed for images."})})]})]})}};o.propTypes={correct:i.array,layout:i.oneOf([s,p]),padding:i.bool},o.widgetName="sorter",o.defaultProps={correct:["$x$","$y$","$z$"],layout:s,padding:!0};let l=o;l.__docgenInfo={description:"",methods:[{name:"onLayoutChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"SorterEditor",props:{correct:{defaultValue:{value:'["$x$", "$y$", "$z$"]',computed:!1},description:"",type:{name:"array"},required:!1},layout:{defaultValue:{value:'"horizontal"',computed:!1},description:"",type:{name:"enum",value:[{value:'"horizontal"',computed:!1},{value:'"vertical"',computed:!1}]},required:!1},padding:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1}}};export{l as S}; +import{a as t,j as e}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import{_ as c}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as h}from"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{C as u}from"./index-QCAhLhLD.js";import{P as i}from"./index-k-0mNqHS.js";import{r as m}from"./index-TT1qJ6UJ.js";const{InfoTip:n,TextListEditor:f}=h,s="horizontal",p="vertical",o=class o extends m.Component{constructor(){super(...arguments),this.onLayoutChange=r=>{this.props.onChange({layout:r.target.value})},this.serialize=()=>c.pick(this.props,"correct","layout","padding")}render(){const r=this;return t("div",{children:[t("div",{children:[" ","Correct answer:"," ",e(n,{children:e("p",{children:"Enter the correct answer (in the correct order) here. The preview on the right will have the cards in a randomized order, which is how the student will see them."})})]}),e(f,{options:this.props.correct,onChange:function(a,d){r.props.onChange({correct:a},d)},layout:this.props.layout}),t("div",{children:[t("label",{children:[" ","Layout:"," ",t("select",{value:this.props.layout,onChange:this.onLayoutChange,children:[e("option",{value:s,children:"Horizontal"}),e("option",{value:p,children:"Vertical"})]})]}),e(n,{children:e("p",{children:"Use the horizontal layout for short text and small images. The vertical layout is best for longer text and larger images."})})]}),t("div",{children:[e(u,{label:"Padding:",checked:this.props.padding,onChange:a=>{this.props.onChange({padding:a})}}),e(n,{children:e("p",{children:"Padding is good for text, but not needed for images."})})]})]})}};o.propTypes={correct:i.array,layout:i.oneOf([s,p]),padding:i.bool},o.widgetName="sorter",o.defaultProps={correct:["$x$","$y$","$z$"],layout:s,padding:!0};let l=o;l.__docgenInfo={description:"",methods:[{name:"onLayoutChange",docblock:null,modifiers:[],params:[{name:"e",optional:!1,type:null}],returns:null},{name:"serialize",docblock:null,modifiers:[],params:[],returns:null}],displayName:"SorterEditor",props:{correct:{defaultValue:{value:'["$x$", "$y$", "$z$"]',computed:!1},description:"",type:{name:"array"},required:!1},layout:{defaultValue:{value:'"horizontal"',computed:!1},description:"",type:{name:"enum",value:[{value:'"horizontal"',computed:!1},{value:'"vertical"',computed:!1}]},required:!1},padding:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1}}};export{l as S}; diff --git a/assets/sorter-editor.stories-Ci63zVAS.js b/assets/sorter-editor.stories-Ci63zVAS.js index 957274a626..7d0aabffce 100644 --- a/assets/sorter-editor.stories-Ci63zVAS.js +++ b/assets/sorter-editor.stories-Ci63zVAS.js @@ -1,3 +1,3 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{S as e}from"./sorter-editor-Kj6XqnPI.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";const ro={title:"PerseusEditor/Widgets/Sorter Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{a as p}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{S as e}from"./sorter-editor-Kj6XqnPI.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";const ro={title:"PerseusEditor/Widgets/Sorter Editor"},r=a=>m(e,{onChange:p("onChange")});r.__docgenInfo={description:"",methods:[],displayName:"Default"};var o,t,i;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(i=(t=r.parameters)==null?void 0:t.docs)==null?void 0:i.source}}};const oo=["Default"];export{r as Default,oo as __namedExportsOrder,ro as default}; diff --git a/assets/sorter.stories-rp7zabAk.js b/assets/sorter.stories-rp7zabAk.js index d3e6cab755..459fff560d 100644 --- a/assets/sorter.stories-rp7zabAk.js +++ b/assets/sorter.stories-rp7zabAk.js @@ -1,4 +1,4 @@ -import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const e={content:`**Arrange the following measurements in order from smallest to largest.** +import{j as m}from"./jsx-runtime-FVsy8kgq.js";import{R as p}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const e={content:`**Arrange the following measurements in order from smallest to largest.** [[☃ sorter 1]]`,images:{},widgets:{"sorter 1":{version:{major:0,minor:0},type:"sorter",graded:!0,options:{padding:!0,layout:"horizontal",correct:["$0.005$ kilograms","$15$ grams","$55$ grams"]}}}},Xr={title:"Perseus/Widgets/Sorter"},r=s=>m(p,{question:e});r.__docgenInfo={description:"",methods:[],displayName:"Question1"};var t,o,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; diff --git a/assets/structured-item-diff-C8S6VB9q.js b/assets/structured-item-diff-C8S6VB9q.js index 734441d375..f9717b0275 100644 --- a/assets/structured-item-diff-C8S6VB9q.js +++ b/assets/structured-item-diff-C8S6VB9q.js @@ -1,4 +1,4 @@ -import{j as d,a as k}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import{_ as y}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import{d as U,e as W,g as B,s as $}from"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import{g as ie,s as ae}from"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{r as N}from"./index-TT1qJ6UJ.js";import{T as oe}from"./text-diff-RbGWUAEg.js";import{c as de}from"./components-0kNWnYe6.js";import{c as A}from"./index-dnMhQZ-1.js";import{P as i}from"./index-0C4KXdeC.js";import{T as pe}from"./tags-diff-loewY876.js";const V="unchanged",Y="changed",Z="added",_="removed",le=function(s,e,t){let n;return s===e?n=V:s===void 0?n=Z:e===void 0?n=_:n=Y,{after:JSON.stringify(e),before:JSON.stringify(s),children:[],key:t,status:n}},ce=function(s,e,t){const n=y.isObject(s)?y(s).keys():[],r=y.isObject(e)?y(e).keys():[],o=y.union(n,r),a=y.map(o,function(c){return ee((s||{})[c],(e||{})[c],c)});let p;return s===void 0?p=Z:e===void 0?p=_:p=y.any(a,function(h){return h.status!==V})?Y:V,{after:"",before:"",children:a,key:t,status:p}},ee=function(s,e,t){return typeof s=="object"||typeof e=="object"?ce(s,e,t):le(s,e,t)},{SvgImage:z}=de,te=function(s){return(s-1)*20},C="before",j="after",ue="unchanged",F=class F extends N.Component{render(){const e=A(this.props.className,{"diff-row":!0,before:this.props.side===C,after:this.props.side===j});return d("div",{className:e,children:k("div",{style:{paddingLeft:te(this.props.depth)},children:[this.props.showKey&&this.props.propKey+": ",d("span",{className:"inner-value dark "+this.props.className,children:this.props.value})]})})}};F.propTypes={className:i.string.isRequired,depth:i.number.isRequired,propKey:i.string.isRequired,showKey:i.bool.isRequired,side:i.oneOf([C,j]).isRequired,value:i.string};let S=F;const K=class K extends N.Component{render(){const e=this;return d("div",{onClick:e.props.onClick,style:{clear:"both"},children:y.map([C,j],function(t){return d("div",{className:"diff-row collapsed "+t,children:d("div",{style:{paddingLeft:te(e.props.depth)},children:d("span",{children:" [ show unmodified ] "})})},t)})})}};K.propTypes={depth:i.number,onClick:i.func.isRequired},K.defaultProps={depth:0};let I=K;const R=class R extends N.Component{constructor(){super(...arguments),this.state={expanded:this.props.expanded},this.expand=()=>{this.setState({expanded:!0})}}render(){const e=this.props.entry,t=e.status==="removed",n=e.status==="added",r=e.status==="changed",o=e.children.length>0,a=A({removed:t||r&&!o,dark:t,"blank-space":n}),p=A({added:n||r&&!o,dark:n,"blank-space":t});let c;this.state.expanded?c=e.children:c=y(e.children).select(function(m){return m.status!==ue});let h=c.length1&&(a.alignment=t),o==="transformer"&&(a.graded=n),ae(o)&&(a.static=(s==null?void 0:s.static)??void 0),a},J=class J extends N.Component{render(){const{after:e,before:t,showAlignmentOptions:n,showSeparator:r,title:o}=this.props;let a,p;(t.content||e.content)&&(a=d(oe,{before:t.content,after:e.content,title:o}));const c=Object.keys(t.widgets??{}).filter(w=>t.content.includes(w)),h=Object.keys(e.widgets??{}).filter(w=>e.content.includes(w));return(c.length||h.length)&&(p=y.union(c,h).map(m=>{var l,f,u,P;return d(E,{before:Q((l=t.widgets)==null?void 0:l[m],n),after:Q((f=e.widgets)==null?void 0:f[m],n),title:m,type:(((u=t.widgets)==null?void 0:u[m])??{}).type||(((P=e.widgets)==null?void 0:P[m])??{}).type},m)})),k("div",{children:[a,p,r&&d("div",{className:"diff-separator"})]})}};J.defaultProps={after:{content:"",images:{},widgets:{}},before:{content:"",images:{},widgets:{}},showAlignmentOptions:!1,showSeparator:!1};let M=J;M.__docgenInfo={description:"",methods:[],displayName:"RendererDiff",props:{after:{required:!1,tsType:{name:"signature",type:"object",raw:`{ +import{j as d,a as k}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import{_ as y}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import{d as U,e as W,g as B,s as $}from"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import{g as ie,s as ae}from"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{r as N}from"./index-TT1qJ6UJ.js";import{T as oe}from"./text-diff-RbGWUAEg.js";import{c as de}from"./components-0kNWnYe6.js";import{c as A}from"./index-dnMhQZ-1.js";import{P as i}from"./index-k-0mNqHS.js";import{T as pe}from"./tags-diff-loewY876.js";const V="unchanged",Y="changed",Z="added",_="removed",le=function(s,e,t){let n;return s===e?n=V:s===void 0?n=Z:e===void 0?n=_:n=Y,{after:JSON.stringify(e),before:JSON.stringify(s),children:[],key:t,status:n}},ce=function(s,e,t){const n=y.isObject(s)?y(s).keys():[],r=y.isObject(e)?y(e).keys():[],o=y.union(n,r),a=y.map(o,function(c){return ee((s||{})[c],(e||{})[c],c)});let p;return s===void 0?p=Z:e===void 0?p=_:p=y.any(a,function(h){return h.status!==V})?Y:V,{after:"",before:"",children:a,key:t,status:p}},ee=function(s,e,t){return typeof s=="object"||typeof e=="object"?ce(s,e,t):le(s,e,t)},{SvgImage:z}=de,te=function(s){return(s-1)*20},C="before",j="after",ue="unchanged",F=class F extends N.Component{render(){const e=A(this.props.className,{"diff-row":!0,before:this.props.side===C,after:this.props.side===j});return d("div",{className:e,children:k("div",{style:{paddingLeft:te(this.props.depth)},children:[this.props.showKey&&this.props.propKey+": ",d("span",{className:"inner-value dark "+this.props.className,children:this.props.value})]})})}};F.propTypes={className:i.string.isRequired,depth:i.number.isRequired,propKey:i.string.isRequired,showKey:i.bool.isRequired,side:i.oneOf([C,j]).isRequired,value:i.string};let S=F;const K=class K extends N.Component{render(){const e=this;return d("div",{onClick:e.props.onClick,style:{clear:"both"},children:y.map([C,j],function(t){return d("div",{className:"diff-row collapsed "+t,children:d("div",{style:{paddingLeft:te(e.props.depth)},children:d("span",{children:" [ show unmodified ] "})})},t)})})}};K.propTypes={depth:i.number,onClick:i.func.isRequired},K.defaultProps={depth:0};let I=K;const R=class R extends N.Component{constructor(){super(...arguments),this.state={expanded:this.props.expanded},this.expand=()=>{this.setState({expanded:!0})}}render(){const e=this.props.entry,t=e.status==="removed",n=e.status==="added",r=e.status==="changed",o=e.children.length>0,a=A({removed:t||r&&!o,dark:t,"blank-space":n}),p=A({added:n||r&&!o,dark:n,"blank-space":t});let c;this.state.expanded?c=e.children:c=y(e.children).select(function(m){return m.status!==ue});let h=c.length1&&(a.alignment=t),o==="transformer"&&(a.graded=n),ae(o)&&(a.static=(s==null?void 0:s.static)??void 0),a},J=class J extends N.Component{render(){const{after:e,before:t,showAlignmentOptions:n,showSeparator:r,title:o}=this.props;let a,p;(t.content||e.content)&&(a=d(oe,{before:t.content,after:e.content,title:o}));const c=Object.keys(t.widgets??{}).filter(w=>t.content.includes(w)),h=Object.keys(e.widgets??{}).filter(w=>e.content.includes(w));return(c.length||h.length)&&(p=y.union(c,h).map(m=>{var l,f,u,P;return d(E,{before:Q((l=t.widgets)==null?void 0:l[m],n),after:Q((f=e.widgets)==null?void 0:f[m],n),title:m,type:(((u=t.widgets)==null?void 0:u[m])??{}).type||(((P=e.widgets)==null?void 0:P[m])??{}).type},m)})),k("div",{children:[a,p,r&&d("div",{className:"diff-separator"})]})}};J.defaultProps={after:{content:"",images:{},widgets:{}},before:{content:"",images:{},widgets:{}},showAlignmentOptions:!1,showSeparator:!1};let M=J;M.__docgenInfo={description:"",methods:[],displayName:"RendererDiff",props:{after:{required:!1,tsType:{name:"signature",type:"object",raw:`{ content: string; // NOTE: images and widgets may not be set for some items hints, // specifically in old revisions, which may only be loaded for diffing. diff --git a/assets/structured-item-diff.stories-HKAnnSGX.js b/assets/structured-item-diff.stories-HKAnnSGX.js index e388207964..45f247b51a 100644 --- a/assets/structured-item-diff.stories-HKAnnSGX.js +++ b/assets/structured-item-diff.stories-HKAnnSGX.js @@ -1,4 +1,4 @@ -import{_ as I}from"./iframe-xIQlSkwS.js";import{j as t}from"./jsx-runtime-FVsy8kgq.js";import{S as a}from"./structured-item-diff-C8S6VB9q.js";import{W as b}from"./perseus-diff-wrapper-dJxBlkDd.js";import"../sb-preview/runtime.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./text-diff-RbGWUAEg.js";import"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";import"./tags-diff-loewY876.js";I(()=>Promise.resolve({}),__vite__mapDeps([0]),import.meta.url);const _t={title:"PerseusEditor/Diffs/Structured Item Diff",decorators:[e=>t(b,{children:t(e,{})})]},c={a:"a tag",b:"b tag",c:"c tag"},i=e=>t(a,{...{before:{_multi:{directions:{__type:"content",content:"",images:{},widgets:{}},passage:{type:"content",content:"",images:{},widgets:{}},overview:{type:"content",content:"",images:{},widgets:{}},hints:[],questions:[]}},after:{_multi:{directions:{type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>c[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}}}),s=e=>t(a,{...{before:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},after:{_multi:{directions:{type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}}],questions:[{hints:[],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>c[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}}}),o=e=>t(a,{...{before:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}},{type:"hint",content:"hint 3",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}},{type:"hint",content:"question hint 2",images:{},widgets:{}},{type:"hint",content:"question hint 3",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},after:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1 edited",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>c[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}}}),p=e=>t(a,{...{before:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1 edited",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},after:{_multi:{directions:{__type:"content",content:"",images:{},widgets:{}},passage:{type:"content",content:"",images:{},widgets:{}},overview:{type:"content",content:"",images:{},widgets:{}},hints:[],questions:[]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>c[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}}});i.__docgenInfo={description:"",methods:[],displayName:"ContentAdded"};s.__docgenInfo={description:"",methods:[],displayName:"ContentAddedRemovedAndChanged"};o.__docgenInfo={description:"",methods:[],displayName:"MiscContentChanges"};p.__docgenInfo={description:"",methods:[],displayName:"ContentRemoved"};var r,m,d;i.parameters={...i.parameters,docs:{...(r=i.parameters)==null?void 0:r.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{_ as I}from"./iframe-xIQlSkwS.js";import{j as t}from"./jsx-runtime-FVsy8kgq.js";import{S as a}from"./structured-item-diff-C8S6VB9q.js";import{W as b}from"./perseus-diff-wrapper-dJxBlkDd.js";import"../sb-preview/runtime.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./text-diff-RbGWUAEg.js";import"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";import"./tags-diff-loewY876.js";I(()=>Promise.resolve({}),__vite__mapDeps([0]),import.meta.url);const _t={title:"PerseusEditor/Diffs/Structured Item Diff",decorators:[e=>t(b,{children:t(e,{})})]},c={a:"a tag",b:"b tag",c:"c tag"},i=e=>t(a,{...{before:{_multi:{directions:{__type:"content",content:"",images:{},widgets:{}},passage:{type:"content",content:"",images:{},widgets:{}},overview:{type:"content",content:"",images:{},widgets:{}},hints:[],questions:[]}},after:{_multi:{directions:{type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>c[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}}}),s=e=>t(a,{...{before:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},after:{_multi:{directions:{type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}}],questions:[{hints:[],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>c[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}}}),o=e=>t(a,{...{before:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}},{type:"hint",content:"hint 3",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}},{type:"hint",content:"question hint 2",images:{},widgets:{}},{type:"hint",content:"question hint 3",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},after:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1 edited",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>c[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}}}),p=e=>t(a,{...{before:{_multi:{directions:{__type:"content",content:"directions",images:{},widgets:{}},passage:{type:"content",content:"passage",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},hints:[{type:"hint",content:"hint 1",images:{},widgets:{}},{type:"hint",content:"hint 2",images:{},widgets:{}}],questions:[{hints:[{type:"hint",content:"question hint 1 edited",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question edited",images:{},widgets:{}},tags:["a","c"]},{hints:[{type:"hint",content:"question hint 1",images:{},widgets:{}}],keepInMind:{type:"content",content:"keep in mind",images:{},widgets:{}},overview:{type:"content",content:"overview",images:{},widgets:{}},question:{type:"content",content:"question",images:{},widgets:{}},tags:["a","b"]}]}},after:{_multi:{directions:{__type:"content",content:"",images:{},widgets:{}},passage:{type:"content",content:"",images:{},widgets:{}},overview:{type:"content",content:"",images:{},widgets:{}},hints:[],questions:[]}},shape:{type:"object",shape:{directions:{type:"content"},overview:{type:"content"},passage:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}},questions:{type:"array",elementShape:{type:"object",shape:{tags:{type:"tags"},question:{type:"content"},overview:{type:"content"},keepInMind:{type:"content"},hints:{type:"array",elementShape:{type:"hint"}}}}}}},tags:{idToName:n=>c[n],nameToId:n=>n[0],names:["a tag","b tag","c tag"]}}});i.__docgenInfo={description:"",methods:[],displayName:"ContentAdded"};s.__docgenInfo={description:"",methods:[],displayName:"ContentAddedRemovedAndChanged"};o.__docgenInfo={description:"",methods:[],displayName:"MiscContentChanges"};p.__docgenInfo={description:"",methods:[],displayName:"ContentRemoved"};var r,m,d;i.parameters={...i.parameters,docs:{...(r=i.parameters)==null?void 0:r.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { const props = ({ before: { _multi: { diff --git a/assets/stub-tag-editor-Hmby24Jq.js b/assets/stub-tag-editor-Hmby24Jq.js index c9a3d392be..adc7a4ed03 100644 --- a/assets/stub-tag-editor-Hmby24Jq.js +++ b/assets/stub-tag-editor-Hmby24Jq.js @@ -1 +1 @@ -import{a,j as t}from"./jsx-runtime-FVsy8kgq.js";import{P as e}from"./index-k-0mNqHS.js";import{r as i}from"./index-TT1qJ6UJ.js";import{T as n}from"./text-list-editor-pe7AGDAl.js";const o=[],s=class s extends i.Component{render(){return a("div",{children:[this.props.showTitle&&t("div",{style:{fontSize:14},children:"Tags:"}),t(n,{options:this.props.value||o,layout:"vertical",onChange:this.props.onChange})]})}};s.propTypes={value:e.arrayOf(e.string),onChange:e.func.isRequired,showTitle:e.bool.isRequired},s.defaultProps={value:o,showTitle:!0};let r=s;r.__docgenInfo={description:"",methods:[],displayName:"StubTagEditor",props:{value:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},showTitle:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},onChange:{description:"",type:{name:"func"},required:!0}}};export{r as S}; +import{a,j as t}from"./jsx-runtime-FVsy8kgq.js";import{P as e}from"./index-0C4KXdeC.js";import{r as i}from"./index-TT1qJ6UJ.js";import{T as n}from"./text-list-editor-pe7AGDAl.js";const o=[],s=class s extends i.Component{render(){return a("div",{children:[this.props.showTitle&&t("div",{style:{fontSize:14},children:"Tags:"}),t(n,{options:this.props.value||o,layout:"vertical",onChange:this.props.onChange})]})}};s.propTypes={value:e.arrayOf(e.string),onChange:e.func.isRequired,showTitle:e.bool.isRequired},s.defaultProps={value:o,showTitle:!0};let r=s;r.__docgenInfo={description:"",methods:[],displayName:"StubTagEditor",props:{value:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},showTitle:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},onChange:{description:"",type:{name:"func"},required:!0}}};export{r as S}; diff --git a/assets/stub-tag-editor.stories-L-kojrKS.js b/assets/stub-tag-editor.stories-L-kojrKS.js index 296185a940..3fc48c2b11 100644 --- a/assets/stub-tag-editor.stories-L-kojrKS.js +++ b/assets/stub-tag-editor.stories-L-kojrKS.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{S as s}from"./stub-tag-editor-Hmby24Jq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./index-7vsPyIck.js";const W={title:"Perseus/Components/name"},f=["Test value 1","Test value 2","Test value 3"],e=i=>a(s,{onChange:()=>{},showTitle:!0}),t=i=>a(s,{onChange:()=>{},showTitle:!1}),o=i=>a(s,{onChange:()=>{},showTitle:!0,value:f}),r=i=>a(s,{onChange:()=>{},showTitle:!1,value:f});e.__docgenInfo={description:"",methods:[],displayName:"ShowingTitle"};t.__docgenInfo={description:"",methods:[],displayName:"NotShowingTitle"};o.__docgenInfo={description:"",methods:[],displayName:"ShowingTitleWithValue"};r.__docgenInfo={description:"",methods:[],displayName:"NotShowingTitleWithValue"};var n,l,u;e.parameters={...e.parameters,docs:{...(n=e.parameters)==null?void 0:n.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{S as s}from"./stub-tag-editor-Hmby24Jq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./index-7vsPyIck.js";const W={title:"Perseus/Components/name"},f=["Test value 1","Test value 2","Test value 3"],e=i=>a(s,{onChange:()=>{},showTitle:!0}),t=i=>a(s,{onChange:()=>{},showTitle:!1}),o=i=>a(s,{onChange:()=>{},showTitle:!0,value:f}),r=i=>a(s,{onChange:()=>{},showTitle:!1,value:f});e.__docgenInfo={description:"",methods:[],displayName:"ShowingTitle"};t.__docgenInfo={description:"",methods:[],displayName:"NotShowingTitle"};o.__docgenInfo={description:"",methods:[],displayName:"ShowingTitleWithValue"};r.__docgenInfo={description:"",methods:[],displayName:"NotShowingTitleWithValue"};var n,l,u;e.parameters={...e.parameters,docs:{...(n=e.parameters)==null?void 0:n.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return {}} showTitle={true} />; }`,...(u=(l=e.parameters)==null?void 0:l.docs)==null?void 0:u.source}}};var c,g,m;t.parameters={...t.parameters,docs:{...(c=t.parameters)==null?void 0:c.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return {}} showTitle={false} />; diff --git a/assets/tabbar.stories-XOe59aSK.js b/assets/tabbar.stories-XOe59aSK.js index 5404962ee2..4b4767a913 100644 --- a/assets/tabbar.stories-XOe59aSK.js +++ b/assets/tabbar.stories-XOe59aSK.js @@ -1,4 +1,4 @@ -import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{r as i}from"./index-TT1qJ6UJ.js";import{T as n}from"./tabbar-WYCYDof0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";const O={title:"math-input/components/Tab Bar",component:n};function l(e){const[p,c]=i.useState("Numbers");return a(n,{...e,selectedItem:p,onSelectItem:r=>{e.onSelectItem(r),c(r)}})}const t={argTypes:{selectedItem:{options:["Numbers","Geometry","Operators"]}},args:{items:["Numbers","Geometry","Operators"]},parameters:{controls:{exclude:["items","onSelectItem","selectedItem","onClickClose"]}},render:e=>a(l,{...e})};var o,s,m;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`{ +import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{r as i}from"./index-TT1qJ6UJ.js";import{T as n}from"./tabbar-WYCYDof0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";const O={title:"math-input/components/Tab Bar",component:n};function l(e){const[p,c]=i.useState("Numbers");return a(n,{...e,selectedItem:p,onSelectItem:r=>{e.onSelectItem(r),c(r)}})}const t={argTypes:{selectedItem:{options:["Numbers","Geometry","Operators"]}},args:{items:["Numbers","Geometry","Operators"]},parameters:{controls:{exclude:["items","onSelectItem","selectedItem","onClickClose"]}},render:e=>a(l,{...e})};var o,s,m;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`{ argTypes: { selectedItem: { options: ["Numbers", "Geometry", "Operators"] diff --git a/assets/tabbaritem.stories-mdibAqRo.js b/assets/tabbaritem.stories-mdibAqRo.js index b7ee914b8a..a216874ffc 100644 --- a/assets/tabbaritem.stories-mdibAqRo.js +++ b/assets/tabbaritem.stories-mdibAqRo.js @@ -1,4 +1,4 @@ -import{T as o}from"./item-X9tjzx12.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-WNT3sUKf.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";const g={title:"math-input/components/Tab Bar Item",component:o},t={args:{itemState:"inactive",itemType:"Numbers"}};var e,r,m;t.parameters={...t.parameters,docs:{...(e=t.parameters)==null?void 0:e.docs,source:{originalSource:`{ +import{T as o}from"./item-X9tjzx12.js";import"./jsx-runtime-FVsy8kgq.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./index-2dmvOE3q.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-deFLJwr4.js";const g={title:"math-input/components/Tab Bar Item",component:o},t={args:{itemState:"inactive",itemType:"Numbers"}};var e,r,m;t.parameters={...t.parameters,docs:{...(e=t.parameters)==null?void 0:e.docs,source:{originalSource:`{ args: { itemState: ("inactive" as const), itemType: "Numbers" diff --git a/assets/tags-diff.stories-hP5HdUXh.js b/assets/tags-diff.stories-hP5HdUXh.js index 9801e1c03d..c48509cd56 100644 --- a/assets/tags-diff.stories-hP5HdUXh.js +++ b/assets/tags-diff.stories-hP5HdUXh.js @@ -1,3 +1,3 @@ -import{j as t}from"./jsx-runtime-FVsy8kgq.js";import{T as e}from"./tags-diff-loewY876.js";import{W as s}from"./perseus-diff-wrapper-dJxBlkDd.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./text-diff-RbGWUAEg.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./index-0C4KXdeC.js";const $r={title:"PerseusEditor/Diffs/Tags Diff",decorators:[o=>t(s,{children:t(o,{})})]},r=o=>t(e,{title:"tags",beforeOnly:["Math","Biology","History"],afterOnly:["World War I"],intersection:["Physics","Chemistry"]});r.__docgenInfo={description:"",methods:[],displayName:"Example"};var i,m,p;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as t}from"./jsx-runtime-FVsy8kgq.js";import{T as e}from"./tags-diff-loewY876.js";import{W as s}from"./perseus-diff-wrapper-dJxBlkDd.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./text-diff-RbGWUAEg.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";const $r={title:"PerseusEditor/Diffs/Tags Diff",decorators:[o=>t(s,{children:t(o,{})})]},r=o=>t(e,{title:"tags",beforeOnly:["Math","Biology","History"],afterOnly:["World War I"],intersection:["Physics","Chemistry"]});r.__docgenInfo={description:"",methods:[],displayName:"Example"};var i,m,p;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(p=(m=r.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};const rt=["Example"];export{r as Example,rt as __namedExportsOrder,$r as default}; diff --git a/assets/text-diff-RbGWUAEg.js b/assets/text-diff-RbGWUAEg.js index 33d5318bf2..1c76eaad18 100644 --- a/assets/text-diff-RbGWUAEg.js +++ b/assets/text-diff-RbGWUAEg.js @@ -1,4 +1,4 @@ -import{j as c,a as b}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import{_ as d}from"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as Q}from"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";import{c as R}from"./index-dnMhQZ-1.js";import{P as E}from"./index-0C4KXdeC.js";import{r as U}from"./index-TT1qJ6UJ.js";function M(t){return{newPos:t.newPos,components:t.components.slice(0)}}function V(t){for(var e=[],n=0;n/g,">"),e=e.replace(/"/g,"""),e}var C=function(t){this.ignoreWhitespace=t};C.prototype={diff:function(t,e){if(e===t)return[{value:e}];if(!e)return[{value:t,removed:!0}];if(!t)return[{value:e,added:!0}];e=this.tokenize(e),t=this.tokenize(t);var n=e.length,r=t.length,f=n+r,i=[{newPos:-1,components:[]}],s=this.extractCommon(i[0],e,t,0);if(i[0].newPos+1>=n&&s+1>=r)return i[0].components;for(var p=1;p<=f;p++)for(var o=-1*p;o<=p;o+=2){var a,l=i[o-1],u=i[o+1];s=(u?u.newPos:0)-o,l&&(i[o-1]=void 0);var m=l&&l.newPos+1=n&&s+1>=r)return a.components;i[o]=a}},pushComponent:function(t,e,n,r){var f=t[t.length-1];f&&f.added===n&&f.removed===r?t[t.length-1]={value:this.join(f.value,e),added:n,removed:r}:t.push({value:e,added:n,removed:r})},extractCommon:function(t,e,n,r){for(var f=e.length,i=n.length,s=t.newPos,p=s-r;s+1/g,">"),e=e.replace(/"/g,"""),e}var C=function(t){this.ignoreWhitespace=t};C.prototype={diff:function(t,e){if(e===t)return[{value:e}];if(!e)return[{value:t,removed:!0}];if(!t)return[{value:e,added:!0}];e=this.tokenize(e),t=this.tokenize(t);var n=e.length,r=t.length,f=n+r,i=[{newPos:-1,components:[]}],s=this.extractCommon(i[0],e,t,0);if(i[0].newPos+1>=n&&s+1>=r)return i[0].components;for(var p=1;p<=f;p++)for(var o=-1*p;o<=p;o+=2){var a,l=i[o-1],u=i[o+1];s=(u?u.newPos:0)-o,l&&(i[o-1]=void 0);var m=l&&l.newPos+1=n&&s+1>=r)return a.components;i[o]=a}},pushComponent:function(t,e,n,r){var f=t[t.length-1];f&&f.added===n&&f.removed===r?t[t.length-1]={value:this.join(f.value,e),added:n,removed:r}:t.push({value:e,added:n,removed:r})},extractCommon:function(t,e,n,r){for(var f=e.length,i=n.length,s=t.newPos,p=s-r;s+1"u"?"":" "+r)),i.push("+++ "+t+(typeof f>"u"?"":" "+f));var s=F.diff(e,n);s[s.length-1].value||s.pop(),s.push({value:"",lines:[]});function p(N){return N.map(function(y){return" "+y})}function o(N,y,W){var A=s[s.length-2],J=y===s.length-2,K=y===s.length-3&&(W.added!==A.added||W.removed!==A.removed);!/\n$/.test(W.value)&&(J||K)&&N.push("\\ No newline at end of file")}for(var a=0,l=0,u=[],m=1,v=1,w=0;wt(a,{children:t(o,{})})]},r=o=>t(e,{title:"A day in the life of a text diff",before:"🥱 Hello world!",after:"😴 Goodbye world!"});r.__docgenInfo={description:"",methods:[],displayName:"Example"};var i,m,p;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as t}from"./jsx-runtime-FVsy8kgq.js";import{T as e}from"./text-diff-RbGWUAEg.js";import{W as a}from"./perseus-diff-wrapper-dJxBlkDd.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./index-k-0mNqHS.js";const Zr={title:"PerseusEditor/Diffs/Text Diff",decorators:[o=>t(a,{children:t(o,{})})]},r=o=>t(e,{title:"A day in the life of a text diff",before:"🥱 Hello world!",after:"😴 Goodbye world!"});r.__docgenInfo={description:"",methods:[],displayName:"Example"};var i,m,p;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ; }`,...(p=(m=r.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};const $r=["Example"];export{r as Example,$r as __namedExportsOrder,Zr as default}; diff --git a/assets/text-list-editor-pe7AGDAl.js b/assets/text-list-editor-pe7AGDAl.js index a220be9fa7..0c253ae941 100644 --- a/assets/text-list-editor-pe7AGDAl.js +++ b/assets/text-list-editor-pe7AGDAl.js @@ -1 +1 @@ -import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{_ as i,$ as f}from"./jquery-yG1GhClm.js";import{P as c}from"./index-k-0mNqHS.js";import{r as m}from"./index-TT1qJ6UJ.js";import{R as l}from"./index-7vsPyIck.js";const u={};function d(a){if(!u[a]){const t=f("").text(a).appendTo("body");u[a]=t.width()+5,t.remove()}return u[a]}const r=class r extends m.Component{constructor(){super(...arguments),this.state={items:this.props.options.concat("")},this.onChange=(t,o)=>{let s=i.clone(this.state.items);s[t]=o.target.value,t===s.length-1&&(s=s.concat("")),this.setState({items:s}),this.props.onChange(i.compact(s))},this.onKeyDown=(t,o)=>{const s=o.nativeEvent.keyCode;if(s===8&&this.state.items[t]===""){o.preventDefault();const e=i.clone(this.state.items),n=t===0?0:t-1;t===e.length-1&&(t===0||e[n]!=="")?l.findDOMNode(this.refs["input_"+n]).focus():(e.splice(t,1),this.setState({items:e},function(){l.findDOMNode(this.refs["input_"+n]).focus()}))}else if(s===8&&this.state.items[t].length===1&&t===this.state.items.length-2){o.preventDefault();const e=i.clone(this.state.items);e.splice(t,1),this.setState({items:e}),this.props.onChange(i.compact(e))}else if(s===13){o.preventDefault();const e=i.clone(this.state.items),n=t+1;t===e.length-2?l.findDOMNode(this.refs["input_"+n]).focus():(e.splice(n,0,""),this.setState({items:e},function(){l.findDOMNode(this.refs["input_"+n]).focus()}))}}}UNSAFE_componentWillReceiveProps(t){this.setState({items:t.options.concat("")})}render(){const t=["perseus-text-list-editor","perseus-clearfix","layout-"+this.props.layout].join(" "),o=i.map(this.state.items,function(s,e){return p("li",{children:p("input",{ref:"input_"+e,type:"text",value:s,onChange:this.onChange.bind(this,e),onKeyDown:this.onKeyDown.bind(this,e),style:{width:d(s)}})},e)},this);return p("ul",{className:t,children:o})}};r.propTypes={options:c.array,layout:c.string,onChange:c.func.isRequired},r.defaultProps={options:[],layout:"horizontal"};let h=r;h.__docgenInfo={description:"",methods:[{name:"onChange",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null},{name:"event",optional:!1,type:null}],returns:null},{name:"onKeyDown",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null},{name:"event",optional:!1,type:null}],returns:null}],displayName:"TextListEditor",props:{options:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"array"},required:!1},layout:{defaultValue:{value:'"horizontal"',computed:!1},description:"",type:{name:"string"},required:!1},onChange:{description:"",type:{name:"func"},required:!0}}};export{h as T}; +import{j as p}from"./jsx-runtime-FVsy8kgq.js";import{_ as i,$ as f}from"./jquery-yG1GhClm.js";import{P as c}from"./index-0C4KXdeC.js";import{r as m}from"./index-TT1qJ6UJ.js";import{R as l}from"./index-7vsPyIck.js";const u={};function d(a){if(!u[a]){const t=f("").text(a).appendTo("body");u[a]=t.width()+5,t.remove()}return u[a]}const r=class r extends m.Component{constructor(){super(...arguments),this.state={items:this.props.options.concat("")},this.onChange=(t,o)=>{let s=i.clone(this.state.items);s[t]=o.target.value,t===s.length-1&&(s=s.concat("")),this.setState({items:s}),this.props.onChange(i.compact(s))},this.onKeyDown=(t,o)=>{const s=o.nativeEvent.keyCode;if(s===8&&this.state.items[t]===""){o.preventDefault();const e=i.clone(this.state.items),n=t===0?0:t-1;t===e.length-1&&(t===0||e[n]!=="")?l.findDOMNode(this.refs["input_"+n]).focus():(e.splice(t,1),this.setState({items:e},function(){l.findDOMNode(this.refs["input_"+n]).focus()}))}else if(s===8&&this.state.items[t].length===1&&t===this.state.items.length-2){o.preventDefault();const e=i.clone(this.state.items);e.splice(t,1),this.setState({items:e}),this.props.onChange(i.compact(e))}else if(s===13){o.preventDefault();const e=i.clone(this.state.items),n=t+1;t===e.length-2?l.findDOMNode(this.refs["input_"+n]).focus():(e.splice(n,0,""),this.setState({items:e},function(){l.findDOMNode(this.refs["input_"+n]).focus()}))}}}UNSAFE_componentWillReceiveProps(t){this.setState({items:t.options.concat("")})}render(){const t=["perseus-text-list-editor","perseus-clearfix","layout-"+this.props.layout].join(" "),o=i.map(this.state.items,function(s,e){return p("li",{children:p("input",{ref:"input_"+e,type:"text",value:s,onChange:this.onChange.bind(this,e),onKeyDown:this.onKeyDown.bind(this,e),style:{width:d(s)}})},e)},this);return p("ul",{className:t,children:o})}};r.propTypes={options:c.array,layout:c.string,onChange:c.func.isRequired},r.defaultProps={options:[],layout:"horizontal"};let h=r;h.__docgenInfo={description:"",methods:[{name:"onChange",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null},{name:"event",optional:!1,type:null}],returns:null},{name:"onKeyDown",docblock:null,modifiers:[],params:[{name:"index",optional:!1,type:null},{name:"event",optional:!1,type:null}],returns:null}],displayName:"TextListEditor",props:{options:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"array"},required:!1},layout:{defaultValue:{value:'"horizontal"',computed:!1},description:"",type:{name:"string"},required:!1},onChange:{description:"",type:{name:"func"},required:!0}}};export{h as T}; diff --git a/assets/text-list-editor.stories-IcrK9bTU.js b/assets/text-list-editor.stories-IcrK9bTU.js index 2bd1fcc608..fcc70911ac 100644 --- a/assets/text-list-editor.stories-IcrK9bTU.js +++ b/assets/text-list-editor.stories-IcrK9bTU.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{a as n}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{T as a}from"./text-list-editor-pe7AGDAl.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./jquery-yG1GhClm.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./index-7vsPyIck.js";const S={title:"Perseus/Components/Text List Editor"},p={onChange:(...e)=>{n("onChange")(...e)},options:["Test option 1","Test option 2","Test option 3"]},m="framework-perseus orderer",t=e=>s("div",{class:m,children:s(a,{...p})});t.__docgenInfo={description:"",methods:[],displayName:"SimpleListOfOptions"};var o,r,i;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { +import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{a as n}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{T as a}from"./text-list-editor-pe7AGDAl.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./jquery-yG1GhClm.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./index-7vsPyIck.js";const S={title:"Perseus/Components/Text List Editor"},p={onChange:(...e)=>{n("onChange")(...e)},options:["Test option 1","Test option 2","Test option 3"]},m="framework-perseus orderer",t=e=>s("div",{class:m,children:s(a,{...p})});t.__docgenInfo={description:"",methods:[],displayName:"SimpleListOfOptions"};var o,r,i;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`(args: StoryArgs): React.ReactElement => { return ( // @ts-expect-error [FEI-5003] - TS2322 - Type '{ children: Element; class: string; }' is not assignable to type 'DetailedHTMLProps, HTMLDivElement>'.
diff --git a/assets/util-7LGRm2EO.js b/assets/util-7LGRm2EO.js index 8c466b6d23..f478f7b611 100644 --- a/assets/util-7LGRm2EO.js +++ b/assets/util-7LGRm2EO.js @@ -1 +1 @@ -import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{l as i}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{V as m}from"./index-6h5t6F0w.js";import{c as p,s as l}from"./index-deFLJwr4.js";import{l as d}from"./index-awljIyHI.js";import{w as u}from"./index-J2t_5nK1.js";const n=e=>{const{color:r,filled:t=!0,decorative:c=!1}=e;return a(m,{"aria-label":c?void 0:`${r}, ${t?"filled":"open"}`,style:[f.colorSwatch,{border:`4px solid ${i[r]}`,backgroundColor:t?i[r]:p.white}]})},f=d.StyleSheet.create({colorSwatch:{outline:`2px solid ${p.offWhite}`,borderRadius:"50%",width:l.large_24,height:l.large_24}}),J=n;n.__docgenInfo={description:"",methods:[],displayName:"ColorSwatch",props:{color:{required:!0,tsType:{name:"LockedFigureColor"},description:""},filled:{required:!1,tsType:{name:"boolean"},description:""},decorative:{required:!1,tsType:{name:"boolean"},description:""}}};const o="grayH";function s(e){switch(e){case"point":return{type:"point",coord:[0,0],color:o,filled:!0};case"line":return{type:"line",kind:"line",points:[s("point"),{...s("point"),coord:[2,2]}],color:o,lineStyle:"solid",showPoint1:!1,showPoint2:!1};case"vector":return{type:"vector",points:[[0,0],[2,2]],color:o};case"ellipse":return{type:"ellipse",center:[0,0],radius:[1,1],angle:0,color:o,fillStyle:"none",strokeStyle:"solid"};case"polygon":return{type:"polygon",points:[[0,2],[-1,0],[1,0]],color:o,showVertices:!1,fillStyle:"none",strokeStyle:"solid"};case"function":return{type:"function",color:o,strokeStyle:"solid",equation:"x^2",directionalAxis:"x"};case"label":return{type:"label",coord:[0,0],text:"",color:o,size:"medium"};default:throw new u(e)}}export{J as C,s as g}; +import{j as a}from"./jsx-runtime-FVsy8kgq.js";import{l as i}from"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./svg-image-Rjw-_QTV.js";import"./hud-FI3E3dT_.js";import"./icon-YuYiVxsK.js";import"./index-K9BSJPWl.js";import"./inline-icon-tKY1iMkH.js";import"./math-input-b6JdL4xR.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./text-input-15gEhfDF.js";import"./text-list-editor-pe7AGDAl.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./index-IIMKO4_x.js";import{V as m}from"./index-6h5t6F0w.js";import{c as p,s as l}from"./index-deFLJwr4.js";import{l as d}from"./index-awljIyHI.js";import{w as u}from"./index-J2t_5nK1.js";const n=e=>{const{color:r,filled:t=!0,decorative:c=!1}=e;return a(m,{"aria-label":c?void 0:`${r}, ${t?"filled":"open"}`,style:[f.colorSwatch,{border:`4px solid ${i[r]}`,backgroundColor:t?i[r]:p.white}]})},f=d.StyleSheet.create({colorSwatch:{outline:`2px solid ${p.offWhite}`,borderRadius:"50%",width:l.large_24,height:l.large_24}}),J=n;n.__docgenInfo={description:"",methods:[],displayName:"ColorSwatch",props:{color:{required:!0,tsType:{name:"LockedFigureColor"},description:""},filled:{required:!1,tsType:{name:"boolean"},description:""},decorative:{required:!1,tsType:{name:"boolean"},description:""}}};const o="grayH";function s(e){switch(e){case"point":return{type:"point",coord:[0,0],color:o,filled:!0};case"line":return{type:"line",kind:"line",points:[s("point"),{...s("point"),coord:[2,2]}],color:o,lineStyle:"solid",showPoint1:!1,showPoint2:!1};case"vector":return{type:"vector",points:[[0,0],[2,2]],color:o};case"ellipse":return{type:"ellipse",center:[0,0],radius:[1,1],angle:0,color:o,fillStyle:"none",strokeStyle:"solid"};case"polygon":return{type:"polygon",points:[[0,2],[-1,0],[1,0]],color:o,showVertices:!1,fillStyle:"none",strokeStyle:"solid"};case"function":return{type:"function",color:o,strokeStyle:"solid",equation:"x^2",directionalAxis:"x"};case"label":return{type:"label",coord:[0,0],text:"",color:o,size:"medium"};default:throw new u(e)}}export{J as C,s as g}; diff --git a/assets/video.stories-3el4H2aK.js b/assets/video.stories-3el4H2aK.js index 4c90f63c16..87f1336a42 100644 --- a/assets/video.stories-3el4H2aK.js +++ b/assets/video.stories-3el4H2aK.js @@ -1,4 +1,4 @@ -import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{R as e}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-2dmvOE3q.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const h={content:`Watch the Biogeography: Where Life Lives video to find the answer. +import{j as i}from"./jsx-runtime-FVsy8kgq.js";import{R as e}from"./renderer-with-debug-ui-o6OVhJgg.js";import"./index-TT1qJ6UJ.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./choice-E4eyMygy.js";import"./index-6h5t6F0w.js";import"./index-awljIyHI.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./index-o3wWn3Y5.js";import"./index-deFLJwr4.js";import"./index-h_CiYGGb.js";import"./index-ngddCaVG.js";import"./index-rfN0X25E.js";import"./index-xuPsLuPk.js";import"./index-WNT3sUKf.js";import"./index-qUyqkRvh.js";import"./index-BPSWBbj5.js";import"./index-7vsPyIck.js";import"./index-YCTzZMik.js";import"./index-CkAxGj88.js";import"./Popper-kGnKOid7.js";import"./index-dnMhQZ-1.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./icon-YuYiVxsK.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./invariant-bu5zBsRS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./jquery-yG1GhClm.js";import"./media-queries-MaBBbpNq.js";import"./constants-I_nlPaPx.js";import"./choice-icon-LAaL9HdM.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-J2t_5nK1.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./client-rbWgHzHN.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./math-input-b6JdL4xR.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./shared-3pf9YZIg.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./side-by-side-kpK-8vW0.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./register-all-widgets-for-testing-fawnePoa.js";const h={content:`Watch the Biogeography: Where Life Lives video to find the answer. [[☃ video 1]] diff --git a/assets/viewport-resizer-YtC0KtaX.js b/assets/viewport-resizer-YtC0KtaX.js index 5c3a7d5863..77f4bd0953 100644 --- a/assets/viewport-resizer-YtC0KtaX.js +++ b/assets/viewport-resizer-YtC0KtaX.js @@ -1,2 +1,2 @@ -import{a as e,j as t}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as a}from"./components-0kNWnYe6.js";import{c}from"./constants-hQyjCzwz.js";import{I as m}from"./icon-paths-AuJwhOz7.js";import"./index-k-0mNqHS.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";const{ButtonGroup:d,InlineIcon:o}=a,{devices:n}=c,{iconDesktop:u,iconMobilePhone:l,iconTablet:h}=m,v=i=>{const r=e("span",{children:[t(o,{...l})," Phone"]}),s=e("span",{children:[t(o,{...h})," Tablet"]}),p=e("span",{children:[t(o,{...u})," Desktop"]});return e("span",{className:"viewport-resizer",children:["Viewport:"," ",t(d,{value:i.deviceType,allowEmpty:!1,buttons:[{value:n.PHONE,content:r},{value:n.TABLET,content:s},{value:n.DESKTOP,content:p}],onChange:i.onViewportSizeChanged})]})};v.__docgenInfo={description:"",methods:[],displayName:"ViewportResizer",props:{deviceType:{required:!0,tsType:{name:"DeviceType"},description:"The current device type that is selected."},onViewportSizeChanged:{required:!0,tsType:{name:"signature",type:"function",raw:"(deviceType: DeviceType) => unknown",signature:{arguments:[{type:{name:"DeviceType"},name:"deviceType"}],return:{name:"unknown"}}},description:`A callback that is passed (width, height) as the dimensions of the +import{a as e,j as t}from"./jsx-runtime-FVsy8kgq.js";import"./article-renderer-o95CuJpS.js";import"./jquery-yG1GhClm.js";import"./util-XcxTwqb0.js";import"./phet-simulation-I2_BZVd2.js";import"./version-akiLXZts.js";import"./dependencies-8XILypbq.js";import"./perseus-api-mOiZT07d.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./renderer-4_U4OAry.js";import"./base-radio-sE9E2UC2.js";import{c as a}from"./components-0kNWnYe6.js";import{c}from"./constants-hQyjCzwz.js";import{I as m}from"./icon-paths-AuJwhOz7.js";import"./index-0C4KXdeC.js";import"./i18n-context-hxuRe8oU.js";import"./svg-image-Rjw-_QTV.js";import"./index-IIMKO4_x.js";const{ButtonGroup:d,InlineIcon:o}=a,{devices:n}=c,{iconDesktop:u,iconMobilePhone:l,iconTablet:h}=m,v=i=>{const r=e("span",{children:[t(o,{...l})," Phone"]}),s=e("span",{children:[t(o,{...h})," Tablet"]}),p=e("span",{children:[t(o,{...u})," Desktop"]});return e("span",{className:"viewport-resizer",children:["Viewport:"," ",t(d,{value:i.deviceType,allowEmpty:!1,buttons:[{value:n.PHONE,content:r},{value:n.TABLET,content:s},{value:n.DESKTOP,content:p}],onChange:i.onViewportSizeChanged})]})};v.__docgenInfo={description:"",methods:[],displayName:"ViewportResizer",props:{deviceType:{required:!0,tsType:{name:"DeviceType"},description:"The current device type that is selected."},onViewportSizeChanged:{required:!0,tsType:{name:"signature",type:"function",raw:"(deviceType: DeviceType) => unknown",signature:{arguments:[{type:{name:"DeviceType"},name:"deviceType"}],return:{name:"unknown"}}},description:`A callback that is passed (width, height) as the dimensions of the viewport to resize to.`}}};export{v as V}; diff --git a/assets/viewport-resizer.stories-FucH3aHd.js b/assets/viewport-resizer.stories-FucH3aHd.js index 47dcea3a0e..2d753931a3 100644 --- a/assets/viewport-resizer.stories-FucH3aHd.js +++ b/assets/viewport-resizer.stories-FucH3aHd.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{a}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{r as c}from"./index-TT1qJ6UJ.js";import{V as m}from"./viewport-resizer-YtC0KtaX.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-WNT3sUKf.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-k-0mNqHS.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-2dmvOE3q.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./constants-hQyjCzwz.js";const pt={component:m,title:"PerseusEditor/Components/Viewport Resizer"},o=()=>{const[e,n]=c.useState("phone");return s(m,{deviceType:e,onViewportSizeChanged:t=>{a("onViewportSizeChanged")(t),n(t)}})};o.__docgenInfo={description:"",methods:[],displayName:"Controlled"};var r,i,p;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`() => { +import{j as s}from"./jsx-runtime-FVsy8kgq.js";import{a}from"./chunk-WFFRPTHA-zlNDxfrq.js";import{r as c}from"./index-TT1qJ6UJ.js";import{V as m}from"./viewport-resizer-YtC0KtaX.js";import"./preview-errors-7FWlPnjy.js";import"./index-PPLHz8o0.js";import"./_commonjsHelpers-4gQjN7DL.js";import"./article-renderer-o95CuJpS.js";import"./util-XcxTwqb0.js";import"./version-akiLXZts.js";import"./jquery-yG1GhClm.js";import"./prop-types-3bOVFRDQ.js";import"./mobile-keypad-hKjeQGNp.js";import"./index-awljIyHI.js";import"./index-7vsPyIck.js";import"./index-CkAxGj88.js";import"./index-J2t_5nK1.js";import"./index-6h5t6F0w.js";import"./index-deFLJwr4.js";import"./tabbar-WYCYDof0.js";import"./item-X9tjzx12.js";import"./index-2dmvOE3q.js";import"./react-router-dom-W_e8xVUu.js";import"./index-tvtfaFq4.js";import"./button-assets-txIojR3b.js";import"./keypad-button-rKskH7oM.js";import"./operators-page-C_EsmjPW.js";import"./navigation-pad-ss7r0FKW.js";import"./key-translator-IA-2V2LV.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./invariant-bu5zBsRS.js";import"./enums-x5qaTru7.js";import"./renderer-4_U4OAry.js";import"./index-dnMhQZ-1.js";import"./asset-context-I7yIqWki.js";import"./svg-image-Rjw-_QTV.js";import"./dependencies-8XILypbq.js";import"./fixed-to-responsive-1fSZ1n--.js";import"./constants-I_nlPaPx.js";import"./client-rbWgHzHN.js";import"./inline-icon-tKY1iMkH.js";import"./icon-paths-AuJwhOz7.js";import"./image-loader-mgyZcN0j.js";import"./tex-VP4hirbI.js";import"./zoomable-CA1NzpZD.js";import"./zoomable-tex-MZi7Hqbp.js";import"./perseus-api-mOiZT07d.js";import"./index-0C4KXdeC.js";import"./stub-tag-editor-Hmby24Jq.js";import"./text-list-editor-pe7AGDAl.js";import"./lint-I_5mQeXl.js";import"./index-K9BSJPWl.js";import"./index-xuPsLuPk.js";import"./index-YCTzZMik.js";import"./index-rfN0X25E.js";import"./index-o3wWn3Y5.js";import"./index-h_CiYGGb.js";import"./Popper-kGnKOid7.js";import"./i18n-context-hxuRe8oU.js";import"./strings-OAjNfY6D.js";import"./math-input-b6JdL4xR.js";import"./index-WNT3sUKf.js";import"./index-BPSWBbj5.js";import"./input-with-examples-1e8gjW5y.js";import"./text-input-15gEhfDF.js";import"./index-QCAhLhLD.js";import"./minus-bold-ONmDo3Ve.js";import"./tooltip-S_hcgkAT.js";import"./simple-keypad-input-zNNuoI83.js";import"./base-radio-sE9E2UC2.js";import"./media-queries-MaBBbpNq.js";import"./shared-3pf9YZIg.js";import"./choice-E4eyMygy.js";import"./index-ngddCaVG.js";import"./index-qUyqkRvh.js";import"./icon-YuYiVxsK.js";import"./choice-icon-LAaL9HdM.js";import"./focus-ring-sgSTt4fM.js";import"./option-status-6glEGOB8.js";import"./choice-none-above-o4v4BTO3.js";import"./phet-simulation-I2_BZVd2.js";import"./arrow-square-out-bold-090vdhrx.js";import"./answer-choices-vbrLThK4.js";import"./button-group-nsoLlHtM.js";import"./graph-sgfCFYpv.js";import"./index-IIMKO4_x.js";import"./tiny-invariant-bHgPayXn.js";import"./bundle.esm-7jAAHVxW.js";import"./hud-FI3E3dT_.js";import"./multi-button-group-a0iIfrwx.js";import"./number-input-dpusjjfa.js";import"./range-input-R0Q6JH86.js";import"./marker-vUQ60Bu-.js";import"./answer-pill-uwg1DdPG.js";import"./sortable-w6DA86Qg.js";import"./video-transcript-link-WVgIZGhp.js";import"./multi-renderer-Nglq5SzN.js";import"./hints-renderer-GjKFBH8K.js";import"./components-0kNWnYe6.js";import"./constants-hQyjCzwz.js";const pt={component:m,title:"PerseusEditor/Components/Viewport Resizer"},o=()=>{const[e,n]=c.useState("phone");return s(m,{deviceType:e,onViewportSizeChanged:t=>{a("onViewportSizeChanged")(t),n(t)}})};o.__docgenInfo={description:"",methods:[],displayName:"Controlled"};var r,i,p;o.parameters={...o.parameters,docs:{...(r=o.parameters)==null?void 0:r.docs,source:{originalSource:`() => { const [deviceType, setDeviceType] = React.useState("phone"); return { action("onViewportSizeChanged")(newDeviceType); diff --git a/preview-stats.json b/preview-stats.json index 42c56000db..dd74d4fce9 100644 --- a/preview-stats.json +++ b/preview-stats.json @@ -1243,80 +1243,56 @@ ] }, { - "id": "./packages/math-input/src/data/key-configs.ts", - "name": "./packages/math-input/src/data/key-configs.ts", + "id": "./packages/perseus-editor/src/tex-error-view.tsx", + "name": "./packages/perseus-editor/src/tex-error-view.tsx", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/keypad-button.stories.tsx" - }, - { - "moduleName": "./packages/math-input/src/index.ts" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/geometry-page.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/numbers-page.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/operators-page.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/extras-page.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/fractions-page.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/shared-keys.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/utils.ts" + "moduleName": "./packages/perseus-editor/src/__stories__/tex-error-view.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/navigation-pad.tsx" + "moduleName": "./packages/perseus-editor/src/editor.tsx" } ] }, { - "id": "./packages/math-input/src/strings.ts", - "name": "./packages/math-input/src/strings.ts", + "id": "./packages/math-input/src/components/tabbar/item.tsx", + "name": "./packages/math-input/src/components/tabbar/item.tsx", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/keypad-button.stories.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx" + "moduleName": "./packages/math-input/src/components/tabbar/tabbaritem.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/i18n-context.tsx" + "moduleName": "./packages/math-input/src/components/tabbar/tabbar.tsx" } ] }, { - "id": "./packages/math-input/src/components/keypad/keypad-button.tsx", - "name": "./packages/math-input/src/components/keypad/keypad-button.tsx", + "id": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts", + "name": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/keypad-button.stories.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/geometry-page.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/editor-page.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/numbers-page.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/article-editor.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/operators-page.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/extras-page.tsx" - }, + "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx", + "name": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx", + "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/fractions-page.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/editor-page.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/shared-keys.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" } ] }, @@ -1357,128 +1333,152 @@ ] }, { - "id": "./packages/math-input/src/components/tabbar/item.tsx", - "name": "./packages/math-input/src/components/tabbar/item.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-swatch.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-swatch.tsx", "reasons": [ { - "moduleName": "./packages/math-input/src/components/tabbar/tabbaritem.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/color-swatch.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/tabbar/tabbar.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-select.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts", - "name": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/util.ts", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/util.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/editor-page.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/color-swatch.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/article-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/color-select.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-ellipse-settings.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx", - "name": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-function-settings.stories.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/__stories__/editor-page.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-label-settings.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-swatch.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-swatch.tsx", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-line-settings.stories.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/color-swatch.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-point-settings.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-polygon-settings.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-select.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/util.ts", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/util.ts", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-vector-settings.stories.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/color-swatch.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-function-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-figures-section.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-line-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-label-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figures-section.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-point-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/color-select.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-polygon-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-ellipse-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + } + ] + }, + { + "id": "./packages/math-input/src/data/key-configs.ts", + "name": "./packages/math-input/src/data/key-configs.ts", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/keypad/keypad-button.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-vector-settings.stories.tsx" + "moduleName": "./packages/math-input/src/index.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.stories.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/geometry-page.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-figures-section.stories.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/numbers-page.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/operators-page.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + "moduleName": "./packages/math-input/src/components/keypad/utils.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figures-section.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/extras-page.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/fractions-page.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/math-input/src/components/keypad/shared-keys.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + "moduleName": "./packages/math-input/src/components/keypad/navigation-pad.tsx" } ] }, { - "id": "./packages/perseus-editor/src/tex-error-view.tsx", - "name": "./packages/perseus-editor/src/tex-error-view.tsx", + "id": "./packages/math-input/src/strings.ts", + "name": "./packages/math-input/src/strings.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/tex-error-view.stories.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad-button.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/editor.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/i18n-context.tsx" + } + ] + }, + { + "id": "./packages/math-input/src/components/keypad/keypad-button.tsx", + "name": "./packages/math-input/src/components/keypad/keypad-button.tsx", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/keypad/keypad-button.stories.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/geometry-page.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/numbers-page.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/operators-page.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/extras-page.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/fractions-page.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/shared-keys.tsx" } ] }, @@ -1516,9 +1516,6 @@ { "moduleName": "./packages/perseus-editor/src/widgets/__stories__/categorizer-editor.stories.tsx" }, - { - "moduleName": "./packages/perseus-editor/src/__stories__/article-editor.stories.tsx" - }, { "moduleName": "./.storybook/preview.tsx" }, @@ -1526,13 +1523,13 @@ "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/device-framer.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/article-editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/viewport-resizer.tsx" + "moduleName": "./packages/perseus-editor/src/components/device-framer.tsx" }, { - "moduleName": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts" + "moduleName": "./packages/perseus-editor/src/components/viewport-resizer.tsx" }, { "moduleName": "./packages/perseus-editor/src/index.ts" @@ -1540,6 +1537,9 @@ { "moduleName": "./packages/perseus-editor/src/__stories__/flags-for-api-options.ts" }, + { + "moduleName": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts" + }, { "moduleName": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx" }, @@ -1547,49 +1547,49 @@ "moduleName": "./packages/perseus-editor/src/widgets/python-program-editor.tsx" }, { - "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/phet-simulation-editor.tsx" }, { - "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" + "moduleName": "./packages/perseus-editor/src/article-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/article-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/image-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/input-number-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/image-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/editor-page.tsx" + "moduleName": "./packages/perseus-editor/src/iframe-content-renderer.tsx" }, { - "moduleName": "./packages/perseus-editor/src/iframe-content-renderer.tsx" + "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" }, { - "moduleName": "./packages/perseus-editor/src/i18n.ts" + "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/phet-simulation-editor.tsx" + "moduleName": "./packages/perseus-editor/src/i18n.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx" + "moduleName": "./packages/perseus-editor/src/editor-page.tsx" }, { - "moduleName": "./testing/renderer-with-debug-ui.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/renderer-diff.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" + "moduleName": "./testing/renderer-with-debug-ui.tsx" }, { - "moduleName": "./packages/perseus-editor/src/diffs/renderer-diff.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/interaction-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/util.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/interaction-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" }, { "moduleName": "./dev/flipbook.tsx" @@ -1598,37 +1598,34 @@ "moduleName": "./packages/perseus-editor/src/editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" + "moduleName": "./packages/perseus-editor/src/components/widget-select.tsx" }, { - "moduleName": "./packages/perseus-editor/src/item-editor.tsx" + "moduleName": "./packages/perseus-editor/src/components/widget-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/grapher-editor.tsx" + "moduleName": "./packages/perseus-editor/src/item-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/deprecated-standin-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/widget-select.tsx" + "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/widget-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/grapher-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/element-container.tsx" }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/function-editor.tsx" - }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/label-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/line-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/function-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-point-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/line-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-line-editor.tsx" @@ -1643,10 +1640,10 @@ "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/rectangle-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/diffs/text-diff.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-point-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/categorizer-editor.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/text-diff.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/definition-editor.tsx" @@ -1654,6 +1651,9 @@ { "moduleName": "./packages/perseus-editor/src/widgets/explanation-editor.tsx" }, + { + "moduleName": "./packages/perseus-editor/src/widgets/categorizer-editor.tsx" + }, { "moduleName": "./packages/perseus-editor/src/widgets/matcher-editor.tsx" }, @@ -1667,37 +1667,37 @@ "moduleName": "./packages/perseus-editor/src/widgets/radio/editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/measurer-editor.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/widget-diff.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/molecule-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/iframe-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/graded-group-set-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/group-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/orderer-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/iframe-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/matrix-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/graded-group-set-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/molecule-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/measurer-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/passage-ref-target-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/orderer-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/passage-ref-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/passage-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/passage-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/passage-ref-target-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/table-editor.tsx" @@ -1706,13 +1706,13 @@ "moduleName": "./packages/perseus-editor/src/widgets/video-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/diffs/widget-diff.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/passage-ref-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/dash-picker.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/color-picker.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/color-picker.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/dash-picker.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/arrow-picker.tsx" @@ -1733,79 +1733,79 @@ "moduleName": "./packages/perseus-editor/src/widgets/__stories__/image-editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx" + "moduleName": "./packages/perseus-editor/src/item-extras-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/content-preview.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-swatch.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-select.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx" }, { - "moduleName": "./packages/perseus-editor/src/item-extras-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-swatch.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/color-select.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/components/section-control-button.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/section-control-button.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/expression-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/behavior.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/marker.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/behavior.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/marker.tsx" }, { "moduleName": "./packages/perseus-editor/src/multirenderer-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-swatch.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/polygon-swatch.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-swatch.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/polygon-swatch.tsx" }, { "moduleName": "./packages/perseus-editor/src/components/form-wrapped-text-field.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/dropdown-option.tsx" + "moduleName": "./packages/perseus-editor/src/components/checkbox.tsx" }, { - "moduleName": "./packages/perseus-editor/src/components/checkbox.tsx" + "moduleName": "./packages/perseus-editor/src/components/dropdown-option.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/graded-group-editor.tsx" @@ -1828,14 +1828,17 @@ ] }, { - "id": "./packages/perseus-editor/src/diffs/tags-diff.tsx", - "name": "./packages/perseus-editor/src/diffs/tags-diff.tsx", + "id": "./packages/perseus-editor/src/diffs/text-diff.tsx", + "name": "./packages/perseus-editor/src/diffs/text-diff.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/diffs/__stories__/tags-diff.stories.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/__stories__/text-diff.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/tags-diff.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/diffs/renderer-diff.tsx" } ] }, @@ -1844,10 +1847,10 @@ "name": "./packages/perseus-editor/src/diffs/__stories__/perseus-diff-wrapper.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/diffs/__stories__/tags-diff.stories.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/__stories__/text-diff.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/diffs/__stories__/text-diff.stories.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/__stories__/tags-diff.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx" @@ -1855,41 +1858,44 @@ ] }, { - "id": "./packages/perseus-editor/src/diffs/text-diff.tsx", - "name": "./packages/perseus-editor/src/diffs/text-diff.tsx", + "id": "./packages/perseus-editor/src/diffs/tags-diff.tsx", + "name": "./packages/perseus-editor/src/diffs/tags-diff.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/diffs/__stories__/text-diff.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/diffs/tags-diff.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/__stories__/tags-diff.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/diffs/renderer-diff.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/categorizer-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/categorizer-editor.tsx", + "id": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx", + "name": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/categorizer-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus-editor/src/index.ts" } ] }, { - "id": "./packages/perseus-editor/src/widgets/dropdown-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/dropdown-editor.tsx", + "id": "./packages/perseus-editor/src/styles/perseus-editor.less", + "name": "./packages/perseus-editor/src/styles/perseus-editor.less", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/dropdown-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus-editor/src/__stories__/item-editor.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/index.ts" } ] }, @@ -1906,11 +1912,11 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/input-number-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/input-number-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/categorizer-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/categorizer-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/input-number-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/categorizer-editor.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -1930,41 +1936,35 @@ ] }, { - "id": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx", - "name": "./packages/perseus-editor/src/diffs/structured-item-diff.tsx", + "id": "./packages/perseus-editor/src/widgets/dropdown-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/dropdown-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/dropdown-editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/index.ts" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, { - "id": "./packages/perseus-editor/src/styles/perseus-editor.less", - "name": "./packages/perseus-editor/src/styles/perseus-editor.less", + "id": "./packages/perseus-editor/src/widgets/input-number-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/input-number-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/diffs/__stories__/structured-item-diff.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/__stories__/item-editor.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/input-number-editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/index.ts" + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, { - "id": "./packages/perseus-editor/src/widgets/number-line-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/number-line-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/matcher-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/matcher-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/number-line-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/matcher-editor.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -1972,11 +1972,11 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/matcher-editor.tsx", - "name": "./packages/perseus-editor/src/widgets/matcher-editor.tsx", + "id": "./packages/perseus-editor/src/widgets/number-line-editor.tsx", + "name": "./packages/perseus-editor/src/widgets/number-line-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/matcher-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/number-line-editor.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/all-editors.ts" @@ -2032,104 +2032,113 @@ ] }, { - "id": "./packages/perseus/src/icon-paths.ts", - "name": "./packages/perseus/src/icon-paths.ts", + "id": "./packages/keypad-context/src/index.ts", + "name": "./packages/keypad-context/src/index.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/icon.stories.tsx" + "moduleName": "./packages/perseus/src/__stories__/article-renderer.stories.tsx" }, { - "moduleName": "./packages/perseus/src/index.ts" + "moduleName": "./packages/perseus/src/widgets/expression/expression.stories.tsx" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group-answer-bar.tsx" + "moduleName": "./packages/math-input/src/full-mobile-input.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/label-image/marker.tsx" + "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx" + "moduleName": "./packages/perseus-editor/src/content-preview.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/categorizer/categorizer.tsx" + "moduleName": "./packages/perseus/src/widgets/__shared__/test-keypad-context-wrapper.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" + "moduleName": "./packages/math-input/src/components/input/math-input.tsx" } ] }, { - "id": "./packages/perseus/src/components/icon.tsx", - "name": "./packages/perseus/src/components/icon.tsx", + "id": "./testing/test-dependencies.tsx", + "name": "./testing/test-dependencies.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/icon.stories.tsx" + "moduleName": "./packages/perseus/src/__stories__/article-renderer.stories.tsx" }, { - "moduleName": "./packages/perseus/src/components.ts" + "moduleName": "./packages/perseus/src/widgets/definition/definition.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/label-image/marker.tsx" + "moduleName": "./.storybook/preview.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" + "moduleName": "./packages/perseus/src/__stories__/server-item-renderer.stories.tsx" + }, + { + "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" + }, + { + "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" } ] }, { - "id": "./testing/server-item-renderer-with-debug-ui.tsx", - "name": "./testing/server-item-renderer-with-debug-ui.tsx", + "id": "./packages/perseus/src/__testdata__/article-renderer.testdata.ts", + "name": "./packages/perseus/src/__testdata__/article-renderer.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/graphie.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/expression/expression.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/__stories__/server-item-renderer.stories.tsx" + "moduleName": "./packages/perseus/src/__stories__/article-renderer.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.stories.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" } ] }, { - "id": "./packages/perseus/src/__testdata__/graphie.testdata.ts", - "name": "./packages/perseus/src/__testdata__/graphie.testdata.ts", + "id": "./packages/perseus/src/article-renderer.tsx", + "name": "./packages/perseus/src/article-renderer.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/graphie.stories.tsx" + "moduleName": "./packages/perseus/src/__stories__/article-renderer.stories.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/definition/definition.stories.tsx" + }, + { + "moduleName": "./packages/perseus/src/index.ts" } ] }, { - "id": "./packages/perseus/src/components/graphie.tsx", - "name": "./packages/perseus/src/components/graphie.tsx", + "id": "./packages/perseus/src/widgets/__shared__/test-keypad-context-wrapper.tsx", + "name": "./packages/perseus/src/widgets/__shared__/test-keypad-context-wrapper.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/graphie.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/components.ts" + "moduleName": "./packages/perseus/src/__stories__/article-renderer.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/grapher/util.tsx" + "moduleName": "./packages/perseus/src/widgets/expression/expression.stories.tsx" }, { - "moduleName": "./packages/perseus/src/components/svg-image.tsx" - }, + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/components/graph.tsx", + "name": "./packages/perseus/src/components/graph.tsx", + "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/graph.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" + "moduleName": "./packages/perseus/src/components.ts" }, { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" } ] }, @@ -2156,19 +2165,19 @@ "moduleName": "./packages/perseus/src/logging/log.ts" }, { - "moduleName": "./packages/perseus/src/perseus-markdown.tsx" + "moduleName": "./packages/perseus/src/widgets/grapher/util.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/grapher/util.tsx" + "moduleName": "./packages/perseus/src/perseus-markdown.tsx" }, { "moduleName": "./packages/perseus/src/article-renderer.tsx" }, { - "moduleName": "./packages/perseus/src/components/graphie-movables.ts" + "moduleName": "./packages/perseus/src/components/svg-image.tsx" }, { - "moduleName": "./packages/perseus/src/components/svg-image.tsx" + "moduleName": "./packages/perseus/src/components/graphie-movables.ts" }, { "moduleName": "./packages/perseus/src/util/tex.ts" @@ -2192,13 +2201,13 @@ "moduleName": "./packages/perseus/src/server-item-renderer.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video-transcript-link.tsx" }, { "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/video/video-transcript-link.tsx" + "moduleName": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx" }, { "moduleName": "./packages/perseus/src/multi-items/multi-renderer.tsx" @@ -2254,137 +2263,104 @@ ] }, { - "id": "./packages/keypad-context/src/index.ts", - "name": "./packages/keypad-context/src/index.ts", + "id": "./testing/server-item-renderer-with-debug-ui.tsx", + "name": "./testing/server-item-renderer-with-debug-ui.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/__stories__/article-renderer.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/graphie.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/expression/expression.stories.tsx" }, - { - "moduleName": "./packages/math-input/src/full-mobile-input.stories.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/number-line/number-line.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/content-preview.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/__shared__/test-keypad-context-wrapper.tsx" - }, + "moduleName": "./packages/perseus/src/__stories__/server-item-renderer.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/__testdata__/graphie.testdata.ts", + "name": "./packages/perseus/src/__testdata__/graphie.testdata.ts", + "reasons": [ { - "moduleName": "./packages/math-input/src/components/input/math-input.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/graphie.stories.tsx" } ] }, { - "id": "./testing/test-dependencies.tsx", - "name": "./testing/test-dependencies.tsx", + "id": "./packages/perseus/src/components/graphie.tsx", + "name": "./packages/perseus/src/components/graphie.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/__stories__/article-renderer.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/graphie.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/definition/definition.stories.tsx" + "moduleName": "./packages/perseus/src/components.ts" }, { - "moduleName": "./packages/perseus/src/__stories__/server-item-renderer.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/grapher/util.tsx" }, { - "moduleName": "./.storybook/preview.tsx" + "moduleName": "./packages/perseus/src/components/svg-image.tsx" }, { - "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" }, { - "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/__testdata__/article-renderer.testdata.ts", - "name": "./packages/perseus/src/__testdata__/article-renderer.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/__stories__/article-renderer.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" } ] }, { - "id": "./packages/perseus/src/article-renderer.tsx", - "name": "./packages/perseus/src/article-renderer.tsx", + "id": "./packages/perseus/src/icon-paths.ts", + "name": "./packages/perseus/src/icon-paths.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/__stories__/article-renderer.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/definition/definition.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/icon.stories.tsx" }, { "moduleName": "./packages/perseus/src/index.ts" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/__shared__/test-keypad-context-wrapper.tsx", - "name": "./packages/perseus/src/widgets/__shared__/test-keypad-context-wrapper.tsx", - "reasons": [ + }, { - "moduleName": "./packages/perseus/src/__stories__/article-renderer.stories.tsx" + "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/expression/expression.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group-answer-bar.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/components/graph.tsx", - "name": "./packages/perseus/src/components/graph.tsx", - "reasons": [ + "moduleName": "./packages/perseus/src/widgets/label-image/marker.tsx" + }, { - "moduleName": "./packages/perseus/src/components/__stories__/graph.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx" }, { - "moduleName": "./packages/perseus/src/components.ts" + "moduleName": "./packages/perseus/src/widgets/categorizer/categorizer.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.tsx" } ] }, { - "id": "./packages/perseus/src/components/image-loader.tsx", - "name": "./packages/perseus/src/components/image-loader.tsx", + "id": "./packages/perseus/src/components/icon.tsx", + "name": "./packages/perseus/src/components/icon.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/image-loader.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/icon.stories.tsx" }, { - "moduleName": "./packages/perseus/src/components/svg-image.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/components/info-tip/index.tsx", - "name": "./packages/perseus/src/components/info-tip/index.tsx", - "reasons": [ + "moduleName": "./packages/perseus/src/components.ts" + }, { - "moduleName": "./packages/perseus/src/components/__stories__/info-tip.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/label-image/marker.tsx" }, { - "moduleName": "./packages/perseus/src/components.ts" + "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" } ] }, @@ -2419,65 +2395,80 @@ ] }, { - "id": "./packages/perseus/src/components/lint.tsx", - "name": "./packages/perseus/src/components/lint.tsx", + "id": "./packages/perseus/src/components/simple-keypad-input.tsx", + "name": "./packages/perseus/src/components/simple-keypad-input.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/lint.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/simple-keypad-input.stories.tsx" }, { - "moduleName": "./packages/perseus/src/perseus-markdown.tsx" + "moduleName": "./packages/perseus/src/widgets/table/table.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/input-number/input-number.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/matrix/matrix.tsx" } ] }, { - "id": "./packages/perseus/src/components/math-input.tsx", - "name": "./packages/perseus/src/components/math-input.tsx", + "id": "./packages/perseus/src/components/sortable.tsx", + "name": "./packages/perseus/src/components/sortable.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/math-input.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/sortable.stories.tsx" }, { - "moduleName": "./packages/perseus/src/components.ts" + "moduleName": "./packages/perseus/src/widgets/sorter/sorter.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" + "moduleName": "./packages/perseus/src/widgets/matcher/matcher.tsx" } ] }, { - "id": "./packages/perseus/src/components/input-with-examples.tsx", - "name": "./packages/perseus/src/components/input-with-examples.tsx", + "id": "./packages/perseus/src/components/info-tip/index.tsx", + "name": "./packages/perseus/src/components/info-tip/index.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/input-with-examples.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/info-tip.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/input-number/input-number.tsx" + "moduleName": "./packages/perseus/src/components.ts" } ] }, { - "id": "./packages/perseus/src/components/number-input.tsx", - "name": "./packages/perseus/src/components/number-input.tsx", + "id": "./packages/perseus/src/components/math-input.tsx", + "name": "./packages/perseus/src/components/math-input.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/number-input.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/math-input.stories.tsx" }, { "moduleName": "./packages/perseus/src/components.ts" }, { - "moduleName": "./packages/perseus/src/components/range-input.tsx" - }, + "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/components/image-loader.tsx", + "name": "./packages/perseus/src/components/image-loader.tsx", + "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/image-loader.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/matrix/matrix.tsx" + "moduleName": "./packages/perseus/src/components/svg-image.tsx" } ] }, @@ -2494,23 +2485,35 @@ ] }, { - "id": "./packages/perseus/src/components/simple-keypad-input.tsx", - "name": "./packages/perseus/src/components/simple-keypad-input.tsx", + "id": "./packages/perseus/src/components/input-with-examples.tsx", + "name": "./packages/perseus/src/components/input-with-examples.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/simple-keypad-input.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/input-with-examples.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/table/table.tsx" + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" + "moduleName": "./packages/perseus/src/widgets/input-number/input-number.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/components/number-input.tsx", + "name": "./packages/perseus/src/components/number-input.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/components/__stories__/number-input.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" + "moduleName": "./packages/perseus/src/components.ts" }, { - "moduleName": "./packages/perseus/src/widgets/input-number/input-number.tsx" + "moduleName": "./packages/perseus/src/components/range-input.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" }, { "moduleName": "./packages/perseus/src/widgets/matrix/matrix.tsx" @@ -2518,17 +2521,26 @@ ] }, { - "id": "./packages/perseus/src/components/sortable.tsx", - "name": "./packages/perseus/src/components/sortable.tsx", + "id": "./packages/perseus/src/components/lint.tsx", + "name": "./packages/perseus/src/components/lint.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/__stories__/sortable.stories.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/lint.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/sorter/sorter.tsx" + "moduleName": "./packages/perseus/src/perseus-markdown.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/components/stub-tag-editor.tsx", + "name": "./packages/perseus/src/components/stub-tag-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/components/__stories__/stub-tag-editor.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/matcher/matcher.tsx" + "moduleName": "./packages/perseus/src/perseus-api.tsx" } ] }, @@ -2562,18 +2574,6 @@ } ] }, - { - "id": "./packages/perseus/src/components/stub-tag-editor.tsx", - "name": "./packages/perseus/src/components/stub-tag-editor.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/components/__stories__/stub-tag-editor.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/perseus-api.tsx" - } - ] - }, { "id": "./packages/perseus/src/components/tex.tsx", "name": "./packages/perseus/src/components/tex.tsx", @@ -2657,76 +2657,67 @@ "moduleName": "./packages/perseus/src/widgets/categorizer/categorizer.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/definition/definition.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/explanation/explanation.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/definition/definition.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/cs-program/cs-program.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/deprecated-standin/__stories__/deprecated-standin.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interaction/interaction.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/explanation/explanation.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/image/image.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/deprecated-standin/__stories__/deprecated-standin.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/group/group.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/iframe/iframe.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/group/group.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/image/image.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/input-number/input-number.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/interaction/interaction.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/input-number/input-number.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-functions.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/label-image/__stories__/label-image.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/matcher/matcher.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/matrix/matrix.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/matcher/matcher.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/orderer/orderer.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/python-program/python-program.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/__stories__/radio.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/plotter/plotter.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/label-image/__stories__/label-image.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.stories.tsx" @@ -2734,12 +2725,21 @@ { "moduleName": "./packages/perseus/src/widgets/passage/passage.stories.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/python-program/python-program.stories.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/plotter/plotter.stories.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/sorter/sorter.stories.tsx" }, { "moduleName": "./packages/perseus/src/widgets/video/video.stories.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/radio/__stories__/radio.stories.tsx" + }, { "moduleName": "./packages/perseus-editor/src/widgets/__stories__/expression-editor.stories.tsx" } @@ -2754,24 +2754,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/explanation/explanation.testdata.ts", - "name": "./packages/perseus/src/widgets/explanation/explanation.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/explanation/explanation.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/grapher/grapher.testdata.ts", - "name": "./packages/perseus/src/widgets/grapher/grapher.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.stories.tsx" - } - ] - }, { "id": "./packages/perseus/src/widgets/cs-program/cs-program.testdata.ts", "name": "./packages/perseus/src/widgets/cs-program/cs-program.testdata.ts", @@ -2781,15 +2763,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/interaction/interaction.testdata.ts", - "name": "./packages/perseus/src/widgets/interaction/interaction.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interaction/interaction.stories.tsx" - } - ] - }, { "id": "./packages/math-input/src/index.ts", "name": "./packages/math-input/src/index.ts", @@ -2859,6 +2832,51 @@ } ] }, + { + "id": "./packages/perseus/src/widgets/explanation/explanation.testdata.ts", + "name": "./packages/perseus/src/widgets/explanation/explanation.testdata.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/explanation/explanation.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/graded-group/graded-group.testdata.ts", + "name": "./packages/perseus/src/widgets/graded-group/graded-group.testdata.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/grapher/grapher.testdata.ts", + "name": "./packages/perseus/src/widgets/grapher/grapher.testdata.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/group/group.testdata.ts", + "name": "./packages/perseus/src/widgets/group/group.testdata.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/group/group.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/iframe/iframe.testdata.ts", + "name": "./packages/perseus/src/widgets/iframe/iframe.testdata.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/iframe/iframe.stories.tsx" + } + ] + }, { "id": "./packages/perseus/src/widgets/image/image.testdata.ts", "name": "./packages/perseus/src/widgets/image/image.testdata.ts", @@ -2868,6 +2886,39 @@ } ] }, + { + "id": "./packages/perseus/src/widgets/interaction/interaction.testdata.ts", + "name": "./packages/perseus/src/widgets/interaction/interaction.testdata.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interaction/interaction.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/input-number/input-number.testdata.ts", + "name": "./packages/perseus/src/widgets/input-number/input-number.testdata.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/input-number/input-number.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph.testdata.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph.testdata.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-functions.stories.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" + } + ] + }, { "id": "./packages/perseus/src/renderer.tsx", "name": "./packages/perseus/src/renderer.tsx", @@ -2897,10 +2948,10 @@ "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/image/image.tsx" + "moduleName": "./packages/perseus/src/widgets/group/group.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/group/group.tsx" + "moduleName": "./packages/perseus/src/widgets/image/image.tsx" }, { "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" @@ -2989,188 +3040,263 @@ ] }, { - "id": "./packages/perseus/src/widgets/graded-group/graded-group.testdata.ts", - "name": "./packages/perseus/src/widgets/graded-group/graded-group.testdata.ts", + "id": "./packages/perseus/src/widgets/matcher/matcher.testdata.ts", + "name": "./packages/perseus/src/widgets/matcher/matcher.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/matcher/matcher.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/iframe/iframe.testdata.ts", - "name": "./packages/perseus/src/widgets/iframe/iframe.testdata.ts", + "id": "./packages/perseus/src/widgets/matrix/matrix.testdata.ts", + "name": "./packages/perseus/src/widgets/matrix/matrix.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/iframe/iframe.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/matrix/matrix.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/group/group.testdata.ts", - "name": "./packages/perseus/src/widgets/group/group.testdata.ts", + "id": "./dev/flipbook.tsx", + "name": "./dev/flipbook.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/group/group.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/input-number/input-number.testdata.ts", - "name": "./packages/perseus/src/widgets/input-number/input-number.testdata.ts", + "id": "./packages/perseus/src/widgets/orderer/orderer.testdata.ts", + "name": "./packages/perseus/src/widgets/orderer/orderer.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/input-number/input-number.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/orderer/orderer.stories.tsx" } ] }, { - "id": "./dev/flipbook.tsx", - "name": "./dev/flipbook.tsx", + "id": "./packages/perseus/src/widgets/number-line/number-line.testdata.ts", + "name": "./packages/perseus/src/widgets/number-line/number-line.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph.testdata.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph.testdata.ts", + "id": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx", + "name": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/interactive-graph.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-functions.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/numeric-input/index.ts" } ] }, { - "id": "./packages/math-input/src/components/tabbar/tabbar.tsx", - "name": "./packages/math-input/src/components/tabbar/tabbar.tsx", + "id": "./packages/perseus/src/widgets/numeric-input/numeric-input.testdata.ts", + "name": "./packages/perseus/src/widgets/numeric-input/numeric-input.testdata.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/tabbar/tabbar.stories.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/tabbar/index.ts" + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.stories.tsx" } ] }, { - "id": "./packages/perseus-editor/src/article-editor.tsx", - "name": "./packages/perseus-editor/src/article-editor.tsx", + "id": "./packages/perseus/src/widgets/label-image/answer-pill.tsx", + "name": "./packages/perseus/src/widgets/label-image/answer-pill.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/article-editor.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/label-image/__stories__/answer-pill.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/index.ts" + "moduleName": "./packages/perseus/src/widgets/label-image/marker.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx", + "id": "./packages/perseus/src/widgets/label-image/__tests__/label-image.testdata.ts", + "name": "./packages/perseus/src/widgets/label-image/__tests__/label-image.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-function-settings.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" + "moduleName": "./packages/perseus/src/widgets/label-image/__stories__/label-image.stories.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx", + "id": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx", + "name": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-line-settings.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" + "moduleName": "./packages/perseus/src/widgets/phet-simulation/index.ts" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx", + "id": "./packages/perseus/src/hints-renderer.tsx", + "name": "./packages/perseus/src/hints-renderer.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-label-settings.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + "moduleName": "./packages/perseus/src/__stories__/hints-renderer.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + "moduleName": "./packages/perseus/src/index.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus/src/server-item-renderer.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + "moduleName": "./packages/perseus/src/multi-items/multi-renderer.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx", + "id": "./packages/perseus/src/components/tooltip.tsx", + "name": "./packages/perseus/src/components/tooltip.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-point-settings.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" + "moduleName": "./packages/perseus/src/components/__stories__/tooltip.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/perseus/src/components/input-with-examples.tsx" } ] }, { - "id": "./packages/perseus-editor/src/item-extras-editor.tsx", - "name": "./packages/perseus-editor/src/item-extras-editor.tsx", + "id": "./packages/perseus/src/widgets/passage-ref/passage-ref.testdata.ts", + "name": "./packages/perseus/src/widgets/passage-ref/passage-ref.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/__stories__/item-editor.stories.tsx" - }, + "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/passage/__tests__/passage.testdata.ts", + "name": "./packages/perseus/src/widgets/passage/__tests__/passage.testdata.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/passage/passage.stories.tsx" + } + ] + }, + { + "id": "./packages/math-input/src/components/tabbar/tabbar.tsx", + "name": "./packages/math-input/src/components/tabbar/tabbar.tsx", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/tabbar/tabbar.stories.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/tabbar/index.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/components/blur-input.tsx", + "name": "./packages/perseus-editor/src/components/blur-input.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/components/__stories__/blur-input.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/image-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/input-number-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/iframe-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/video-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/plotter-editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/item-extras-editor.tsx", + "name": "./packages/perseus-editor/src/item-extras-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/__stories__/item-editor.stories.tsx" + }, { "moduleName": "./packages/perseus-editor/src/item-editor.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx", + "id": "./packages/perseus/src/widgets/radio/__tests__/radio.testdata.ts", + "name": "./packages/perseus/src/widgets/radio/__tests__/radio.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/__stories__/radio.stories.tsx" } ] }, { - "id": "./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.argtypes.ts", - "name": "./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.argtypes.ts", + "id": "./packages/perseus-editor/src/components/device-framer.tsx", + "name": "./packages/perseus-editor/src/components/device-framer.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.argtypes.ts" + "moduleName": "./packages/perseus-editor/src/components/__stories__/device-framer.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/index.ts" + }, + { + "moduleName": "./packages/perseus-editor/src/article-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/item-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/components/viewport-resizer.tsx", + "name": "./packages/perseus-editor/src/components/viewport-resizer.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/components/__stories__/viewport-resizer.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/index.ts" + }, + { + "moduleName": "./packages/perseus-editor/src/editor-page.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/content-preview.tsx", + "name": "./packages/perseus-editor/src/content-preview.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" } ] }, @@ -3182,64 +3308,118 @@ "moduleName": "./packages/perseus-editor/src/components/__stories__/color-select.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/article-editor.tsx", + "name": "./packages/perseus-editor/src/article-editor.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/__stories__/article-editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/index.ts" + } + ] + }, + { + "id": "./packages/perseus-editor/src/index.ts", + "name": "./packages/perseus-editor/src/index.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" } ] }, { - "id": "./packages/perseus-editor/src/components/blur-input.tsx", - "name": "./packages/perseus-editor/src/components/blur-input.tsx", + "id": "./testing/side-by-side.tsx", + "name": "./testing/side-by-side.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/blur-input.stories.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/input-number-editor.tsx" + "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/image-editor.tsx" + "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/iframe-editor.tsx" + "moduleName": "./testing/renderer-with-debug-ui.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/__testdata__/input-number.testdata.ts", + "name": "./packages/perseus-editor/src/__testdata__/input-number.testdata.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/__stories__/flags-for-api-options.ts", + "name": "./packages/perseus-editor/src/__stories__/flags-for-api-options.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/video-editor.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/plotter-editor.tsx" + "moduleName": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-polygon-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.argtypes.ts", + "name": "./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.argtypes.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/components/__stories__/interactive-graph-settings.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.argtypes.ts" } ] }, @@ -3256,11 +3436,11 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-vector-settings.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-function-settings.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" @@ -3268,50 +3448,92 @@ ] }, { - "id": "./packages/perseus-editor/src/components/viewport-resizer.tsx", - "name": "./packages/perseus-editor/src/components/viewport-resizer.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/viewport-resizer.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-label-settings.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/index.ts" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/editor-page.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interaction-editor/index.ts", - "name": "./packages/perseus-editor/src/widgets/interaction-editor/index.ts", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/interaction-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-line-settings.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/all-editors.ts" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/__stories__/flags-for-api-options.ts", - "name": "./packages/perseus-editor/src/__stories__/flags-for-api-options.ts", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/__stories__/interactive-graph-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-point-settings.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-polygon-settings.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/editor-page-with-storybook-preview.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/components/__stories__/locked-vector-settings.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/interaction-editor/index.ts", + "name": "./packages/perseus-editor/src/widgets/interaction-editor/index.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/widgets/__stories__/interaction-editor.stories.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/all-editors.ts" } ] }, @@ -3406,101 +3628,50 @@ ] }, { - "id": "./packages/perseus/src/widgets/label-image/answer-pill.tsx", - "name": "./packages/perseus/src/widgets/label-image/answer-pill.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/label-image/__stories__/answer-pill.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/label-image/marker.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/label-image/__tests__/label-image.testdata.ts", - "name": "./packages/perseus/src/widgets/label-image/__tests__/label-image.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/label-image/__stories__/label-image.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/matrix/matrix.testdata.ts", - "name": "./packages/perseus/src/widgets/matrix/matrix.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/matrix/matrix.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/matcher/matcher.testdata.ts", - "name": "./packages/perseus/src/widgets/matcher/matcher.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/matcher/matcher.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/number-line/number-line.testdata.ts", - "name": "./packages/perseus/src/widgets/number-line/number-line.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/orderer/orderer.testdata.ts", - "name": "./packages/perseus/src/widgets/orderer/orderer.testdata.ts", + "id": "./packages/perseus/src/widgets/python-program/python-program.testdata.ts", + "name": "./packages/perseus/src/widgets/python-program/python-program.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/orderer/orderer.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/python-program/python-program.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/python-program/python-program.testdata.ts", - "name": "./packages/perseus/src/widgets/python-program/python-program.testdata.ts", + "id": "./packages/perseus/src/widgets/plotter/plotter.testdata.ts", + "name": "./packages/perseus/src/widgets/plotter/plotter.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/python-program/python-program.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/plotter/plotter.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx", - "name": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx", + "id": "./packages/perseus/src/widgets/sorter/sorter.testdata.ts", + "name": "./packages/perseus/src/widgets/sorter/sorter.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/phet-simulation/index.ts" + "moduleName": "./packages/perseus/src/widgets/sorter/sorter.stories.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx", - "name": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx", + "id": "./packages/perseus/src/widgets/video/video-transcript-link.tsx", + "name": "./packages/perseus/src/widgets/video/video-transcript-link.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video-transcript-link.stories.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/numeric-input/index.ts" + "moduleName": "./packages/perseus/src/widgets/video/video.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/numeric-input/numeric-input.testdata.ts", - "name": "./packages/perseus/src/widgets/numeric-input/numeric-input.testdata.ts", + "id": "./packages/perseus/src/widgets/video/video.testdata.ts", + "name": "./packages/perseus/src/widgets/video/video.testdata.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video.stories.tsx" } ] }, @@ -3527,10 +3698,10 @@ "moduleName": "./packages/perseus/src/index.ts" }, { - "moduleName": "./packages/perseus/src/util/sizing-utils.ts" + "moduleName": "./packages/perseus/src/styles/media-queries.ts" }, { - "moduleName": "./packages/perseus/src/styles/media-queries.ts" + "moduleName": "./packages/perseus/src/util/sizing-utils.ts" }, { "moduleName": "./testing/side-by-side.tsx" @@ -3559,15 +3730,15 @@ { "moduleName": "./packages/perseus/src/hints-renderer.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/radio/focus-ring.tsx" }, { "moduleName": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" }, @@ -3604,14 +3775,14 @@ ] }, { - "id": "./packages/perseus/src/widgets/radio/__tests__/radio.testdata.ts", - "name": "./packages/perseus/src/widgets/radio/__tests__/radio.testdata.ts", + "id": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx", + "name": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/__stories__/radio.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/__stories__/choice-icon.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" } ] }, @@ -3666,198 +3837,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx", - "name": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/radio/__stories__/choice-icon.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/components/device-framer.tsx", - "name": "./packages/perseus-editor/src/components/device-framer.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/components/__stories__/device-framer.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/index.ts" - }, - { - "moduleName": "./packages/perseus-editor/src/article-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/item-editor.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/content-preview.tsx", - "name": "./packages/perseus-editor/src/content-preview.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/__stories__/content-preview.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/index.ts", - "name": "./packages/perseus-editor/src/index.ts", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/__stories__/interactive-graph-editor.stories.tsx" - } - ] - }, - { - "id": "./testing/side-by-side.tsx", - "name": "./testing/side-by-side.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" - }, - { - "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" - }, - { - "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" - }, - { - "moduleName": "./testing/renderer-with-debug-ui.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/__testdata__/input-number.testdata.ts", - "name": "./packages/perseus-editor/src/__testdata__/input-number.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/__stories__/editor.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/hints-renderer.tsx", - "name": "./packages/perseus/src/hints-renderer.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/__stories__/hints-renderer.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/index.ts" - }, - { - "moduleName": "./packages/perseus/src/server-item-renderer.tsx" - }, - { - "moduleName": "./packages/perseus/src/multi-items/multi-renderer.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/components/tooltip.tsx", - "name": "./packages/perseus/src/components/tooltip.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/components/__stories__/tooltip.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/components/input-with-examples.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/plotter/plotter.testdata.ts", - "name": "./packages/perseus/src/widgets/plotter/plotter.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/plotter/plotter.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/passage-ref/passage-ref.testdata.ts", - "name": "./packages/perseus/src/widgets/passage-ref/passage-ref.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/passage/__tests__/passage.testdata.ts", - "name": "./packages/perseus/src/widgets/passage/__tests__/passage.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/passage/passage.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/sorter/sorter.testdata.ts", - "name": "./packages/perseus/src/widgets/sorter/sorter.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/sorter/sorter.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/video/video.testdata.ts", - "name": "./packages/perseus/src/widgets/video/video.testdata.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/video/video.stories.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/video/video-transcript-link.tsx", - "name": "./packages/perseus/src/widgets/video/video-transcript-link.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/video/video-transcript-link.stories.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/video/video.tsx" - } - ] - }, - { - "id": "./packages/math-input/src/components/keypad/keypad.tsx", - "name": "./packages/math-input/src/components/keypad/keypad.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/components/keypad/index.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx" - } - ] - }, - { - "id": "./packages/math-input/src/components/keypad/mobile-keypad.tsx", - "name": "./packages/math-input/src/components/keypad/mobile-keypad.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/components/keypad/index.tsx" - } - ] - }, { "id": "./packages/math-input/less/main.less", "name": "./packages/math-input/less/main.less", @@ -3895,14 +3874,11 @@ { "moduleName": "./packages/math-input/src/components/keypad/keypad-mathquill.stories.tsx" }, - { - "moduleName": "./packages/math-input/src/components/key-handlers/key-translator.ts" - }, { "moduleName": "./packages/math-input/src/components/input/mathquill-helpers.ts" }, { - "moduleName": "./packages/math-input/src/components/key-handlers/handle-exponent.ts" + "moduleName": "./packages/math-input/src/components/key-handlers/key-translator.ts" }, { "moduleName": "./packages/math-input/src/components/key-handlers/handle-arrow.ts" @@ -3910,6 +3886,9 @@ { "moduleName": "./packages/math-input/src/components/key-handlers/handle-jump-out.ts" }, + { + "moduleName": "./packages/math-input/src/components/key-handlers/handle-exponent.ts" + }, { "moduleName": "./packages/math-input/src/components/input/math-wrapper.ts" }, @@ -4091,10 +4070,10 @@ "moduleName": "./packages/perseus/src/renderer.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" + "moduleName": "./packages/perseus/src/widgets/table/table.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/table/table.tsx" + "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" }, { "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.tsx" @@ -4112,19 +4091,19 @@ "moduleName": "./packages/perseus/src/components/sortable.tsx" }, { - "moduleName": "./packages/perseus/src/server-item-renderer.tsx" + "moduleName": "./packages/perseus/src/hints-renderer.tsx" }, { - "moduleName": "./packages/perseus/src/hints-renderer.tsx" + "moduleName": "./packages/perseus/src/server-item-renderer.tsx" }, { "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" }, { "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" @@ -4198,18 +4177,18 @@ { "moduleName": "./packages/perseus/src/item-version.ts" }, - { - "moduleName": "./packages/perseus/src/util/register-all-widgets-for-testing.ts" - }, { "moduleName": "./packages/perseus/src/renderability.ts" }, { - "moduleName": "./packages/perseus/src/a11y.ts" + "moduleName": "./packages/perseus/src/util/register-all-widgets-for-testing.ts" }, { "moduleName": "./packages/perseus/src/traversal.ts" }, + { + "moduleName": "./packages/perseus/src/a11y.ts" + }, { "moduleName": "./packages/perseus/src/util/extract-perseus-data.ts" }, @@ -4430,10 +4409,10 @@ "moduleName": "./packages/perseus/src/widgets.ts" }, { - "moduleName": "./packages/perseus/src/util/graphie.ts" + "moduleName": "./packages/perseus/src/components/svg-image.tsx" }, { - "moduleName": "./packages/perseus/src/components/svg-image.tsx" + "moduleName": "./packages/perseus/src/util/graphie.ts" }, { "moduleName": "./packages/perseus/src/widgets/expression/expression-validator.ts" @@ -4484,19 +4463,19 @@ "moduleName": "./packages/perseus/src/util/graphie.ts" }, { - "moduleName": "./packages/perseus/src/util/answer-types.ts" + "moduleName": "./packages/perseus/src/interactive2/wrapped-line.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/wrapped-line.ts" + "moduleName": "./packages/perseus/src/util/answer-types.ts" }, { "moduleName": "./packages/perseus/src/util/geometry.ts" }, { - "moduleName": "./packages/perseus/src/util/tex.ts" + "moduleName": "./packages/perseus/src/util/interactive.ts" }, { - "moduleName": "./packages/perseus/src/util/interactive.ts" + "moduleName": "./packages/perseus/src/util/tex.ts" }, { "moduleName": "./packages/perseus/src/interactive2/arrowhead.ts" @@ -4598,7 +4577,10 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-ellipse.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-function.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-function.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-point.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-polygon.tsx" @@ -4606,9 +4588,6 @@ { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-line.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-point.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-vector.tsx" } @@ -4688,59 +4667,56 @@ "moduleName": "./packages/perseus/src/widgets/definition/definition.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/image/image.tsx" + "moduleName": "./packages/perseus/src/widgets/group/group.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/group/group.tsx" + "moduleName": "./packages/perseus/src/widgets/image/image.tsx" }, { "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/video/video.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video.tsx" }, { "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" }, { - "moduleName": "./packages/perseus/src/components/number-input.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" + "moduleName": "./packages/perseus/src/components/number-input.tsx" }, { "moduleName": "./packages/perseus/src/widgets/table/table.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" + "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/orderer/orderer.tsx" + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" + "moduleName": "./packages/perseus/src/widgets/orderer/orderer.tsx" }, { "moduleName": "./packages/perseus/src/widgets/graded-group/graded-group-answer-bar.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage/passage-markdown.tsx" + "moduleName": "./packages/perseus/src/components/math-input.tsx" }, { "moduleName": "./packages/perseus/src/components/sortable.tsx" }, { - "moduleName": "./packages/perseus/src/components/math-input.tsx" + "moduleName": "./packages/perseus/src/hints-renderer.tsx" }, { "moduleName": "./packages/perseus/src/server-item-renderer.tsx" }, - { - "moduleName": "./packages/perseus/src/hints-renderer.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/label-image/answer-pill.tsx" }, @@ -4748,26 +4724,26 @@ "moduleName": "./packages/perseus/src/widgets/label-image/marker.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/radio/option-status.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video-transcript-link.tsx" }, { "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/video/video-transcript-link.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/option-status.tsx" }, { "moduleName": "./packages/perseus/src/widgets/radio/choice-icon/choice-icon.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" + "moduleName": "./packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx" }, { "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" }, @@ -4807,6 +4783,9 @@ { "moduleName": "./packages/perseus/src/widgets/label-image/hide-answers-toggle.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/passage/passage-markdown.tsx" + }, { "moduleName": "./packages/perseus/src/components/highlighting/ui/highlighting-ui.tsx" }, @@ -4832,10 +4811,10 @@ "moduleName": "./packages/perseus/src/article-renderer.tsx" }, { - "moduleName": "./packages/perseus/src/components/graphie-classes.ts" + "moduleName": "./packages/perseus/src/components/svg-image.tsx" }, { - "moduleName": "./packages/perseus/src/components/svg-image.tsx" + "moduleName": "./packages/perseus/src/components/graphie-classes.ts" }, { "moduleName": "./dev/flipbook.tsx" @@ -4847,10 +4826,10 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" + "moduleName": "./packages/perseus/src/util/geometry.ts" }, { - "moduleName": "./packages/perseus/src/util/geometry.ts" + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" }, { "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" @@ -4865,28 +4844,28 @@ "moduleName": "./packages/perseus/src/widgets/sorter/sorter.tsx" }, { - "moduleName": "./packages/perseus/src/components/graphie.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" }, { - "moduleName": "./packages/perseus/src/components/number-input.tsx" + "moduleName": "./packages/perseus/src/components/graph.tsx" }, { - "moduleName": "./packages/perseus/src/components/graph.tsx" + "moduleName": "./packages/perseus/src/components/graphie.tsx" }, { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus/src/components/number-input.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" }, { "moduleName": "./packages/perseus/src/widgets/table/table.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/orderer/orderer.tsx" + "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" + "moduleName": "./packages/perseus/src/widgets/orderer/orderer.tsx" }, { "moduleName": "./packages/perseus/src/widgets/sorter/sorter-validator.ts" @@ -4895,10 +4874,10 @@ "moduleName": "./packages/perseus/src/components/sortable.tsx" }, { - "moduleName": "./packages/perseus/src/server-item-renderer.tsx" + "moduleName": "./packages/perseus/src/hints-renderer.tsx" }, { - "moduleName": "./packages/perseus/src/hints-renderer.tsx" + "moduleName": "./packages/perseus/src/server-item-renderer.tsx" }, { "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" @@ -4937,10 +4916,10 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" + "moduleName": "./packages/perseus/src/interactive2.ts" }, { - "moduleName": "./packages/perseus/src/interactive2.ts" + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" }, { "moduleName": "./packages/perseus/src/util/interactive.ts" @@ -4949,10 +4928,10 @@ "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" + "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" }, { "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" @@ -5105,13 +5084,13 @@ "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/iframe/iframe.tsx" + "moduleName": "./packages/perseus/src/widgets/group/group.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/image/image.tsx" + "moduleName": "./packages/perseus/src/widgets/iframe/iframe.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/group/group.tsx" + "moduleName": "./packages/perseus/src/widgets/image/image.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" @@ -5120,10 +5099,10 @@ "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/video/video.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video.tsx" }, { "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" @@ -5245,71 +5224,62 @@ ] }, { - "id": "./packages/keypad-context/src/keypad-context.tsx", - "name": "./packages/keypad-context/src/keypad-context.tsx", - "reasons": [ - { - "moduleName": "./packages/keypad-context/src/index.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/all-editors.ts", - "name": "./packages/perseus-editor/src/all-editors.ts", + "id": "./packages/math-input/src/components/keypad/keypad.tsx", + "name": "./packages/math-input/src/components/keypad/keypad.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts" + "moduleName": "./packages/math-input/src/components/keypad/index.tsx" }, { - "moduleName": "./packages/perseus-editor/src/index.ts" - } - ] - }, - { - "id": "./packages/math-input/src/components/key-handlers/handle-arrow.ts", - "name": "./packages/math-input/src/components/key-handlers/handle-arrow.ts", - "reasons": [ - { - "moduleName": "./packages/math-input/src/components/key-handlers/key-translator.ts" + "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx" } ] }, { - "id": "./packages/math-input/src/components/key-handlers/handle-exponent.ts", - "name": "./packages/math-input/src/components/key-handlers/handle-exponent.ts", + "id": "./packages/math-input/src/components/keypad/mobile-keypad.tsx", + "name": "./packages/math-input/src/components/keypad/mobile-keypad.tsx", "reasons": [ { - "moduleName": "./packages/math-input/src/components/key-handlers/key-translator.ts" + "moduleName": "./packages/math-input/src/components/keypad/index.tsx" } ] }, { - "id": "./packages/math-input/src/components/key-handlers/handle-jump-out.ts", - "name": "./packages/math-input/src/components/key-handlers/handle-jump-out.ts", + "id": "./packages/keypad-context/src/keypad-context.tsx", + "name": "./packages/keypad-context/src/keypad-context.tsx", "reasons": [ { - "moduleName": "./packages/math-input/src/components/key-handlers/key-translator.ts" + "moduleName": "./packages/keypad-context/src/index.ts" } ] }, { - "id": "./packages/math-input/src/components/input/mathquill-types.ts", - "name": "./packages/math-input/src/components/input/mathquill-types.ts", + "id": "./packages/perseus-editor/src/components/scrollless-number-text-field.tsx", + "name": "./packages/perseus-editor/src/components/scrollless-number-text-field.tsx", "reasons": [ { - "moduleName": "./packages/math-input/src/components/input/mathquill-helpers.ts" + "moduleName": "./packages/perseus-editor/src/components/__stories__/scrollless-number-text-field.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/key-handlers/handle-exponent.ts" + "moduleName": "./packages/perseus-editor/src/components/angle-input.tsx" }, { - "moduleName": "./packages/math-input/src/components/key-handlers/handle-arrow.ts" + "moduleName": "./packages/perseus-editor/src/components/coordinate-pair-input.tsx" }, { - "moduleName": "./packages/math-input/src/components/key-handlers/handle-jump-out.ts" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-circle.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/label-image/answer-choices.tsx", + "name": "./packages/perseus/src/widgets/label-image/answer-choices.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/label-image/__stories__/answer-choices.stories.tsx" }, { - "moduleName": "./packages/math-input/src/components/key-handlers/handle-backspace.ts" + "moduleName": "./packages/perseus/src/widgets/label-image/label-image.tsx" } ] }, @@ -5372,10 +5342,10 @@ "moduleName": "./packages/perseus-editor/src/widgets/numeric-input-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" + "moduleName": "./packages/perseus-editor/src/item-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/item-editor.tsx" + "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/definition-editor.tsx" @@ -5426,10 +5396,10 @@ "moduleName": "./packages/perseus-editor/src/article-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" + "moduleName": "./packages/perseus-editor/src/item-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/item-editor.tsx" + "moduleName": "./packages/perseus-editor/src/hint-editor.tsx" } ] }, @@ -5452,32 +5422,35 @@ ] }, { - "id": "./packages/perseus-editor/src/components/scrollless-number-text-field.tsx", - "name": "./packages/perseus-editor/src/components/scrollless-number-text-field.tsx", + "id": "./packages/perseus-editor/src/all-editors.ts", + "name": "./packages/perseus-editor/src/all-editors.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/components/__stories__/scrollless-number-text-field.stories.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/components/coordinate-pair-input.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/components/angle-input.tsx" + "moduleName": "./packages/perseus-editor/src/index.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-circle.tsx" + "moduleName": "./packages/perseus-editor/src/util/register-all-widgets-and-editors-for-testing.ts" } ] }, { - "id": "./packages/perseus/src/widgets/label-image/answer-choices.tsx", - "name": "./packages/perseus/src/widgets/label-image/answer-choices.tsx", + "id": "./packages/math-input/src/components/input/mathquill-types.ts", + "name": "./packages/math-input/src/components/input/mathquill-types.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/label-image/__stories__/answer-choices.stories.tsx" + "moduleName": "./packages/math-input/src/components/input/mathquill-helpers.ts" }, { - "moduleName": "./packages/perseus/src/widgets/label-image/label-image.tsx" + "moduleName": "./packages/math-input/src/components/key-handlers/handle-arrow.ts" + }, + { + "moduleName": "./packages/math-input/src/components/key-handlers/handle-jump-out.ts" + }, + { + "moduleName": "./packages/math-input/src/components/key-handlers/handle-exponent.ts" + }, + { + "moduleName": "./packages/math-input/src/components/key-handlers/handle-backspace.ts" } ] }, @@ -5496,6 +5469,33 @@ } ] }, + { + "id": "./packages/math-input/src/components/key-handlers/handle-arrow.ts", + "name": "./packages/math-input/src/components/key-handlers/handle-arrow.ts", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/key-handlers/key-translator.ts" + } + ] + }, + { + "id": "./packages/math-input/src/components/key-handlers/handle-exponent.ts", + "name": "./packages/math-input/src/components/key-handlers/handle-exponent.ts", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/key-handlers/key-translator.ts" + } + ] + }, + { + "id": "./packages/math-input/src/components/key-handlers/handle-jump-out.ts", + "name": "./packages/math-input/src/components/key-handlers/handle-jump-out.ts", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/key-handlers/key-translator.ts" + } + ] + }, { "id": "./packages/perseus-editor/src/diffs/renderer-diff.tsx", "name": "./packages/perseus-editor/src/diffs/renderer-diff.tsx", @@ -5556,45 +5556,18 @@ } ] }, - { - "id": "./packages/perseus/src/basic-widgets.ts", - "name": "./packages/perseus/src/basic-widgets.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/init.ts" - }, - { - "moduleName": "./packages/perseus/src/all-widgets.ts" - } - ] - }, - { - "id": "./packages/perseus/src/extra-widgets.ts", - "name": "./packages/perseus/src/extra-widgets.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/init.ts" - }, - { - "moduleName": "./packages/perseus/src/all-widgets.ts" - } - ] - }, { "id": "./packages/perseus-core/src/index.ts", "name": "./packages/perseus-core/src/index.ts", "reasons": [ - { - "moduleName": "./packages/perseus/src/version.ts" - }, { "moduleName": "./packages/math-input/src/version.ts" }, { - "moduleName": "./packages/perseus/src/renderability.ts" + "moduleName": "./packages/perseus/src/version.ts" }, { - "moduleName": "./packages/perseus/src/multi-items/trees.ts" + "moduleName": "./packages/perseus/src/renderability.ts" }, { "moduleName": "./packages/perseus/src/multi-items/items.ts" @@ -5608,20 +5581,23 @@ { "moduleName": "./packages/perseus/src/util.ts" }, + { + "moduleName": "./packages/perseus/src/multi-items/trees.ts" + }, { "moduleName": "./packages/perseus-editor/src/version.ts" }, { - "moduleName": "./packages/perseus/src/components/graphie-classes.ts" + "moduleName": "./packages/perseus/src/components/svg-image.tsx" }, { - "moduleName": "./packages/perseus/src/interactive2/interactive-util.ts" + "moduleName": "./packages/perseus/src/components/graphie-classes.ts" }, { - "moduleName": "./packages/perseus/src/util/graphie.ts" + "moduleName": "./packages/perseus/src/interactive2/interactive-util.ts" }, { - "moduleName": "./packages/perseus/src/components/svg-image.tsx" + "moduleName": "./packages/perseus/src/util/graphie.ts" }, { "moduleName": "./packages/perseus/src/widgets/expression/expression-validator.ts" @@ -5630,10 +5606,10 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" }, { - "moduleName": "./packages/perseus-editor/src/editor.tsx" + "moduleName": "./packages/perseus/src/util/answer-types.ts" }, { - "moduleName": "./packages/perseus/src/util/answer-types.ts" + "moduleName": "./packages/perseus-editor/src/editor.tsx" }, { "moduleName": "./packages/perseus/src/error-boundary.tsx" @@ -5644,12 +5620,6 @@ { "moduleName": "./packages/kas/src/version.ts" }, - { - "moduleName": "./packages/perseus/src/interactive2/movable-helper-methods.ts" - }, - { - "moduleName": "./packages/perseus/src/util/interactive.ts" - }, { "moduleName": "./packages/perseus-linter/src/rule.ts" }, @@ -5660,10 +5630,10 @@ "moduleName": "./packages/perseus-linter/src/tree-transformer.ts" }, { - "moduleName": "./packages/pure-markdown/src/version.ts" + "moduleName": "./packages/perseus/src/util/interactive.ts" }, { - "moduleName": "./packages/simple-markdown/src/version.ts" + "moduleName": "./packages/perseus/src/interactive2/movable-helper-methods.ts" }, { "moduleName": "./packages/perseus/src/interactive2/movable.ts" @@ -5672,17 +5642,23 @@ "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx" + "moduleName": "./packages/pure-markdown/src/version.ts" }, { - "moduleName": "./packages/perseus/src/mixins/changeable.ts" + "moduleName": "./packages/simple-markdown/src/version.ts" }, { - "moduleName": "./packages/perseus/src/multi-items/prop-type-builders.ts" + "moduleName": "./packages/perseus-editor/src/widgets/cs-program-editor.tsx" }, { "moduleName": "./packages/perseus-linter/src/selector.ts" }, + { + "moduleName": "./packages/perseus/src/mixins/changeable.ts" + }, + { + "moduleName": "./packages/perseus/src/multi-items/prop-type-builders.ts" + }, { "moduleName": "./packages/perseus/src/components/graphie.tsx" }, @@ -5704,20 +5680,35 @@ ] }, { - "id": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx", - "name": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx", + "id": "./packages/perseus/src/basic-widgets.ts", + "name": "./packages/perseus/src/basic-widgets.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad.tsx" + "moduleName": "./packages/perseus/src/init.ts" + }, + { + "moduleName": "./packages/perseus/src/all-widgets.ts" } ] }, { - "id": "./packages/perseus/src/widgets/categorizer/categorizer.tsx", - "name": "./packages/perseus/src/widgets/categorizer/categorizer.tsx", + "id": "./packages/perseus/src/extra-widgets.ts", + "name": "./packages/perseus/src/extra-widgets.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/categorizer/index.ts" + "moduleName": "./packages/perseus/src/init.ts" + }, + { + "moduleName": "./packages/perseus/src/all-widgets.ts" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/input-number/input-number.tsx", + "name": "./packages/perseus/src/widgets/input-number/input-number.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/input-number/index.ts" } ] }, @@ -5731,11 +5722,11 @@ ] }, { - "id": "./packages/perseus/src/widgets/input-number/input-number.tsx", - "name": "./packages/perseus/src/widgets/input-number/input-number.tsx", + "id": "./packages/perseus/src/widgets/categorizer/categorizer.tsx", + "name": "./packages/perseus/src/widgets/categorizer/categorizer.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/input-number/index.ts" + "moduleName": "./packages/perseus/src/widgets/categorizer/index.ts" } ] }, @@ -5757,6 +5748,15 @@ } ] }, + { + "id": "./packages/perseus/src/widgets/grapher/grapher.tsx", + "name": "./packages/perseus/src/widgets/grapher/grapher.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/grapher/index.ts" + } + ] + }, { "id": "./packages/simple-markdown/src/index.ts", "name": "./packages/simple-markdown/src/index.ts", @@ -5776,11 +5776,11 @@ ] }, { - "id": "./packages/perseus/src/widgets/grapher/grapher.tsx", - "name": "./packages/perseus/src/widgets/grapher/grapher.tsx", + "id": "./packages/perseus/src/widgets/table/table.tsx", + "name": "./packages/perseus/src/widgets/table/table.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/grapher/index.ts" + "moduleName": "./packages/perseus/src/widgets/table/index.ts" } ] }, @@ -5802,39 +5802,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/table/table.tsx", - "name": "./packages/perseus/src/widgets/table/table.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/table/index.ts" - } - ] - }, - { - "id": "./testing/ke-score-ui.tsx", - "name": "./testing/ke-score-ui.tsx", - "reasons": [ - { - "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" - }, - { - "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/multi-items/__testdata__/multi-renderer.testdata.ts", - "name": "./packages/perseus/src/multi-items/__testdata__/multi-renderer.testdata.ts", - "reasons": [ - { - "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" - }, - { - "moduleName": "./packages/perseus/src/multi-items/__stories__/multi-renderer.stories.tsx" - } - ] - }, { "id": "./packages/perseus-editor/src/components/json-editor.tsx", "name": "./packages/perseus-editor/src/components/json-editor.tsx", @@ -5867,10 +5834,10 @@ "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/image/image.tsx" + "moduleName": "./packages/perseus/src/widgets/group/group.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/group/group.tsx" + "moduleName": "./packages/perseus/src/widgets/image/image.tsx" }, { "moduleName": "./packages/perseus/src/widgets/sorter/sorter.tsx" @@ -5894,10 +5861,10 @@ "moduleName": "./packages/perseus/src/components/sortable.tsx" }, { - "moduleName": "./packages/perseus/src/server-item-renderer.tsx" + "moduleName": "./packages/perseus/src/hints-renderer.tsx" }, { - "moduleName": "./packages/perseus/src/hints-renderer.tsx" + "moduleName": "./packages/perseus/src/server-item-renderer.tsx" }, { "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" @@ -5935,167 +5902,245 @@ ] }, { - "id": "./packages/pure-markdown/src/index.ts", - "name": "./packages/pure-markdown/src/index.ts", + "id": "./packages/kmath/src/index.ts", + "name": "./packages/kmath/src/index.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/perseus-markdown.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/interactive2/objective_.ts", - "name": "./packages/perseus/src/interactive2/objective_.ts", - "reasons": [ + "moduleName": "./packages/perseus/src/widgets/grapher/util.tsx" + }, { - "moduleName": "./packages/perseus/src/traversal.ts" + "moduleName": "./packages/perseus/src/util/math.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/util.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + "moduleName": "./packages/perseus/src/util/graphie.ts" }, { - "moduleName": "./packages/perseus/src/renderer.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/util/answer-types.ts", - "name": "./packages/perseus/src/util/answer-types.ts", - "reasons": [ + "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" + }, { - "moduleName": "./packages/perseus/src/util.ts" + "moduleName": "./packages/perseus/src/interactive2/wrapped-line.ts" }, { - "moduleName": "./packages/perseus/src/widgets/expression/expression-validator.ts" + "moduleName": "./packages/perseus/src/util/geometry.ts" }, { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input-validator.ts" + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/input-number/input-number-validator.ts" + "moduleName": "./packages/perseus/src/util/interactive.ts" }, { - "moduleName": "./packages/perseus/src/widgets/table/table.tsx" + "moduleName": "./packages/perseus/src/interactive2/movable-helper-methods.ts" }, { - "moduleName": "./packages/perseus/src/widgets/matrix/matrix.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/util.graphie.ts", - "name": "./packages/perseus/src/util.graphie.ts", - "reasons": [ + "moduleName": "./packages/perseus/src/interactive2/wrapped-drawing.ts" + }, { - "moduleName": "./packages/perseus/src/util.ts" - } - ] - }, - { - "id": "./packages/kmath/src/index.ts", - "name": "./packages/kmath/src/index.ts", - "reasons": [ + "moduleName": "./packages/perseus/src/interactive2/movable.ts" + }, { - "moduleName": "./packages/perseus/src/widgets/grapher/util.tsx" + "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" + "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/util.ts" + "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" }, { - "moduleName": "./packages/perseus/src/util/math.ts" + "moduleName": "./packages/perseus-editor/src/widgets/number-line-editor.tsx" }, { - "moduleName": "./packages/perseus/src/util/graphie.ts" + "moduleName": "./packages/perseus/src/interactive2/arrowhead.ts" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" + "moduleName": "./packages/perseus/src/interactive2/wrapped-ellipse.ts" }, { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" + "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" }, { - "moduleName": "./packages/perseus/src/interactive2/wrapped-line.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" }, { - "moduleName": "./packages/perseus/src/util/geometry.ts" + "moduleName": "./packages/perseus/src/interactive2/movable-line-options.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-helper-methods.ts" + "moduleName": "./packages/perseus/src/interactive2/movable-point-options.ts" }, { - "moduleName": "./packages/perseus/src/util/interactive.ts" + "moduleName": "./packages/perseus/src/interactive2/movable-polygon-options.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" + "moduleName": "./packages/perseus/src/components/graph.tsx" }, { - "moduleName": "./packages/perseus/src/interactive2/movable.ts" + "moduleName": "./packages/perseus/src/components/number-input.tsx" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" + "moduleName": "./packages/perseus-editor/src/widgets/plotter-editor.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" + }, + { + "moduleName": "./packages/perseus/src/interactive2/get-clip-point.ts" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" + } + ] + }, + { + "id": "./packages/pure-markdown/src/index.ts", + "name": "./packages/pure-markdown/src/index.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/perseus-markdown.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/interactive2/objective_.ts", + "name": "./packages/perseus/src/interactive2/objective_.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/traversal.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" }, { "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" }, { - "moduleName": "./packages/perseus/src/interactive2/wrapped-drawing.ts" + "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/number-line-editor.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/util/answer-types.ts", + "name": "./packages/perseus/src/util/answer-types.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/util.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/arrowhead.ts" + "moduleName": "./packages/perseus/src/widgets/expression/expression-validator.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/wrapped-ellipse.ts" + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input-validator.ts" }, { - "moduleName": "./packages/perseus/src/widgets/interaction/interaction.tsx" + "moduleName": "./packages/perseus/src/widgets/input-number/input-number-validator.ts" }, { - "moduleName": "./packages/perseus/src/components/number-input.tsx" + "moduleName": "./packages/perseus/src/widgets/table/table.tsx" }, { - "moduleName": "./packages/perseus/src/components/graph.tsx" + "moduleName": "./packages/perseus/src/widgets/matrix/matrix.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/util.graphie.ts", + "name": "./packages/perseus/src/util.graphie.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/util.ts" + } + ] + }, + { + "id": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx", + "name": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/util/geometry.ts", + "name": "./packages/perseus/src/util/geometry.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/initialize-graph-state.ts" }, { - "moduleName": "./packages/perseus-editor/src/widgets/plotter-editor.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" + "moduleName": "./packages/perseus/src/util/interactive.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-line-options.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-state.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-polygon-options.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-point-options.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/angle-indicators.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/utils.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/utils.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/initialize-graph-state.ts" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/get-clip-point.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" + } + ] + }, + { + "id": "./testing/ke-score-ui.tsx", + "name": "./testing/ke-score-ui.tsx", + "reasons": [ + { + "moduleName": "./testing/server-item-renderer-with-debug-ui.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" + "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/multi-items/__testdata__/multi-renderer.testdata.ts", + "name": "./packages/perseus/src/multi-items/__testdata__/multi-renderer.testdata.ts", + "reasons": [ + { + "moduleName": "./testing/multi-item-renderer-with-debug-ui.tsx" + }, + { + "moduleName": "./packages/perseus/src/multi-items/__stories__/multi-renderer.stories.tsx" } ] }, @@ -6363,51 +6408,6 @@ } ] }, - { - "id": "./packages/perseus/src/util/geometry.ts", - "name": "./packages/perseus/src/util/geometry.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/initialize-graph-state.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" - }, - { - "moduleName": "./packages/perseus/src/util/interactive.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-state.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/angle-indicators.tsx" - } - ] - }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/utils.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/utils.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/initialize-graph-state.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" - } - ] - }, { "id": "./packages/kmath/src/version.ts", "name": "./packages/kmath/src/version.ts", @@ -6440,10 +6440,10 @@ "moduleName": "./packages/kmath/src/index.ts" }, { - "moduleName": "./packages/kmath/src/point.ts" + "moduleName": "./packages/kmath/src/line.ts" }, { - "moduleName": "./packages/kmath/src/line.ts" + "moduleName": "./packages/kmath/src/point.ts" }, { "moduleName": "./packages/kmath/src/ray.ts" @@ -6483,33 +6483,6 @@ } ] }, - { - "id": "./packages/kas/src/version.ts", - "name": "./packages/kas/src/version.ts", - "reasons": [ - { - "moduleName": "./packages/kas/src/index.js" - } - ] - }, - { - "id": "./packages/kas/src/nodes.js", - "name": "./packages/kas/src/nodes.js", - "reasons": [ - { - "moduleName": "./packages/kas/src/index.js" - } - ] - }, - { - "id": "./packages/kas/src/compare.ts", - "name": "./packages/kas/src/compare.ts", - "reasons": [ - { - "moduleName": "./packages/kas/src/index.js" - } - ] - }, { "id": "./vendor/jsdiff/jsdiff.js", "name": "./vendor/jsdiff/jsdiff.js", @@ -6523,119 +6496,62 @@ ] }, { - "id": "./packages/perseus-editor/src/components/heading.tsx", - "name": "./packages/perseus-editor/src/components/heading.tsx", + "id": "./packages/perseus-editor/src/diffs/widget-diff.tsx", + "name": "./packages/perseus-editor/src/diffs/widget-diff.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-correct-answer.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figures-section.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/renderer-diff.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-description.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-angle.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-angle.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-circle.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-circle.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-line.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-line.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-multiline.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-multiline.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" + "moduleName": "./packages/perseus-editor/src/diffs/item-diff.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-point.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-point.tsx", + "id": "./packages/kas/src/version.ts", + "name": "./packages/kas/src/version.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" + "moduleName": "./packages/kas/src/index.js" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-quadratic.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-quadratic.tsx", + "id": "./packages/kas/src/nodes.js", + "name": "./packages/kas/src/nodes.js", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" + "moduleName": "./packages/kas/src/index.js" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-sinusoid.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-sinusoid.tsx", + "id": "./packages/kas/src/compare.ts", + "name": "./packages/kas/src/compare.ts", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" + "moduleName": "./packages/kas/src/index.js" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/util.ts", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/util.ts", + "id": "./packages/perseus-editor/src/components/heading.tsx", + "name": "./packages/perseus-editor/src/components/heading.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-quadratic.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-angle.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-correct-answer.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-sinusoid.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/diffs/widget-diff.tsx", - "name": "./packages/perseus-editor/src/diffs/widget-diff.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/diffs/renderer-diff.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/diffs/item-diff.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figures-section.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-description.tsx" } ] }, @@ -6721,116 +6637,113 @@ ] }, { - "id": "./packages/perseus/src/util/graphie.ts", - "name": "./packages/perseus/src/util/graphie.ts", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-angle.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-angle.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/util/graph-utils.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" - }, - { - "moduleName": "./packages/perseus/src/util/interactive.ts" - }, - { - "moduleName": "./packages/perseus/src/components/graphie.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" } ] }, { - "id": "./packages/perseus/src/util/interactive.ts", - "name": "./packages/perseus/src/util/interactive.ts", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-circle.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-circle.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/util/graph-utils.ts" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" } ] }, { - "id": "./packages/perseus/src/interactive2/movable-helper-methods.ts", - "name": "./packages/perseus/src/interactive2/movable-helper-methods.ts", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-line.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-line.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/interactive2/interactive-util.ts" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" } ] }, { - "id": "./packages/perseus/src/interactive2.ts", - "name": "./packages/perseus/src/interactive2.ts", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-multiline.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-multiline.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/graphie-movables.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" } ] }, { - "id": "./packages/perseus/src/components/graphie-classes.ts", - "name": "./packages/perseus/src/components/graphie-classes.ts", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-point.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-point.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/graphie-movables.ts" - }, - { - "moduleName": "./packages/perseus/src/components/graphie.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" } ] }, { - "id": "./vendor/raphael/raphael.js", - "name": "./vendor/raphael/raphael.js", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-quadratic.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-quadratic.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/util/graphie.ts" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" } ] }, { - "id": "./packages/perseus/src/util/drawing-transform.ts", - "name": "./packages/perseus/src/util/drawing-transform.ts", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-sinusoid.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-sinusoid.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/util/graphie.ts" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" } ] }, { - "id": "./packages/perseus/src/util/graph-bounds.ts", - "name": "./packages/perseus/src/util/graph-bounds.ts", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/util.ts", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/util.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/util/graphie.ts" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-angle.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-quadratic.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-sinusoid.tsx" } ] }, { - "id": "./packages/perseus/src/util/tex.ts", - "name": "./packages/perseus/src/util/tex.ts", + "id": "./packages/perseus/src/util/graphie.ts", + "name": "./packages/perseus/src/util/graphie.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/util/graphie.ts" + "moduleName": "./packages/perseus/src/util/graph-utils.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" + }, + { + "moduleName": "./packages/perseus/src/util/interactive.ts" + }, + { + "moduleName": "./packages/perseus/src/components/graphie.tsx" } ] }, { - "id": "./packages/perseus/src/zoom.ts", - "name": "./packages/perseus/src/zoom.ts", + "id": "./packages/perseus/src/util/interactive.ts", + "name": "./packages/perseus/src/util/interactive.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/components/svg-image.tsx" + "moduleName": "./packages/perseus/src/util/graph-utils.ts" } ] }, @@ -6841,9 +6754,6 @@ { "moduleName": "./packages/perseus-linter/src/index.ts" }, - { - "moduleName": "./packages/perseus-linter/src/rules/absolute-url.ts" - }, { "moduleName": "./packages/perseus-linter/src/rules/blockquoted-math.ts" }, @@ -6851,29 +6761,32 @@ "moduleName": "./packages/perseus-linter/src/rules/blockquoted-widget.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/double-spacing-after-terminal.ts" + "moduleName": "./packages/perseus-linter/src/rules/absolute-url.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/expression-widget.ts" + "moduleName": "./packages/perseus-linter/src/rules/double-spacing-after-terminal.ts" }, { "moduleName": "./packages/perseus-linter/src/rules/extra-content-spacing.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/heading-level-1.ts" + "moduleName": "./packages/perseus-linter/src/rules/heading-sentence-case.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/heading-level-skip.ts" + "moduleName": "./packages/perseus-linter/src/rules/expression-widget.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/heading-sentence-case.ts" + "moduleName": "./packages/perseus-linter/src/rules/heading-level-skip.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/heading-title-case.ts" + "moduleName": "./packages/perseus-linter/src/rules/heading-level-1.ts" }, { "moduleName": "./packages/perseus-linter/src/rules/image-in-table.ts" }, + { + "moduleName": "./packages/perseus-linter/src/rules/heading-title-case.ts" + }, { "moduleName": "./packages/perseus-linter/src/rules/image-alt-text.ts" }, @@ -6884,10 +6797,10 @@ "moduleName": "./packages/perseus-linter/src/rules/link-click-here.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/long-paragraph.ts" + "moduleName": "./packages/perseus-linter/src/rules/image-widget.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/image-widget.ts" + "moduleName": "./packages/perseus-linter/src/rules/long-paragraph.ts" }, { "moduleName": "./packages/perseus-linter/src/rules/math-adjacent.ts" @@ -6926,10 +6839,10 @@ "moduleName": "./packages/perseus-linter/src/rules/static-widget-in-question-stem.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/unbalanced-code-delimiters.ts" + "moduleName": "./packages/perseus-linter/src/rules/table-missing-cells.ts" }, { - "moduleName": "./packages/perseus-linter/src/rules/table-missing-cells.ts" + "moduleName": "./packages/perseus-linter/src/rules/unbalanced-code-delimiters.ts" }, { "moduleName": "./packages/perseus-linter/src/rules/unescaped-dollar.ts" @@ -6976,59 +6889,98 @@ ] }, { - "id": "./dev/cache.ts", - "name": "./dev/cache.ts", + "id": "./packages/perseus/src/zoom.ts", + "name": "./packages/perseus/src/zoom.ts", "reasons": [ { - "moduleName": "./dev/flipbook-model.ts" + "moduleName": "./packages/perseus/src/components/svg-image.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/mafs-supported-graph-types.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/mafs-supported-graph-types.ts", + "id": "./packages/perseus/src/interactive2.ts", + "name": "./packages/perseus/src/interactive2.ts", "reasons": [ { - "moduleName": "./dev/flipbook.tsx" + "moduleName": "./packages/perseus/src/components/graphie-movables.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graph.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/grapher/grapher.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" } ] }, { - "id": "./dev/editable-controlled-input.tsx", - "name": "./dev/editable-controlled-input.tsx", + "id": "./packages/perseus/src/components/graphie-classes.ts", + "name": "./packages/perseus/src/components/graphie-classes.ts", "reasons": [ { - "moduleName": "./dev/flipbook.tsx" + "moduleName": "./packages/perseus/src/components/graphie-movables.ts" + }, + { + "moduleName": "./packages/perseus/src/components/graphie.tsx" } ] }, { - "id": "./dev/flipbook-model.ts", - "name": "./dev/flipbook-model.ts", + "id": "./packages/perseus/src/interactive2/movable-helper-methods.ts", + "name": "./packages/perseus/src/interactive2/movable-helper-methods.ts", "reasons": [ { - "moduleName": "./dev/flipbook.tsx" + "moduleName": "./packages/perseus/src/interactive2/interactive-util.ts" } ] }, { - "id": "./dev/header.tsx", - "name": "./dev/header.tsx", + "id": "./vendor/raphael/raphael.js", + "name": "./vendor/raphael/raphael.js", "reasons": [ { - "moduleName": "./dev/flipbook.tsx" + "moduleName": "./packages/perseus/src/util/graphie.ts" } ] }, { - "id": "./packages/perseus/src/styles/perseus-renderer.less", - "name": "./packages/perseus/src/styles/perseus-renderer.less", + "id": "./packages/perseus/src/util/drawing-transform.ts", + "name": "./packages/perseus/src/util/drawing-transform.ts", "reasons": [ { - "moduleName": "./dev/flipbook.tsx" + "moduleName": "./packages/perseus/src/util/graphie.ts" + } + ] + }, + { + "id": "./packages/perseus/src/util/graph-bounds.ts", + "name": "./packages/perseus/src/util/graph-bounds.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/util/graphie.ts" + } + ] + }, + { + "id": "./packages/perseus/src/util/tex.ts", + "name": "./packages/perseus/src/util/tex.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/util/graphie.ts" }, { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + } + ] + }, + { + "id": "./dev/cache.ts", + "name": "./dev/cache.ts", + "reasons": [ + { + "moduleName": "./dev/flipbook-model.ts" } ] }, @@ -7052,19 +7004,67 @@ "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-function.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-function.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/expression/get-decimal-separator.ts", + "name": "./packages/perseus/src/widgets/expression/get-decimal-separator.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/expression/expression-validator.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/mafs-supported-graph-types.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/mafs-supported-graph-types.ts", + "reasons": [ + { + "moduleName": "./dev/flipbook.tsx" + } + ] + }, + { + "id": "./dev/editable-controlled-input.tsx", + "name": "./dev/editable-controlled-input.tsx", + "reasons": [ + { + "moduleName": "./dev/flipbook.tsx" + } + ] + }, + { + "id": "./dev/flipbook-model.ts", + "name": "./dev/flipbook-model.ts", + "reasons": [ + { + "moduleName": "./dev/flipbook.tsx" + } + ] + }, + { + "id": "./dev/header.tsx", + "name": "./dev/header.tsx", + "reasons": [ + { + "moduleName": "./dev/flipbook.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/expression/get-decimal-separator.ts", - "name": "./packages/perseus/src/widgets/expression/get-decimal-separator.ts", + "id": "./packages/perseus/src/styles/perseus-renderer.less", + "name": "./packages/perseus/src/styles/perseus-renderer.less", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/expression/expression-validator.ts" + "moduleName": "./dev/flipbook.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/expression/expression.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" } ] }, @@ -7275,24 +7275,6 @@ } ] }, - { - "id": "./packages/math-input/src/components/keypad/utils.ts", - "name": "./packages/math-input/src/components/keypad/utils.ts", - "reasons": [ - { - "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/fractions-page.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/shared-keys.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx" - } - ] - }, { "id": "./packages/perseus/src/tex-wrangler.ts", "name": "./packages/perseus/src/tex-wrangler.ts", @@ -7305,24 +7287,6 @@ } ] }, - { - "id": "./packages/math-input/src/fake-react-native-web/text.tsx", - "name": "./packages/math-input/src/fake-react-native-web/text.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/fake-react-native-web/index.ts" - } - ] - }, - { - "id": "./packages/math-input/src/fake-react-native-web/view.tsx", - "name": "./packages/math-input/src/fake-react-native-web/view.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/fake-react-native-web/index.ts" - } - ] - }, { "id": "./packages/math-input/src/components/input/cursor-styles.ts", "name": "./packages/math-input/src/components/input/cursor-styles.ts", @@ -7370,10 +7334,10 @@ "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" }, { - "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" + "moduleName": "./packages/perseus/src/interactive2/movable-line-options.ts" }, { - "moduleName": "./packages/perseus/src/interactive2/movable-line-options.ts" + "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" } ] }, @@ -7388,10 +7352,10 @@ "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" }, { - "moduleName": "./packages/perseus/src/components/graphie.tsx" + "moduleName": "./packages/perseus/src/components/graph.tsx" }, { - "moduleName": "./packages/perseus/src/components/graph.tsx" + "moduleName": "./packages/perseus/src/components/graphie.tsx" }, { "moduleName": "./packages/perseus/src/widgets/plotter/plotter.tsx" @@ -7411,65 +7375,20 @@ ] }, { - "id": "./packages/pure-markdown/src/version.ts", - "name": "./packages/pure-markdown/src/version.ts", - "reasons": [ - { - "moduleName": "./packages/pure-markdown/src/index.ts" - } - ] - }, - { - "id": "./packages/simple-markdown/src/version.ts", - "name": "./packages/simple-markdown/src/version.ts", - "reasons": [ - { - "moduleName": "./packages/simple-markdown/src/index.ts" - } - ] - }, - { - "id": "./packages/perseus-editor/src/katex-mhchem/index.js", - "name": "./packages/perseus-editor/src/katex-mhchem/index.js", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/editor.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/components/drag-target.tsx", - "name": "./packages/perseus-editor/src/components/drag-target.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/editor.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/components/widget-editor.tsx", - "name": "./packages/perseus-editor/src/components/widget-editor.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/editor.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/components/widget-select.tsx", - "name": "./packages/perseus-editor/src/components/widget-select.tsx", + "id": "./packages/math-input/src/fake-react-native-web/text.tsx", + "name": "./packages/math-input/src/fake-react-native-web/text.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/editor.tsx" + "moduleName": "./packages/math-input/src/fake-react-native-web/index.ts" } ] }, { - "id": "./packages/perseus-editor/src/katex-mhchem/parser.js", - "name": "./packages/perseus-editor/src/katex-mhchem/parser.js", + "id": "./packages/math-input/src/fake-react-native-web/view.tsx", + "name": "./packages/math-input/src/fake-react-native-web/view.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/katex-mhchem/index.js" + "moduleName": "./packages/math-input/src/fake-react-native-web/index.ts" } ] }, @@ -7490,22 +7409,22 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-labels.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/grid.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/legacy-grid.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/grid.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-polygon.tsx" @@ -7522,9 +7441,6 @@ { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/sinusoid.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" }, @@ -7532,14 +7448,17 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/vector.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/vector.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/svg-line.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/angle-indicators.tsx" }, @@ -7548,6 +7467,69 @@ } ] }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/index.ts" + } + ] + }, + { + "id": "./packages/perseus/src/interactive2/interactive-util.ts", + "name": "./packages/perseus/src/interactive2/interactive-util.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/interactive2/wrapped-line.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/wrapped-drawing.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/wrapped-ellipse.ts" + }, + { + "moduleName": "./packages/perseus/src/components/graphie.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/table/table.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/matrix/matrix.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/interactive2/wrapped-drawing.ts", + "name": "./packages/perseus/src/interactive2/wrapped-drawing.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/interactive2/wrapped-line.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/wrapped-ellipse.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/wrapped-path.ts" + } + ] + }, { "id": "./packages/perseus/src/interactive2/movable.ts", "name": "./packages/perseus/src/interactive2/movable.ts", @@ -7585,65 +7567,83 @@ ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx", + "id": "./packages/perseus-editor/src/katex-mhchem/index.js", + "name": "./packages/perseus-editor/src/katex-mhchem/index.js", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/index.ts" + "moduleName": "./packages/perseus-editor/src/editor.tsx" } ] }, { - "id": "./packages/perseus/src/interactive2/interactive-util.ts", - "name": "./packages/perseus/src/interactive2/interactive-util.ts", + "id": "./packages/perseus-editor/src/components/drag-target.tsx", + "name": "./packages/perseus-editor/src/components/drag-target.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/interactive2/wrapped-line.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" - }, - { - "moduleName": "./packages/perseus/src/interactive2/wrapped-drawing.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/wrapped-ellipse.ts" - }, + "moduleName": "./packages/perseus-editor/src/editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/components/widget-editor.tsx", + "name": "./packages/perseus-editor/src/components/widget-editor.tsx", + "reasons": [ { - "moduleName": "./packages/perseus/src/components/graphie.tsx" - }, + "moduleName": "./packages/perseus-editor/src/editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/components/widget-select.tsx", + "name": "./packages/perseus-editor/src/components/widget-select.tsx", + "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/table/table.tsx" - }, + "moduleName": "./packages/perseus-editor/src/editor.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/katex-mhchem/parser.js", + "name": "./packages/perseus-editor/src/katex-mhchem/parser.js", + "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/number-line/number-line.tsx" - }, + "moduleName": "./packages/perseus-editor/src/katex-mhchem/index.js" + } + ] + }, + { + "id": "./packages/pure-markdown/src/version.ts", + "name": "./packages/pure-markdown/src/version.ts", + "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/matrix/matrix.tsx" + "moduleName": "./packages/pure-markdown/src/index.ts" } ] }, { - "id": "./packages/perseus/src/interactive2/wrapped-drawing.ts", - "name": "./packages/perseus/src/interactive2/wrapped-drawing.ts", + "id": "./packages/simple-markdown/src/version.ts", + "name": "./packages/simple-markdown/src/version.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/interactive2/wrapped-line.ts" + "moduleName": "./packages/simple-markdown/src/index.ts" + } + ] + }, + { + "id": "./packages/math-input/src/components/keypad/utils.ts", + "name": "./packages/math-input/src/components/keypad/utils.ts", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/keypad/keypad-pages/fractions-page.tsx" }, { - "moduleName": "./packages/perseus/src/interactive2/wrapped-ellipse.ts" + "moduleName": "./packages/math-input/src/components/keypad/shared-keys.tsx" }, { - "moduleName": "./packages/perseus/src/interactive2/wrapped-path.ts" + "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx" } ] }, @@ -7652,10 +7652,10 @@ "name": "./packages/perseus-editor/src/widgets/interaction-editor/color-picker.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/function-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/label-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/label-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/function-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/line-editor.tsx" @@ -7671,36 +7671,18 @@ } ] }, - { - "id": "./packages/perseus-editor/src/widgets/interaction-editor/dash-picker.tsx", - "name": "./packages/perseus-editor/src/widgets/interaction-editor/dash-picker.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/function-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/line-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/parametric-editor.tsx" - } - ] - }, { "id": "./packages/perseus-editor/src/widgets/interaction-editor/mathquill-input.tsx", "name": "./packages/perseus-editor/src/widgets/interaction-editor/mathquill-input.tsx", "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/function-editor.tsx" - }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/label-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/line-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/function-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-point-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/line-editor.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-line-editor.tsx" @@ -7714,11 +7696,29 @@ { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/rectangle-editor.tsx" }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-point-editor.tsx" + }, { "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/constraint-editor.tsx" } ] }, + { + "id": "./packages/perseus-editor/src/widgets/interaction-editor/dash-picker.tsx", + "name": "./packages/perseus-editor/src/widgets/interaction-editor/dash-picker.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/function-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/line-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/parametric-editor.tsx" + } + ] + }, { "id": "./packages/perseus-editor/src/widgets/interaction-editor/arrow-picker.tsx", "name": "./packages/perseus-editor/src/widgets/interaction-editor/arrow-picker.tsx", @@ -7733,22 +7733,19 @@ "name": "./packages/perseus-editor/src/widgets/interaction-editor/constraint-editor.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-point-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-line-editor.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-line-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interaction-editor/movable-point-editor.tsx" } ] }, { - "id": "./packages/perseus/src/util/react-render.tsx", - "name": "./packages/perseus/src/util/react-render.tsx", + "id": "./packages/perseus-linter/src/selector.ts", + "name": "./packages/perseus-linter/src/selector.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/util/tex.ts" - }, - { - "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + "moduleName": "./packages/perseus-linter/src/rule.ts" } ] }, @@ -7788,15 +7785,6 @@ } ] }, - { - "id": "./packages/perseus-linter/src/selector.ts", - "name": "./packages/perseus-linter/src/selector.ts", - "reasons": [ - { - "moduleName": "./packages/perseus-linter/src/rule.ts" - } - ] - }, { "id": "./packages/perseus-linter/src/rules/absolute-url.ts", "name": "./packages/perseus-linter/src/rules/absolute-url.ts", @@ -8085,6 +8073,18 @@ } ] }, + { + "id": "./packages/perseus/src/util/react-render.tsx", + "name": "./packages/perseus/src/util/react-render.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/util/tex.ts" + }, + { + "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + } + ] + }, { "id": "./packages/perseus/src/widgets/cs-program/cs-program.tsx", "name": "./packages/perseus/src/widgets/cs-program/cs-program.tsx", @@ -8112,15 +8112,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/explanation/explanation.tsx", - "name": "./packages/perseus/src/widgets/explanation/explanation.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/explanation/index.ts" - } - ] - }, { "id": "./packages/perseus/src/widgets/graded-group/graded-group.tsx", "name": "./packages/perseus/src/widgets/graded-group/graded-group.tsx", @@ -8134,11 +8125,11 @@ ] }, { - "id": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx", - "name": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx", + "id": "./packages/perseus/src/widgets/explanation/explanation.tsx", + "name": "./packages/perseus/src/widgets/explanation/explanation.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/graded-group-set/index.ts" + "moduleName": "./packages/perseus/src/widgets/explanation/index.ts" } ] }, @@ -8151,15 +8142,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/iframe/iframe.tsx", - "name": "./packages/perseus/src/widgets/iframe/iframe.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/iframe/index.ts" - } - ] - }, { "id": "./packages/perseus/src/widgets/__shared__/noop-validator.tsx", "name": "./packages/perseus/src/widgets/__shared__/noop-validator.tsx", @@ -8180,10 +8162,10 @@ "moduleName": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/video/video.tsx" + "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/passage-ref-target/passage-ref-target.tsx" + "moduleName": "./packages/perseus/src/widgets/video/video.tsx" }, { "moduleName": "./packages/perseus/src/widgets/molecule/molecule.tsx" @@ -8199,6 +8181,24 @@ } ] }, + { + "id": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx", + "name": "./packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/graded-group-set/index.ts" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/iframe/iframe.tsx", + "name": "./packages/perseus/src/widgets/iframe/iframe.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/iframe/index.ts" + } + ] + }, { "id": "./packages/perseus/src/widgets/image/image.tsx", "name": "./packages/perseus/src/widgets/image/image.tsx", @@ -8244,15 +8244,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/orderer/orderer.tsx", - "name": "./packages/perseus/src/widgets/orderer/orderer.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/orderer/index.ts" - } - ] - }, { "id": "./packages/perseus/src/widgets/measurer/measurer.tsx", "name": "./packages/perseus/src/widgets/measurer/measurer.tsx", @@ -8271,6 +8262,15 @@ } ] }, + { + "id": "./packages/perseus/src/widgets/orderer/orderer.tsx", + "name": "./packages/perseus/src/widgets/orderer/orderer.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/orderer/index.ts" + } + ] + }, { "id": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx", "name": "./packages/perseus/src/widgets/passage-ref/passage-ref.tsx", @@ -8293,20 +8293,20 @@ ] }, { - "id": "./packages/perseus/src/widgets/video/video.tsx", - "name": "./packages/perseus/src/widgets/video/video.tsx", + "id": "./packages/perseus/src/widgets/sorter/sorter.tsx", + "name": "./packages/perseus/src/widgets/sorter/sorter.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/video/index.ts" + "moduleName": "./packages/perseus/src/widgets/sorter/index.ts" } ] }, { - "id": "./packages/perseus/src/widgets/sorter/sorter.tsx", - "name": "./packages/perseus/src/widgets/sorter/sorter.tsx", + "id": "./packages/perseus/src/widgets/video/video.tsx", + "name": "./packages/perseus/src/widgets/video/video.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/sorter/index.ts" + "moduleName": "./packages/perseus/src/widgets/video/index.ts" } ] }, @@ -8329,29 +8329,80 @@ ] }, { - "id": "./packages/perseus/src/interactive2/movable-line-options.ts", - "name": "./packages/perseus/src/interactive2/movable-line-options.ts", + "id": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" } ] }, { - "id": "./packages/perseus/src/interactive2/movable-polygon-options.ts", - "name": "./packages/perseus/src/interactive2/movable-polygon-options.ts", + "id": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-action.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-action.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/quadratic.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/segment.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/linear.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/linear-system.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/ray.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/sinusoid.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" } ] }, { - "id": "./packages/perseus/src/interactive2/movable-point-options.ts", - "name": "./packages/perseus/src/interactive2/movable-point-options.ts", + "id": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" + } + ] + }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-state.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-state.ts", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" } ] }, @@ -8443,80 +8494,38 @@ ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx", + "id": "./packages/perseus/src/interactive2/movable-line-options.ts", + "name": "./packages/perseus/src/interactive2/movable-line-options.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" + "moduleName": "./packages/perseus/src/interactive2/movable-line.ts" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-action.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-action.ts", + "id": "./packages/perseus/src/interactive2/movable-point-options.ts", + "name": "./packages/perseus/src/interactive2/movable-point-options.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/quadratic.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/segment.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/linear.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/ray.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/linear-system.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/sinusoid.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" + "moduleName": "./packages/perseus/src/interactive2/movable-point.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts", + "id": "./packages/perseus/src/widgets/radio/radio-validator.ts", + "name": "./packages/perseus/src/widgets/radio/radio-validator.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-state.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-state.ts", + "id": "./packages/perseus/src/interactive2/movable-polygon-options.ts", + "name": "./packages/perseus/src/interactive2/movable-polygon-options.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/stateful-mafs-graph.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" + "moduleName": "./packages/perseus/src/interactive2/movable-polygon.ts" } ] }, @@ -8547,15 +8556,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/radio/radio-validator.ts", - "name": "./packages/perseus/src/widgets/radio/radio-validator.ts", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/radio/radio-component.tsx" - } - ] - }, { "id": "./packages/kas/src/__genfiles__/unitparser.js", "name": "./packages/kas/src/__genfiles__/unitparser.js", @@ -8616,15 +8616,6 @@ } ] }, - { - "id": "./packages/math-input/src/components/aphrodite-css-transition-group/transition-child.tsx", - "name": "./packages/math-input/src/components/aphrodite-css-transition-group/transition-child.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/components/aphrodite-css-transition-group/index.tsx" - } - ] - }, { "id": "./packages/perseus/src/widgets/sorter/sorter-validator.ts", "name": "./packages/perseus/src/widgets/sorter/sorter-validator.ts", @@ -8683,101 +8674,104 @@ ] }, { - "id": "./packages/perseus/src/components/graphie-movables.ts", - "name": "./packages/perseus/src/components/graphie-movables.ts", + "id": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-arrows.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-arrows.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/graphie.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" } ] }, { - "id": "./packages/perseus/src/components/visibility-observer/create-visibility-observer.ts", - "name": "./packages/perseus/src/components/visibility-observer/create-visibility-observer.ts", + "id": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-labels.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-labels.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/visibility-observer/visibility-observer.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" } ] }, { - "id": "./packages/perseus/src/components/visibility-observer/get-scroll-parent.ts", - "name": "./packages/perseus/src/components/visibility-observer/get-scroll-parent.ts", + "id": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/components/visibility-observer/visibility-observer.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" } ] }, { - "id": "./packages/perseus/src/error-boundary.tsx", - "name": "./packages/perseus/src/error-boundary.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/grid.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/grid.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/renderer.tsx" - }, - { - "moduleName": "./packages/perseus/src/widget-container.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" } ] }, { - "id": "./packages/perseus/src/interaction-tracker.ts", - "name": "./packages/perseus/src/interaction-tracker.ts", + "id": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/legacy-grid.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/legacy-grid.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" } ] }, { - "id": "./packages/perseus/src/question-paragraph.tsx", - "name": "./packages/perseus/src/question-paragraph.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/graph-locked-labels-layer.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/graph-locked-labels-layer.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" } ] }, { - "id": "./packages/perseus/src/translation-linter.ts", - "name": "./packages/perseus/src/translation-linter.ts", + "id": "./packages/perseus/src/widgets/interactive-graphs/graph-locked-layer.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/graph-locked-layer.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" } ] }, { - "id": "./packages/perseus/src/widget-container.tsx", - "name": "./packages/perseus/src/widget-container.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/index.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/index.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/renderer.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/dropdown/dropdown-validator.tsx", - "name": "./packages/perseus/src/widgets/dropdown/dropdown-validator.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/text-label.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/text-label.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/angle-indicators.tsx" } ] }, { - "id": "./packages/math-input/src/components/aphrodite-css-transition-group/util.ts", - "name": "./packages/math-input/src/components/aphrodite-css-transition-group/util.ts", + "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx", "reasons": [ { - "moduleName": "./packages/math-input/src/components/aphrodite-css-transition-group/transition-child.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-arrows.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-arrows.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx", "reasons": [ { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" @@ -8785,17 +8779,59 @@ ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-labels.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-labels.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/reducer/use-graph-config.ts", + "name": "./packages/perseus/src/widgets/interactive-graphs/reducer/use-graph-config.ts", "reasons": [ { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-arrows.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-labels.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-label.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point-view.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/mafs-styles.css", + "name": "./packages/perseus/src/widgets/interactive-graphs/mafs-styles.css", "reasons": [ { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" @@ -8803,152 +8839,116 @@ ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/grid.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/grid.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/quadratic.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/quadratic.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/index.ts" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/legacy-grid.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/legacy-grid.tsx", + "id": "./packages/perseus/src/components/graphie-movables.ts", + "name": "./packages/perseus/src/components/graphie-movables.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" + "moduleName": "./packages/perseus/src/components/graphie.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/graph-locked-labels-layer.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/graph-locked-labels-layer.tsx", + "id": "./packages/perseus/src/components/visibility-observer/create-visibility-observer.ts", + "name": "./packages/perseus/src/components/visibility-observer/create-visibility-observer.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" + "moduleName": "./packages/perseus/src/components/visibility-observer/visibility-observer.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/graph-locked-layer.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/graph-locked-layer.tsx", + "id": "./packages/perseus/src/components/visibility-observer/get-scroll-parent.ts", + "name": "./packages/perseus/src/components/visibility-observer/get-scroll-parent.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" + "moduleName": "./packages/perseus/src/components/visibility-observer/visibility-observer.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/index.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/index.ts", + "id": "./packages/perseus/src/error-boundary.tsx", + "name": "./packages/perseus/src/error-boundary.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" + }, + { + "moduleName": "./packages/perseus/src/widget-container.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/text-label.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/text-label.tsx", + "id": "./packages/perseus/src/interaction-tracker.ts", + "name": "./packages/perseus/src/interaction-tracker.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/angle-indicators.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx", + "id": "./packages/perseus/src/question-paragraph.tsx", + "name": "./packages/perseus/src/question-paragraph.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx", + "id": "./packages/perseus/src/translation-linter.ts", + "name": "./packages/perseus/src/translation-linter.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/reducer/use-graph-config.ts", - "name": "./packages/perseus/src/widgets/interactive-graphs/reducer/use-graph-config.ts", + "id": "./packages/perseus/src/widget-container.tsx", + "name": "./packages/perseus/src/widget-container.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-arrows.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-labels.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-label.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-draggable.ts" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point-view.tsx" + "moduleName": "./packages/perseus/src/renderer.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/mafs-styles.css", - "name": "./packages/perseus/src/widgets/interactive-graphs/mafs-styles.css", + "id": "./packages/perseus/src/widgets/dropdown/dropdown-validator.tsx", + "name": "./packages/perseus/src/widgets/dropdown/dropdown-validator.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/mafs-graph.tsx" + "moduleName": "./packages/perseus/src/widgets/dropdown/dropdown.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/quadratic.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/quadratic.tsx", + "id": "./packages/math-input/src/components/aphrodite-css-transition-group/transition-child.tsx", + "name": "./packages/math-input/src/components/aphrodite-css-transition-group/transition-child.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/reducer/interactive-graph-reducer.ts" - }, + "moduleName": "./packages/math-input/src/components/aphrodite-css-transition-group/index.tsx" + } + ] + }, + { + "id": "./packages/math-input/src/components/aphrodite-css-transition-group/util.ts", + "name": "./packages/math-input/src/components/aphrodite-css-transition-group/util.ts", + "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/index.ts" + "moduleName": "./packages/math-input/src/components/aphrodite-css-transition-group/transition-child.tsx" } ] }, @@ -8965,23 +8965,23 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx", - "name": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx", + "id": "./packages/perseus-editor/src/widgets/label-image/marker.tsx", + "name": "./packages/perseus-editor/src/widgets/label-image/marker.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/__stories__/answer-choices.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/__stories__/marker.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx", - "name": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx", + "id": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx", + "name": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/__stories__/select-image.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/__stories__/answer-choices.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/label-image-editor.tsx" @@ -8989,23 +8989,23 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/label-image/marker.tsx", - "name": "./packages/perseus-editor/src/widgets/label-image/marker.tsx", + "id": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx", + "name": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/__stories__/marker.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/__stories__/question-markers.stories.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image-editor.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx", - "name": "./packages/perseus-editor/src/widgets/label-image/question-markers.tsx", + "id": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx", + "name": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/__stories__/question-markers.stories.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/__stories__/select-image.stories.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/label-image-editor.tsx" @@ -9042,6 +9042,15 @@ } ] }, + { + "id": "./packages/math-input/src/components/tabbar/icons.tsx", + "name": "./packages/math-input/src/components/tabbar/icons.tsx", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/tabbar/item.tsx" + } + ] + }, { "id": "./packages/math-input/src/components/keypad/button-assets.tsx", "name": "./packages/math-input/src/components/keypad/button-assets.tsx", @@ -9055,152 +9064,137 @@ ] }, { - "id": "./packages/math-input/src/components/tabbar/icons.tsx", - "name": "./packages/math-input/src/components/tabbar/icons.tsx", + "id": "./packages/perseus-editor/src/components/angle-input.tsx", + "name": "./packages/perseus-editor/src/components/angle-input.tsx", "reasons": [ { - "moduleName": "./packages/math-input/src/components/tabbar/item.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/components/perseus-editor-accordion.tsx", - "name": "./packages/perseus-editor/src/components/perseus-editor-accordion.tsx", + "id": "./packages/perseus-editor/src/components/coordinate-pair-input.tsx", + "name": "./packages/perseus-editor/src/components/coordinate-pair-input.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-angle.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-circle.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-multiline.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-stroke-select.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-stroke-select.tsx", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-line.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-point.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-multiline.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-quadratic.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-sinusoid.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-swatch.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-swatch.tsx", + "id": "./packages/perseus-editor/src/components/perseus-editor-accordion.tsx", + "name": "./packages/perseus-editor/src/components/perseus-editor-accordion.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings-actions.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings-actions.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" - }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" }, { "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-multiline.tsx" } ] }, { - "id": "./packages/perseus-editor/src/components/coordinate-pair-input.tsx", - "name": "./packages/perseus-editor/src/components/coordinate-pair-input.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" - }, + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-stroke-select.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-stroke-select.tsx", + "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" - }, + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings-actions.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-figure-settings-actions.tsx", + "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-circle.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-multiline.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-point.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-label-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-quadratic.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-line.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-angle.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/start-coords/start-coords-sinusoid.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-examples.ts", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-examples.ts", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" } ] }, @@ -9223,26 +9217,38 @@ ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-switch.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-switch.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-swatch.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/line-swatch.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-line-settings.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-vector-settings.tsx" + } + ] + }, + { + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-examples.ts", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-examples.ts", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-function-settings.tsx" } ] }, { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-row.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-row.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-switch.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-switch.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-point-settings.tsx" }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-polygon-settings.tsx" } ] }, @@ -9256,20 +9262,14 @@ ] }, { - "id": "./packages/perseus-editor/src/components/angle-input.tsx", - "name": "./packages/perseus-editor/src/components/angle-input.tsx", + "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-row.tsx", + "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/labeled-row.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" - } - ] - }, - { - "id": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.tsx", - "name": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/ellipse-swatch.tsx", - "reasons": [ + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.tsx" + }, { - "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/locked-figures/locked-ellipse-settings.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/interactive-graph-editor/interactive-graph-editor.tsx" } ] }, @@ -9297,6 +9297,24 @@ } ] }, + { + "id": "./packages/perseus-editor/src/components/form-wrapped-text-field.tsx", + "name": "./packages/perseus-editor/src/components/form-wrapped-text-field.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus-editor/src/widgets/label-image-editor.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx" + }, + { + "moduleName": "./packages/perseus-editor/src/widgets/label-image/marker.tsx" + } + ] + }, { "id": "./packages/perseus-editor/src/util/points.ts", "name": "./packages/perseus-editor/src/util/points.ts", @@ -9364,20 +9382,11 @@ ] }, { - "id": "./packages/perseus-editor/src/components/form-wrapped-text-field.tsx", - "name": "./packages/perseus-editor/src/components/form-wrapped-text-field.tsx", + "id": "./packages/perseus-editor/src/components/checkbox.tsx", + "name": "./packages/perseus-editor/src/components/checkbox.tsx", "reasons": [ { - "moduleName": "./packages/perseus-editor/src/widgets/label-image-editor.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/select-image.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/answer-choices.tsx" - }, - { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/marker.tsx" + "moduleName": "./packages/perseus-editor/src/widgets/label-image/behavior.tsx" } ] }, @@ -9399,15 +9408,6 @@ } ] }, - { - "id": "./packages/perseus-editor/src/components/checkbox.tsx", - "name": "./packages/perseus-editor/src/components/checkbox.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus-editor/src/widgets/label-image/behavior.tsx" - } - ] - }, { "id": "./packages/perseus/src/util/debounce.ts", "name": "./packages/perseus/src/util/debounce.ts", @@ -9475,113 +9475,113 @@ ] }, { - "id": "./packages/math-input/src/components/tabbar/index.ts", - "name": "./packages/math-input/src/components/tabbar/index.ts", + "id": "./packages/perseus/src/widgets/radio/choice-a11y-text.ts", + "name": "./packages/perseus/src/widgets/radio/choice-a11y-text.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" } ] }, { - "id": "./packages/math-input/src/components/keypad/keypad-pages/extras-page.tsx", - "name": "./packages/math-input/src/components/keypad/keypad-pages/extras-page.tsx", + "id": "./packages/perseus/src/widgets/numeric-input/numeric-input-validator.ts", + "name": "./packages/perseus/src/widgets/numeric-input/numeric-input-validator.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" + "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" } ] }, { - "id": "./packages/math-input/src/components/keypad/keypad-pages/fractions-page.tsx", - "name": "./packages/math-input/src/components/keypad/keypad-pages/fractions-page.tsx", + "id": "./packages/math-input/src/fake-react-native-web/index.ts", + "name": "./packages/math-input/src/fake-react-native-web/index.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" + "moduleName": "./packages/math-input/src/components/input/math-input.tsx" + }, + { + "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx" } ] }, { - "id": "./packages/math-input/src/components/keypad/shared-keys.tsx", - "name": "./packages/math-input/src/components/keypad/shared-keys.tsx", + "id": "./packages/math-input/src/components/input/cursor-handle.tsx", + "name": "./packages/math-input/src/components/input/cursor-handle.tsx", "reasons": [ { - "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" + "moduleName": "./packages/math-input/src/components/input/math-input.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/numeric-input/numeric-input-validator.ts", - "name": "./packages/perseus/src/widgets/numeric-input/numeric-input-validator.ts", + "id": "./packages/math-input/src/components/input/drag-listener.ts", + "name": "./packages/math-input/src/components/input/drag-listener.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/numeric-input/numeric-input.tsx" + "moduleName": "./packages/math-input/src/components/input/math-input.tsx" } ] }, { - "id": "./packages/perseus/src/widgets/radio/choice-a11y-text.ts", - "name": "./packages/perseus/src/widgets/radio/choice-a11y-text.ts", + "id": "./packages/math-input/src/components/input/math-wrapper.ts", + "name": "./packages/math-input/src/components/input/math-wrapper.ts", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/choice.tsx" + "moduleName": "./packages/math-input/src/components/input/math-input.tsx" } ] }, { - "id": "./packages/math-input/src/fake-react-native-web/index.ts", - "name": "./packages/math-input/src/fake-react-native-web/index.ts", + "id": "./packages/math-input/src/components/input/scroll-into-view.ts", + "name": "./packages/math-input/src/components/input/scroll-into-view.ts", "reasons": [ { "moduleName": "./packages/math-input/src/components/input/math-input.tsx" - }, - { - "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx" } ] }, { - "id": "./packages/math-input/src/components/input/cursor-handle.tsx", - "name": "./packages/math-input/src/components/input/cursor-handle.tsx", + "id": "./packages/perseus/src/util/scroll-utils.ts", + "name": "./packages/perseus/src/util/scroll-utils.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/input/math-input.tsx" + "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" } ] }, { - "id": "./packages/math-input/src/components/input/drag-listener.ts", - "name": "./packages/math-input/src/components/input/drag-listener.ts", + "id": "./packages/math-input/src/components/tabbar/index.ts", + "name": "./packages/math-input/src/components/tabbar/index.ts", "reasons": [ { - "moduleName": "./packages/math-input/src/components/input/math-input.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" } ] }, { - "id": "./packages/math-input/src/components/input/math-wrapper.ts", - "name": "./packages/math-input/src/components/input/math-wrapper.ts", + "id": "./packages/math-input/src/components/keypad/keypad-pages/extras-page.tsx", + "name": "./packages/math-input/src/components/keypad/keypad-pages/extras-page.tsx", "reasons": [ { - "moduleName": "./packages/math-input/src/components/input/math-input.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" } ] }, { - "id": "./packages/math-input/src/components/input/scroll-into-view.ts", - "name": "./packages/math-input/src/components/input/scroll-into-view.ts", + "id": "./packages/math-input/src/components/keypad/keypad-pages/fractions-page.tsx", + "name": "./packages/math-input/src/components/keypad/keypad-pages/fractions-page.tsx", "reasons": [ { - "moduleName": "./packages/math-input/src/components/input/math-input.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" } ] }, { - "id": "./packages/perseus/src/util/scroll-utils.ts", - "name": "./packages/perseus/src/util/scroll-utils.ts", + "id": "./packages/math-input/src/components/keypad/shared-keys.tsx", + "name": "./packages/math-input/src/components/keypad/shared-keys.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/radio/base-radio.tsx" + "moduleName": "./packages/math-input/src/components/keypad/keypad.tsx" } ] }, @@ -9615,15 +9615,6 @@ } ] }, - { - "id": "./packages/math-input/src/components/aphrodite-css-transition-group/index.tsx", - "name": "./packages/math-input/src/components/aphrodite-css-transition-group/index.tsx", - "reasons": [ - { - "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx" - } - ] - }, { "id": "./packages/perseus/src/widgets/input-number/input-number-validator.ts", "name": "./packages/perseus/src/widgets/input-number/input-number-validator.ts", @@ -9642,6 +9633,15 @@ } ] }, + { + "id": "./packages/math-input/src/components/aphrodite-css-transition-group/index.tsx", + "name": "./packages/math-input/src/components/aphrodite-css-transition-group/index.tsx", + "reasons": [ + { + "moduleName": "./packages/math-input/src/components/keypad/mobile-keypad-internals.tsx" + } + ] + }, { "id": "./packages/perseus/src/util/mobile-native-utils.ts", "name": "./packages/perseus/src/util/mobile-native-utils.ts", @@ -9735,15 +9735,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-label.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-label.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graph-locked-labels-layer.tsx" - } - ] - }, { "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.tsx", "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.tsx", @@ -9759,6 +9750,15 @@ } ] }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-label.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-label.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graph-locked-labels-layer.tsx" + } + ] + }, { "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts", "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/use-transform.ts", @@ -9769,18 +9769,18 @@ { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/backgrounds/axis-ticks.tsx" }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" - }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/protractor.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-label.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.tsx" }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-label.tsx" + }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/locked-figures/locked-line.tsx" }, @@ -9927,30 +9927,6 @@ } ] }, - { - "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx", - "reasons": [ - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/quadratic.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/sinusoid.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" - } - ] - }, { "id": "./packages/perseus/src/util/svg.ts", "name": "./packages/perseus/src/util/svg.ts", @@ -9993,6 +9969,30 @@ } ] }, + { + "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx", + "reasons": [ + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/point.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/quadratic.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/polygon.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/circle.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/sinusoid.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" + } + ] + }, { "id": "./packages/perseus/src/components/highlighting/ranges.ts", "name": "./packages/perseus/src/components/highlighting/ranges.ts", @@ -10085,10 +10085,10 @@ "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/linear.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/ray.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/linear-system.tsx" }, { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/linear-system.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/ray.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" @@ -10108,11 +10108,14 @@ ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point-view.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point-view.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/svg-line.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/svg-line.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" + }, + { + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/vector.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" @@ -10120,14 +10123,11 @@ ] }, { - "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/svg-line.tsx", - "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/svg-line.tsx", + "id": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point-view.tsx", + "name": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point-view.tsx", "reasons": [ { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/angle.tsx" - }, - { - "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/vector.tsx" + "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-point.tsx" }, { "moduleName": "./packages/perseus/src/widgets/interactive-graphs/graphs/components/movable-line.tsx" diff --git a/project.json b/project.json index 6d80c6cc75..0f8659c018 100644 --- a/project.json +++ b/project.json @@ -1 +1 @@ -{"generatedAt":1727367788386,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"monorepo":"Workspaces","packageManager":{"type":"yarn","version":"1.22.22"},"typescriptOptions":{"reactDocgen":"react-docgen"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","storybookVersion":"7.6.17","storybookVersionSpecifier":"^7.6.17","language":"typescript","storybookPackages":{"@storybook/addon-actions":{"version":"7.6.17"},"@storybook/addon-controls":{"version":"7.6.17"},"@storybook/addon-viewport":{"version":"7.6.17"},"@storybook/react":{"version":"7.6.17"},"@storybook/react-vite":{"version":"7.6.17"},"eslint-plugin-storybook":{"version":"0.8.0"},"storybook":{"version":"7.6.17"}},"addons":{"@storybook/addon-links":{"version":"7.6.17"},"@storybook/addon-essentials":{"version":"7.6.17"},"@storybook/addon-a11y":{"version":"7.6.17"}}} +{"generatedAt":1727368469885,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"monorepo":"Workspaces","packageManager":{"type":"yarn","version":"1.22.22"},"typescriptOptions":{"reactDocgen":"react-docgen"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","storybookVersion":"7.6.17","storybookVersionSpecifier":"^7.6.17","language":"typescript","storybookPackages":{"@storybook/addon-actions":{"version":"7.6.17"},"@storybook/addon-controls":{"version":"7.6.17"},"@storybook/addon-viewport":{"version":"7.6.17"},"@storybook/react":{"version":"7.6.17"},"@storybook/react-vite":{"version":"7.6.17"},"eslint-plugin-storybook":{"version":"0.8.0"},"storybook":{"version":"7.6.17"}},"addons":{"@storybook/addon-links":{"version":"7.6.17"},"@storybook/addon-essentials":{"version":"7.6.17"},"@storybook/addon-a11y":{"version":"7.6.17"}}}