@mathwiz/ui-components 0.1.29 → 0.1.31
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.
- package/README.md +1 -1
- package/dist/components/AICopilot/AICopilot.css +237 -0
- package/dist/components/AICopilot/AICopilot.d.ts +10 -0
- package/dist/components/AICopilot/AICopilot.d.ts.map +1 -0
- package/dist/components/AICopilot/components/ChatContainer.d.ts +9 -0
- package/dist/components/AICopilot/components/ChatContainer.d.ts.map +1 -0
- package/dist/components/AICopilot/components/ChatInput.d.ts +9 -0
- package/dist/components/AICopilot/components/ChatInput.d.ts.map +1 -0
- package/dist/components/AICopilot/components/ChatMessage.d.ts +9 -0
- package/dist/components/AICopilot/components/ChatMessage.d.ts.map +1 -0
- package/dist/components/AICopilot/components/CollapsibleContextBar.d.ts +9 -0
- package/dist/components/AICopilot/components/CollapsibleContextBar.d.ts.map +1 -0
- package/dist/components/AICopilot/components/QuickActions.d.ts +9 -0
- package/dist/components/AICopilot/components/QuickActions.d.ts.map +1 -0
- package/dist/components/AICopilot/components/StreamMessage.d.ts +9 -0
- package/dist/components/AICopilot/components/StreamMessage.d.ts.map +1 -0
- package/dist/components/AICopilot/index.d.ts +12 -0
- package/dist/components/AICopilot/index.d.ts.map +1 -0
- package/dist/components/AICopilot/store.d.ts +30 -0
- package/dist/components/AICopilot/store.d.ts.map +1 -0
- package/dist/components/AICopilot/types.d.ts +219 -0
- package/dist/components/AICopilot/types.d.ts.map +1 -0
- package/dist/components/HundredChart/HundredChart.css +8 -0
- package/dist/components/HundredChart/HundredChart.d.ts.map +1 -1
- package/dist/components/HundredChart/HundredChart.types.d.ts +29 -0
- package/dist/components/HundredChart/HundredChart.types.d.ts.map +1 -1
- package/dist/components/HundredChart/HundredChart.utils.d.ts +13 -1
- package/dist/components/HundredChart/HundredChart.utils.d.ts.map +1 -1
- package/dist/components/HundredChart/index.d.ts +2 -2
- package/dist/components/HundredChart/index.d.ts.map +1 -1
- package/dist/components/MathCardV2/DecimalNumberRecognitionSessionStore.d.ts +2 -2
- package/dist/components/MathCardV2/DecimalNumberRecognitionSessionStore.d.ts.map +1 -1
- package/dist/components/MathCardV2/ExplanationStep.d.ts +9 -0
- package/dist/components/MathCardV2/ExplanationStep.d.ts.map +1 -1
- package/dist/components/MathCardV2/MathCardV2.css +11 -4
- package/dist/components/MathCardV2/MathCardV2.d.ts.map +1 -1
- package/dist/components/MathCardV2/MathCardV2.types.d.ts +70 -1
- package/dist/components/MathCardV2/MathCardV2.types.d.ts.map +1 -1
- package/dist/components/MathCardV2/MathPracticeSessionStore.d.ts +3 -3
- package/dist/components/MathCardV2/MathPracticeSessionStore.d.ts.map +1 -1
- package/dist/components/MathCardV2/MathPracticeSessionTypes.d.ts +38 -18
- package/dist/components/MathCardV2/MathPracticeSessionTypes.d.ts.map +1 -1
- package/dist/components/MathCardV2/MathPracticeStoreContext.d.ts +3 -9
- package/dist/components/MathCardV2/MathPracticeStoreContext.d.ts.map +1 -1
- package/dist/components/MathCardV2/MathPracticeStoreHooks.d.ts +3 -2
- package/dist/components/MathCardV2/MathPracticeStoreHooks.d.ts.map +1 -1
- package/dist/components/MathCardV2/components/content/MathContainerContent.d.ts +16 -0
- package/dist/components/MathCardV2/components/content/MathContainerContent.d.ts.map +1 -0
- package/dist/components/MathCardV2/components/content/OptionGroupContent.d.ts +10 -0
- package/dist/components/MathCardV2/components/content/OptionGroupContent.d.ts.map +1 -0
- package/dist/components/MathCardV2/components/renderers/ContentRenderer.d.ts.map +1 -1
- package/dist/components/MathCardV2/hooks/useDataAdapter.d.ts.map +1 -1
- package/dist/components/MathCardV2/hooks/useMeetingProblemAdapter.d.ts.map +1 -1
- package/dist/components/MathCardV2/modules/ReviewModule/ReviewModule.d.ts.map +1 -1
- package/dist/components/MathCardV2/scenes/ExplanationScene/ExplanationScene.d.ts.map +1 -1
- package/dist/components/MathCardV2/scenes/QuestionScene/QuestionScene.css +18 -18
- package/dist/components/MathCardV2/scenes/QuestionScene/QuestionScene.d.ts.map +1 -1
- package/dist/components/MathCell/MathCell.d.ts +35 -0
- package/dist/components/MathCell/MathCell.d.ts.map +1 -0
- package/dist/components/MathCell/MathCell.styles.d.ts +149 -0
- package/dist/components/MathCell/MathCell.styles.d.ts.map +1 -0
- package/dist/components/MathCell/MathCell.types.d.ts +76 -0
- package/dist/components/MathCell/MathCell.types.d.ts.map +1 -0
- package/dist/components/MathCell/index.d.ts +11 -0
- package/dist/components/MathCell/index.d.ts.map +1 -0
- package/dist/components/MathContainer/FactorTable/FactorTable.d.ts +17 -0
- package/dist/components/MathContainer/FactorTable/FactorTable.d.ts.map +1 -0
- package/dist/components/MathContainer/FactorTable/FactorTable.types.d.ts +55 -0
- package/dist/components/MathContainer/FactorTable/FactorTable.types.d.ts.map +1 -0
- package/dist/components/MathContainer/FactorTable/FactorTableView.d.ts +28 -0
- package/dist/components/MathContainer/FactorTable/FactorTableView.d.ts.map +1 -0
- package/dist/components/MathContainer/FactorTable/index.d.ts +7 -0
- package/dist/components/MathContainer/FactorTable/index.d.ts.map +1 -0
- package/dist/components/MathContainer/LongDivision/LongDivision.d.ts +12 -0
- package/dist/components/MathContainer/LongDivision/LongDivision.d.ts.map +1 -0
- package/dist/components/MathContainer/LongDivision/LongDivision.layout.d.ts +81 -0
- package/dist/components/MathContainer/LongDivision/LongDivision.layout.d.ts.map +1 -0
- package/dist/components/MathContainer/LongDivision/LongDivision.types.d.ts +37 -0
- package/dist/components/MathContainer/LongDivision/LongDivision.types.d.ts.map +1 -0
- package/dist/components/MathContainer/LongDivision/LongDivisionView.d.ts +37 -0
- package/dist/components/MathContainer/LongDivision/LongDivisionView.d.ts.map +1 -0
- package/dist/components/MathContainer/LongDivision/index.d.ts +7 -0
- package/dist/components/MathContainer/LongDivision/index.d.ts.map +1 -0
- package/dist/components/MathContainer/MathContainer.types.d.ts +151 -0
- package/dist/components/MathContainer/MathContainer.types.d.ts.map +1 -0
- package/dist/components/MathContainer/ShortDivision/ShortDivision.d.ts +15 -0
- package/dist/components/MathContainer/ShortDivision/ShortDivision.d.ts.map +1 -0
- package/dist/components/MathContainer/ShortDivision/ShortDivision.types.d.ts +67 -0
- package/dist/components/MathContainer/ShortDivision/ShortDivision.types.d.ts.map +1 -0
- package/dist/components/MathContainer/ShortDivision/ShortDivisionView.d.ts +16 -0
- package/dist/components/MathContainer/ShortDivision/ShortDivisionView.d.ts.map +1 -0
- package/dist/components/MathContainer/ShortDivision/index.d.ts +8 -0
- package/dist/components/MathContainer/ShortDivision/index.d.ts.map +1 -0
- package/dist/components/MathContainer/VerticalMultiplication/VerticalMultiplication.d.ts +16 -0
- package/dist/components/MathContainer/VerticalMultiplication/VerticalMultiplication.d.ts.map +1 -0
- package/dist/components/MathContainer/VerticalMultiplication/VerticalMultiplication.types.d.ts +42 -0
- package/dist/components/MathContainer/VerticalMultiplication/VerticalMultiplication.types.d.ts.map +1 -0
- package/dist/components/MathContainer/VerticalMultiplication/VerticalMultiplicationView.d.ts +22 -0
- package/dist/components/MathContainer/VerticalMultiplication/VerticalMultiplicationView.d.ts.map +1 -0
- package/dist/components/MathContainer/VerticalMultiplication/VerticalMultiplicationView.utils.d.ts +19 -0
- package/dist/components/MathContainer/VerticalMultiplication/VerticalMultiplicationView.utils.d.ts.map +1 -0
- package/dist/components/MathContainer/VerticalMultiplication/index.d.ts +9 -0
- package/dist/components/MathContainer/VerticalMultiplication/index.d.ts.map +1 -0
- package/dist/components/MathContainer/hooks/index.d.ts +15 -0
- package/dist/components/MathContainer/hooks/index.d.ts.map +1 -0
- package/dist/components/MathContainer/hooks/useFactorTable.d.ts +39 -0
- package/dist/components/MathContainer/hooks/useFactorTable.d.ts.map +1 -0
- package/dist/components/MathContainer/hooks/useLongDivision.d.ts +51 -0
- package/dist/components/MathContainer/hooks/useLongDivision.d.ts.map +1 -0
- package/dist/components/MathContainer/hooks/useLongDivision.utils.d.ts +15 -0
- package/dist/components/MathContainer/hooks/useLongDivision.utils.d.ts.map +1 -0
- package/dist/components/MathContainer/hooks/useShortDivision.d.ts +41 -0
- package/dist/components/MathContainer/hooks/useShortDivision.d.ts.map +1 -0
- package/dist/components/MathContainer/hooks/useVerticalMultiplication.d.ts +28 -0
- package/dist/components/MathContainer/hooks/useVerticalMultiplication.d.ts.map +1 -0
- package/dist/components/MathContainer/hooks/useVerticalMultiplication.utils.d.ts +30 -0
- package/dist/components/MathContainer/hooks/useVerticalMultiplication.utils.d.ts.map +1 -0
- package/dist/components/MathContainer/index.d.ts +17 -0
- package/dist/components/MathContainer/index.d.ts.map +1 -0
- package/dist/components/OptionGroup/OptionCard.d.ts +11 -0
- package/dist/components/OptionGroup/OptionCard.d.ts.map +1 -0
- package/dist/components/OptionGroup/OptionCard.styles.d.ts +87 -0
- package/dist/components/OptionGroup/OptionCard.styles.d.ts.map +1 -0
- package/dist/components/OptionGroup/OptionGroup.d.ts +11 -0
- package/dist/components/OptionGroup/OptionGroup.d.ts.map +1 -0
- package/dist/components/OptionGroup/OptionGroup.types.d.ts +71 -0
- package/dist/components/OptionGroup/OptionGroup.types.d.ts.map +1 -0
- package/dist/components/OptionGroup/index.d.ts +5 -0
- package/dist/components/OptionGroup/index.d.ts.map +1 -0
- package/dist/components/StatBlock/StatBlock.css +330 -330
- package/dist/components/dashboard/atoms/Badge/Badge.d.ts +32 -0
- package/dist/components/dashboard/atoms/Badge/Badge.d.ts.map +1 -0
- package/dist/components/dashboard/atoms/Badge/index.d.ts +4 -0
- package/dist/components/dashboard/atoms/Badge/index.d.ts.map +1 -0
- package/dist/data/GeometryProblemAdapterV4/geometry-types.d.ts +119 -4
- package/dist/data/GeometryProblemAdapterV4/geometry-types.d.ts.map +1 -1
- package/dist/data/GeometryProblemAdapterV4/jsondata/parallelogram-revised.json +721 -721
- package/dist/data/GeometryProblemAdapterV4/jsondata/right-triangle-v4.json +594 -594
- package/dist/data/GeometryProblemAdapterV4/jsondata/trapezoid-v4-final.json +469 -469
- package/dist/data/GeometryProblemAdapterV4/jsondata/triangle-v4-final.json +1 -1
- package/dist/data/GeometryProblemAdapterV4/types.d.ts +2 -0
- package/dist/data/GeometryProblemAdapterV4/types.d.ts.map +1 -1
- package/dist/data/TriangleAdapterV3/config/embeddedConfigs.d.ts +96 -18
- package/dist/data/TriangleAdapterV3/config/embeddedConfigs.d.ts.map +1 -1
- package/dist/data/TriangleAdapterV3/config/index.d.ts +64 -12
- package/dist/data/TriangleAdapterV3/config/index.d.ts.map +1 -1
- package/dist/data/TriangleAdapterV3/core/syncAdapter.d.ts +5 -0
- package/dist/data/TriangleAdapterV3/core/syncAdapter.d.ts.map +1 -1
- package/dist/data/TriangleAdapterV3/transformers/hundredChartTransformer.d.ts +58 -0
- package/dist/data/TriangleAdapterV3/transformers/hundredChartTransformer.d.ts.map +1 -0
- package/dist/data/TriangleAdapterV3/transformers/index.d.ts +2 -0
- package/dist/data/TriangleAdapterV3/transformers/index.d.ts.map +1 -1
- package/dist/data/TriangleAdapterV3/transformers/optionGroupTransformer.d.ts +29 -0
- package/dist/data/TriangleAdapterV3/transformers/optionGroupTransformer.d.ts.map +1 -0
- package/dist/data/TriangleAdapterV3/types.d.ts +3 -0
- package/dist/data/TriangleAdapterV3/types.d.ts.map +1 -1
- package/dist/data/config/style-presets.json +27 -3
- package/dist/data/dataSchema/OpenAPI/openapi.json +5777 -5777
- package/dist/data/problems/factorProblemV4-backup.json +427 -0
- package/dist/data/problems/factorProblemV4.json +462 -0
- package/dist/data/problems/factorProblemV4_backup_20260311.json +436 -0
- package/dist/index.cjs +131 -100
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +17 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +15093 -7136
- package/dist/index.mjs.map +1 -1
- package/dist/mathwiz-ui.css +1 -1
- package/dist/pages/AreaGeometrySessionPage/AreaGeometrySessionPageIXL.css +385 -0
- package/dist/pages/AreaGeometrySessionPage/AreaGeometrySessionPageIXL.d.ts +29 -0
- package/dist/pages/AreaGeometrySessionPage/AreaGeometrySessionPageIXL.d.ts.map +1 -0
- package/dist/pages/AreaGeometrySessionPage/components/LearningDashboardPlaceholder.css +219 -0
- package/dist/pages/AreaGeometrySessionPage/components/LearningDashboardPlaceholder.d.ts +15 -0
- package/dist/pages/AreaGeometrySessionPage/components/LearningDashboardPlaceholder.d.ts.map +1 -0
- package/dist/pages/AreaGeometrySessionPage/components/ReviewSectionPlaceholder.css +64 -0
- package/dist/pages/AreaGeometrySessionPage/components/ReviewSectionPlaceholder.d.ts +11 -0
- package/dist/pages/AreaGeometrySessionPage/components/ReviewSectionPlaceholder.d.ts.map +1 -0
- package/dist/pages/AreaGeometrySessionPage/components/ScaffoldingPlaceholder.css +59 -0
- package/dist/pages/AreaGeometrySessionPage/components/ScaffoldingPlaceholder.d.ts +14 -0
- package/dist/pages/AreaGeometrySessionPage/components/ScaffoldingPlaceholder.d.ts.map +1 -0
- package/dist/pages/AreaGeometrySessionPage/index.d.ts +3 -1
- package/dist/pages/AreaGeometrySessionPage/index.d.ts.map +1 -1
- package/dist/pages/AreaGeometrySessionPage/types.d.ts +25 -0
- package/dist/pages/AreaGeometrySessionPage/types.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/mathcard-tokens.css +47 -5
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/components/MathCardV2/components/renderers/ContentRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/components/MathCardV2/components/renderers/ContentRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,KAAK,EAAE,oBAAoB,EAAyJ,MAAM,wBAAwB,CAAC;AAE1N,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA6I1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDataAdapter.d.ts","sourceRoot":"","sources":["../../../../src/components/MathCardV2/hooks/useDataAdapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEhF;;;GAGG;AACH,eAAO,MAAM,cAAc,GACzB,MAAM,mBAAmB,EACzB,OAAO,eAAe;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useDataAdapter.d.ts","sourceRoot":"","sources":["../../../../src/components/MathCardV2/hooks/useDataAdapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEhF;;;GAGG;AACH,eAAO,MAAM,cAAc,GACzB,MAAM,mBAAmB,EACzB,OAAO,eAAe;;;;;;;;;;uCAY80F,CAAC;eAAkB,CAAC;cAA+B,CAAC;gBAA+B,CAAC;;CAAz7F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMeetingProblemAdapter.d.ts","sourceRoot":"","sources":["../../../../src/components/MathCardV2/hooks/useMeetingProblemAdapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACjG,OAAO,KAAK,EAAuB,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE9F;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GACnC,MAAM,sBAAsB,EAC5B,QAAO,eAA4B,EACnC,cAAc,MAAM;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useMeetingProblemAdapter.d.ts","sourceRoot":"","sources":["../../../../src/components/MathCardV2/hooks/useMeetingProblemAdapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACjG,OAAO,KAAK,EAAuB,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE9F;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GACnC,MAAM,sBAAsB,EAC5B,QAAO,eAA4B,EACnC,cAAc,MAAM;;;;;;;;;;uCA6Gd,CAAL;eAAkB,CAAC;cACd,CAAJ;gBACS,CAAC;;CA3Cb,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,MAAM,sBAAsB,EAAE,oBAAe,wBAkB9E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,MAAM,sBAAsB;;;CA2B9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReviewModule.d.ts","sourceRoot":"","sources":["../../../../../src/components/MathCardV2/modules/ReviewModule/ReviewModule.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"ReviewModule.d.ts","sourceRoot":"","sources":["../../../../../src/components/MathCardV2/modules/ReviewModule/ReviewModule.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA+EpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExplanationScene.d.ts","sourceRoot":"","sources":["../../../../../src/components/MathCardV2/scenes/ExplanationScene/ExplanationScene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"ExplanationScene.d.ts","sourceRoot":"","sources":["../../../../../src/components/MathCardV2/scenes/ExplanationScene/ExplanationScene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,wBAAwB,CAAC;AAmChC;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA0F5D,CAAC"}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
/* QuestionScene 组件样式 - 使用设计令牌 */
|
|
2
2
|
|
|
3
3
|
.question-scene-container {
|
|
4
|
-
padding:
|
|
5
|
-
max-width:
|
|
6
|
-
margin: 0
|
|
4
|
+
padding: 0;
|
|
5
|
+
max-width: none;
|
|
6
|
+
margin: 0;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
@media (min-width: 768px) {
|
|
10
10
|
.question-scene-container {
|
|
11
|
-
padding:
|
|
11
|
+
padding: 0;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.question-scene-card {
|
|
16
|
-
background-color:
|
|
17
|
-
border:
|
|
18
|
-
border-radius:
|
|
19
|
-
box-shadow:
|
|
20
|
-
overflow:
|
|
16
|
+
background-color: transparent;
|
|
17
|
+
border: none;
|
|
18
|
+
border-radius: 0;
|
|
19
|
+
box-shadow: none;
|
|
20
|
+
overflow: visible;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.question-display-area {
|
|
24
|
-
padding:
|
|
24
|
+
padding: 0;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.answer-form-container {
|
|
28
|
-
padding-left:
|
|
29
|
-
padding-right:
|
|
30
|
-
padding-bottom:
|
|
31
|
-
padding-top: var(--mc-space-
|
|
32
|
-
background-color:
|
|
33
|
-
border-top:
|
|
28
|
+
padding-left: 0;
|
|
29
|
+
padding-right: 0;
|
|
30
|
+
padding-bottom: 0;
|
|
31
|
+
padding-top: var(--mc-space-6);
|
|
32
|
+
background-color: transparent;
|
|
33
|
+
border-top: none;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.answer-form {
|
|
@@ -97,11 +97,11 @@
|
|
|
97
97
|
/* 响应式设计 */
|
|
98
98
|
@media (max-width: 768px) {
|
|
99
99
|
.question-scene-container {
|
|
100
|
-
padding:
|
|
100
|
+
padding: 0;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
.question-display-area {
|
|
104
|
-
padding:
|
|
104
|
+
padding: 0;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
.answer-form {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuestionScene.d.ts","sourceRoot":"","sources":["../../../../../src/components/MathCardV2/scenes/QuestionScene/QuestionScene.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"QuestionScene.d.ts","sourceRoot":"","sources":["../../../../../src/components/MathCardV2/scenes/QuestionScene/QuestionScene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAGpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,OAAO,qBAAqB,CAAC;AAE7B;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiHtD,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MathCell 组件
|
|
3
|
+
* 数学专用单元格组件
|
|
4
|
+
*
|
|
5
|
+
* @description
|
|
6
|
+
* MathCell 是 K12 数学教育场景下的专用输入单元格组件,支持:
|
|
7
|
+
* - 双模式(数位模式/标准模式)
|
|
8
|
+
* - 状态映射(correct/incorrect/idle)
|
|
9
|
+
* - Auto-Tab 自动跳转
|
|
10
|
+
* - 完整的 ARIA 可访问性支持
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* // 数位模式 - 竖式计算
|
|
15
|
+
* <MathCell type={MathCellType.INPUT} place={0} autoTab cellId="cell1" />
|
|
16
|
+
*
|
|
17
|
+
* // 标准模式 - 因数表
|
|
18
|
+
* <MathCell type={MathCellType.INPUT} place={null} />
|
|
19
|
+
*
|
|
20
|
+
* // 只读状态展示
|
|
21
|
+
* <MathCell
|
|
22
|
+
* type={MathCellType.INPUT}
|
|
23
|
+
* readonly
|
|
24
|
+
* status={MathCellStatus.CORRECT}
|
|
25
|
+
* value={5}
|
|
26
|
+
* />
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
import React from 'react';
|
|
30
|
+
import type { MathCellProps } from './MathCell.types';
|
|
31
|
+
/**
|
|
32
|
+
* MathCell 数学专用单元格组件
|
|
33
|
+
*/
|
|
34
|
+
export declare const MathCell: React.NamedExoticComponent<MathCellProps>;
|
|
35
|
+
//# sourceMappingURL=MathCell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MathCell.d.ts","sourceRoot":"","sources":["../../../src/components/MathCell/MathCell.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAA4D,MAAM,OAAO,CAAC;AAEjF,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,kBAAkB,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,QAAQ,2CA0HnB,CAAC"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MathCell 样式定义
|
|
3
|
+
* 使用 tailwind-variants 管理组件样式变体
|
|
4
|
+
*
|
|
5
|
+
* @description
|
|
6
|
+
* 定义 MathCell 组件的所有样式变体,包括:
|
|
7
|
+
* - size: 尺寸变体(digit/standard)
|
|
8
|
+
* - status: 状态变体(normal/correct/incorrect/idle)
|
|
9
|
+
* - type: 类型变体(input/label/result/placeholder)
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* MathCell 样式变体定义
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* const styles = mathCellStyles({
|
|
17
|
+
* size: 'digit',
|
|
18
|
+
* status: 'correct',
|
|
19
|
+
* type: 'input',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare const mathCellStyles: import("tailwind-variants").TVReturnType<{
|
|
24
|
+
/** 尺寸变体 */
|
|
25
|
+
size: {
|
|
26
|
+
/** 数位模式 - 固定 40x40px 正方形 */
|
|
27
|
+
digit: string;
|
|
28
|
+
/** 标准模式 - 最小宽度 48px,可扩展 */
|
|
29
|
+
standard: string;
|
|
30
|
+
};
|
|
31
|
+
/** 状态变体 */
|
|
32
|
+
status: {
|
|
33
|
+
/** 正常状态 */
|
|
34
|
+
normal: string;
|
|
35
|
+
/** 正确状态 - 绿色 */
|
|
36
|
+
correct: string;
|
|
37
|
+
/** 错误状态 - 红色+删除线 */
|
|
38
|
+
incorrect: string;
|
|
39
|
+
/** 空闲状态 - 虚线边框 */
|
|
40
|
+
idle: string;
|
|
41
|
+
};
|
|
42
|
+
/** 类型变体 */
|
|
43
|
+
type: {
|
|
44
|
+
/** 输入类型 */
|
|
45
|
+
input: string;
|
|
46
|
+
/** 标签类型 - 粗体+灰色背景 */
|
|
47
|
+
label: string;
|
|
48
|
+
/** 结果类型 - 半粗体+蓝色背景 */
|
|
49
|
+
result: string;
|
|
50
|
+
/** 占位类型 - 透明+无交互 */
|
|
51
|
+
placeholder: string;
|
|
52
|
+
};
|
|
53
|
+
/** 禁用状态 */
|
|
54
|
+
disabled: {
|
|
55
|
+
true: string;
|
|
56
|
+
false: string;
|
|
57
|
+
};
|
|
58
|
+
/** 只读状态 */
|
|
59
|
+
readonly: {
|
|
60
|
+
true: string;
|
|
61
|
+
false: string;
|
|
62
|
+
};
|
|
63
|
+
}, undefined, string[], {
|
|
64
|
+
/** 尺寸变体 */
|
|
65
|
+
size: {
|
|
66
|
+
/** 数位模式 - 固定 40x40px 正方形 */
|
|
67
|
+
digit: string;
|
|
68
|
+
/** 标准模式 - 最小宽度 48px,可扩展 */
|
|
69
|
+
standard: string;
|
|
70
|
+
};
|
|
71
|
+
/** 状态变体 */
|
|
72
|
+
status: {
|
|
73
|
+
/** 正常状态 */
|
|
74
|
+
normal: string;
|
|
75
|
+
/** 正确状态 - 绿色 */
|
|
76
|
+
correct: string;
|
|
77
|
+
/** 错误状态 - 红色+删除线 */
|
|
78
|
+
incorrect: string;
|
|
79
|
+
/** 空闲状态 - 虚线边框 */
|
|
80
|
+
idle: string;
|
|
81
|
+
};
|
|
82
|
+
/** 类型变体 */
|
|
83
|
+
type: {
|
|
84
|
+
/** 输入类型 */
|
|
85
|
+
input: string;
|
|
86
|
+
/** 标签类型 - 粗体+灰色背景 */
|
|
87
|
+
label: string;
|
|
88
|
+
/** 结果类型 - 半粗体+蓝色背景 */
|
|
89
|
+
result: string;
|
|
90
|
+
/** 占位类型 - 透明+无交互 */
|
|
91
|
+
placeholder: string;
|
|
92
|
+
};
|
|
93
|
+
/** 禁用状态 */
|
|
94
|
+
disabled: {
|
|
95
|
+
true: string;
|
|
96
|
+
false: string;
|
|
97
|
+
};
|
|
98
|
+
/** 只读状态 */
|
|
99
|
+
readonly: {
|
|
100
|
+
true: string;
|
|
101
|
+
false: string;
|
|
102
|
+
};
|
|
103
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
104
|
+
/** 尺寸变体 */
|
|
105
|
+
size: {
|
|
106
|
+
/** 数位模式 - 固定 40x40px 正方形 */
|
|
107
|
+
digit: string;
|
|
108
|
+
/** 标准模式 - 最小宽度 48px,可扩展 */
|
|
109
|
+
standard: string;
|
|
110
|
+
};
|
|
111
|
+
/** 状态变体 */
|
|
112
|
+
status: {
|
|
113
|
+
/** 正常状态 */
|
|
114
|
+
normal: string;
|
|
115
|
+
/** 正确状态 - 绿色 */
|
|
116
|
+
correct: string;
|
|
117
|
+
/** 错误状态 - 红色+删除线 */
|
|
118
|
+
incorrect: string;
|
|
119
|
+
/** 空闲状态 - 虚线边框 */
|
|
120
|
+
idle: string;
|
|
121
|
+
};
|
|
122
|
+
/** 类型变体 */
|
|
123
|
+
type: {
|
|
124
|
+
/** 输入类型 */
|
|
125
|
+
input: string;
|
|
126
|
+
/** 标签类型 - 粗体+灰色背景 */
|
|
127
|
+
label: string;
|
|
128
|
+
/** 结果类型 - 半粗体+蓝色背景 */
|
|
129
|
+
result: string;
|
|
130
|
+
/** 占位类型 - 透明+无交互 */
|
|
131
|
+
placeholder: string;
|
|
132
|
+
};
|
|
133
|
+
/** 禁用状态 */
|
|
134
|
+
disabled: {
|
|
135
|
+
true: string;
|
|
136
|
+
false: string;
|
|
137
|
+
};
|
|
138
|
+
/** 只读状态 */
|
|
139
|
+
readonly: {
|
|
140
|
+
true: string;
|
|
141
|
+
false: string;
|
|
142
|
+
};
|
|
143
|
+
}, undefined, string[], unknown, unknown, undefined>>;
|
|
144
|
+
/**
|
|
145
|
+
* MathCell 容器样式
|
|
146
|
+
* 用于包裹多个 MathCell 的容器布局
|
|
147
|
+
*/
|
|
148
|
+
export declare const mathCellContainerStyles: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "inline-flex items-center gap-1", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "inline-flex items-center gap-1", unknown, unknown, undefined>>;
|
|
149
|
+
//# sourceMappingURL=MathCell.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MathCell.styles.d.ts","sourceRoot":"","sources":["../../../src/components/MathCell/MathCell.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc;IAOvB,WAAW;;QAET,4BAA4B;;QAE5B,2BAA2B;;;IAG7B,WAAW;;QAET,WAAW;;QAEX,gBAAgB;;QAEhB,oBAAoB;;QAEpB,kBAAkB;;;IAGpB,WAAW;;QAET,WAAW;;QAEX,qBAAqB;;QAErB,sBAAsB;;QAEtB,oBAAoB;;;IAGtB,WAAW;;;;;IAKX,WAAW;;;;;;IAlCX,WAAW;;QAET,4BAA4B;;QAE5B,2BAA2B;;;IAG7B,WAAW;;QAET,WAAW;;QAEX,gBAAgB;;QAEhB,oBAAoB;;QAEpB,kBAAkB;;;IAGpB,WAAW;;QAET,WAAW;;QAEX,qBAAqB;;QAErB,sBAAsB;;QAEtB,oBAAoB;;;IAGtB,WAAW;;;;;IAKX,WAAW;;;;;;IAlCX,WAAW;;QAET,4BAA4B;;QAE5B,2BAA2B;;;IAG7B,WAAW;;QAET,WAAW;;QAEX,gBAAgB;;QAEhB,oBAAoB;;QAEpB,kBAAkB;;;IAGpB,WAAW;;QAET,WAAW;;QAEX,qBAAqB;;QAErB,sBAAsB;;QAEtB,oBAAoB;;;IAGtB,WAAW;;;;;IAKX,WAAW;;;;;qDAab,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,uBAAuB,sPAElC,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MathCell 类型定义
|
|
3
|
+
* 数学专用单元格组件的类型系统
|
|
4
|
+
*
|
|
5
|
+
* @description
|
|
6
|
+
* MathCell 是 K12 数学教育场景下的专用输入单元格组件,
|
|
7
|
+
* 支持双模式(数位模式/标准模式)、状态映射和 Auto-Tab 自动跳转。
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* // 数位模式 - 用于竖式计算
|
|
12
|
+
* <MathCell type={MathCellType.INPUT} place={0} />
|
|
13
|
+
*
|
|
14
|
+
* // 标准模式 - 用于因数表
|
|
15
|
+
* <MathCell type={MathCellType.INPUT} place={null} />
|
|
16
|
+
*
|
|
17
|
+
* // 只读状态展示
|
|
18
|
+
* <MathCell type={MathCellType.INPUT} readonly status={MathCellStatus.CORRECT} value={5} />
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
/** 双模式控制与数位位置标识
|
|
22
|
+
* - number: 数位模式,限制单字符输入,用于竖式计算
|
|
23
|
+
* - null: 标准模式,无输入长度限制,用于因数表等场景
|
|
24
|
+
*/
|
|
25
|
+
export type PlaceValue = number | null;
|
|
26
|
+
/** 单元格状态 - 使用 const 替代 enum (erasableSyntaxOnly 兼容) */
|
|
27
|
+
export declare const MathCellStatus: {
|
|
28
|
+
/** 正确状态 - 绿色边框/背景 */
|
|
29
|
+
readonly CORRECT: "correct";
|
|
30
|
+
/** 错误状态 - 红色边框+删除线 */
|
|
31
|
+
readonly INCORRECT: "incorrect";
|
|
32
|
+
/** 空闲状态 - 虚线边框 */
|
|
33
|
+
readonly IDLE: "idle";
|
|
34
|
+
};
|
|
35
|
+
/** 单元格状态类型 */
|
|
36
|
+
export type MathCellStatus = typeof MathCellStatus[keyof typeof MathCellStatus];
|
|
37
|
+
/** 单元格类型 - 使用 const 替代 enum */
|
|
38
|
+
export declare const MathCellType: {
|
|
39
|
+
/** 标签类型 - 只读显示 */
|
|
40
|
+
readonly LABEL: "label";
|
|
41
|
+
/** 输入类型 - 可编辑 */
|
|
42
|
+
readonly INPUT: "input";
|
|
43
|
+
/** 结果类型 - 计算结果展示 */
|
|
44
|
+
readonly RESULT: "result";
|
|
45
|
+
/** 占位类型 - 空白占位 */
|
|
46
|
+
readonly PLACEHOLDER: "placeholder";
|
|
47
|
+
};
|
|
48
|
+
/** 单元格类型 */
|
|
49
|
+
export type MathCellType = typeof MathCellType[keyof typeof MathCellType];
|
|
50
|
+
/** MathCell Props接口 */
|
|
51
|
+
export interface MathCellProps {
|
|
52
|
+
/** 单元格类型 */
|
|
53
|
+
type: MathCellType;
|
|
54
|
+
/** 显示值 */
|
|
55
|
+
value?: string | number;
|
|
56
|
+
/** 只读模式(展示错题回显/标准解析时设为 true) */
|
|
57
|
+
readonly?: boolean;
|
|
58
|
+
/** 状态:用于只读模式下的对错回显 */
|
|
59
|
+
status?: MathCellStatus;
|
|
60
|
+
/** 自动跳转开关:默认 false。开启后输入单字符秒切下一格 */
|
|
61
|
+
autoTab?: boolean;
|
|
62
|
+
/** 双模式控制与数位位置标识:
|
|
63
|
+
* - 不为 null 时激活数位模式(限制单字符输入,用于竖式计算)
|
|
64
|
+
* - 为 null 时激活标准模式(无输入长度限制,用于因数表等场景)
|
|
65
|
+
*/
|
|
66
|
+
place?: PlaceValue;
|
|
67
|
+
/** 变更回调 */
|
|
68
|
+
onChange?: (value: number | null) => void;
|
|
69
|
+
/** 自定义样式类 */
|
|
70
|
+
className?: string;
|
|
71
|
+
/** 单元格标识(用于数据映射) */
|
|
72
|
+
cellId?: string;
|
|
73
|
+
/** Auto-Tab 回调 - 用于父容器控制焦点跳转 */
|
|
74
|
+
onAutoTab?: (cellId: string, direction: 'next' | 'prev') => void;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=MathCell.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MathCell.types.d.ts","sourceRoot":"","sources":["../../../src/components/MathCell/MathCell.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC;AAEvC,uDAAuD;AACvD,eAAO,MAAM,cAAc;IACzB,qBAAqB;;IAErB,sBAAsB;;IAEtB,kBAAkB;;CAEV,CAAC;AAEX,cAAc;AACd,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEhF,+BAA+B;AAC/B,eAAO,MAAM,YAAY;IACvB,kBAAkB;;IAElB,iBAAiB;;IAEjB,oBAAoB;;IAEpB,kBAAkB;;CAEV,CAAC;AAEX,YAAY;AACZ,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE1E,uBAAuB;AACvB,MAAM,WAAW,aAAa;IAC5B,YAAY;IACZ,IAAI,EAAE,YAAY,CAAC;IAEnB,UAAU;IACV,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,sBAAsB;IACtB,MAAM,CAAC,EAAE,cAAc,CAAC;IAExB,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IAEnB,WAAW;IACX,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAE1C,aAAa;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,oBAAoB;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,gCAAgC;IAChC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;CAClE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MathCell 组件导出
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* MathCell 是 K12 数学教育场景下的专用输入单元格组件
|
|
6
|
+
*/
|
|
7
|
+
export { MathCell } from './MathCell';
|
|
8
|
+
export { mathCellStyles, mathCellContainerStyles } from './MathCell.styles';
|
|
9
|
+
export { MathCellStatus, MathCellType, } from './MathCell.types';
|
|
10
|
+
export type { MathCellProps, MathCellStatus as MathCellStatusType, MathCellType as MathCellTypeType, PlaceValue, } from './MathCell.types';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MathCell/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EACL,cAAc,EACd,YAAY,GACb,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACV,aAAa,EACb,cAAc,IAAI,kBAAkB,EACpC,YAAY,IAAI,gBAAgB,EAChC,UAAU,GACX,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FactorTable 组件(新架构)
|
|
3
|
+
* 因数表组合组件 - Hook + View 模式
|
|
4
|
+
*
|
|
5
|
+
* @description
|
|
6
|
+
* 使用 useFactorTable Hook 管理状态和验证逻辑,
|
|
7
|
+
* 使用 FactorTableView 纯展示组件渲染界面。
|
|
8
|
+
* 支持三种模式:edit(编辑)、review(错题回显)、solution(标答解析)
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import type { FactorTableProps } from './FactorTable.types';
|
|
12
|
+
/**
|
|
13
|
+
* FactorTable 因数表组合组件
|
|
14
|
+
* 将 Hook 和 View 组合成完整组件
|
|
15
|
+
*/
|
|
16
|
+
export declare const FactorTable: React.FC<FactorTableProps>;
|
|
17
|
+
//# sourceMappingURL=FactorTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FactorTable.d.ts","sourceRoot":"","sources":["../../../../src/components/MathContainer/FactorTable/FactorTable.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAoB,MAAM,OAAO,CAAC;AAGzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA2ClD,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FactorTable 类型定义
|
|
3
|
+
* 因数表容器组件的类型系统
|
|
4
|
+
*
|
|
5
|
+
* @description
|
|
6
|
+
* FactorTable 用于展示因数成对排列,支持因数配对验证。
|
|
7
|
+
* 使用标准模式输入(place=null),支持多位数输入。
|
|
8
|
+
*
|
|
9
|
+
* 新架构:使用统一类型定义从 MathContainer.types.ts
|
|
10
|
+
*/
|
|
11
|
+
import type { FactorTableConfig as BaseFactorTableConfig, ContainerAnswers, AnswerStatus } from '../MathContainer.types';
|
|
12
|
+
export type { FactorTableConfig, ContainerAnswers, AnswerStatus } from '../MathContainer.types';
|
|
13
|
+
/**
|
|
14
|
+
* FactorTable Props 接口(新架构)
|
|
15
|
+
*/
|
|
16
|
+
export interface FactorTableProps {
|
|
17
|
+
/** 因数表配置 */
|
|
18
|
+
config: BaseFactorTableConfig;
|
|
19
|
+
/** 初始答案 */
|
|
20
|
+
initialAnswers?: ContainerAnswers;
|
|
21
|
+
/** 答案变化回调 */
|
|
22
|
+
onAnswerChange?: (answers: ContainerAnswers) => void;
|
|
23
|
+
/** 验证状态变化回调 */
|
|
24
|
+
onValidationChange?: (validation: Record<string, AnswerStatus>) => void;
|
|
25
|
+
/** 是否只读 */
|
|
26
|
+
readonly?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 因数对数据类型
|
|
30
|
+
*/
|
|
31
|
+
export interface FactorPair {
|
|
32
|
+
/** 左侧因数 */
|
|
33
|
+
left: number | null;
|
|
34
|
+
/** 右侧因数 */
|
|
35
|
+
right: number | null;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 单元格数据类型
|
|
39
|
+
*/
|
|
40
|
+
export interface FactorCellData {
|
|
41
|
+
/** 单元格值 */
|
|
42
|
+
value: number | null;
|
|
43
|
+
/** 单元格ID */
|
|
44
|
+
cellId: string;
|
|
45
|
+
/** 行索引 */
|
|
46
|
+
row: number;
|
|
47
|
+
/** 列索引 */
|
|
48
|
+
col: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* 验证结果类型(旧版兼容)
|
|
52
|
+
* @deprecated 使用 AnswerStatus 替代
|
|
53
|
+
*/
|
|
54
|
+
export type FactorValidationResult = AnswerStatus;
|
|
55
|
+
//# sourceMappingURL=FactorTable.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FactorTable.types.d.ts","sourceRoot":"","sources":["../../../../src/components/MathContainer/FactorTable/FactorTable.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,iBAAiB,IAAI,qBAAqB,EAC1C,gBAAgB,EAChB,YAAY,EACb,MAAM,wBAAwB,CAAC;AAGhC,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,YAAY;IACZ,MAAM,EAAE,qBAAqB,CAAC;IAC9B,WAAW;IACX,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAClC,aAAa;IACb,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACrD,eAAe;IACf,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,KAAK,IAAI,CAAC;IACxE,WAAW;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,WAAW;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpB,WAAW;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,WAAW;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,YAAY;IACZ,MAAM,EAAE,MAAM,CAAC;IAEf,UAAU;IACV,GAAG,EAAE,MAAM,CAAC;IAEZ,UAAU;IACV,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FactorTableView 组件
|
|
3
|
+
* 因数表展示层 - 纯展示组件
|
|
4
|
+
*
|
|
5
|
+
* @description
|
|
6
|
+
* 使用 React.memo 优化,避免不必要的重渲染。
|
|
7
|
+
* 渲染 2 列网格布局,每行包含:左侧因数 × 右侧因数 = 目标数字
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import type { FactorTableConfig, ContainerAnswers, AnswerStatus } from '../MathContainer.types';
|
|
11
|
+
export interface FactorTableViewProps {
|
|
12
|
+
/** 因数表配置 */
|
|
13
|
+
config: FactorTableConfig;
|
|
14
|
+
/** 当前答案 */
|
|
15
|
+
answers: ContainerAnswers;
|
|
16
|
+
/** 单元格变化回调 */
|
|
17
|
+
onCellChange: (cellId: string, value: number | null) => void;
|
|
18
|
+
/** 获取单元格状态 */
|
|
19
|
+
getCellStatus: (cellId: string) => AnswerStatus;
|
|
20
|
+
/** 是否只读 */
|
|
21
|
+
readonly?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 因数表展示组件
|
|
25
|
+
* 纯展示组件,接收 props 渲染,不管理状态
|
|
26
|
+
*/
|
|
27
|
+
export declare const FactorTableView: React.FC<FactorTableViewProps>;
|
|
28
|
+
//# sourceMappingURL=FactorTableView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FactorTableView.d.ts","sourceRoot":"","sources":["../../../../src/components/MathContainer/FactorTable/FactorTableView.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEhG,MAAM,WAAW,oBAAoB;IACnC,YAAY;IACZ,MAAM,EAAE,iBAAiB,CAAC;IAC1B,WAAW;IACX,OAAO,EAAE,gBAAgB,CAAC;IAC1B,cAAc;IACd,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7D,cAAc;IACd,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,YAAY,CAAC;IAChD,WAAW;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA6GzD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FactorTable 模块导出
|
|
3
|
+
*/
|
|
4
|
+
export { FactorTable } from './FactorTable';
|
|
5
|
+
export { FactorTableView } from './FactorTableView';
|
|
6
|
+
export type { FactorTableProps, FactorPair, FactorCellData, FactorValidationResult, } from './FactorTable.types';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/MathContainer/FactorTable/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EACV,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,sBAAsB,GACvB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LongDivision 组件
|
|
3
|
+
* 长除法组合组件 - Hook + View 组合
|
|
4
|
+
*
|
|
5
|
+
* @description
|
|
6
|
+
* 使用 useLongDivision Hook 管理状态,
|
|
7
|
+
* 使用 LongDivisionView 组件渲染界面。
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import type { LongDivisionProps } from './LongDivision.types';
|
|
11
|
+
export declare const LongDivision: React.FC<LongDivisionProps>;
|
|
12
|
+
//# sourceMappingURL=LongDivision.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LongDivision.d.ts","sourceRoot":"","sources":["../../../../src/components/MathContainer/LongDivision/LongDivision.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA2BpD,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LongDivision 布局计算工具
|
|
3
|
+
* 计算长除法竖式的动态网格布局
|
|
4
|
+
*/
|
|
5
|
+
import type { LongDivisionConfig } from '../MathContainer.types';
|
|
6
|
+
/** 单元格类型 */
|
|
7
|
+
export type LongDivisionCellType = 'quotient' | 'dividend' | 'divisor' | 'product' | 'remainder' | 'horizontalLine' | 'remainderWithBringDown' | 'placeholder';
|
|
8
|
+
/** 单元格位置信息 */
|
|
9
|
+
export interface CellPosition {
|
|
10
|
+
/** 行索引 (0-based) */
|
|
11
|
+
row: number;
|
|
12
|
+
/** 列索引 (0-based) */
|
|
13
|
+
col: number;
|
|
14
|
+
/** 跨列数 (默认1) */
|
|
15
|
+
colspan?: number;
|
|
16
|
+
/** 跨行数 (默认1) */
|
|
17
|
+
rowspan?: number;
|
|
18
|
+
}
|
|
19
|
+
/** 单元格数据 */
|
|
20
|
+
export interface LongDivisionCell {
|
|
21
|
+
/** 单元格唯一标识 */
|
|
22
|
+
id: string;
|
|
23
|
+
/** 单元格类型 */
|
|
24
|
+
type: LongDivisionCellType;
|
|
25
|
+
/** 显示值 */
|
|
26
|
+
value: number | null;
|
|
27
|
+
/** 数位位置 (用于输入模式) */
|
|
28
|
+
place?: number | null;
|
|
29
|
+
/** 是否只读 (标签单元格) */
|
|
30
|
+
readonly?: boolean;
|
|
31
|
+
/** 单元格位置信息 */
|
|
32
|
+
position: CellPosition;
|
|
33
|
+
/** 额外的CSS类 */
|
|
34
|
+
className?: string;
|
|
35
|
+
/** 数据属性 */
|
|
36
|
+
dataAttrs?: Record<string, string>;
|
|
37
|
+
}
|
|
38
|
+
/** 布局配置 */
|
|
39
|
+
export interface LongDivisionLayout {
|
|
40
|
+
/** 网格列数 */
|
|
41
|
+
columns: number;
|
|
42
|
+
/** 网格行数 */
|
|
43
|
+
rows: number;
|
|
44
|
+
/** 所有单元格 */
|
|
45
|
+
cells: LongDivisionCell[];
|
|
46
|
+
/** 除数位置 (行, 列) */
|
|
47
|
+
divisorPosition: [number, number];
|
|
48
|
+
/** 被除数起始位置 (行, 列) */
|
|
49
|
+
dividendStartPosition: [number, number];
|
|
50
|
+
/** 商起始位置 (行, 列) */
|
|
51
|
+
quotientStartPosition: [number, number];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* 计算长除法竖式布局
|
|
55
|
+
* @param config 长除法配置
|
|
56
|
+
* @param steps 计算步骤 (来自 useLongDivision)
|
|
57
|
+
* @returns 布局信息
|
|
58
|
+
*/
|
|
59
|
+
export declare function calculateLongDivisionLayout(config: LongDivisionConfig, steps: Array<{
|
|
60
|
+
index: number;
|
|
61
|
+
dividend: number;
|
|
62
|
+
quotient: number;
|
|
63
|
+
remainder: number;
|
|
64
|
+
product: number;
|
|
65
|
+
}>): LongDivisionLayout;
|
|
66
|
+
/**
|
|
67
|
+
* 生成CSS Grid样式
|
|
68
|
+
*/
|
|
69
|
+
export declare function generateGridStyles(layout: LongDivisionLayout): React.CSSProperties;
|
|
70
|
+
/**
|
|
71
|
+
* 计算标准长除法竖式布局(符合数学规范)
|
|
72
|
+
* 仿照demo HTML布局,实现完整的厂字形除号结构
|
|
73
|
+
*/
|
|
74
|
+
export declare function calculateStandardLongDivisionLayout(config: LongDivisionConfig, steps: Array<{
|
|
75
|
+
index: number;
|
|
76
|
+
dividend: number;
|
|
77
|
+
quotient: number;
|
|
78
|
+
remainder: number;
|
|
79
|
+
product: number;
|
|
80
|
+
}>): LongDivisionLayout;
|
|
81
|
+
//# sourceMappingURL=LongDivision.layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LongDivision.layout.d.ts","sourceRoot":"","sources":["../../../../src/components/MathContainer/LongDivision/LongDivision.layout.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,YAAY;AACZ,MAAM,MAAM,oBAAoB,GAC5B,UAAU,GACV,UAAU,GACV,SAAS,GACT,SAAS,GACT,WAAW,GACX,gBAAgB,GAChB,wBAAwB,GACxB,aAAa,CAAC;AAElB,cAAc;AACd,MAAM,WAAW,YAAY;IAC3B,oBAAoB;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,oBAAoB;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,YAAY;AACZ,MAAM,WAAW,gBAAgB;IAC/B,cAAc;IACd,EAAE,EAAE,MAAM,CAAC;IACX,YAAY;IACZ,IAAI,EAAE,oBAAoB,CAAC;IAC3B,UAAU;IACV,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,mBAAmB;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc;IACd,QAAQ,EAAE,YAAY,CAAC;IACvB,cAAc;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW;IACX,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED,WAAW;AACX,MAAM,WAAW,kBAAkB;IACjC,WAAW;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW;IACX,IAAI,EAAE,MAAM,CAAC;IACb,YAAY;IACZ,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,kBAAkB;IAClB,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,qBAAqB;IACrB,qBAAqB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,mBAAmB;IACnB,qBAAqB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,kBAAkB,EAC1B,KAAK,EAAE,KAAK,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,GACD,kBAAkB,CA8IpB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,GAAG,KAAK,CAAC,aAAa,CASlF;AAED;;;GAGG;AACH,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,kBAAkB,EAC1B,KAAK,EAAE,KAAK,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,GACD,kBAAkB,CAiNpB"}
|