@khanacademy/math-input 22.2.6 → 23.0.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.
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Adds the given perseus library version information to the __perseus_debug__
3
+ * object and ensures that the object is attached to `globalThis` (`window` in
4
+ * browser environments).
5
+ *
6
+ * This allows each library to provide runtime version information to assist in
7
+ * debugging in production environments.
8
+ */
9
+ export declare const addLibraryVersionToPerseusDebug: (libraryName: string, libraryVersion: string) => void;
@@ -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","_ref","obj","_ref2","_ref3","_ref4","_ref5","_ref6","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,QAA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EAAAA,aAAa,EAAE,4BAA4B;AAC3CC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,OAAO,EAAE,UAAU;AACnBC,EAAAA,UAAU,EAAE,aAAa;AACzBC,EAAAA,SAAS,EAAE,YAAY;AACvBC,EAAAA,SAAS,EAAE,YAAY;AACvBC,EAAAA,mBAAmB,EAAE,4CAA4C;AACjEC,EAAAA,gBAAgB,EAAE,mCAAmC;AACrDC,EAAAA,YAAY,EAAE,8BAA8B;AAC5CC,EAAAA,gBAAgB,EAAE,iDAAiD;AACnEC,EAAAA,gCAAgC,EAC5B,8DAA8D;AAClEC,EAAAA,mBAAmB,EAAE,qDAAqD;AAC1EC,EAAAA,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","_ref","obj","_ref2","_ref3","_ref4","_ref5","_ref6","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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B,EAAE,4CAA4C;AACzEC,EAAAA,cAAc,EAAE,iBAAiB;AACjCC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,UAAU,EAAE,aAAa;AACzBC,EAAAA,QAAQ,EAAE,WAAW;AACrBC,EAAAA,qBAAqB,EAAE,0BAA0B;AACjDC,EAAAA,eAAe,EAAE,kBAAkB;AACnCC,EAAAA,gBAAgB,EAAE,mBAAmB;AACrCC,EAAAA,UAAU,EAAE,mBAAmB;AAC/BC,EAAAA,SAAS,EAAE,wBAAwB;AACnCC,EAAAA,aAAa,EAAE,4BAA4B;AAC3CC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,OAAO,EAAE,UAAU;AACnBC,EAAAA,UAAU,EAAE,aAAa;AACzBC,EAAAA,SAAS,EAAE,YAAY;AACvBC,EAAAA,SAAS,EAAE,YAAY;AACvBC,EAAAA,mBAAmB,EAAE,4CAA4C;AACjEC,EAAAA,gBAAgB,EAAE,mCAAmC;AACrDC,EAAAA,YAAY,EAAE,8BAA8B;AAC5CC,EAAAA,gBAAgB,EAAE,iDAAiD;AACnEC,EAAAA,gCAAgC,EAC5B,8DAA8D;AAClEC,EAAAA,mBAAmB,EAAE,qDAAqD;AAC1EC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,OAAO,EAAE,SAAA;AACb;;;;;"}
package/dist/types.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import type { CursorContext } from "./components/input/cursor-contexts";
2
- import type Key from "./data/keys";
3
- import type { KeyType, KeypadType } from "./enums";
4
- import type { KeypadContextRendererInterface } from "@khanacademy/perseus-core";
2
+ import type { KeyType } from "./enums";
3
+ import type { KeypadConfiguration, KeypadContextRendererInterface, KeypadKey } from "@khanacademy/perseus-core";
5
4
  import type * as React from "react";
6
5
  import type ReactDOM from "react-dom";
7
6
  export declare enum MathFieldActionType {
@@ -14,22 +13,16 @@ type IconConfig = {
14
13
  data: string;
15
14
  };
16
15
  export type KeyConfig = {
17
- id: Key;
16
+ id: KeypadKey;
18
17
  type: KeyType;
19
18
  icon: IconConfig;
20
19
  ariaLabel: string;
21
20
  };
22
- export type KeypadConfiguration = {
23
- keypadType: KeypadType;
24
- extraKeys?: ReadonlyArray<Key>;
25
- times?: boolean;
26
- scientific?: boolean;
27
- };
28
- export type KeyHandler = (key: Key) => Cursor;
21
+ export type KeyHandler = (key: KeypadKey) => Cursor;
29
22
  export type Cursor = {
30
23
  context: (typeof CursorContext)[keyof typeof CursorContext];
31
24
  };
32
- export type ClickKeyCallback = (key: Key, event?: React.SyntheticEvent) => void;
25
+ export type ClickKeyCallback = (key: KeypadKey, event?: React.SyntheticEvent) => void;
33
26
  export type KeypadPageType = "Geometry" | "Operators" | "Numbers" | "Fractions" | "Extras" | "Dismiss";
34
27
  export interface KeypadAPI {
35
28
  activate: () => void;
package/package.json CHANGED
@@ -1,83 +1,81 @@
1
1
  {
2
- "name": "@khanacademy/math-input",
3
- "description": "Khan Academy's new expression editor for the mobile web.",
4
- "author": "Khan Academy",
5
- "license": "MIT",
6
- "version": "22.2.6",
7
- "publishConfig": {
8
- "access": "public"
2
+ "name": "@khanacademy/math-input",
3
+ "description": "Khan Academy's new expression editor for the mobile web.",
4
+ "author": "Khan Academy",
5
+ "license": "MIT",
6
+ "version": "23.0.0",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/Khan/perseus.git",
13
+ "directory": "packages/math-input"
14
+ },
15
+ "bugs": {
16
+ "url": "https://github.com/Khan/perseus/issues"
17
+ },
18
+ "module": "dist/es/index.js",
19
+ "main": "dist/index.js",
20
+ "source": "src/index.ts",
21
+ "exports": {
22
+ ".": {
23
+ "import": "./dist/es/index.js",
24
+ "require": "./dist/index.js",
25
+ "types": "./dist/index.d.ts",
26
+ "source": "./src/index.ts"
9
27
  },
10
- "repository": {
11
- "type": "git",
12
- "url": "https://github.com/Khan/perseus.git",
13
- "directory": "packages/math-input"
28
+ "./strings": {
29
+ "import": "./dist/es/strings.js",
30
+ "require": "./dist/strings.js",
31
+ "types": "./dist/strings.d.ts",
32
+ "source": "./src/strings.ts"
14
33
  },
15
- "bugs": {
16
- "url": "https://github.com/Khan/perseus/issues"
17
- },
18
- "module": "dist/es/index.js",
19
- "main": "dist/index.js",
20
- "source": "src/index.ts",
21
- "exports": {
22
- ".": {
23
- "import": "./dist/es/index.js",
24
- "require": "./dist/index.js",
25
- "types": "./dist/index.d.ts",
26
- "source": "./src/index.ts"
27
- },
28
- "./strings": {
29
- "import": "./dist/es/strings.js",
30
- "require": "./dist/strings.js",
31
- "types": "./dist/strings.d.ts",
32
- "source": "./src/strings.ts"
33
- },
34
- "./styles.css": "./dist/index.css"
35
- },
36
- "files": [
37
- "dist"
38
- ],
39
- "scripts": {
40
- "prepublishOnly": "../../utils/package-pre-publish-check.sh"
41
- },
42
- "dependencies": {
43
- "@khanacademy/keypad-context": "^1.0.19",
44
- "@khanacademy/perseus-core": "3.7.0",
45
- "mathquill": "https://github.com/Khan/mathquill/releases/download/v1.0.0/mathquill-v1.0.0.tgz"
46
- },
47
- "devDependencies": {
48
- "@khanacademy/mathjax-renderer": "^2.1.1",
49
- "@khanacademy/wonder-blocks-clickable": "6.1.1",
50
- "@khanacademy/wonder-blocks-core": "12.1.1",
51
- "@khanacademy/wonder-blocks-popover": "5.1.1",
52
- "@khanacademy/wonder-blocks-timing": "7.0.1",
53
- "@khanacademy/wonder-blocks-tokens": "4.2.1",
54
- "@khanacademy/wonder-stuff-core": "1.5.4",
55
- "@phosphor-icons/core": "^2.0.2",
56
- "aphrodite": "^1.2.5",
57
- "jquery": "^2.1.1",
58
- "katex": "0.11.1",
59
- "perseus-build-settings": "^0.4.3",
60
- "prop-types": "15.6.1",
61
- "react": "^18.2.0",
62
- "react-dom": "^18.2.0",
63
- "react-transition-group": "^4.4.1"
64
- },
65
- "peerDependencies": {
66
- "@khanacademy/mathjax-renderer": "^2.1.1",
67
- "@khanacademy/wonder-blocks-clickable": "6.1.1",
68
- "@khanacademy/wonder-blocks-core": "12.1.1",
69
- "@khanacademy/wonder-blocks-popover": "5.1.1",
70
- "@khanacademy/wonder-blocks-timing": "7.0.1",
71
- "@khanacademy/wonder-blocks-tokens": "4.2.1",
72
- "@khanacademy/wonder-stuff-core": "1.5.4",
73
- "@phosphor-icons/core": "^2.0.2",
74
- "aphrodite": "^1.2.5",
75
- "jquery": "^2.1.1",
76
- "katex": "0.11.1",
77
- "prop-types": "15.6.1",
78
- "react": "^18.2.0",
79
- "react-dom": "^18.2.0",
80
- "react-transition-group": "^4.4.1"
81
- },
82
- "keywords": []
83
- }
34
+ "./styles.css": "./dist/index.css"
35
+ },
36
+ "files": [
37
+ "dist"
38
+ ],
39
+ "dependencies": {
40
+ "mathquill": "https://github.com/Khan/mathquill/releases/download/v1.0.0/mathquill-v1.0.0.tgz",
41
+ "@khanacademy/keypad-context": "1.1.1",
42
+ "@khanacademy/perseus-core": "5.0.0"
43
+ },
44
+ "devDependencies": {
45
+ "@khanacademy/mathjax-renderer": "^2.1.1",
46
+ "@khanacademy/wonder-blocks-clickable": "6.1.1",
47
+ "@khanacademy/wonder-blocks-core": "12.1.1",
48
+ "@khanacademy/wonder-blocks-popover": "5.1.1",
49
+ "@khanacademy/wonder-blocks-timing": "7.0.1",
50
+ "@khanacademy/wonder-blocks-tokens": "4.2.1",
51
+ "@khanacademy/wonder-stuff-core": "1.5.4",
52
+ "@phosphor-icons/core": "^2.0.2",
53
+ "aphrodite": "^1.2.5",
54
+ "jquery": "^2.1.1",
55
+ "katex": "0.11.1",
56
+ "prop-types": "15.6.1",
57
+ "react": "^18.2.0",
58
+ "react-dom": "^18.2.0",
59
+ "react-transition-group": "^4.4.1",
60
+ "perseus-build-settings": "0.5.0"
61
+ },
62
+ "peerDependencies": {
63
+ "@khanacademy/mathjax-renderer": "^2.1.1",
64
+ "@khanacademy/wonder-blocks-clickable": "6.1.1",
65
+ "@khanacademy/wonder-blocks-core": "12.1.1",
66
+ "@khanacademy/wonder-blocks-popover": "5.1.1",
67
+ "@khanacademy/wonder-blocks-timing": "7.0.1",
68
+ "@khanacademy/wonder-blocks-tokens": "4.2.1",
69
+ "@khanacademy/wonder-stuff-core": "1.5.4",
70
+ "@phosphor-icons/core": "^2.0.2",
71
+ "aphrodite": "^1.2.5",
72
+ "jquery": "^2.1.1",
73
+ "katex": "0.11.1",
74
+ "prop-types": "15.6.1",
75
+ "react": "^18.2.0",
76
+ "react-dom": "^18.2.0",
77
+ "react-transition-group": "^4.4.1"
78
+ },
79
+ "keywords": [],
80
+ "scripts": {}
81
+ }