@khanacademy/perseus-core
Advanced tools
Comparing version 0.0.0-PR862-20231207182234 to 0.0.0-PR875-20250221232857
@@ -1,2 +0,2 @@ | ||
export type VirtualKeypadVersion = "MATH_INPUT_KEYPAD_V2" | "REACT_NATIVE_KEYPAD"; | ||
type VirtualKeypadVersion = "MATH_INPUT_KEYPAD_V2" | "REACT_NATIVE_KEYPAD"; | ||
/** | ||
@@ -18,6 +18,32 @@ * A type union of all the events that any package in the Perseus ecosystem can | ||
payload: { | ||
widgetSubType: string; | ||
widgetType: string; | ||
widgetId: string; | ||
message: string; | ||
userAgent: string; | ||
}; | ||
} | { | ||
type: "perseus:widget-rendering-error:ti"; | ||
payload: { | ||
widgetSubType: string; | ||
widgetType: string; | ||
widgetId: string; | ||
message: string; | ||
userAgent: string; | ||
}; | ||
} | { | ||
type: "perseus:interactive-graph-widget:rendered"; | ||
payload: { | ||
type: string; | ||
widgetType: string; | ||
widgetId: string; | ||
}; | ||
} | { | ||
type: "perseus:widget:rendered:ti"; | ||
payload: { | ||
widgetSubType: string; | ||
widgetType: string; | ||
widgetId: string; | ||
}; | ||
} | { | ||
type: "perseus:label-image:toggle-answers-hidden"; | ||
@@ -32,2 +58,11 @@ payload: null; | ||
} | { | ||
type: "perseus:label-image:toggle-answers-hidden:ti"; | ||
payload: null; | ||
} | { | ||
type: "perseus:label-image:marker-interacted-with:ti"; | ||
payload: null; | ||
} | { | ||
type: "perseus:label-image:choiced-interacted-with:ti"; | ||
payload: null; | ||
} | { | ||
type: "math-input:keypad-closed"; | ||
@@ -45,1 +80,2 @@ payload: { | ||
export type AnalyticsEventHandlerFn = (event: PerseusAnalyticsEvent) => Promise<void>; | ||
export {}; |
export type { PerseusAnalyticsEvent, AnalyticsEventHandlerFn } from "./analytics"; | ||
export type { KEScore, KeypadContextRendererInterface, RendererInterface, } from "./types"; | ||
export { addLibraryVersionToPerseusDebug } from "./utils/add-library-version-to-perseus-debug"; | ||
export type { KEScore, KeypadContextRendererInterface, RendererInterface, MarkerType, InteractiveMarkerType, Relationship, Alignment, } from "./types"; | ||
export type { ErrorKind } from "./error/errors"; | ||
export type { FunctionTypeMappingKeys } from "./utils/grapher-util"; | ||
export type { Coords } from "./utils/grapher-types"; | ||
export { default as getMatrixSize } from "./utils/get-matrix-size"; | ||
export { default as getDecimalSeparator } from "./utils/get-decimal-separator"; | ||
export { approximateEqual, approximateDeepEqual } from "./utils/equality"; | ||
export { addWidget, getWidgetIdsFromContent, getWidgetIdsFromContentByType, } from "./utils/widget-id-utils"; | ||
export { default as deepClone } from "./utils/deep-clone"; | ||
export * as GrapherUtil from "./utils/grapher-util"; | ||
export { parsePerseusItem, parseAndMigratePerseusItem, parseAndMigratePerseusArticle, type ParseFailureDetail, } from "./parse-perseus-json"; | ||
export { isSuccess, isFailure, type Result, type Success, type Failure, } from "./parse-perseus-json/result"; | ||
export { libVersion } from "./version"; | ||
export { Errors } from "./error/errors"; | ||
export { PerseusError } from "./error/perseus-error"; | ||
export * from "./data-schema"; | ||
export { pluck, mapObject } from "./utils/objective_"; | ||
export { default as categorizerLogic } from "./widgets/categorizer"; | ||
export type { CategorizerDefaultWidgetOptions } from "./widgets/categorizer"; | ||
export { default as csProgramLogic } from "./widgets/cs-program"; | ||
export type { CSProgramDefaultWidgetOptions } from "./widgets/cs-program"; | ||
export { default as definitionLogic } from "./widgets/definition"; | ||
export type { DefinitionDefaultWidgetOptions } from "./widgets/definition"; | ||
export { default as dropdownLogic } from "./widgets/dropdown"; | ||
export type { DropdownDefaultWidgetOptions } from "./widgets/dropdown"; | ||
export { default as explanationLogic } from "./widgets/explanation"; | ||
export type { ExplanationDefaultWidgetOptions } from "./widgets/explanation"; | ||
export { default as expressionLogic } from "./widgets/expression"; | ||
export type { ExpressionDefaultWidgetOptions } from "./widgets/expression"; | ||
export { default as gradedGroupLogic } from "./widgets/graded-group"; | ||
export type { GradedGroupDefaultWidgetOptions } from "./widgets/graded-group"; | ||
export { default as gradedGroupSetLogic } from "./widgets/graded-group-set"; | ||
export type { GradedGroupSetDefaultWidgetOptions } from "./widgets/graded-group-set"; | ||
export { default as grapherLogic } from "./widgets/grapher"; | ||
export type { GrapherDefaultWidgetOptions } from "./widgets/grapher"; | ||
export { default as groupLogic } from "./widgets/group"; | ||
export type { GroupDefaultWidgetOptions } from "./widgets/group"; | ||
export { default as iframeLogic } from "./widgets/iframe"; | ||
export type { IFrameDefaultWidgetOptions } from "./widgets/iframe"; | ||
export { default as imageLogic } from "./widgets/image"; | ||
export type { ImageDefaultWidgetOptions } from "./widgets/image"; | ||
export { default as inputNumberLogic } from "./widgets/input-number"; | ||
export type { InputNumberDefaultWidgetOptions } from "./widgets/input-number"; | ||
export { default as interactionLogic } from "./widgets/interaction"; | ||
export type { InteractionDefaultWidgetOptions } from "./widgets/interaction"; | ||
export { default as interactiveGraphLogic } from "./widgets/interactive-graph"; | ||
export type { InteractiveGraphDefaultWidgetOptions } from "./widgets/interactive-graph"; | ||
export { default as labelImageLogic } from "./widgets/label-image"; | ||
export type { LabelImageDefaultWidgetOptions } from "./widgets/label-image"; | ||
export { default as matcherLogic } from "./widgets/matcher"; | ||
export type { MatcherDefaultWidgetOptions } from "./widgets/matcher"; | ||
export { default as matrixLogic } from "./widgets/matrix"; | ||
export type { MatrixDefaultWidgetOptions } from "./widgets/matrix"; | ||
export { default as measurerLogic } from "./widgets/measurer"; | ||
export type { MeasurerDefaultWidgetOptions } from "./widgets/measurer"; | ||
export { default as numberLineLogic } from "./widgets/number-line"; | ||
export type { NumberLineDefaultWidgetOptions } from "./widgets/number-line"; | ||
export { default as numericInputLogic } from "./widgets/numeric-input"; | ||
export type { NumericInputDefaultWidgetOptions } from "./widgets/numeric-input"; | ||
export { default as ordererLogic } from "./widgets/orderer"; | ||
export type { OrdererDefaultWidgetOptions } from "./widgets/orderer"; | ||
export { default as passageLogic } from "./widgets/passage"; | ||
export type { PassageDefaultWidgetOptions } from "./widgets/passage"; | ||
export { default as passageRefLogic } from "./widgets/passage-ref"; | ||
export type { PassageRefDefaultWidgetOptions } from "./widgets/passage-ref"; | ||
export { default as passageRefTargetLogic } from "./widgets/passage-ref-target"; | ||
export type { PassageRefTargetDefaultWidgetOptions } from "./widgets/passage-ref-target"; | ||
export { default as phetSimulationLogic } from "./widgets/phet-simulation"; | ||
export type { PhetSimulationDefaultWidgetOptions } from "./widgets/phet-simulation"; | ||
export { default as plotterLogic } from "./widgets/plotter"; | ||
export type { PlotterDefaultWidgetOptions } from "./widgets/plotter"; | ||
export { default as pythonProgramLogic } from "./widgets/python-program"; | ||
export type { PythonProgramDefaultWidgetOptions } from "./widgets/python-program"; | ||
export { default as radioLogic } from "./widgets/radio"; | ||
export type { RadioDefaultWidgetOptions } from "./widgets/radio"; | ||
export { default as sorterLogic } from "./widgets/sorter"; | ||
export type { SorterDefaultWidgetOptions } from "./widgets/sorter"; | ||
export { default as tableLogic } from "./widgets/table"; | ||
export type { TableDefaultWidgetOptions } from "./widgets/table"; | ||
export { default as videoLogic } from "./widgets/video"; | ||
export type { VideoDefaultWidgetOptions } from "./widgets/video"; | ||
export { getUpgradedWidgetOptions, upgradeWidgetInfoToLatestVersion, } from "./widgets/upgrade"; | ||
export { default as splitPerseusItem } from "./utils/split-perseus-item"; | ||
export type * from "./widgets/logic-export.types"; | ||
export * as CoreWidgetRegistry from "./widgets/core-widget-registry"; | ||
export { default as getOrdererPublicWidgetOptions } from "./widgets/orderer/orderer-util"; | ||
export { default as getCategorizerPublicWidgetOptions } from "./widgets/categorizer/categorizer-util"; | ||
export { default as getCSProgramPublicWidgetOptions } from "./widgets/cs-program/cs-program-util"; | ||
export { default as getExpressionPublicWidgetOptions } from "./widgets/expression/expression-util"; | ||
export { default as getGrapherPublicWidgetOptions } from "./widgets/grapher/grapher-util"; | ||
export { default as getInteractiveGraphPublicWidgetOptions, type InteractiveGraphPublicWidgetOptions, } from "./widgets/interactive-graph/interactive-graph-util"; | ||
export { default as getLabelImagePublicWidgetOptions } from "./widgets/label-image/label-image-util"; | ||
export { default as getSorterPublicWidgetOptions } from "./widgets/sorter/sorter-util"; | ||
export { default as getDropdownPublicWidgetOptions } from "./widgets/dropdown/dropdown-util"; | ||
export type { DropdownPublicWidgetOptions } from "./widgets/dropdown/dropdown-util"; | ||
export { default as getNumericInputPublicWidgetOptions } from "./widgets/numeric-input/numeric-input-util"; | ||
export { default as getNumberLinePublicWidgetOptions } from "./widgets/number-line/number-line-util"; | ||
export { default as getRadioPublicWidgetOptions } from "./widgets/radio/radio-util"; | ||
export { default as getTablePublicWidgetOptions } from "./widgets/table/table-util"; | ||
export { default as getIFramePublicWidgetOptions } from "./widgets/iframe/iframe-util"; | ||
export { default as getMatrixPublicWidgetOptions } from "./widgets/matrix/matrix-util"; | ||
export { default as getPlotterPublicWidgetOptions } from "./widgets/plotter/plotter-util"; | ||
export { default as getMatcherPublicWidgetOptions, shuffleMatcher, } from "./widgets/matcher/matcher-util"; | ||
export { shuffle, seededRNG, random } from "./utils/random-util"; |
@@ -8,3 +8,2 @@ export interface KeypadContextRendererInterface { | ||
restoreSerializedState(state: State, callback?: () => void): void; | ||
scoreInput(): KEScore; | ||
blur(): void; | ||
@@ -22,2 +21,15 @@ focus(): boolean | null | undefined; | ||
}; | ||
export type MarkerType = { | ||
answers: ReadonlyArray<string>; | ||
label: string; | ||
x: number; | ||
y: number; | ||
}; | ||
export type InteractiveMarkerType = MarkerType & { | ||
selected?: ReadonlyArray<string>; | ||
showCorrectness?: "correct" | "incorrect"; | ||
focused?: boolean; | ||
}; | ||
export type Relationship = "lt" | "gt" | "le" | "ge"; | ||
export type Alignment = "default" | "block" | "inline-block" | "inline" | "float-left" | "float-right" | "full-width"; | ||
export {}; |
{ | ||
"name": "@khanacademy/perseus-core", | ||
"description": "Shared Perseus infrastructure", | ||
"author": "Khan Academy", | ||
"license": "MIT", | ||
"version": "0.0.0-PR862-20231207182234", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Khan/perseus.git", | ||
"directory": "packages/perseus-core" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/Khan/perseus/issues" | ||
}, | ||
"module": "dist/es/index.js", | ||
"main": "dist/index.js", | ||
"source": "src/index.ts", | ||
"scripts": { | ||
"test": "bash -c 'yarn --silent --cwd \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": {}, | ||
"peerDependencies": {}, | ||
"keywords": [] | ||
} | ||
"name": "@khanacademy/perseus-core", | ||
"description": "Shared Perseus infrastructure", | ||
"author": "Khan Academy", | ||
"license": "MIT", | ||
"version": "0.0.0-PR875-20250221232857", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Khan/perseus.git", | ||
"directory": "packages/perseus-core" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/Khan/perseus/issues" | ||
}, | ||
"module": "dist/es/index.js", | ||
"main": "dist/index.js", | ||
"source": "src/index.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@khanacademy/wonder-stuff-core": "1.5.4", | ||
"underscore": "^1.4.4" | ||
}, | ||
"peerDependencies": { | ||
"@khanacademy/wonder-stuff-core": "1.5.4", | ||
"underscore": "^1.4.4" | ||
}, | ||
"keywords": [], | ||
"scripts": {} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
1154335
42204
161
9649
2
2
2
1