@khanacademy/math-input 22.2.6 → 22.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"strings.js","sources":["../../src/strings.ts"],"sourcesContent":["/**\n * The translated strings that are used to render the Math Input.\n */\nexport type MathInputStrings = {\n mathInputBox: string;\n fingerTap: string;\n before: ({obj}: {obj: string}) => string;\n after: ({obj}: {obj: string}) => string;\n \"beginning of\": ({obj}: {obj: string}) => string;\n \"end of\": ({obj}: {obj: string}) => string;\n Baseline: string;\n Superscript: string;\n selected: ({obj}: {obj: string}) => string;\n \"no answer\": string;\n \"nothing selected\": string;\n \"nothing to the right\": string;\n \"nothing to the left\": string;\n \"block is empty\": string;\n \"nothing above\": string;\n labelValue: ({label, value}: {label: string; value: string}) => string;\n plus: string;\n minus: string;\n negative: string;\n times: string;\n divide: string;\n decimal: string;\n percent: string;\n cdot: string;\n equalsSign: string;\n notEqualsSign: string;\n greaterThanSign: string;\n lessThanSign: string;\n greaterThanOrEqualToSign: string;\n lessThanOrEqualSign: string;\n fractionExpressionInNumerator: string;\n fractionExcludingExpression: string;\n customExponent: string;\n square: string;\n cube: string;\n squareRoot: string;\n cubeRoot: string;\n radicalWithCustomRoot: string;\n leftParenthesis: string;\n rightParenthesis: string;\n naturalLog: string;\n logBase10: string;\n logCustomBase: string;\n sine: string;\n sin: string;\n cosine: string;\n cos: string;\n tangent: string;\n tan: string;\n pi: string;\n theta: string;\n upArrow: string;\n rightArrow: string;\n downArrow: string;\n leftArrow: string;\n navOutOfParentheses: string;\n navOutOfExponent: string;\n navOutOfBase: string;\n navIntoNumerator: string;\n navOutOfNumeratorIntoDenominator: string;\n navOutOfDenominator: string;\n delete: string;\n dismiss: string;\n};\n\n/**\n * Untranslated strings used in the math input. To be used by an external\n * translator to produce translated strings, passed in as `MathInputStrings`.\n */\nexport const strings: {\n [key in keyof MathInputStrings]:\n | string\n | {context?: string; message: string}\n | {context?: string; one: string; other: string};\n} = {\n mathInputBox: \"Math input box\",\n fingerTap: \"Tap with one or two fingers to open keyboard\",\n before: \"before %(obj)s\",\n after: \"after %(obj)s\",\n \"beginning of\": \"beginning of %(obj)s\",\n \"end of\": \"end of %(obj)s\",\n Baseline: \"Baseline\",\n Superscript: \"Superscript\",\n selected: \"%(obj)s selected\",\n \"no answer\": \"no answer\",\n \"nothing selected\": \"nothing selected\",\n \"nothing to the right\": \"nothing to the right\",\n \"nothing to the left\": \"nothing to the left\",\n \"block is empty\": \"block is empty\",\n \"nothing above\": \"nothing above\",\n labelValue: \"%(label)s: %(value)s\",\n plus: {\n context: \"A label for a 'plus' sign.\",\n message: \"Plus\",\n },\n minus: {context: \"A label for a 'minus' sign.\", message: \"Minus\"},\n negative: {context: \"A label for a 'negative' sign.\", message: \"Negative\"},\n times: {context: \"A label for a 'multiply' sign.\", message: \"Multiply\"},\n divide: {context: \"A label for a 'divide' sign.\", message: \"Divide\"},\n decimal: {\n context: \"A label for a 'decimal' sign (represented as '.' or ',').\",\n message: \"Decimal\",\n },\n percent: {\n context: \"A label for a 'percent' sign (represented as '%').\",\n message: \"Percent\",\n },\n cdot: {\n context:\n \"A label for a 'centered dot' multiplication sign (represented as '⋅').\",\n message: \"Multiply\",\n },\n equalsSign: {\n context: \"A label for an 'equals' sign (represented as '=').\",\n message: \"Equals sign\",\n },\n notEqualsSign: {\n context: \"A label for a 'not-equals' sign (represented as '≠').\",\n message: \"Not-equals sign\",\n },\n greaterThanSign: {\n context: \"A label for a 'greater than' sign (represented as '>').\",\n message: \"Greater than sign\",\n },\n lessThanSign: {\n context: \"A label for a 'less than' sign (represented as '<').\",\n message: \"Less than sign\",\n },\n greaterThanOrEqualToSign: {\n context:\n \"A label for a 'greater than or equal to' sign (represented as '≥').\",\n message: \"Greater than or equal to sign\",\n },\n lessThanOrEqualSign: {\n context:\n \"A label for a 'less than or equal to' sign (represented as '≤').\",\n message: \"Less than or equal to sign\",\n },\n fractionExpressionInNumerator: {\n context:\n \"A label for a button that creates a new fraction and puts the current expression in the numerator of that fraction.\",\n message: \"Fraction, with current expression in numerator\",\n },\n fractionExcludingExpression: {\n context:\n \"A label for a button that creates a new fraction next to the cursor.\",\n message: \"Fraction, excluding the current expression\",\n },\n customExponent: {\n context:\n \"A label for a button that will allow the user to input a custom exponent.\",\n message: \"Custom exponent\",\n },\n square: {\n context:\n \"A label for a button that will square (take to the second power) some math.\",\n message: \"Square\",\n },\n cube: {\n context:\n \"A label for a button that will cube (take to the third power) some math.\",\n message: \"Cube\",\n },\n squareRoot: {\n context:\n \"A label for a button that will allow the user to input a square root.\",\n message: \"Square root\",\n },\n cubeRoot: {\n context:\n \"A label for a button that will allow the user to input a cube root.\",\n message: \"Cube root\",\n },\n radicalWithCustomRoot: {\n context:\n \"A label for a button that will allow the user to input a radical with a custom root.\",\n message: \"Radical with custom root\",\n },\n leftParenthesis: {\n context:\n \"A label for a button that will allow the user to input a left parenthesis (i.e. '(')\",\n message: \"Left parenthesis\",\n },\n rightParenthesis: {\n context:\n \"A label for a button that will allow the user to input a right parenthesis (i.e. ')')\",\n message: \"Right parenthesis\",\n },\n naturalLog: {\n context:\n \"A label for a button that will allow the user to input a natural logarithm.\",\n message: \"Natural logarithm\",\n },\n logBase10: {\n context:\n \"A label for a button that will allow the user to input a logarithm with base 10.\",\n message: \"Logarithm with base 10\",\n },\n logCustomBase: {\n context:\n \"A label for a button that will allow the user to input a logarithm with a custom base.\",\n message: \"Logarithm with custom base\",\n },\n sine: {\n context:\n \"A label for a button that will allow the user to input a sine function.\",\n message: \"Sine\",\n },\n sin: {\n context:\n \"A label for a button that will allow the user to input a sine function (shorthand version).\",\n message: \"sin\",\n },\n cosine: {\n context:\n \"A label for a button that will allow the user to input a cosine function.\",\n message: \"Cosine\",\n },\n cos: {\n context:\n \"A label for a button that will allow the user to input a cosine function (shorthand version).\",\n message: \"cos\",\n },\n tangent: {\n context:\n \"A label for a button that will allow the user to input a tangent function.\",\n message: \"Tangent\",\n },\n tan: {\n context:\n \"A label for a button that will allow the user to input a tangent function (shorthand version).\",\n message: \"tan\",\n },\n pi: {\n context:\n \"A label for a button that will allow the user to input the mathematical constant pi (i.e., π)\",\n message: \"Pi\",\n },\n theta: {\n context:\n \"A label for a button that will allow the user to input the mathematical constant theta (i.e., θ)\",\n message: \"Theta\",\n },\n upArrow: \"Up arrow\",\n rightArrow: \"Right arrow\",\n downArrow: \"Down arrow\",\n leftArrow: \"Left arrow\",\n navOutOfParentheses: \"Navigate right out of a set of parentheses\",\n navOutOfExponent: \"Navigate right out of an exponent\",\n navOutOfBase: \"Navigate right out of a base\",\n navIntoNumerator: \"Navigate right into the numerator of a fraction\",\n navOutOfNumeratorIntoDenominator:\n \"Navigate right out of the numerator and into the denominator\",\n navOutOfDenominator: \"Navigate right out of the denominator of a fraction\",\n delete: \"Delete\",\n dismiss: {\n context: \"A label for a button that will dismiss/hide a keypad.\",\n message: \"Dismiss\",\n },\n};\n\n/**\n * Mock strings for the Math Input package, to be used for tests and Storybook.\n */\nexport const mockStrings: MathInputStrings = {\n mathInputBox: \"Math input box\",\n fingerTap: \"Tap with one or two fingers to open keyboard\",\n before: ({obj}: {obj: string}) => `before ${obj}`,\n after: ({obj}: {obj: string}) => `after ${obj}`,\n \"beginning of\": ({obj}: {obj: string}) => `beginning of ${obj}`,\n \"end of\": ({obj}: {obj: string}) => `end of ${obj}`,\n Baseline: \"Baseline\",\n Superscript: \"Superscript\",\n selected: ({obj}: {obj: string}) => `${obj} selected`,\n \"no answer\": \"no answer\",\n \"nothing selected\": \"nothing selected\",\n \"nothing to the right\": \"nothing to the right\",\n \"nothing to the left\": \"nothing to the left\",\n \"block is empty\": \"block is empty\",\n \"nothing above\": \"nothing above\",\n labelValue: ({label, value}: {label: string; value: string}) =>\n `${label}: ${value}`,\n plus: \"Plus\",\n minus: \"Minus\",\n negative: \"Negative\",\n times: \"Multiply\",\n divide: \"Divide\",\n decimal: \"Decimal\",\n percent: \"Percent\",\n cdot: \"Multiply\",\n equalsSign: \"Equals sign\",\n notEqualsSign: \"Not-equals sign\",\n greaterThanSign: \"Greater than sign\",\n lessThanSign: \"Less than sign\",\n greaterThanOrEqualToSign: \"Greater than or equal to sign\",\n lessThanOrEqualSign: \"Less than or equal to sign\",\n fractionExpressionInNumerator:\n \"Fraction, with current expression in numerator\",\n fractionExcludingExpression: \"Fraction, excluding the current expression\",\n customExponent: \"Custom exponent\",\n square: \"Square\",\n cube: \"Cube\",\n squareRoot: \"Square root\",\n cubeRoot: \"Cube root\",\n radicalWithCustomRoot: \"Radical with custom root\",\n leftParenthesis: \"Left parenthesis\",\n rightParenthesis: \"Right parenthesis\",\n naturalLog: \"Natural logarithm\",\n logBase10: \"Logarithm with base 10\",\n logCustomBase: \"Logarithm with custom base\",\n sine: \"Sine\",\n sin: \"sin\",\n cosine: \"Cosine\",\n cos: \"cos\",\n tangent: \"Tangent\",\n tan: \"tan\",\n pi: \"Pi\",\n theta: \"Theta\",\n upArrow: \"Up arrow\",\n rightArrow: \"Right arrow\",\n downArrow: \"Down arrow\",\n leftArrow: \"Left arrow\",\n navOutOfParentheses: \"Navigate right out of a set of parentheses\",\n navOutOfExponent: \"Navigate right out of an exponent\",\n navOutOfBase: \"Navigate right out of a base\",\n navIntoNumerator: \"Navigate right into the numerator of a fraction\",\n navOutOfNumeratorIntoDenominator:\n \"Navigate right out of the numerator and into the denominator\",\n navOutOfDenominator: \"Navigate right out of the denominator of a fraction\",\n delete: \"Delete\",\n dismiss: \"Dismiss\",\n};\n"],"names":["strings","mathInputBox","fingerTap","before","after","Baseline","Superscript","selected","labelValue","plus","context","message","minus","negative","times","divide","decimal","percent","cdot","equalsSign","notEqualsSign","greaterThanSign","lessThanSign","greaterThanOrEqualToSign","lessThanOrEqualSign","fractionExpressionInNumerator","fractionExcludingExpression","customExponent","square","cube","squareRoot","cubeRoot","radicalWithCustomRoot","leftParenthesis","rightParenthesis","naturalLog","logBase10","logCustomBase","sine","sin","cosine","cos","tangent","tan","pi","theta","upArrow","rightArrow","downArrow","leftArrow","navOutOfParentheses","navOutOfExponent","navOutOfBase","navIntoNumerator","navOutOfNumeratorIntoDenominator","navOutOfDenominator","delete","dismiss","mockStrings","obj","beginning of","end of","label","value"],"mappings":"AAAA;AACA;AACA;;AAmEA;AACA;AACA;AACA;AACO,MAAMA,OAKZ,GAAG;AACAC,EAAAA,YAAY,EAAE,gBAAgB;AAC9BC,EAAAA,SAAS,EAAE,8CAA8C;AACzDC,EAAAA,MAAM,EAAE,gBAAgB;AACxBC,EAAAA,KAAK,EAAE,eAAe;AACtB,EAAA,cAAc,EAAE,sBAAsB;AACtC,EAAA,QAAQ,EAAE,gBAAgB;AAC1BC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,QAAQ,EAAE,kBAAkB;AAC5B,EAAA,WAAW,EAAE,WAAW;AACxB,EAAA,kBAAkB,EAAE,kBAAkB;AACtC,EAAA,sBAAsB,EAAE,sBAAsB;AAC9C,EAAA,qBAAqB,EAAE,qBAAqB;AAC5C,EAAA,gBAAgB,EAAE,gBAAgB;AAClC,EAAA,eAAe,EAAE,eAAe;AAChCC,EAAAA,UAAU,EAAE,sBAAsB;AAClCC,EAAAA,IAAI,EAAE;AACFC,IAAAA,OAAO,EAAE,4BAA4B;AACrCC,IAAAA,OAAO,EAAE,MAAA;GACZ;AACDC,EAAAA,KAAK,EAAE;AAACF,IAAAA,OAAO,EAAE,6BAA6B;AAAEC,IAAAA,OAAO,EAAE,OAAA;GAAQ;AACjEE,EAAAA,QAAQ,EAAE;AAACH,IAAAA,OAAO,EAAE,gCAAgC;AAAEC,IAAAA,OAAO,EAAE,UAAA;GAAW;AAC1EG,EAAAA,KAAK,EAAE;AAACJ,IAAAA,OAAO,EAAE,gCAAgC;AAAEC,IAAAA,OAAO,EAAE,UAAA;GAAW;AACvEI,EAAAA,MAAM,EAAE;AAACL,IAAAA,OAAO,EAAE,8BAA8B;AAAEC,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,MAAM,EAAE,QAAQ;AAChBC,EAAAA,OAAO,EAAE,SAAA;AACb;;;;"}
1
+ {"version":3,"file":"strings.js","sources":["../../src/strings.ts"],"sourcesContent":["/**\n * The translated strings that are used to render the Math Input.\n */\nexport type MathInputStrings = {\n mathInputBox: string;\n fingerTap: string;\n before: ({obj}: {obj: string}) => string;\n after: ({obj}: {obj: string}) => string;\n \"beginning of\": ({obj}: {obj: string}) => string;\n \"end of\": ({obj}: {obj: string}) => string;\n Baseline: string;\n Superscript: string;\n selected: ({obj}: {obj: string}) => string;\n \"no answer\": string;\n \"nothing selected\": string;\n \"nothing to the right\": string;\n \"nothing to the left\": string;\n \"block is empty\": string;\n \"nothing above\": string;\n labelValue: ({label, value}: {label: string; value: string}) => string;\n plus: string;\n minus: string;\n negative: string;\n times: string;\n divide: string;\n decimal: string;\n percent: string;\n cdot: string;\n equalsSign: string;\n notEqualsSign: string;\n greaterThanSign: string;\n lessThanSign: string;\n greaterThanOrEqualToSign: string;\n lessThanOrEqualSign: string;\n fractionExpressionInNumerator: string;\n fractionExcludingExpression: string;\n customExponent: string;\n square: string;\n cube: string;\n squareRoot: string;\n cubeRoot: string;\n radicalWithCustomRoot: string;\n leftParenthesis: string;\n rightParenthesis: string;\n naturalLog: string;\n logBase10: string;\n logCustomBase: string;\n sine: string;\n sin: string;\n cosine: string;\n cos: string;\n tangent: string;\n tan: string;\n pi: string;\n theta: string;\n upArrow: string;\n rightArrow: string;\n downArrow: string;\n leftArrow: string;\n navOutOfParentheses: string;\n navOutOfExponent: string;\n navOutOfBase: string;\n navIntoNumerator: string;\n navOutOfNumeratorIntoDenominator: string;\n navOutOfDenominator: string;\n delete: string;\n dismiss: string;\n};\n\n/**\n * Untranslated strings used in the math input. To be used by an external\n * translator to produce translated strings, passed in as `MathInputStrings`.\n */\nexport const strings: {\n [key in keyof MathInputStrings]:\n | string\n | {context?: string; message: string}\n | {context?: string; one: string; other: string};\n} = {\n mathInputBox: \"Math input box\",\n fingerTap: \"Tap with one or two fingers to open keyboard\",\n before: \"before %(obj)s\",\n after: \"after %(obj)s\",\n \"beginning of\": \"beginning of %(obj)s\",\n \"end of\": \"end of %(obj)s\",\n Baseline: \"Baseline\",\n Superscript: \"Superscript\",\n selected: \"%(obj)s selected\",\n \"no answer\": \"no answer\",\n \"nothing selected\": \"nothing selected\",\n \"nothing to the right\": \"nothing to the right\",\n \"nothing to the left\": \"nothing to the left\",\n \"block is empty\": \"block is empty\",\n \"nothing above\": \"nothing above\",\n labelValue: \"%(label)s: %(value)s\",\n plus: {\n context: \"A label for a 'plus' sign.\",\n message: \"Plus\",\n },\n minus: {context: \"A label for a 'minus' sign.\", message: \"Minus\"},\n negative: {context: \"A label for a 'negative' sign.\", message: \"Negative\"},\n times: {context: \"A label for a 'multiply' sign.\", message: \"Multiply\"},\n divide: {context: \"A label for a 'divide' sign.\", message: \"Divide\"},\n decimal: {\n context: \"A label for a 'decimal' sign (represented as '.' or ',').\",\n message: \"Decimal\",\n },\n percent: {\n context: \"A label for a 'percent' sign (represented as '%').\",\n message: \"Percent\",\n },\n cdot: {\n context:\n \"A label for a 'centered dot' multiplication sign (represented as '⋅').\",\n message: \"Multiply\",\n },\n equalsSign: {\n context: \"A label for an 'equals' sign (represented as '=').\",\n message: \"Equals sign\",\n },\n notEqualsSign: {\n context: \"A label for a 'not-equals' sign (represented as '≠').\",\n message: \"Not-equals sign\",\n },\n greaterThanSign: {\n context: \"A label for a 'greater than' sign (represented as '>').\",\n message: \"Greater than sign\",\n },\n lessThanSign: {\n context: \"A label for a 'less than' sign (represented as '<').\",\n message: \"Less than sign\",\n },\n greaterThanOrEqualToSign: {\n context:\n \"A label for a 'greater than or equal to' sign (represented as '≥').\",\n message: \"Greater than or equal to sign\",\n },\n lessThanOrEqualSign: {\n context:\n \"A label for a 'less than or equal to' sign (represented as '≤').\",\n message: \"Less than or equal to sign\",\n },\n fractionExpressionInNumerator: {\n context:\n \"A label for a button that creates a new fraction and puts the current expression in the numerator of that fraction.\",\n message: \"Fraction, with current expression in numerator\",\n },\n fractionExcludingExpression: {\n context:\n \"A label for a button that creates a new fraction next to the cursor.\",\n message: \"Fraction, excluding the current expression\",\n },\n customExponent: {\n context:\n \"A label for a button that will allow the user to input a custom exponent.\",\n message: \"Custom exponent\",\n },\n square: {\n context:\n \"A label for a button that will square (take to the second power) some math.\",\n message: \"Square\",\n },\n cube: {\n context:\n \"A label for a button that will cube (take to the third power) some math.\",\n message: \"Cube\",\n },\n squareRoot: {\n context:\n \"A label for a button that will allow the user to input a square root.\",\n message: \"Square root\",\n },\n cubeRoot: {\n context:\n \"A label for a button that will allow the user to input a cube root.\",\n message: \"Cube root\",\n },\n radicalWithCustomRoot: {\n context:\n \"A label for a button that will allow the user to input a radical with a custom root.\",\n message: \"Radical with custom root\",\n },\n leftParenthesis: {\n context:\n \"A label for a button that will allow the user to input a left parenthesis (i.e. '(')\",\n message: \"Left parenthesis\",\n },\n rightParenthesis: {\n context:\n \"A label for a button that will allow the user to input a right parenthesis (i.e. ')')\",\n message: \"Right parenthesis\",\n },\n naturalLog: {\n context:\n \"A label for a button that will allow the user to input a natural logarithm.\",\n message: \"Natural logarithm\",\n },\n logBase10: {\n context:\n \"A label for a button that will allow the user to input a logarithm with base 10.\",\n message: \"Logarithm with base 10\",\n },\n logCustomBase: {\n context:\n \"A label for a button that will allow the user to input a logarithm with a custom base.\",\n message: \"Logarithm with custom base\",\n },\n sine: {\n context:\n \"A label for a button that will allow the user to input a sine function.\",\n message: \"Sine\",\n },\n sin: {\n context:\n \"A label for a button that will allow the user to input a sine function (shorthand version).\",\n message: \"sin\",\n },\n cosine: {\n context:\n \"A label for a button that will allow the user to input a cosine function.\",\n message: \"Cosine\",\n },\n cos: {\n context:\n \"A label for a button that will allow the user to input a cosine function (shorthand version).\",\n message: \"cos\",\n },\n tangent: {\n context:\n \"A label for a button that will allow the user to input a tangent function.\",\n message: \"Tangent\",\n },\n tan: {\n context:\n \"A label for a button that will allow the user to input a tangent function (shorthand version).\",\n message: \"tan\",\n },\n pi: {\n context:\n \"A label for a button that will allow the user to input the mathematical constant pi (i.e., π)\",\n message: \"Pi\",\n },\n theta: {\n context:\n \"A label for a button that will allow the user to input the mathematical constant theta (i.e., θ)\",\n message: \"Theta\",\n },\n upArrow: \"Up arrow\",\n rightArrow: \"Right arrow\",\n downArrow: \"Down arrow\",\n leftArrow: \"Left arrow\",\n navOutOfParentheses: \"Navigate right out of a set of parentheses\",\n navOutOfExponent: \"Navigate right out of an exponent\",\n navOutOfBase: \"Navigate right out of a base\",\n navIntoNumerator: \"Navigate right into the numerator of a fraction\",\n navOutOfNumeratorIntoDenominator:\n \"Navigate right out of the numerator and into the denominator\",\n navOutOfDenominator: \"Navigate right out of the denominator of a fraction\",\n delete: \"Delete\",\n dismiss: {\n context: \"A label for a button that will dismiss/hide a keypad.\",\n message: \"Dismiss\",\n },\n};\n\n/**\n * Mock strings for the Math Input package, to be used for tests and Storybook.\n */\nexport const mockStrings: MathInputStrings = {\n mathInputBox: \"Math input box\",\n fingerTap: \"Tap with one or two fingers to open keyboard\",\n before: ({obj}: {obj: string}) => `before ${obj}`,\n after: ({obj}: {obj: string}) => `after ${obj}`,\n \"beginning of\": ({obj}: {obj: string}) => `beginning of ${obj}`,\n \"end of\": ({obj}: {obj: string}) => `end of ${obj}`,\n Baseline: \"Baseline\",\n Superscript: \"Superscript\",\n selected: ({obj}: {obj: string}) => `${obj} selected`,\n \"no answer\": \"no answer\",\n \"nothing selected\": \"nothing selected\",\n \"nothing to the right\": \"nothing to the right\",\n \"nothing to the left\": \"nothing to the left\",\n \"block is empty\": \"block is empty\",\n \"nothing above\": \"nothing above\",\n labelValue: ({label, value}: {label: string; value: string}) =>\n `${label}: ${value}`,\n plus: \"Plus\",\n minus: \"Minus\",\n negative: \"Negative\",\n times: \"Multiply\",\n divide: \"Divide\",\n decimal: \"Decimal\",\n percent: \"Percent\",\n cdot: \"Multiply\",\n equalsSign: \"Equals sign\",\n notEqualsSign: \"Not-equals sign\",\n greaterThanSign: \"Greater than sign\",\n lessThanSign: \"Less than sign\",\n greaterThanOrEqualToSign: \"Greater than or equal to sign\",\n lessThanOrEqualSign: \"Less than or equal to sign\",\n fractionExpressionInNumerator:\n \"Fraction, with current expression in numerator\",\n fractionExcludingExpression: \"Fraction, excluding the current expression\",\n customExponent: \"Custom exponent\",\n square: \"Square\",\n cube: \"Cube\",\n squareRoot: \"Square root\",\n cubeRoot: \"Cube root\",\n radicalWithCustomRoot: \"Radical with custom root\",\n leftParenthesis: \"Left parenthesis\",\n rightParenthesis: \"Right parenthesis\",\n naturalLog: \"Natural logarithm\",\n logBase10: \"Logarithm with base 10\",\n logCustomBase: \"Logarithm with custom base\",\n sine: \"Sine\",\n sin: \"sin\",\n cosine: \"Cosine\",\n cos: \"cos\",\n tangent: \"Tangent\",\n tan: \"tan\",\n pi: \"Pi\",\n theta: \"Theta\",\n upArrow: \"Up arrow\",\n rightArrow: \"Right arrow\",\n downArrow: \"Down arrow\",\n leftArrow: \"Left arrow\",\n navOutOfParentheses: \"Navigate right out of a set of parentheses\",\n navOutOfExponent: \"Navigate right out of an exponent\",\n navOutOfBase: \"Navigate right out of a base\",\n navIntoNumerator: \"Navigate right into the numerator of a fraction\",\n navOutOfNumeratorIntoDenominator:\n \"Navigate right out of the numerator and into the denominator\",\n navOutOfDenominator: \"Navigate right out of the denominator of a fraction\",\n delete: \"Delete\",\n dismiss: \"Dismiss\",\n};\n"],"names":["strings","mathInputBox","fingerTap","before","after","Baseline","Superscript","selected","labelValue","plus","context","message","minus","negative","times","divide","decimal","percent","cdot","equalsSign","notEqualsSign","greaterThanSign","lessThanSign","greaterThanOrEqualToSign","lessThanOrEqualSign","fractionExpressionInNumerator","fractionExcludingExpression","customExponent","square","cube","squareRoot","cubeRoot","radicalWithCustomRoot","leftParenthesis","rightParenthesis","naturalLog","logBase10","logCustomBase","sine","sin","cosine","cos","tangent","tan","pi","theta","upArrow","rightArrow","downArrow","leftArrow","navOutOfParentheses","navOutOfExponent","navOutOfBase","navIntoNumerator","navOutOfNumeratorIntoDenominator","navOutOfDenominator","delete","dismiss","mockStrings","obj","beginning of","end of","label","value"],"mappings":"AAAA;AACA;AACA;;AAmEA;AACA;AACA;AACA;AACO,MAAMA,OAKZ,GAAG;AACAC,EAAAA,YAAY,EAAE,gBAAgB;AAC9BC,EAAAA,SAAS,EAAE,8CAA8C;AACzDC,EAAAA,MAAM,EAAE,gBAAgB;AACxBC,EAAAA,KAAK,EAAE,eAAe;AACtB,EAAA,cAAc,EAAE,sBAAsB;AACtC,EAAA,QAAQ,EAAE,gBAAgB;AAC1BC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,QAAQ,EAAE,kBAAkB;AAC5B,EAAA,WAAW,EAAE,WAAW;AACxB,EAAA,kBAAkB,EAAE,kBAAkB;AACtC,EAAA,sBAAsB,EAAE,sBAAsB;AAC9C,EAAA,qBAAqB,EAAE,qBAAqB;AAC5C,EAAA,gBAAgB,EAAE,gBAAgB;AAClC,EAAA,eAAe,EAAE,eAAe;AAChCC,EAAAA,UAAU,EAAE,sBAAsB;AAClCC,EAAAA,IAAI,EAAE;AACFC,IAAAA,OAAO,EAAE,4BAA4B;AACrCC,IAAAA,OAAO,EAAE,MAAA;GACZ;AACDC,EAAAA,KAAK,EAAE;AAACF,IAAAA,OAAO,EAAE,6BAA6B;AAAEC,IAAAA,OAAO,EAAE,OAAA;GAAQ;AACjEE,EAAAA,QAAQ,EAAE;AAACH,IAAAA,OAAO,EAAE,gCAAgC;AAAEC,IAAAA,OAAO,EAAE,UAAA;GAAW;AAC1EG,EAAAA,KAAK,EAAE;AAACJ,IAAAA,OAAO,EAAE,gCAAgC;AAAEC,IAAAA,OAAO,EAAE,UAAA;GAAW;AACvEI,EAAAA,MAAM,EAAE;AAACL,IAAAA,OAAO,EAAE,8BAA8B;AAAEC,IAAAA,OAAO,EAAE,QAAA;GAAS;AACpEK,EAAAA,OAAO,EAAE;AACL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;;;"}
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var perseusCore = require('@khanacademy/perseus-core');
5
+ var _extends = require('@babel/runtime/helpers/extends');
6
6
  var keypadContext = require('@khanacademy/keypad-context');
7
7
  var wonderBlocksTokens = require('@khanacademy/wonder-blocks-tokens');
8
8
  var wonderStuffCore = require('@khanacademy/wonder-stuff-core');
@@ -11,6 +11,7 @@ var React = require('react');
11
11
  var ReactDOM = require('react-dom');
12
12
  var mathjaxRenderer = require('@khanacademy/mathjax-renderer');
13
13
  var MathQuill = require('mathquill');
14
+ var perseusCore = require('@khanacademy/perseus-core');
14
15
  var wonderBlocksCore = require('@khanacademy/wonder-blocks-core');
15
16
  var Clickable = require('@khanacademy/wonder-blocks-clickable');
16
17
  var reactTransitionGroup = require('react-transition-group');
@@ -20,48 +21,75 @@ var PropTypes = require('prop-types');
20
21
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
21
22
 
22
23
  function _interopNamespace(e) {
23
- if (e && e.__esModule) return e;
24
- var n = Object.create(null);
25
- if (e) {
26
- Object.keys(e).forEach(function (k) {
27
- if (k !== 'default') {
28
- var d = Object.getOwnPropertyDescriptor(e, k);
29
- Object.defineProperty(n, k, d.get ? d : {
30
- enumerable: true,
31
- get: function () { return e[k]; }
24
+ if (e && e.__esModule) return e;
25
+ var n = Object.create(null);
26
+ if (e) {
27
+ Object.keys(e).forEach(function (k) {
28
+ if (k !== 'default') {
29
+ var d = Object.getOwnPropertyDescriptor(e, k);
30
+ Object.defineProperty(n, k, d.get ? d : {
31
+ enumerable: true,
32
+ get: function () { return e[k]; }
33
+ });
34
+ }
32
35
  });
33
- }
34
- });
35
- }
36
- n["default"] = e;
37
- return Object.freeze(n);
36
+ }
37
+ n["default"] = e;
38
+ return Object.freeze(n);
38
39
  }
39
40
 
41
+ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
40
42
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
41
43
  var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
42
44
  var MathQuill__default = /*#__PURE__*/_interopDefaultLegacy(MathQuill);
43
45
  var Clickable__default = /*#__PURE__*/_interopDefaultLegacy(Clickable);
44
46
  var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
45
47
 
46
- // This file is processed by a Rollup plugin (replace) to inject the production
47
- const libName = "@khanacademy/math-input";
48
- const libVersion = "22.2.6";
49
- perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
50
-
51
- function _extends() {
52
- _extends = Object.assign ? Object.assign.bind() : function (target) {
53
- for (var i = 1; i < arguments.length; i++) {
54
- var source = arguments[i];
55
- for (var key in source) {
56
- if (Object.prototype.hasOwnProperty.call(source, key)) {
57
- target[key] = source[key];
58
- }
48
+ /**
49
+ * Adds the given perseus library version information to the __perseus_debug__
50
+ * object and ensures that the object is attached to `globalThis` (`window` in
51
+ * browser environments).
52
+ *
53
+ * This allows each library to provide runtime version information to assist in
54
+ * debugging in production environments.
55
+ */
56
+ const addLibraryVersionToPerseusDebug = (libraryName, libraryVersion) => {
57
+ // If the library version is the default value, then we don't want to
58
+ // prefix it with a "v" to indicate that it is a version number.
59
+ let prefix = "v";
60
+ if (libraryVersion === "__lib_version__") {
61
+ prefix = "";
62
+ }
63
+ const formattedVersion = `${prefix}${libraryVersion}`;
64
+ if (typeof globalThis !== "undefined") {
65
+ globalThis.__perseus_debug__ = globalThis.__perseus_debug__ ?? {};
66
+ const existingVersionEntry = globalThis.__perseus_debug__[libraryName];
67
+ if (existingVersionEntry) {
68
+ // If we already have an entry and it doesn't match the registered
69
+ // version, we morph the entry into an array and log a warning.
70
+ if (existingVersionEntry !== formattedVersion) {
71
+ // Existing entry might be an array already (oops, at least 2
72
+ // versions of the library already loaded!).
73
+ const allVersions = Array.isArray(existingVersionEntry) ? existingVersionEntry : [existingVersionEntry];
74
+ allVersions.push(formattedVersion);
75
+ globalThis.__perseus_debug__[libraryName] = allVersions;
76
+
77
+ // eslint-disable-next-line no-console
78
+ console.warn(`Multiple versions of ${libraryName} loaded on this page: ${allVersions.sort().join(", ")}`);
59
79
  }
80
+ } else {
81
+ globalThis.__perseus_debug__[libraryName] = formattedVersion;
60
82
  }
61
- return target;
62
- };
63
- return _extends.apply(this, arguments);
64
- }
83
+ } else {
84
+ // eslint-disable-next-line no-console
85
+ console.warn(`globalThis not found found (${formattedVersion})`);
86
+ }
87
+ };
88
+
89
+ // This file is processed by a Rollup plugin (replace) to inject the production
90
+ const libName = "@khanacademy/math-input";
91
+ const libVersion = "22.3.0";
92
+ addLibraryVersionToPerseusDebug(libName, libVersion);
65
93
 
66
94
  class View extends React__namespace.Component {
67
95
  static styles = aphrodite.StyleSheet.create({
@@ -1248,7 +1276,6 @@ const getKeyTranslator = (locale, strings) => ({
1248
1276
  mathQuill.write("\\sqrt[3]{}");
1249
1277
  mathQuill.keystroke("Left"); // under the root
1250
1278
  },
1251
-
1252
1279
  FRAC_EXCLUSIVE: mathQuill => {
1253
1280
  const cursor = mathQuill.cursor();
1254
1281
  // If there's nothing to the left of the cursor, then we want to
@@ -1265,7 +1292,6 @@ const getKeyTranslator = (locale, strings) => ({
1265
1292
  mathQuill.keystroke("Left"); // out of parentheses
1266
1293
  mathQuill.keystroke("Left"); // into index
1267
1294
  },
1268
-
1269
1295
  // These need to be overwritten by the consumer
1270
1296
  // if they're going to be used
1271
1297
  DISMISS: () => {},
@@ -1777,6 +1803,10 @@ class MathInput extends React__namespace.Component {
1777
1803
  }
1778
1804
  });
1779
1805
  };
1806
+
1807
+ // [Jan 2025] Third: While testing, I've discovered that we likely don't
1808
+ // need to be passing setKeypadActive here at all. Removing the parameter
1809
+ // still results in the same behavior.
1780
1810
  focus = setKeypadActive => {
1781
1811
  // Pass this component's handleKey method to the keypad so it can call
1782
1812
  // it whenever it needs to trigger a keypress action.
@@ -2253,11 +2283,14 @@ class MathInput extends React__namespace.Component {
2253
2283
  // padding values for the vertical directions.
2254
2284
  const symbolaPaddingBottom = 3;
2255
2285
  const symbolaPaddingTop = 1;
2286
+ // We also add a little padding for the cursor to ensure there's no
2287
+ // overflow when the input is empty and set to right aligned.
2288
+ const cursorPadding = 2;
2256
2289
  const padding = {
2257
2290
  paddingTop: paddingInset - symbolaPaddingTop,
2258
- paddingRight: paddingInset,
2291
+ paddingRight: paddingInset + cursorPadding,
2259
2292
  paddingBottom: paddingInset - symbolaPaddingBottom,
2260
- paddingLeft: paddingInset
2293
+ paddingLeft: paddingInset + cursorPadding
2261
2294
  };
2262
2295
  return padding;
2263
2296
  };
@@ -2325,7 +2358,7 @@ class MathInput extends React__namespace.Component {
2325
2358
  this._mathContainer = ReactDOM__default["default"].findDOMNode(node);
2326
2359
  },
2327
2360
  style: innerStyle
2328
- })), showInputFocusStyle && handle.visible && /*#__PURE__*/React__namespace.createElement(CursorHandle, _extends({}, handle, {
2361
+ })), showInputFocusStyle && handle.visible && /*#__PURE__*/React__namespace.createElement(CursorHandle, _extends__default["default"]({}, handle, {
2329
2362
  onTouchStart: this.onCursorHandleTouchStart,
2330
2363
  onTouchMove: this.onCursorHandleTouchMove,
2331
2364
  onTouchEnd: this.onCursorHandleTouchEnd,
@@ -5966,7 +5999,7 @@ function MobileKeypad(props) {
5966
5999
  keypadActive,
5967
6000
  setKeypadActive
5968
6001
  } = _ref;
5969
- return /*#__PURE__*/React__namespace.createElement(MobileKeypadInternals, _extends({}, props, {
6002
+ return /*#__PURE__*/React__namespace.createElement(MobileKeypadInternals, _extends__default["default"]({}, props, {
5970
6003
  keypadActive: keypadActive,
5971
6004
  setKeypadActive: setKeypadActive
5972
6005
  }));