@opentrons/components 0.1.7-alpha.1 → 0.2.0-alpha.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.
Files changed (251) hide show
  1. package/cssModuleSideEffect.ts +22 -0
  2. package/lib/assets/localization/en/index.d.ts +12 -0
  3. package/lib/assets/localization/index.d.ts +12 -0
  4. package/lib/atoms/AnimationVideo/index.d.ts +13 -0
  5. package/lib/atoms/InlineNotification/index.d.ts +1 -1
  6. package/lib/atoms/ListButton/ListButtonChildren/index.d.ts +0 -1
  7. package/lib/atoms/StyledText/PlaceholderStyledText.d.ts +14 -0
  8. package/lib/atoms/StyledText/index.d.ts +1 -0
  9. package/lib/atoms/buttons/BasicButton.d.ts +12 -0
  10. package/lib/atoms/buttons/index.d.ts +1 -0
  11. package/lib/atoms/index.d.ts +1 -0
  12. package/lib/hardware-sim/BaseDeck/BaseDeck.d.ts +10 -8
  13. package/lib/hardware-sim/Deck/FlexTrash.d.ts +4 -1
  14. package/lib/hardware-sim/Deck/MoveLabwareOnDeck.d.ts +3 -2
  15. package/lib/hardware-sim/Deck/RobotCoordsForeignDiv.d.ts +6 -5
  16. package/lib/hardware-sim/Deck/RobotCoordsForeignObject.d.ts +8 -5
  17. package/lib/hardware-sim/Deck/RobotCoordsText.d.ts +11 -1
  18. package/lib/hardware-sim/Deck/RobotWorkSpace.d.ts +30 -14
  19. package/lib/hardware-sim/Deck/__tests__/resolveLabwareLocation.test.d.ts +1 -0
  20. package/lib/hardware-sim/Deck/resolveLabwareLocation.d.ts +20 -0
  21. package/lib/hardware-sim/DeckConfigurator/AbsorbanceReaderItem.d.ts +11 -0
  22. package/lib/hardware-sim/DeckConfigurator/EmptyConfigItem.d.ts +11 -0
  23. package/lib/hardware-sim/DeckConfigurator/FlexStackerItem.d.ts +12 -0
  24. package/lib/hardware-sim/DeckConfigurator/HeaterShakerItem.d.ts +11 -0
  25. package/lib/hardware-sim/DeckConfigurator/MagneticBlockItem.d.ts +12 -0
  26. package/lib/hardware-sim/DeckConfigurator/StagingAreaConfigItem.d.ts +11 -0
  27. package/lib/hardware-sim/DeckConfigurator/{StaticFixture.d.ts → StaticItem.d.ts} +1 -1
  28. package/lib/hardware-sim/DeckConfigurator/TemperatureModuleItem.d.ts +11 -0
  29. package/lib/hardware-sim/DeckConfigurator/ThermocyclerItem.d.ts +11 -0
  30. package/lib/hardware-sim/DeckConfigurator/TrashBinConfigItem.d.ts +11 -0
  31. package/lib/hardware-sim/DeckConfigurator/WasteChuteConfigItem.d.ts +11 -0
  32. package/lib/hardware-sim/DeckConfigurator/constants.d.ts +5 -8
  33. package/lib/hardware-sim/DeckConfigurator/index.d.ts +4 -3
  34. package/lib/hardware-sim/Labware/CalibrationBlockRender.d.ts +15 -0
  35. package/lib/hardware-sim/Labware/Labware.d.ts +7 -8
  36. package/lib/hardware-sim/Labware/LabwareAdapter/index.d.ts +2 -2
  37. package/lib/hardware-sim/Labware/LabwareRender.d.ts +46 -5
  38. package/lib/hardware-sim/Labware/index.d.ts +1 -0
  39. package/lib/hardware-sim/Labware/labwareInternals/FilledWells.d.ts +3 -4
  40. package/lib/hardware-sim/Labware/labwareInternals/LabwareOutline.d.ts +20 -9
  41. package/lib/hardware-sim/Labware/labwareInternals/LabwareWellLabels.d.ts +2 -2
  42. package/lib/hardware-sim/Labware/labwareInternals/StaticLabware.d.ts +2 -2
  43. package/lib/hardware-sim/Labware/labwareInternals/StrokedWells.d.ts +2 -2
  44. package/lib/hardware-sim/Labware/labwareInternals/StyledWells.d.ts +2 -2
  45. package/lib/hardware-sim/Labware/labwareInternals/Well.d.ts +1 -2
  46. package/lib/hardware-sim/Labware/labwareInternals/WellLabels.d.ts +2 -2
  47. package/lib/hardware-sim/Module/index.d.ts +24 -2
  48. package/lib/hardware-sim/Pipette/PipetteRender.d.ts +2 -2
  49. package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.d.ts +5 -3
  50. package/lib/hocs/withStyleProps.d.ts +26 -0
  51. package/lib/hooks/useConditionalConfirm.d.ts +4 -0
  52. package/lib/icons/Icon.d.ts +7 -7
  53. package/lib/icons/ModuleIcon.d.ts +4 -3
  54. package/lib/instrument/index.d.ts +0 -2
  55. package/lib/legacy-hardware-sim/index.d.ts +0 -1
  56. package/lib/lists/index.d.ts +0 -1
  57. package/lib/molecules/CustomizeExpandButton/__tests__/CustomizeExpandButton.test.d.ts +1 -0
  58. package/lib/molecules/CustomizeExpandButton/index.d.ts +29 -0
  59. package/lib/molecules/DeckInfoLabel/index.d.ts +8 -16
  60. package/lib/molecules/index.d.ts +2 -1
  61. package/lib/organisms/CommandText/index.d.ts +2 -2
  62. package/lib/organisms/CommandText/useCommandTextString/index.d.ts +2 -2
  63. package/lib/organisms/CommandText/useCommandTextString/utils/getLabwareDefinitionsFromCommands.d.ts +2 -2
  64. package/lib/organisms/CommandText/useCommandTextString/utils/getLabwareLocation.d.ts +3 -3
  65. package/lib/organisms/CommandText/useCommandTextString/utils/getLabwareName.d.ts +2 -2
  66. package/lib/organisms/FixtureOption/index.d.ts +2 -2
  67. package/lib/organisms/ProtocolDeck/index.d.ts +10 -0
  68. package/lib/organisms/ProtocolTimelineScrubber/CommandItem.d.ts +2 -2
  69. package/lib/organisms/ProtocolTimelineScrubber/utils.d.ts +2 -2
  70. package/lib/organisms/index.d.ts +1 -0
  71. package/lib/primitives/ForeignObject.d.ts +8 -18
  72. package/lib/primitives/style-props.d.ts +1 -1
  73. package/lib/structure/index.d.ts +2 -3
  74. package/package.json +6 -3
  75. package/src/alerts/alerts.module.css +2 -2
  76. package/src/assets/localization/en/deck_configuration.json +12 -0
  77. package/src/assets/localization/en/index.ts +2 -0
  78. package/src/assets/localization/en/protocol_command_text.json +1 -1
  79. package/src/atoms/AnimationVideo/__tests__/AnimationVideo.test.tsx +40 -0
  80. package/src/atoms/AnimationVideo/index.tsx +44 -0
  81. package/src/atoms/CheckboxField/__tests__/CheckboxField.test.tsx +0 -3
  82. package/src/atoms/CheckboxField/index.tsx +1 -1
  83. package/src/atoms/InlineNotification/index.tsx +86 -70
  84. package/src/atoms/ListButton/ListButton.stories.tsx +21 -7
  85. package/src/atoms/ListButton/ListButtonChildren/index.ts +0 -1
  86. package/src/atoms/ListItem/ListItemChildren/ListItemDescriptor.tsx +2 -2
  87. package/src/atoms/MenuList/OverflowBtn.tsx +39 -41
  88. package/src/atoms/Snackbar/Snackbar.stories.tsx +59 -23
  89. package/src/atoms/Snackbar/index.tsx +48 -38
  90. package/src/atoms/StyledText/PlaceholderStyledText.tsx +46 -0
  91. package/src/atoms/StyledText/index.ts +1 -0
  92. package/src/atoms/StyledText/placeholderstyledtext.module.css +25 -0
  93. package/src/atoms/buttons/BasicButton.tsx +100 -0
  94. package/src/atoms/buttons/SecondaryButton.tsx +5 -2
  95. package/src/atoms/buttons/__tests__/BasicButton.test.tsx +87 -0
  96. package/src/atoms/buttons/buttons.stories.tsx +91 -55
  97. package/src/atoms/buttons/index.ts +1 -0
  98. package/src/atoms/index.ts +1 -0
  99. package/src/buttons/buttons.module.css +92 -92
  100. package/src/controls/styles.module.css +15 -15
  101. package/src/forms/Select.module.css +23 -23
  102. package/src/forms/forms.module.css +38 -37
  103. package/src/hardware-sim/BaseDeck/BaseDeck.stories.tsx +7 -7
  104. package/src/hardware-sim/BaseDeck/BaseDeck.tsx +98 -61
  105. package/src/hardware-sim/BaseDeck/WasteChuteFixture.tsx +22 -28
  106. package/src/hardware-sim/BaseDeck/basedeck.module.css +20 -0
  107. package/src/hardware-sim/Deck/FlexTrash.tsx +50 -30
  108. package/src/hardware-sim/Deck/MoveLabwareOnDeck.stories.tsx +2 -2
  109. package/src/hardware-sim/Deck/MoveLabwareOnDeck.tsx +122 -156
  110. package/src/hardware-sim/Deck/RobotCoordsForeignDiv.tsx +35 -27
  111. package/src/hardware-sim/Deck/RobotCoordsForeignObject.tsx +32 -29
  112. package/src/hardware-sim/Deck/RobotCoordsText.tsx +12 -11
  113. package/src/hardware-sim/Deck/RobotWorkSpace.tsx +74 -54
  114. package/src/hardware-sim/Deck/SlotLabels.tsx +51 -51
  115. package/src/hardware-sim/Deck/__tests__/resolveLabwareLocation.test.ts +138 -0
  116. package/src/hardware-sim/Deck/deck.module.css +54 -0
  117. package/src/hardware-sim/Deck/resolveLabwareLocation.ts +154 -0
  118. package/src/hardware-sim/DeckConfigurator/{FlexStackerFixture.tsx → AbsorbanceReaderItem.tsx} +34 -31
  119. package/src/hardware-sim/DeckConfigurator/{EmptyConfigFixture.tsx → EmptyConfigItem.tsx} +72 -44
  120. package/src/hardware-sim/DeckConfigurator/{AbsorbanceReaderFixture.tsx → FlexStackerItem.tsx} +46 -27
  121. package/src/hardware-sim/DeckConfigurator/{HeaterShakerFixture.tsx → HeaterShakerItem.tsx} +40 -28
  122. package/src/hardware-sim/DeckConfigurator/{MagneticBlockFixture.tsx → MagneticBlockItem.tsx} +41 -58
  123. package/src/hardware-sim/DeckConfigurator/{StagingAreaConfigFixture.tsx → StagingAreaConfigItem.tsx} +41 -23
  124. package/src/hardware-sim/DeckConfigurator/{StaticFixture.tsx → StaticItem.tsx} +16 -9
  125. package/src/hardware-sim/DeckConfigurator/{TemperatureModuleFixture.tsx → TemperatureModuleItem.tsx} +42 -26
  126. package/src/hardware-sim/DeckConfigurator/{ThermocyclerFixture.tsx → ThermocyclerItem.tsx} +31 -21
  127. package/src/hardware-sim/DeckConfigurator/{TrashBinConfigFixture.tsx → TrashBinConfigItem.tsx} +42 -27
  128. package/src/hardware-sim/DeckConfigurator/{WasteChuteConfigFixture.tsx → WasteChuteConfigItem.tsx} +38 -27
  129. package/src/hardware-sim/DeckConfigurator/constants.ts +5 -9
  130. package/src/hardware-sim/DeckConfigurator/index.tsx +236 -206
  131. package/src/hardware-sim/Labware/CalibrationBlockRender.stories.tsx +49 -0
  132. package/src/hardware-sim/Labware/CalibrationBlockRender.tsx +172 -0
  133. package/src/hardware-sim/Labware/Labware.tsx +30 -15
  134. package/src/hardware-sim/Labware/LabwareAdapter/index.tsx +2 -2
  135. package/src/hardware-sim/Labware/LabwareRender.stories.tsx +36 -21
  136. package/src/hardware-sim/Labware/LabwareRender.tsx +70 -15
  137. package/src/hardware-sim/Labware/__tests__/Labware.test.tsx +9 -4
  138. package/src/hardware-sim/Labware/__tests__/LabwareRender.test.tsx +14 -5
  139. package/src/hardware-sim/Labware/index.ts +1 -0
  140. package/src/hardware-sim/Labware/labware.module.css +8 -0
  141. package/src/hardware-sim/Labware/labwareInternals/FilledWells.tsx +3 -4
  142. package/src/hardware-sim/Labware/labwareInternals/LabwareOutline.tsx +48 -23
  143. package/src/hardware-sim/Labware/labwareInternals/LabwareWellLabels.tsx +3 -3
  144. package/src/hardware-sim/Labware/labwareInternals/StaticLabware.tsx +2 -2
  145. package/src/hardware-sim/Labware/labwareInternals/StrokedWells.tsx +2 -2
  146. package/src/hardware-sim/Labware/labwareInternals/StyledWells.tsx +2 -2
  147. package/src/hardware-sim/Labware/labwareInternals/Well.tsx +1 -2
  148. package/src/hardware-sim/Labware/labwareInternals/WellLabels.tsx +10 -11
  149. package/src/hardware-sim/Labware/labwareInternals/__tests__/LabwareWellLabels.test.tsx +2 -2
  150. package/src/hardware-sim/Labware/labwareInternals/__tests__/StrokedWells.test.tsx +2 -2
  151. package/src/hardware-sim/Labware/labwareInternals/__tests__/WellLabels.test.tsx +2 -2
  152. package/src/hardware-sim/Module/Module.stories.tsx +45 -15
  153. package/src/hardware-sim/Module/Thermocycler/index.tsx +2 -2
  154. package/src/hardware-sim/Module/index.tsx +41 -18
  155. package/src/hardware-sim/Pipette/PipetteRender.stories.tsx +2 -2
  156. package/src/hardware-sim/Pipette/PipetteRender.tsx +5 -7
  157. package/src/hardware-sim/Pipette/__tests__/PipetteRender.test.tsx +2 -2
  158. package/src/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.tsx +15 -14
  159. package/src/hardware-sim/RobotCoordinateSpace/robotcoordinatespace.module.css +3 -0
  160. package/src/hocs/withStyleProps.ts +53 -0
  161. package/src/hooks/useConditionalConfirm.ts +15 -5
  162. package/src/icons/Icon.tsx +38 -29
  163. package/src/icons/ModuleIcon.tsx +5 -3
  164. package/src/icons/icon-data.ts +26 -2
  165. package/src/icons/icon.module.css +10 -0
  166. package/src/index.module.css +1 -0
  167. package/src/instrument/InstrumentDiagram.tsx +0 -2
  168. package/src/instrument/PipetteSelect.module.css +3 -3
  169. package/src/instrument/index.ts +0 -2
  170. package/src/legacy-hardware-sim/LabwareNameOverlay.module.css +5 -5
  171. package/src/legacy-hardware-sim/ModuleItem.module.css +19 -19
  172. package/src/legacy-hardware-sim/index.ts +0 -1
  173. package/src/lists/index.ts +0 -1
  174. package/src/lists/lists.module.css +23 -23
  175. package/src/modals/modals.module.css +55 -55
  176. package/src/molecules/CustomizeExpandButton/__tests__/CustomizeExpandButton.test.tsx +88 -0
  177. package/src/molecules/CustomizeExpandButton/index.tsx +189 -0
  178. package/src/molecules/DeckInfoLabel/DeckInfoLabel.stories.tsx +10 -6
  179. package/src/molecules/DeckInfoLabel/__tests__/DeckInfoLabel.test.tsx +15 -11
  180. package/src/molecules/DeckInfoLabel/deckinfolabel.module.css +42 -0
  181. package/src/molecules/DeckInfoLabel/index.tsx +36 -62
  182. package/src/molecules/DropdownMenu/index.tsx +17 -13
  183. package/src/molecules/InfoScreen/index.tsx +6 -2
  184. package/src/molecules/ReleaseNotes/styles.module.css +15 -15
  185. package/src/molecules/index.ts +2 -1
  186. package/src/nav/SidePanel.module.css +6 -6
  187. package/src/organisms/CommandText/__tests__/CommandText.test.tsx +12 -12
  188. package/src/organisms/CommandText/index.tsx +2 -2
  189. package/src/organisms/CommandText/useCommandTextString/index.ts +2 -2
  190. package/src/organisms/CommandText/useCommandTextString/utils/__tests__/getFinalLabwareLocation.test.ts +4 -4
  191. package/src/organisms/CommandText/useCommandTextString/utils/commandText/__tests__/getPipettingCommandText.test.tsx +3 -3
  192. package/src/organisms/CommandText/useCommandTextString/utils/commandText/getFlexStackerCommandText.ts +2 -4
  193. package/src/organisms/CommandText/useCommandTextString/utils/commandText/getMoveToWellCommandText.ts +19 -3
  194. package/src/organisms/CommandText/useCommandTextString/utils/commandText/getPipettingCommandText.ts +19 -10
  195. package/src/organisms/CommandText/useCommandTextString/utils/getLabwareDefinitionsFromCommands.ts +9 -9
  196. package/src/organisms/CommandText/useCommandTextString/utils/getLabwareLocation.tsx +3 -3
  197. package/src/organisms/CommandText/useCommandTextString/utils/getLabwareName.ts +2 -2
  198. package/src/organisms/DeckLabelSet/index.tsx +1 -3
  199. package/src/organisms/FixtureOption/__tests__/FixtureOption.test.tsx +0 -2
  200. package/src/organisms/FixtureOption/index.tsx +42 -71
  201. package/src/organisms/ProtocolDeck/index.tsx +118 -0
  202. package/src/organisms/ProtocolTimelineScrubber/CommandItem.tsx +2 -2
  203. package/src/organisms/ProtocolTimelineScrubber/PipetteVisuals.tsx +1 -1
  204. package/src/organisms/ProtocolTimelineScrubber/utils.ts +3 -3
  205. package/src/organisms/index.ts +1 -0
  206. package/src/primitives/ForeignObject.tsx +20 -61
  207. package/src/primitives/style-props.ts +1 -0
  208. package/src/slotmap/styles.module.css +1 -1
  209. package/src/structure/Pill.module.css +1 -1
  210. package/src/structure/Splash.module.css +1 -1
  211. package/src/structure/index.ts +2 -4
  212. package/src/structure/structure.module.css +11 -11
  213. package/src/styles/colors.module.css +1 -0
  214. package/src/styles/global.css +179 -0
  215. package/src/styles/index.module.css +1 -1
  216. package/src/styles/typography.module.css +1 -0
  217. package/src/testing/utils/renderWithProviders.tsx +3 -6
  218. package/src/tooltips/tooltips.module.css +14 -14
  219. package/vite.config.mts +6 -3
  220. package/lib/atoms/ListButton/ListButtonChildren/ListButtonRadioButton.d.ts +0 -14
  221. package/lib/hardware-sim/DeckConfigurator/AbsorbanceReaderFixture.d.ts +0 -10
  222. package/lib/hardware-sim/DeckConfigurator/EmptyConfigFixture.d.ts +0 -8
  223. package/lib/hardware-sim/DeckConfigurator/FlexStackerFixture.d.ts +0 -11
  224. package/lib/hardware-sim/DeckConfigurator/HeaterShakerFixture.d.ts +0 -10
  225. package/lib/hardware-sim/DeckConfigurator/MagneticBlockFixture.d.ts +0 -11
  226. package/lib/hardware-sim/DeckConfigurator/StagingAreaConfigFixture.d.ts +0 -10
  227. package/lib/hardware-sim/DeckConfigurator/TemperatureModuleFixture.d.ts +0 -10
  228. package/lib/hardware-sim/DeckConfigurator/ThermocyclerFixture.d.ts +0 -10
  229. package/lib/hardware-sim/DeckConfigurator/TrashBinConfigFixture.d.ts +0 -10
  230. package/lib/hardware-sim/DeckConfigurator/WasteChuteConfigFixture.d.ts +0 -11
  231. package/lib/hardware-sim/utils.d.ts +0 -3
  232. package/lib/instrument/InstrumentGroup.d.ts +0 -11
  233. package/lib/instrument/InstrumentInfo.d.ts +0 -18
  234. package/lib/legacy-hardware-sim/ModuleItem.d.ts +0 -17
  235. package/lib/lists/TitledList.d.ts +0 -44
  236. package/lib/structure/Card.d.ts +0 -18
  237. package/src/atoms/ListButton/ListButtonChildren/ListButtonRadioButton.tsx +0 -109
  238. package/src/atoms/ListButton/__tests__/ListButtonRadioButton.test.tsx +0 -28
  239. package/src/hardware-sim/utils.ts +0 -18
  240. package/src/instrument/InstrumentDiagram.stories.tsx +0 -43
  241. package/src/instrument/InstrumentGroup.stories.tsx +0 -89
  242. package/src/instrument/InstrumentGroup.tsx +0 -35
  243. package/src/instrument/InstrumentInfo.tsx +0 -106
  244. package/src/instrument/__tests__/InstrumentInfo.test.tsx +0 -58
  245. package/src/instrument/instrument.module.css +0 -45
  246. package/src/legacy-hardware-sim/ModuleItem.tsx +0 -145
  247. package/src/lists/TitledList.tsx +0 -154
  248. package/src/structure/Card.stories.tsx +0 -29
  249. package/src/structure/Card.tsx +0 -65
  250. /package/lib/atoms/{ListButton/__tests__/ListButtonRadioButton.test.d.ts → AnimationVideo/__tests__/AnimationVideo.test.d.ts} +0 -0
  251. /package/lib/{instrument/__tests__/InstrumentInfo.test.d.ts → atoms/buttons/__tests__/BasicButton.test.d.ts} +0 -0
@@ -1,19 +1,12 @@
1
- import { SLOT_RENDER_HEIGHT, SLOT_RENDER_WIDTH } from '@opentrons/shared-data'
1
+ import { getLabwareViewBox } from '@opentrons/shared-data'
2
2
 
3
3
  import { COLORS } from '../../../helix-design-system'
4
4
  import { getTiprackBackgroundColor } from './getTiprackBackgroundColor'
5
5
 
6
- import type { CSSProperties } from 'styled-components'
7
- import type { SVGProps } from 'react'
8
- import type { LabwareDefinition2 } from '@opentrons/shared-data'
6
+ import type { CSSProperties, SVGProps } from 'react'
7
+ import type { LabwareDefinition } from '@opentrons/shared-data'
9
8
 
10
- export interface LabwareOutlineProps {
11
- /** Labware definition to outline */
12
- definition?: LabwareDefinition2
13
- /** x dimension in mm of this labware, used if definition doesn't supply dimensions, defaults to 127.76 */
14
- width?: number
15
- /** y dimension in mm of this labware, used if definition doesn't supply dimensions, defaults to 85.48 */
16
- height?: number
9
+ export type LabwareOutlineProps = {
17
10
  /** if this labware is a tip rack, darken background and lighten borderx dimension in mm of this labware, used if definition doesn't supply dimensions, defaults to false */
18
11
  isTiprack?: boolean
19
12
  /** adds thicker blue border with blur to labware, defaults to false */
@@ -24,6 +17,24 @@ export interface LabwareOutlineProps {
24
17
  stroke?: CSSProperties['stroke']
25
18
  fill?: CSSProperties['fill']
26
19
  showRadius?: boolean
20
+ } & (DefinitionProps | DefinitionReplacementProps)
21
+
22
+ interface DefinitionProps {
23
+ /** Labware definition to outline */
24
+ definition: LabwareDefinition
25
+ }
26
+
27
+ /** Used for rendering an outline without needing a full labware definition. */
28
+ interface DefinitionReplacementProps {
29
+ definition?: undefined
30
+ /** x dimension in mm of the outline. */
31
+ width: number
32
+ /** y dimension in mm of the outline. */
33
+ height: number
34
+ /** minimum x-coordinate (i.e. the left side) of the outline. */
35
+ minX: number
36
+ /** minimum y-coordinate (i.e. the bottom) of the outline. */
37
+ minY: number
27
38
  }
28
39
 
29
40
  const OUTLINE_THICKNESS_MM = 1
@@ -31,8 +42,6 @@ const OUTLINE_THICKNESS_MM = 1
31
42
  export function LabwareOutline(props: LabwareOutlineProps): JSX.Element {
32
43
  const {
33
44
  definition,
34
- width = SLOT_RENDER_WIDTH,
35
- height = SLOT_RENDER_HEIGHT,
36
45
  isTiprack = false,
37
46
  highlight = false,
38
47
  highlightShadow = false,
@@ -40,10 +49,18 @@ export function LabwareOutline(props: LabwareOutlineProps): JSX.Element {
40
49
  fill,
41
50
  showRadius = true,
42
51
  } = props
43
- const {
44
- parameters = { isTiprack, loadName: '' },
45
- dimensions = { xDimension: width, yDimension: height },
46
- } = definition ?? {}
52
+
53
+ const { minX, minY, xDimension, yDimension } =
54
+ definition != null
55
+ ? getLabwareViewBox(definition)
56
+ : {
57
+ minX: props.minX,
58
+ minY: props.minY,
59
+ xDimension: props.width,
60
+ yDimension: props.height,
61
+ }
62
+
63
+ const { parameters = { isTiprack, loadName: '' } } = definition ?? {}
47
64
 
48
65
  let backgroundFill
49
66
  if (fill != null) {
@@ -86,8 +103,10 @@ export function LabwareOutline(props: LabwareOutlineProps): JSX.Element {
86
103
  </defs>
87
104
  <LabwareBorder
88
105
  borderThickness={2.2 * OUTLINE_THICKNESS_MM}
89
- xDimension={dimensions.xDimension}
90
- yDimension={dimensions.yDimension}
106
+ minX={minX}
107
+ minY={minY}
108
+ xDimension={xDimension}
109
+ yDimension={yDimension}
91
110
  filter={highlightShadow ? 'url(#feOffset)' : ''}
92
111
  stroke={COLORS.blue50}
93
112
  rx="8"
@@ -99,8 +118,10 @@ export function LabwareOutline(props: LabwareOutlineProps): JSX.Element {
99
118
  ) : (
100
119
  <LabwareBorder
101
120
  borderThickness={OUTLINE_THICKNESS_MM}
102
- xDimension={dimensions.xDimension}
103
- yDimension={dimensions.yDimension}
121
+ minX={minX}
122
+ minY={minY}
123
+ xDimension={xDimension}
124
+ yDimension={yDimension}
104
125
  stroke={stroke ?? (parameters.isTiprack ? '#979797' : COLORS.black90)}
105
126
  fill={backgroundFill}
106
127
  showRadius={showRadius}
@@ -112,6 +133,8 @@ export function LabwareOutline(props: LabwareOutlineProps): JSX.Element {
112
133
 
113
134
  interface LabwareBorderProps extends SVGProps<SVGRectElement> {
114
135
  borderThickness: number
136
+ minX: number
137
+ minY: number
115
138
  xDimension: number
116
139
  yDimension: number
117
140
  showRadius?: boolean
@@ -119,6 +142,8 @@ interface LabwareBorderProps extends SVGProps<SVGRectElement> {
119
142
  function LabwareBorder(props: LabwareBorderProps): JSX.Element {
120
143
  const {
121
144
  borderThickness,
145
+ minX,
146
+ minY,
122
147
  xDimension,
123
148
  yDimension,
124
149
  showRadius = true,
@@ -126,8 +151,8 @@ function LabwareBorder(props: LabwareBorderProps): JSX.Element {
126
151
  } = props
127
152
  return (
128
153
  <rect
129
- x={borderThickness}
130
- y={borderThickness}
154
+ x={minX + borderThickness}
155
+ y={minY + borderThickness}
131
156
  strokeWidth={2 * borderThickness}
132
157
  width={xDimension - 2 * borderThickness}
133
158
  height={yDimension - 2 * borderThickness}
@@ -5,7 +5,7 @@ import { TYPOGRAPHY } from '../../../ui-style-constants'
5
5
  import { RobotCoordsText } from '../../Deck'
6
6
 
7
7
  import type { MemoExoticComponent } from 'react'
8
- import type { LabwareDefinition2 } from '@opentrons/shared-data'
8
+ import type { LabwareDefinition } from '@opentrons/shared-data'
9
9
  import type { HighlightedWellLabels } from './types'
10
10
 
11
11
  // magic layout numbers to make the letters close to the edges of the labware
@@ -14,13 +14,13 @@ const LETTER_COLUMN_X_ADJUSTMENT = -4
14
14
  const NUMBER_COLUMN_Y_ADJUSTMENT = 2
15
15
 
16
16
  interface LabwareWellLabelsProps {
17
- definition: LabwareDefinition2
17
+ definition: LabwareDefinition
18
18
  highlightedWellLabels?: HighlightedWellLabels
19
19
  wellLabelColor?: string
20
20
  }
21
21
 
22
22
  const Labels = (props: {
23
- definition: LabwareDefinition2
23
+ definition: LabwareDefinition
24
24
  wells: string[]
25
25
  isLetterColumn?: boolean
26
26
  highlightedWellLabels?: HighlightedWellLabels
@@ -10,12 +10,12 @@ import { Well } from './Well'
10
10
 
11
11
  import type { CSSProperties } from 'styled-components'
12
12
  import type { MemoExoticComponent } from 'react'
13
- import type { LabwareDefinition2, LabwareWell } from '@opentrons/shared-data'
13
+ import type { LabwareDefinition, LabwareWell } from '@opentrons/shared-data'
14
14
  import type { WellMouseEvent, WellStroke } from './types'
15
15
 
16
16
  export interface StaticLabwareProps {
17
17
  /** Labware definition to render */
18
- definition: LabwareDefinition2
18
+ definition: LabwareDefinition
19
19
  /** Add thicker blurred blue border to labware, defaults to false */
20
20
  highlight?: boolean
21
21
  /** adds a drop shadow to the highlight border */
@@ -6,10 +6,10 @@ import { Well } from './Well'
6
6
 
7
7
  import type { CSSProperties } from 'styled-components'
8
8
  import type { MemoExoticComponent, ReactNode } from 'react'
9
- import type { LabwareDefinition2 } from '@opentrons/shared-data'
9
+ import type { LabwareDefinition } from '@opentrons/shared-data'
10
10
 
11
11
  export interface StrokedWellProps {
12
- definition: LabwareDefinition2
12
+ definition: LabwareDefinition
13
13
  strokeByWell: Record<string, CSSProperties['stroke']>
14
14
  }
15
15
 
@@ -4,7 +4,7 @@ import { COLORS } from '../../../helix-design-system'
4
4
  import { Well } from './Well'
5
5
 
6
6
  import type { CSSProperties, MemoExoticComponent } from 'react'
7
- import type { LabwareDefinition2 } from '@opentrons/shared-data'
7
+ import type { LabwareDefinition } from '@opentrons/shared-data'
8
8
  import type { WellGroup } from './types'
9
9
 
10
10
  type WellContents =
@@ -16,7 +16,7 @@ type WellContents =
16
16
  | 'selectedWell'
17
17
  export interface StyledWellProps {
18
18
  wellContents: WellContents
19
- definition: LabwareDefinition2
19
+ definition: LabwareDefinition
20
20
  wells: WellGroup
21
21
  }
22
22
 
@@ -6,10 +6,9 @@ import { COLORS } from '../../../helix-design-system'
6
6
 
7
7
  import type { CSSProperties, MemoExoticComponent, MouseEvent } from 'react'
8
8
  import type { LabwareWell } from '@opentrons/shared-data'
9
- import type { StyleProps } from '../../../primitives'
10
9
  import type { WellMouseEvent } from './types'
11
10
 
12
- export interface WellProps extends StyleProps {
11
+ export interface WellProps extends CSSProperties {
13
12
  /** Well Name (eg 'A1') */
14
13
  wellName: string
15
14
  /** well object from labware definition */
@@ -1,12 +1,14 @@
1
1
  import { memo } from 'react'
2
2
 
3
+ import { getSchema2Dimensions } from '@opentrons/shared-data'
4
+
3
5
  import { COLORS } from '../../../helix-design-system'
4
6
  import { C_BLACK, C_BLUE } from '../../../styles/colors'
5
7
  import { RobotCoordsText } from '../../Deck'
6
8
  import { WELL_LABEL_OPTIONS } from '../LabwareRender'
7
9
 
8
10
  import type { MemoExoticComponent } from 'react'
9
- import type { LabwareDefinition2 } from '@opentrons/shared-data'
11
+ import type { LabwareDefinition } from '@opentrons/shared-data'
10
12
  import type { WellLabelOption } from '../LabwareRender'
11
13
  import type { HighlightedWellLabels } from './types'
12
14
 
@@ -18,14 +20,14 @@ const LETTER_COLUMN_X_OUTSIDE = -4
18
20
  const NUMBER_COLUMN_Y_FROM_TOP_OUTSIDE = -5
19
21
 
20
22
  export interface WellLabelsProps {
21
- definition: LabwareDefinition2
23
+ definition: LabwareDefinition
22
24
  wellLabelOption: WellLabelOption
23
25
  highlightedWellLabels?: HighlightedWellLabels
24
26
  wellLabelColor?: string
25
27
  }
26
28
 
27
29
  const Labels = (props: {
28
- definition: LabwareDefinition2
30
+ definition: LabwareDefinition
29
31
  wells: string[]
30
32
  wellLabelOption: WellLabelOption
31
33
  isLetterColumn?: boolean
@@ -61,16 +63,13 @@ const Labels = (props: {
61
63
  y={
62
64
  props.isLetterColumn === true
63
65
  ? well.y
64
- : props.definition.dimensions.yDimension -
66
+ : getSchema2Dimensions(props.definition).yDimension -
65
67
  NUMBER_COLUMN_Y_FROM_TOP
66
68
  }
67
- style={{
68
- color: COLORS.grey50, // LEGACY --c-font-dark
69
- fontSize: '0.2rem', // LEGACY --fs-micro
70
- textAnchor: 'middle',
71
- dominantBaseline:
72
- props.isLetterColumn === true ? 'middle' : 'auto',
73
- }}
69
+ color={COLORS.grey50} // LEGACY --c-font-dark
70
+ fontSize="0.2rem" // LEGACY --fs-micro
71
+ textAnchor="middle"
72
+ dominantBaseline={props.isLetterColumn === true ? 'middle' : 'auto'}
74
73
  fill={
75
74
  highlightedWellLabels?.wells.includes(wellName) ?? false
76
75
  ? highlightColor
@@ -7,9 +7,9 @@ import { fixture12Trough as _fixture12Trough } from '@opentrons/shared-data'
7
7
 
8
8
  import { LabwareWellLabels } from '../LabwareWellLabels'
9
9
 
10
- import type { LabwareDefinition2 } from '@opentrons/shared-data'
10
+ import type { LabwareDefinition } from '@opentrons/shared-data'
11
11
 
12
- const troughFixture12 = _fixture12Trough as LabwareDefinition2
12
+ const troughFixture12 = _fixture12Trough as LabwareDefinition
13
13
 
14
14
  describe('LabwareWellLabels', () => {
15
15
  it('should render well labels', () => {
@@ -8,11 +8,11 @@ import { fixture12Trough } from '@opentrons/shared-data'
8
8
  import { StrokedWells } from '../StrokedWells'
9
9
  import { WellComponent as Well } from '../Well'
10
10
 
11
- import type { LabwareDefinition2 } from '@opentrons/shared-data'
11
+ import type { LabwareDefinition } from '@opentrons/shared-data'
12
12
 
13
13
  vi.mock('../Well')
14
14
 
15
- const troughFixture12 = fixture12Trough as LabwareDefinition2
15
+ const troughFixture12 = fixture12Trough as LabwareDefinition
16
16
 
17
17
  describe('StrokedWells', () => {
18
18
  it('should render a series of wells with the given stroke', () => {
@@ -8,9 +8,9 @@ import { fixture12Trough as _fixture12Trough } from '@opentrons/shared-data'
8
8
  import { WELL_LABEL_OPTIONS } from '../../LabwareRender'
9
9
  import { WellLabels } from '../WellLabels'
10
10
 
11
- import type { LabwareDefinition2 } from '@opentrons/shared-data'
11
+ import type { LabwareDefinition } from '@opentrons/shared-data'
12
12
 
13
- const troughFixture12 = _fixture12Trough as LabwareDefinition2
13
+ const troughFixture12 = _fixture12Trough as LabwareDefinition
14
14
 
15
15
  describe('WellLabels', () => {
16
16
  it('should render well labels outside of the labware', () => {
@@ -1,6 +1,8 @@
1
1
  import {
2
+ ABSORBANCE_READER_V1,
2
3
  fixture96Plate,
3
- getModuleDef2,
4
+ FLEX_STACKER_MODULE_V1,
5
+ getModuleDef,
4
6
  HEATERSHAKER_MODULE_V1,
5
7
  MAGNETIC_BLOCK_V1,
6
8
  MAGNETIC_MODULE_V1,
@@ -16,7 +18,7 @@ import { RobotCoordinateSpace } from '../RobotCoordinateSpace'
16
18
  import { Module as ModuleComponent } from './'
17
19
 
18
20
  import type { Meta, Story } from '@storybook/react'
19
- import type { LabwareDefinition2, ModuleModel } from '@opentrons/shared-data'
21
+ import type { LabwareDefinition, ModuleModel } from '@opentrons/shared-data'
20
22
 
21
23
  const moduleModels: ModuleModel[] = [
22
24
  TEMPERATURE_MODULE_V2,
@@ -27,8 +29,23 @@ const moduleModels: ModuleModel[] = [
27
29
  MAGNETIC_MODULE_V2,
28
30
  HEATERSHAKER_MODULE_V1,
29
31
  MAGNETIC_BLOCK_V1,
32
+ ABSORBANCE_READER_V1,
33
+ FLEX_STACKER_MODULE_V1,
30
34
  ]
31
35
 
36
+ const moduleModelOptions = {
37
+ 'Temperature Module V2': TEMPERATURE_MODULE_V2,
38
+ 'Temperature Module V1': TEMPERATURE_MODULE_V1,
39
+ 'Thermocycler Module V1': THERMOCYCLER_MODULE_V1,
40
+ 'Thermocycler Module V2': THERMOCYCLER_MODULE_V2,
41
+ 'Magnetic Module V1': MAGNETIC_MODULE_V1,
42
+ 'Magnetic Module V2': MAGNETIC_MODULE_V2,
43
+ 'Heater-Shaker Module V1': HEATERSHAKER_MODULE_V1,
44
+ 'Magnetic Block V1': MAGNETIC_BLOCK_V1,
45
+ 'Absorbance Reader V1': ABSORBANCE_READER_V1,
46
+ 'Flex Stacker Module V1': FLEX_STACKER_MODULE_V1,
47
+ }
48
+
32
49
  export default {
33
50
  title: 'Library/Molecules/Simulation/Module',
34
51
  } as Meta
@@ -39,53 +56,66 @@ const Template: Story<{
39
56
  hasLabware: boolean
40
57
  innerProps: {}
41
58
  }> = args => {
59
+ // Add null check and default to first module model if undefined
60
+ const moduleModel = args.model || moduleModels[0]
61
+
42
62
  return (
43
63
  <RobotCoordinateSpace height="100vh" width="100vw" viewBox="0 -50 200 320">
44
64
  <ModuleComponent
45
- def={getModuleDef2(args.model)}
65
+ def={getModuleDef(moduleModel)}
46
66
  x={0}
47
67
  y={0}
48
68
  innerProps={args.innerProps}
49
69
  orientation={args.orientation}
70
+ targetSlotId={null}
71
+ targetDeckId={null}
72
+ childrenPositioningMode="offsetToSlot"
50
73
  >
51
74
  {args.hasLabware ? (
52
- <LabwareRender definition={fixture96Plate as LabwareDefinition2} />
75
+ <LabwareRender
76
+ definition={fixture96Plate as LabwareDefinition}
77
+ positioningMode="passThrough"
78
+ />
53
79
  ) : null}
54
80
  </ModuleComponent>
55
81
  </RobotCoordinateSpace>
56
82
  )
57
83
  }
84
+
58
85
  export const Module = Template.bind({})
86
+ Module.args = {
87
+ model: TEMPERATURE_MODULE_V2,
88
+ orientation: 'left',
89
+ hasLabware: false,
90
+ innerProps: {
91
+ lidMotorState: 'open',
92
+ blockTargetTemp: 90,
93
+ targetTemperature: 4,
94
+ targetTemp: 40,
95
+ },
96
+ }
97
+
59
98
  Module.argTypes = {
60
99
  model: {
61
100
  control: {
62
101
  type: 'select',
63
- options: moduleModels,
64
102
  },
65
- defaultValue: moduleModels[0],
103
+ options: moduleModelOptions,
66
104
  },
67
105
  orientation: {
68
106
  control: {
69
107
  type: 'select',
70
- options: ['left', 'right'],
71
108
  },
72
- defaultValue: 'left',
109
+ options: ['left', 'right'],
73
110
  },
74
111
  hasLabware: {
75
112
  control: {
76
113
  type: 'boolean',
77
114
  },
78
- defaultValue: false,
79
115
  },
80
116
  innerProps: {
81
117
  control: {
82
118
  type: 'object',
83
119
  },
84
- defaultValue: {
85
- lidMotorState: 'open',
86
- blockTargetTemp: 90,
87
- targetTemperature: 4,
88
- targetTemp: 40,
89
- },
90
120
  },
91
121
  }
@@ -1,4 +1,4 @@
1
- import { getModuleDef2, THERMOCYCLER_MODULE_V1 } from '@opentrons/shared-data'
1
+ import { getModuleDef, THERMOCYCLER_MODULE_V1 } from '@opentrons/shared-data'
2
2
 
3
3
  import { BORDERS, COLORS } from '../../../helix-design-system'
4
4
  import { C_MED_LIGHT_GRAY } from '../../../styles'
@@ -17,7 +17,7 @@ export interface ThermocyclerVizProps {
17
17
 
18
18
  export function Thermocycler(props: ThermocyclerVizProps): JSX.Element {
19
19
  const { lidMotorState, blockTargetTemp, model } = props
20
- const def = getModuleDef2(model)
20
+ const def = getModuleDef(model)
21
21
  if (lidMotorState === 'unknown') {
22
22
  // just a rectangle if we don't know the state of the lid
23
23
  return (
@@ -5,7 +5,7 @@ import {
5
5
  HEATERSHAKER_MODULE_TYPE,
6
6
  MAGNETIC_BLOCK_TYPE,
7
7
  MAGNETIC_MODULE_TYPE,
8
- OT2_STANDARD_DECKID,
8
+ multiplyMatrices,
9
9
  TEMPERATURE_MODULE_TYPE,
10
10
  THERMOCYCLER_MODULE_TYPE,
11
11
  } from '@opentrons/shared-data'
@@ -21,7 +21,6 @@ import {
21
21
  SPACING_1,
22
22
  } from '../../styles'
23
23
  import { RobotCoordsForeignObject } from '../Deck'
24
- import { multiplyMatrices } from '../utils'
25
24
  import { FlexStacker } from './FlexStacker'
26
25
  import { HeaterShaker } from './HeaterShaker'
27
26
  import { MagneticBlock } from './MagneticBlock'
@@ -35,6 +34,7 @@ import type {
35
34
  ModuleDefinition,
36
35
  ThermocyclerModuleModel,
37
36
  } from '@opentrons/shared-data'
37
+ import type { FlexDirection } from '../Deck'
38
38
 
39
39
  export * from './Thermocycler'
40
40
 
@@ -51,9 +51,34 @@ interface Props {
51
51
  | ComponentProps<typeof Temperature>
52
52
  | {}
53
53
  statusInfo?: ReactNode // contents of small status rectangle, not displayed if absent
54
- children?: ReactNode // contents to be rendered on top of the labware mating surface of the module
55
- targetSlotId?: string
56
- targetDeckId?: string
54
+
55
+ children?: ReactNode
56
+
57
+ /**
58
+ * How child components should be positioned.
59
+ *
60
+ * "offsetToSlot" - The SVG origin of a child will be at the labware mating interface of the
61
+ * module, which is the front-left (-x, -y) corner of the slot on top of the module.
62
+ *
63
+ * todo(mm, 2025-07-21):
64
+ * 1. Add a "passThrough" mode that disables the "offsetToSlot" behavior,
65
+ * to allow child components to replace it with their own SVG transform,
66
+ * to support labware schema 3.
67
+ * 2. Migrate all existing call sites to use "passThrough".
68
+ * 3. Remove "offsetToSlot".
69
+ */
70
+ childrenPositioningMode: 'offsetToSlot'
71
+
72
+ /**
73
+ * Used for applying slot-specific positioning adjustments.
74
+ * If you're rendering the module on a deck, supply this for correct positioning.
75
+ */
76
+ targetSlotId: string | null
77
+ /**
78
+ * Used for applying slot-specific positioning adjustments.
79
+ * If you're rendering the module on a deck, supply this for correct positioning.
80
+ */
81
+ targetDeckId: string | null
57
82
  }
58
83
 
59
84
  const statusInfoWrapperProps = {
@@ -61,7 +86,7 @@ const statusInfoWrapperProps = {
61
86
  alignItems: ALIGN_CENTER,
62
87
  }
63
88
  const statusInfoFlexProps = {
64
- flexDirection: DIRECTION_COLUMN,
89
+ flexDirection: DIRECTION_COLUMN as FlexDirection,
65
90
  justifyContent: JUSTIFY_CENTER,
66
91
  backgroundColor: C_MED_LIGHT_GRAY,
67
92
  padding: SPACING_1,
@@ -80,8 +105,9 @@ export const Module = (props: Props): JSX.Element => {
80
105
  statusInfo,
81
106
  children,
82
107
  targetSlotId,
83
- targetDeckId = OT2_STANDARD_DECKID,
108
+ targetDeckId,
84
109
  } = props
110
+
85
111
  const moduleType = getModuleType(def.model)
86
112
 
87
113
  const { x: labwareOffsetX, y: labwareOffsetY } = def.labwareOffset
@@ -110,19 +136,16 @@ export const Module = (props: Props): JSX.Element => {
110
136
  let nestedLabwareOffsetY = labwareOffsetY
111
137
 
112
138
  // additional transforms to apply to vectors in certain deck/slot combinations
113
- const transformsForDeckBySlot = def?.slotTransforms?.[targetDeckId]
139
+ const transformsForDeckBySlot =
140
+ (targetDeckId != null ? def?.slotTransforms?.[targetDeckId] : null) ?? {}
114
141
  const slotTransformsForDeckSlot =
115
- targetSlotId != null &&
116
- transformsForDeckBySlot != null &&
117
- targetSlotId in transformsForDeckBySlot
118
- ? transformsForDeckBySlot[targetSlotId]
119
- : null
120
- const deckSpecificTransforms = slotTransformsForDeckSlot ?? {}
121
- if (deckSpecificTransforms?.cornerOffsetFromSlot != null) {
142
+ (targetSlotId != null ? transformsForDeckBySlot[targetSlotId] : null) ?? {}
143
+
144
+ if (slotTransformsForDeckSlot.cornerOffsetFromSlot != null) {
122
145
  const [
123
146
  [slotTranslateX],
124
147
  [slotTranslateY],
125
- ] = multiplyMatrices(deckSpecificTransforms.cornerOffsetFromSlot, [
148
+ ] = multiplyMatrices(slotTransformsForDeckSlot.cornerOffsetFromSlot, [
126
149
  [translateX],
127
150
  [translateY],
128
151
  [translateZ],
@@ -130,11 +153,11 @@ export const Module = (props: Props): JSX.Element => {
130
153
  ])
131
154
  offsetTransform = `translate(${slotTranslateX}, ${slotTranslateY})`
132
155
  }
133
- if (deckSpecificTransforms?.labwareOffset != null) {
156
+ if (slotTransformsForDeckSlot.labwareOffset != null) {
134
157
  const [
135
158
  [slotLabwareOffsetX],
136
159
  [slotLabwareOffsetY],
137
- ] = multiplyMatrices(deckSpecificTransforms.labwareOffset, [
160
+ ] = multiplyMatrices(slotTransformsForDeckSlot.labwareOffset, [
138
161
  [labwareOffsetX],
139
162
  [labwareOffsetY],
140
163
  [1],
@@ -7,7 +7,7 @@ import { LabwareRender } from '../Labware'
7
7
  import { PipetteRender } from './'
8
8
 
9
9
  import type { Meta, Story } from '@storybook/react'
10
- import type { LabwareDefinition2, PipetteName } from '@opentrons/shared-data'
10
+ import type { LabwareDefinition, PipetteName } from '@opentrons/shared-data'
11
11
 
12
12
  const DECK_MAP_VIEWBOX = '0 -140 230 230'
13
13
 
@@ -18,7 +18,7 @@ const axygenReservoir90ml = getAllLabwareDefs().axygen1Reservoir90MlV1
18
18
  const opentrons6TuberackNest50mlConical = getAllLabwareDefs()
19
19
  .opentrons6TuberackNest50MlConicalV1
20
20
 
21
- const labwareDefMap: Record<string, LabwareDefinition2> = {
21
+ const labwareDefMap: Record<string, LabwareDefinition> = {
22
22
  [opentrons300UlTiprack.metadata.displayName]: opentrons300UlTiprack,
23
23
  [opentrons10UlTiprack.metadata.displayName]: opentrons10UlTiprack,
24
24
  [nest12Reservoir15ml.metadata.displayName]: nest12Reservoir15ml,
@@ -13,10 +13,10 @@ import {
13
13
  import { EightEmanatingNozzles } from './EightEmanatingNozzles'
14
14
  import { EmanatingNozzle } from './EmanatingNozzle'
15
15
 
16
- import type { LabwareDefinition2, PipetteName } from '@opentrons/shared-data'
16
+ import type { LabwareDefinition, PipetteName } from '@opentrons/shared-data'
17
17
 
18
18
  interface PipetteRenderProps {
19
- labwareDef: LabwareDefinition2
19
+ labwareDef: LabwareDefinition
20
20
  pipetteName: PipetteName
21
21
  usingMetalProbe?: boolean
22
22
  }
@@ -63,11 +63,9 @@ export const PipetteRender = (props: PipetteRenderProps): JSX.Element => {
63
63
  y={y}
64
64
  outerProps={{ style: { overflow: 'visible' } }}
65
65
  innerDivProps={{
66
- style: {
67
- width: '100%',
68
- height: '100%',
69
- overflow: 'visible',
70
- },
66
+ width: '100%',
67
+ height: '100%',
68
+ overflow: 'visible',
71
69
  }}
72
70
  >
73
71
  <svg overflow="visible">
@@ -16,13 +16,13 @@ import { EmanatingNozzle } from '../EmanatingNozzle'
16
16
  import { PipetteRender } from '../PipetteRender'
17
17
 
18
18
  import type { ComponentProps } from 'react'
19
- import type { LabwareDefinition2 } from '@opentrons/shared-data'
19
+ import type { LabwareDefinition } from '@opentrons/shared-data'
20
20
 
21
21
  vi.mock('../../Deck/RobotCoordsForeignDiv')
22
22
  vi.mock('../EmanatingNozzle')
23
23
  vi.mock('../EightEmanatingNozzles')
24
24
 
25
- const fixtureTiprack300Ul = _fixtureTiprack300ul as LabwareDefinition2
25
+ const fixtureTiprack300Ul = _fixtureTiprack300ul as LabwareDefinition
26
26
 
27
27
  const render = (props: ComponentProps<typeof PipetteRender>) => {
28
28
  return renderWithProviders(<PipetteRender {...props} />)[0]