All files / web/src/app/create/worksheets/components/config-panel DifficultyPlot2D.stories.tsx

0% Statements 0/145
0% Branches 0/1
0% Functions 0/1
0% Lines 0/145

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146                                                                                                                                                                                                                                                                                                   
import type { Meta, StoryObj } from '@storybook/react'
import { DifficultyPlot2D } from './DifficultyPlot2D'
import { DIFFICULTY_PROFILES } from '../../difficultyProfiles'

const meta = {
  title: 'Worksheets/Config Panel/DifficultyPlot2D',
  component: DifficultyPlot2D,
  parameters: {
    layout: 'centered',
  },
  tags: ['autodocs'],
} satisfies Meta<typeof DifficultyPlot2D>

export default meta
type Story = StoryObj<typeof meta>

export const EarlyLearner: Story = {
  args: {
    pAnyStart: DIFFICULTY_PROFILES.earlyLearner.regrouping.pAnyStart,
    pAllStart: DIFFICULTY_PROFILES.earlyLearner.regrouping.pAllStart,
    displayRules: DIFFICULTY_PROFILES.earlyLearner.displayRules,
    onChange: (config) => {
      console.log('Selected configuration:', config)
    },
    isDark: false,
  },
}

export const Intermediate: Story = {
  args: {
    pAnyStart: DIFFICULTY_PROFILES.intermediate.regrouping.pAnyStart,
    pAllStart: DIFFICULTY_PROFILES.intermediate.regrouping.pAllStart,
    displayRules: DIFFICULTY_PROFILES.intermediate.displayRules,
    onChange: (config) => {
      console.log('Selected configuration:', config)
    },
    isDark: false,
  },
}

export const Expert: Story = {
  args: {
    pAnyStart: DIFFICULTY_PROFILES.expert.regrouping.pAnyStart,
    pAllStart: DIFFICULTY_PROFILES.expert.regrouping.pAllStart,
    displayRules: DIFFICULTY_PROFILES.expert.displayRules,
    onChange: (config) => {
      console.log('Selected configuration:', config)
    },
    isDark: false,
  },
}

export const CustomConfiguration: Story = {
  args: {
    pAnyStart: 0.5,
    pAllStart: 0.1,
    displayRules: {
      carryBoxes: 'whenRegrouping',
      answerBoxes: 'always',
      placeValueColors: 'never',
      tenFrames: 'never',
      problemNumbers: 'always',
      cellBorders: 'always',
      borrowNotation: 'never',
      borrowingHints: 'never',
    },
    onChange: (config) => {
      console.log('Selected configuration:', config)
    },
    isDark: false,
  },
}

export const DarkMode: Story = {
  args: {
    pAnyStart: DIFFICULTY_PROFILES.intermediate.regrouping.pAnyStart,
    pAllStart: DIFFICULTY_PROFILES.intermediate.regrouping.pAllStart,
    displayRules: DIFFICULTY_PROFILES.intermediate.displayRules,
    onChange: (config) => {
      console.log('Selected configuration:', config)
    },
    isDark: true,
  },
  parameters: {
    backgrounds: { default: 'dark' },
  },
}

export const MasteryProgressionView: Story = {
  args: {
    pAnyStart: 0.5,
    pAllStart: 0.1,
    displayRules: {
      carryBoxes: 'whenRegrouping',
      answerBoxes: 'always',
      placeValueColors: 'never',
      tenFrames: 'never',
      problemNumbers: 'always',
      cellBorders: 'always',
      borrowNotation: 'never',
      borrowingHints: 'never',
    },
    onChange: (config) => {
      console.log('Selected configuration:', config)
    },
    isDark: false,
    customPoints: [
      {
        id: 'skill-1',
        label: 'Single Digit',
        pAnyStart: 0,
        pAllStart: 0,
        displayRules: DIFFICULTY_PROFILES.earlyLearner.displayRules,
      },
      {
        id: 'skill-2',
        label: 'No Regroup',
        pAnyStart: 0,
        pAllStart: 0,
        displayRules: DIFFICULTY_PROFILES.earlyLearner.displayRules,
      },
      {
        id: 'skill-3',
        label: 'Some Regroup',
        pAnyStart: 0.25,
        pAllStart: 0,
        displayRules: DIFFICULTY_PROFILES.intermediate.displayRules,
      },
      {
        id: 'skill-4',
        label: 'More Regroup',
        pAnyStart: 0.5,
        pAllStart: 0.1,
        displayRules: DIFFICULTY_PROFILES.intermediate.displayRules,
      },
      {
        id: 'skill-5',
        label: 'Advanced',
        pAnyStart: 0.75,
        pAllStart: 0.25,
        displayRules: DIFFICULTY_PROFILES.expert.displayRules,
      },
    ],
  },
}